From patchwork Tue Nov 26 15:49:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Dunlap X-Patchwork-Id: 11262667 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84F0C1390 for ; Tue, 26 Nov 2019 15:50:27 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 608062071E for ; Tue, 26 Nov 2019 15:50:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="QQvpzAZJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 608062071E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iZd5j-00010F-EZ; Tue, 26 Nov 2019 15:49:27 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iZd5i-00010A-EA for xen-devel@lists.xenproject.org; Tue, 26 Nov 2019 15:49:26 +0000 X-Inumbo-ID: 52381ece-1064-11ea-a55d-bc764e2007e4 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 52381ece-1064-11ea-a55d-bc764e2007e4; Tue, 26 Nov 2019 15:49:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1574783365; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WDHowXEBmaspeCxoFzjj6/PTlaqGrurxKFq110N1yYA=; b=QQvpzAZJwih2VeNurQDZwhnfRXsqpn8yE72qgfpNH34dpi+p82dn/HCz dUAtV2t3Wd1k2Yw1/MFjsHf6lOea5IYiiEGJR89z0CQ31PUBVoVva/nKe MU5p/l3MN04OOH4cnJGrlFvDM0hMSl6MZuDI49ei6C0mQq10RCJoM2naO w=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=george.dunlap@citrix.com; spf=Pass smtp.mailfrom=George.Dunlap@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of george.dunlap@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="George.Dunlap@citrix.com"; x-sender="george.dunlap@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of George.Dunlap@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="George.Dunlap@citrix.com"; x-sender="George.Dunlap@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="George.Dunlap@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 1DjEAXIAg5sdG7CNgFV73mVHCqKcd7TJRlN8lp2+G0ilntRLiOxi4dNxiQmesVZkiDqzHzXne8 DIrf6pZ6+pcruNbL6Tpra9I8RCluBEHtzdTjhHNb78ST18FPBErfleCEFzoDTcjqMQOB4rn95/ dJwsjvlrpqUcuBSRg653+SKXu4jHBikuAkJU6mEPR5x86IkA9gOSvA0rROKhjBWyKQHPZd+CMN Cgz5dmVgR7Q/uAIlBBqriI2ArNXU/Qesxhbg92NfQ+Mtrb9WRmmYPXpIs2A/9uuL0J51iliRjV 1Qs= X-SBRS: 2.7 X-MesageID: 9403762 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,246,1571716800"; d="scan'208";a="9403762" From: George Dunlap To: Date: Tue, 26 Nov 2019 15:49:20 +0000 Message-ID: <20191126154920.2950420-1-george.dunlap@citrix.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-4.13 v2] docs/xl: Document pci-assignable state X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Wei Liu , Paul Durrant , George Dunlap , Jan Beulich , Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Changesets 319f9a0ba9 ("passthrough: quarantine PCI devices") and ba2ab00bbb ("IOMMU: default to always quarantining PCI devices") introduced PCI device "quarantine" behavior, but did not document how the pci-assignable-add and -remove functions act in regard to this. Rectify this. Signed-off-by: George Dunlap Release-acked-by: Juergen Gross Acked-by: Ian Jackson Acked-by: Wei Liu Reviewed-by: Paul Durrant --- Release justification: This brings documentation into line with the actual code that will be released. CC: Ian Jackson CC: Wei Liu CC: Jan Beulich CC: Paul Durrant CC: Juergen Gross --- docs/man/xl.1.pod.in | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in index 2303b81e4f..d4b5e8e362 100644 --- a/docs/man/xl.1.pod.in +++ b/docs/man/xl.1.pod.in @@ -1589,10 +1589,12 @@ backend driver in domain 0 rather than a real driver. =item B I Make the device at PCI Bus/Device/Function BDF assignable to guests. -This will bind the device to the pciback driver. If it is already -bound to a driver, it will first be unbound, and the original driver -stored so that it can be re-bound to the same driver later if desired. -If the device is already bound, it will return success. +This will bind the device to the pciback driver and assign it to the +"quarantine domain". If it is already bound to a driver, it will +first be unbound, and the original driver stored so that it can be +re-bound to the same driver later if desired. If the device is +already bound, it will assign it to the quarantine domain and return +success. CAUTION: This will make the device unusable by Domain 0 until it is returned with pci-assignable-remove. Care should therefore be taken @@ -1602,11 +1604,22 @@ being used. =item B [I<-r>] I -Make the device at PCI Bus/Device/Function BDF not assignable to guests. This -will at least unbind the device from pciback. If the -r option is specified, -it will also attempt to re-bind the device to its original driver, making it -usable by Domain 0 again. If the device is not bound to pciback, it will -return success. +Make the device at PCI Bus/Device/Function BDF not assignable to +guests. This will at least unbind the device from pciback, and +re-assign it from the "quarantine domain" back to domain 0. If the -r +option is specified, it will also attempt to re-bind the device to its +original driver, making it usable by Domain 0 again. If the device is +not bound to pciback, it will return success. + +Note that this functionality will work even for devices which were not +made assignable by B. This can be used to allow +dom0 to access devices which were automatically quarantined by Xen +after domain destruction as a result of Xen's B +command-line default. + +As always, this should only be done if you trust the guest, or are +confident that the particular device you're re-assigning to dom0 will +cancel all in-flight DMA on FLR. =item B I I