From nobody Wed May 8 13:04:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1576503406; cv=none; d=zohomail.com; s=zohoarc; b=ZeVJuHv9rv88W1yyLZEV8UknMNFeCFVBGY9uJE2IXkuy3latKqcWsOiuRYGK0hyewOyr4/2ChT2ytMcPw5uw1PBPG6Qq6R2SUVBOdY9JbqBBmkzWYuOK1vvy6YE8u4KKX4D1OunGGxU9+46+qFd277OaiwP+xphxfe0xWh/AF1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576503406; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PVQwWrnSMkC0IGoAuyJ3MNl/xca75WW/JRKHlPMBvDo=; b=h3FenyDO1ejKS6EEAfAyEclK0KQmKkPXB2x5RnZl6DwrbQaCET2b9Wnem3hNGSLIamLMX7bzQ93rjL6xSsSYXQKyh81SMev7ULYjWJUukMNDR7fMWlCZc130qal334OPz/BZ96O+AftX+k9q9/TQszQYgcbXgYOroI34ll8ZSwI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1576503406955712.2160377600319; Mon, 16 Dec 2019 05:36:46 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-G5EOFyhYMVi0EKL8hcvDcg-1; Mon, 16 Dec 2019 08:36:43 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E172106BC09; Mon, 16 Dec 2019 13:36:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1367A5C28C; Mon, 16 Dec 2019 13:36:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BD2FF18089CF; Mon, 16 Dec 2019 13:36:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xBGDaPCR007549 for ; Mon, 16 Dec 2019 08:36:25 -0500 Received: by smtp.corp.redhat.com (Postfix) id 27BDB1005401; Mon, 16 Dec 2019 13:36:25 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E28410BBCC4 for ; Mon, 16 Dec 2019 13:36:23 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F3C3F85A333 for ; Mon, 16 Dec 2019 13:36:22 +0000 (UTC) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-131-43Oq9yAQO0C2uRnoIz9udw-1; Mon, 16 Dec 2019 08:36:19 -0500 Received: by mail-qk1-f195.google.com with SMTP id z76so2182068qka.2; Mon, 16 Dec 2019 05:36:19 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:2f19:a73a:b6c3:c24a:90f3]) by smtp.gmail.com with ESMTPSA id r12sm2414002qkm.94.2019.12.16.05.36.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 05:36:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576503405; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=PVQwWrnSMkC0IGoAuyJ3MNl/xca75WW/JRKHlPMBvDo=; b=P6hGAxWrbDCOJgZ7FCKaLBXMm7hgMUN8DrxYfZcmoAD7PXgqadx2TB3ek2c2/OxdKKyMQR wDpCFA/0/xtUtFr1YY4MEyl+0DlFqoTX6mZPJQHpKxIxXwEmshrTw7dJOrhQLizbxPuOS1 1ilLcEAtpgTKRiSLCu4BUgG4aesCIwY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5FWpY9oh2Q5aOFqcRfaYBd4a1QsG+6tE3JLpfpXfx5I=; b=OZFNyV09G/S1GLg4t8mgmbOwAGrFbTQpWDk3x3YNx0cjbWzD0C1EDUKrHZG+dAS686 QaHSw0dWb4DRmYJkJxsUIr4XqIK5WCmYSRFF2OY6ZqFtzUsqJ1D9W1t2hub2JV0dm5Ke od3gSh7ZgSXZCHt6amLffzXbfLATMEwdYJ4mJqOBJjQulpOCoyzUUO8ducNKTF/2l3k0 cOYdasfYHRn/PN0CV0aafNmnSwYDpuijof9sS+5ck5Wym+yjTMNHXCEOcxuTH3an++uU oG3RcXYxflNtPT8osCcVswa7Pt7lcb+CM3b1JYJRA1kVXOHkk1MNwCmP6JI/CLDix3qM EodA== X-Gm-Message-State: APjAAAWy8wImHnYkeWtaqTXVc18aq0q+aqoY1X/V3Bm7mcvPhlC0hKd2 Ccq7zKD6/VJRyuUnJsuidXSdHyLM X-Google-Smtp-Source: APXvYqx248wUlLNddonvSC+SEQTNUd9oTHQC0a5bT9dbF/KPtFJ72w6xYYwAkiSJXFH/YM7WiqU7+Q== X-Received: by 2002:a37:a18b:: with SMTP id k133mr27157858qke.83.1576503378385; Mon, 16 Dec 2019 05:36:18 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 16 Dec 2019 10:36:03 -0300 Message-Id: <20191216133607.3055202-2-danielhb413@gmail.com> In-Reply-To: <20191216133607.3055202-1-danielhb413@gmail.com> References: <20191216133607.3055202-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: 43Oq9yAQO0C2uRnoIz9udw-1 X-MC-Unique: G5EOFyhYMVi0EKL8hcvDcg-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id xBGDaPCR007549 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , laine@laine.org, darkstego@gmail.com, crobinso@redhat.com Subject: [libvirt] [PATCH v4 1/5] Introducing new address type='unassigned' for PCI hostdevs X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Today, to use a PCI hostdev "A" in a domain, all PCI devices that belongs to the same IOMMU group must also be declared in the domain XML, meaning that all IOMMU devices are detached from the host and all of them are visible to the guest. The result is that the guest will have access to all devices, but this is not necessarily what the administrator wanted. If only the hostdev "A" was intended for guest usage, but hostdevs "B" and "C" happened to be in the same IOMMU group of "A", the guest will gain access to all 3 devices. This makes the administrator rely on alternative solutions, such as use all hostdevs with un-managed mode and detached all the IOMMU before the guest starts. If use un-managed mode is not an option, the only alternative left is an ACS patch to deny guest access to "B" and "C". This patch introduces a new address type called "unassigned" to handle this situation where a hostdev will be owned by a domain, but not visible to the guest OS. This allows the administrator to declare all the IOMMU while also choosing which hostdevs will be usable by the guest. This new mechanic applies to all PCI hostdevs, regardless of whether they are a PCI multifunction hostdev or not. Using
in any case other than a PCI hostdev will result in error. Next patch will use this new address type in the QEMU driver to avoid adding unassigned devices to the QEMU launch command line. Signed-off-by: Daniel Henrique Barboza --- docs/schemas/domaincommon.rng | 5 ++ src/conf/device_conf.c | 2 + src/conf/device_conf.h | 1 + src/conf/domain_conf.c | 7 ++- src/qemu/qemu_command.c | 1 + src/qemu/qemu_domain.c | 1 + src/qemu/qemu_domain_address.c | 5 ++ .../hostdev-pci-address-unassigned.xml | 42 ++++++++++++++ .../hostdev-pci-address-unassigned.xml | 58 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 10 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/hostdev-pci-address-unassigned.x= ml create mode 100644 tests/qemuxml2xmloutdata/hostdev-pci-address-unassigned= .xml diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index f5b51d20ad..372d248f25 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5470,6 +5470,11 @@ + + + unassigned + + diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index 4c57f0995f..4dbd5c1ac9 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -45,6 +45,7 @@ VIR_ENUM_IMPL(virDomainDeviceAddress, "virtio-mmio", "isa", "dimm", + "unassigned", ); =20 static int @@ -120,6 +121,7 @@ virDomainDeviceInfoAddressIsEqual(const virDomainDevice= Info *a, /* address types below don't have any specific data */ case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390: + case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED: break; =20 case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h index d98fae775c..e091d7cfe2 100644 --- a/src/conf/device_conf.h +++ b/src/conf/device_conf.h @@ -45,6 +45,7 @@ typedef enum { VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_ISA, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DIMM, + VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED, =20 VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST } virDomainDeviceAddressType; diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index cfec86a24d..454eb63be6 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6338,9 +6338,11 @@ virDomainHostdevDefValidate(const virDomainHostdevDe= f *hostdev) switch ((virDomainHostdevSubsysType) hostdev->source.subsys.type) { case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI: if (hostdev->info->type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NO= NE && + hostdev->info->type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UN= ASSIGNED && hostdev->info->type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PC= I) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("PCI host devices must use 'pci' address = type")); + _("PCI host devices must use 'pci' or " + "'unassigned' address type")); return -1; } break; @@ -7357,6 +7359,7 @@ virDomainDeviceInfoFormat(virBufferPtr buf, =20 case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE: + case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST: break; } @@ -7557,6 +7560,7 @@ virDomainDeviceAddressParseXML(xmlNodePtr address, break; =20 case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE: + case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST: break; } @@ -21871,6 +21875,7 @@ virDomainDeviceInfoCheckABIStability(virDomainDevic= eInfoPtr src, case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE: + case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST: break; } diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 49a0dad8d4..5d12ef3d63 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -461,6 +461,7 @@ qemuBuildVirtioDevStr(virBufferPtr buf, return -1; =20 case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE: + case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST: default: virReportEnumRangeError(virDomainDeviceAddressType, info->type); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index df21065e84..b3df2c4a7a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7456,6 +7456,7 @@ qemuDomainDeviceDefValidateAddress(const virDomainDev= iceDef *dev, case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_ISA: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DIMM: + case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED: /* No validation for these address types yet */ break; =20 diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 605984f80f..b077240899 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2313,6 +2313,11 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, continue; } =20 + /* do not reserve address for info->type=3D'unassigned' */ + if (def->hostdevs[i]->info->type =3D=3D + VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED) + continue; + if (qemuDomainPCIAddressReserveNextAddr(addrs, def->hostdevs[i]->info) < = 0) goto error; diff --git a/tests/qemuxml2argvdata/hostdev-pci-address-unassigned.xml b/te= sts/qemuxml2argvdata/hostdev-pci-address-unassigned.xml new file mode 100644 index 0000000000..9a2685ca0e --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-pci-address-unassigned.xml @@ -0,0 +1,42 @@ + + delete + 583a8e8e-f0ce-4f53-89ab-092862148b25 + 262144 + 4 + + hvm + + + /usr/bin/qemu-system-x86_64 + + + + + + + + +
+ + + + + +
+ +
+ + + + +
+ + + + + +
+ + + + diff --git a/tests/qemuxml2xmloutdata/hostdev-pci-address-unassigned.xml b/= tests/qemuxml2xmloutdata/hostdev-pci-address-unassigned.xml new file mode 100644 index 0000000000..2341e8432b --- /dev/null +++ b/tests/qemuxml2xmloutdata/hostdev-pci-address-unassigned.xml @@ -0,0 +1,58 @@ + + delete + 583a8e8e-f0ce-4f53-89ab-092862148b25 + 262144 + 262144 + 4 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + + + + +
+ +
+ + + + +
+ +
+ + + + +
+ +
+ + + + +
+ +
+ + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 50b43e01d4..c02791c660 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -431,6 +431,7 @@ mymain(void) =20 DO_TEST("hostdev-usb-address", NONE); DO_TEST("hostdev-pci-address", NONE); + DO_TEST("hostdev-pci-address-unassigned", NONE); DO_TEST("hostdev-pci-multifunction", NONE); DO_TEST("hostdev-vfio", NONE); DO_TEST("hostdev-vfio-zpci", --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 8 13:04:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1576503425; cv=none; d=zohomail.com; s=zohoarc; b=ijrJTv0az32lV3K+A8JA+rOyRIdf7MqZWT3ST27ISDfsUz6cEc439ZFq6rP5XBHEMKe74h44uWusiRbLc0IwJFSe1x1Vkq/ty3KdenI8PtuwtVvtMZs4Ht0j41ieRmFJ9T0QEZKu5h1hkd9sw0by6hvY0ZEm4ic+IwucjfLtbLg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576503425; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FGaMLRFzF74ijZ6x0/ZqcgJFXV4aKXe9Bvv4NZRkrYk=; b=FqjjXhQSnbKa4mJr0oywo5i2bsKLQUH4foJrFiiKsLsNMDuh9GZPoDdEzq+ka4zrs6jj2lE6bLwdoomEUUSerg2kuHczv1YLgHSLy5O8NLeJP6wWTvFwuJJVGEXEdK4FknG2kd/nQl8pkQiGZ8gtwryQMKlVftpoBfAzaH8SRBw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1576503425654293.00801127126454; Mon, 16 Dec 2019 05:37:05 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-123-CA5-IMlyM4CwwHEemUVq4A-1; Mon, 16 Dec 2019 08:36:34 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1E7CC802CB6; Mon, 16 Dec 2019 13:36:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E871E1000329; Mon, 16 Dec 2019 13:36:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8E67DADAAE; Mon, 16 Dec 2019 13:36:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xBGDaR8R007565 for ; Mon, 16 Dec 2019 08:36:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 333802063FF2; Mon, 16 Dec 2019 13:36:27 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E5B42026D68 for ; Mon, 16 Dec 2019 13:36:23 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5CEC6801E65 for ; Mon, 16 Dec 2019 13:36:23 +0000 (UTC) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-202-MHP2ZlTeN8ubpdiKA_g20g-1; Mon, 16 Dec 2019 08:36:21 -0500 Received: by mail-qt1-f194.google.com with SMTP id d5so4235698qto.0; Mon, 16 Dec 2019 05:36:20 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:2f19:a73a:b6c3:c24a:90f3]) by smtp.gmail.com with ESMTPSA id r12sm2414002qkm.94.2019.12.16.05.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 05:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576503422; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=FGaMLRFzF74ijZ6x0/ZqcgJFXV4aKXe9Bvv4NZRkrYk=; b=gaZjNrQVh3CY0Yj6kldu4wNsEQazcKYoLNj3VVTVihbr8XPyMsUXMCTw0PEMXa7U5xd/qm V3ORXF7x/4eR5AqkLTpVSIBNQTO71RkuFU1p2GhIT84GytpIxSXLPzyzgrOj7lZ9utpRLn 6HdACk1Tjh8rDUq5AZgwtcg9oCqB1Tk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WOgVYmUuW96m3UrI6C+uhSOPJ4BwI4GsUd6ENeuujd4=; b=ShQ346qVuexIUF34lkMmICdVO7/XXlTY2TuNT22fqXTTRmYRn/JCzNRzLa7Slx6c8s 9T6tk+qIeF2XsK+OBObgZOXde95wNNmt/PZnEo6FsszlEnPE4wu7GYUZDK5RuMDFV2xW m5OHb19bOaR6AvMRv1mwiuH53tQ0LIogBv9Co1PYw9UdGzzsMrrH2ZILRaKQ+gLYau/x s7N0TUMuWYuRwJ8ICFJT+xPZXpA9g1V7Lz85C/fGhQRkj4vLK/rWaFSqHnVGbJmm2sLs XUIIjX7idgcRHG7vKQM1KkQX0ajxQlZ3kDRSEmEFKz0pdDnHoeYPn92CeAAzpWLinWvW vyew== X-Gm-Message-State: APjAAAXfr0RIadDCoqGqq2m70ydjSQMkw3YzJZuhuf9X6EkR8Y+QlG+V FomR+wOMepb4PCQRz+Pj9QXKUJCX X-Google-Smtp-Source: APXvYqw23J+ulZMfHSZXq0ed3tWZQLfVs9cij1d+vRitgjl2N7fRF/qtKInE+HXpQ7HwykO523Vmew== X-Received: by 2002:ac8:7956:: with SMTP id r22mr8377169qtt.16.1576503380355; Mon, 16 Dec 2019 05:36:20 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 16 Dec 2019 10:36:04 -0300 Message-Id: <20191216133607.3055202-3-danielhb413@gmail.com> In-Reply-To: <20191216133607.3055202-1-danielhb413@gmail.com> References: <20191216133607.3055202-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: MHP2ZlTeN8ubpdiKA_g20g-1 X-MC-Unique: CA5-IMlyM4CwwHEemUVq4A-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id xBGDaR8R007565 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , laine@laine.org, darkstego@gmail.com, crobinso@redhat.com Subject: [libvirt] [PATCH v4 2/5] qemu: handle unassigned PCI hostdevs in command line X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Previous patch made it possible for the QEMU driver to check if a given PCI hostdev is unassigned, by checking if dev->info->type is VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED, meaning that this device shouldn't be part of the actual guest launch. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c | 4 +++ .../hostdev-pci-address-unassigned.args | 31 +++++++++++++++++++ tests/qemuxml2argvtest.c | 4 +++ 3 files changed, 39 insertions(+) create mode 100644 tests/qemuxml2argvdata/hostdev-pci-address-unassigned.a= rgs diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5d12ef3d63..7f7331744f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5419,6 +5419,10 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd, } } =20 + /* Ignore unassigned devices */ + if (hostdev->info->type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_U= NASSIGNED) + continue; + unsigned int bootIndex =3D hostdev->info->bootIndex; =20 /* bootNet will be non-0 if boot order was set and no other diff --git a/tests/qemuxml2argvdata/hostdev-pci-address-unassigned.args b/t= ests/qemuxml2argvdata/hostdev-pci-address-unassigned.args new file mode 100644 index 0000000000..42fae17444 --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-pci-address-unassigned.args @@ -0,0 +1,31 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-delete \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-delete/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-delete/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-delete/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name delete \ +-S \ +-machine pc,accel=3Dkvm,usb=3Doff,dump-guest-core=3Doff \ +-m 256 \ +-realtime mlock=3Doff \ +-smp 4,sockets=3D4,cores=3D1,threads=3D1 \ +-uuid 583a8e8e-f0ce-4f53-89ab-092862148b25 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-delete/monitor.= sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-device vfio-pci,host=3D0005:90:01.0,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ +-device vfio-pci,host=3D0005:90:01.2,id=3Dhostdev2,bus=3Dpci.0,addr=3D0x4 \ +-device vfio-pci,host=3D0005:90:01.3,id=3Dhostdev3,bus=3Dpci.0,addr=3D0x5 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x6 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 8655db609e..92fbf3764e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1331,6 +1331,10 @@ mymain(void) QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_VFIO_PCI); =20 + DO_TEST("hostdev-pci-address-unassigned", + QEMU_CAPS_KVM, + QEMU_CAPS_DEVICE_VFIO_PCI); + DO_TEST("serial-file-log", QEMU_CAPS_CHARDEV_FILE_APPEND, QEMU_CAPS_DEVICE_ISA_SERIAL, --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 8 13:04:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1576503397; cv=none; d=zohomail.com; s=zohoarc; b=Tko1eNYGcIhoLp96Z31w8V+/z4+m8DjRmMERpeTyzlsT/86jjbd7Y+Yo4QvHuqeTSCWV+pCd5ob9Y8dIf4xzF8HqbrpeDkjfxSAmDFv9cPu5TLg300A2PTkcYVjKrniosowWU+/MQVi7/9RkZWg4khrMRY6sPI9/V2LvnZrzrHI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576503397; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bUjPFdWQrrwxueoVHK5TSKazSywhuE9d6JMAKwbQljY=; b=ZBcVO2jzDe5sKIlk0nIFTHgQNOPpfhdUmqRSh2AOPC+/BNWN9G9wOqJXYTO6KxPhfvKDOWmIAlAC8/qpStOUpjJWQ2nilycggmG8dqlcN/ib0a6VOf5wKYJsAe2xXHcnuVGCaUZ9WtWYTx5cWJGdM2cMT3l9cSfhFqiPiGwWsQI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 157650339744253.047392465071425; Mon, 16 Dec 2019 05:36:37 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-123-yyDzSTZSOFmpMai2SnKHXw-1; Mon, 16 Dec 2019 08:36:34 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BD81A104ED3D; Mon, 16 Dec 2019 13:36:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D6AA5C1D6; Mon, 16 Dec 2019 13:36:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4BD98ADAAB; Mon, 16 Dec 2019 13:36:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xBGDaQP5007558 for ; Mon, 16 Dec 2019 08:36:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id C81542063FF5; Mon, 16 Dec 2019 13:36:26 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C33D92026D68 for ; Mon, 16 Dec 2019 13:36:26 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A73AE85A333 for ; Mon, 16 Dec 2019 13:36:26 +0000 (UTC) Received: from mail-qv1-f66.google.com (mail-qv1-f66.google.com [209.85.219.66]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-219-hWcZIPk9OH2KiPXhZ_5k6w-1; Mon, 16 Dec 2019 08:36:23 -0500 Received: by mail-qv1-f66.google.com with SMTP id x1so1386376qvr.8; Mon, 16 Dec 2019 05:36:22 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:2f19:a73a:b6c3:c24a:90f3]) by smtp.gmail.com with ESMTPSA id r12sm2414002qkm.94.2019.12.16.05.36.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 05:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576503396; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=bUjPFdWQrrwxueoVHK5TSKazSywhuE9d6JMAKwbQljY=; b=MjCeujhKZCZkfH4UEtAMc6cC7fw+JqiPWg9WtgAVCwJntPWv4ScgNSovbLLgvMrxmZjdSV I2rGIju2762RRcoTM7ZNdiguqqfmiAYLe7UccfSm8Z2ZCAW/6yDwMFtdAaBPeS7/18kbeY idvSgUAMiFJrYutTMh9Hu376fbQIxeQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tigpZ7TRbDUY1H9PSts/IrB7bb+O+VLwwyKhCEzkx2U=; b=Uf0aRV60E9aLTeJvc+04VoiDrHO2smV++5TwiZC7P0gtD1hXqtwfHllqprkMttlgCJ sy0VLP8lJsCrSFNKeG+vDFmx9hPKlXn8YhyXNMfvT+bp3kDzifSz7BOOKawCwSLxygE5 3kczdLOs0Os0JPjmI4NuFzNYzDXd4DPwoFjexvxnHEm93EfnsOk/QXjIB3R6c+hbuClH GMmOseiQaRCfJ+HiQKCVONtBPpmZTt4roDNYzDJAP5chPuDZaw8eV2Hm2s1perjR+KWI Lc2OEuAzLFnii7Mf5pQJjlKndZ9zJaQwCewyCctH0OukEQeaUm6rgYIpVRknJnNbRd02 DycQ== X-Gm-Message-State: APjAAAXlcyDVHes3m4WRTBSC0bLc8gGXO0sIqN3MRS1EJMPsYg4nNA40 oi0T+oDf5RVSuVYYlTCDOlqrVjIX X-Google-Smtp-Source: APXvYqyVp4XjKpYv6yWSuM9PhA8YpDrLIcF+ck36jPJppqusY5C12dUMe7s4IQxbFBjiSoW1JFUWIw== X-Received: by 2002:ad4:4c42:: with SMTP id cs2mr26637448qvb.198.1576503382130; Mon, 16 Dec 2019 05:36:22 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 16 Dec 2019 10:36:05 -0300 Message-Id: <20191216133607.3055202-4-danielhb413@gmail.com> In-Reply-To: <20191216133607.3055202-1-danielhb413@gmail.com> References: <20191216133607.3055202-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: hWcZIPk9OH2KiPXhZ_5k6w-1 X-MC-Unique: yyDzSTZSOFmpMai2SnKHXw-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id xBGDaQP5007558 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , laine@laine.org, darkstego@gmail.com, crobinso@redhat.com Subject: [libvirt] [PATCH v4 3/5] virhostdev.c: check all IOMMU devs in virHostdevPreparePCIDevices X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" virHostdevPreparePCIDevices verifies if a PCI hostdev "A" is in use by another domain by checking the 'activePCIHostdevs' list. It also verifies if other domains are using any other hostdev that belongs to the same IOMMU of "A". This is not enough to cover all the cases. Suppose a PCI hostdev "B" that shares the IOMMU with "A". We are currently able to abort guest launch if "B" is being used by another domain, but if "B" is not being used by any domain, we'll proceed guest execution. What happens then is: if "A" is being used in managed mode, the guest will fail to launch because Libvirt didn't detach "B" from the host. If "A" is being used in un-managed mode, the guest might fail or succeed to launch depending on whether both "A" and "B" were detached manually prior to guest start. Libvirt is now able to deal with these scenarios in a homogeneous fashion, providing the same behavior for both managed and un-managed mode while allowing parcial assignment for both cases as well. This patch changes virHostdevPreparePCIDevices to check all the PCI hostdevs of the domain against all the PCI hostdevs of the IOMMU, failing to launch if the domain does not contain all the PCI hostdevs declared, in both managed and un-managed cases. After this patch, any existing domains that were using PCI hostdevs with un-managed mode, and were getting away with partial assignment without declaring all the IOMMU PCI hostdevs in the domain XML, will be forced to do so. The missing PCI hostdevs can be declared with "
" to keep them invisible to the guest, making the guest oblivious of this change. This is an annoyance for such domains, but the payoff is more consistency of behavior between managed and un-managed mode and more clarity on the domain XML, forcing the admin to declare all PCI hostdevs of the IOMMU and knowing exactly what will be detached from the host. This is an example of this newly added error condition when the domain does not declare all the PCI hostdevs of the same IOMMU: $ sudo ./run tools/virsh start multipci-coldplug-partial-fail error: Failed to start domain multipci-coldplug-partial-fail error: Requested operation is not valid: All devices of the same IOMMU grou= p 1 of the PCI device 0001:09:00.0 must belong to domain multipci-coldplug-partial= -fail $ Signed-off-by: Daniel Henrique Barboza --- src/util/virhostdev.c | 64 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 39e6b8f49f..2e7885112f 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -56,6 +56,13 @@ struct virHostdevIsPCINodeDeviceUsedData { bool usesVFIO; }; =20 +struct virHostdevIsAllIOMMUGroupUsedData { + virPCIDeviceListPtr pcidevs; + const char *domainName; + const char *deviceName; + int iommuGroup; +}; + /* This module makes heavy use of bookkeeping lists contained inside a * virHostdevManager instance to keep track of the devices' status. To make * it easy to spot potential ownership errors when moving devices from one @@ -111,6 +118,27 @@ static int virHostdevIsPCINodeDeviceUsed(virPCIDeviceA= ddressPtr devAddr, void *o return 0; } =20 +static int virHostdevIsAllIOMMUGroupUsed(virPCIDeviceAddressPtr devAddr, v= oid *opaque) +{ + struct virHostdevIsAllIOMMUGroupUsedData *helperData =3D opaque; + virPCIDevicePtr actual; + + actual =3D virPCIDeviceListFindByIDs(helperData->pcidevs, + devAddr->domain, devAddr->bus, + devAddr->slot, devAddr->function); + if (actual) { + return 0; + } else { + virReportError(VIR_ERR_OPERATION_INVALID, + _("All devices of the same IOMMU group %d of " + "the PCI device %s must belong to domain %s"), + helperData->iommuGroup, + helperData->deviceName, + helperData->domainName); + return -1; + } +} + static int virHostdevManagerOnceInit(void) { if (!VIR_CLASS_NEW(virHostdevManager, virClassForObject())) @@ -724,9 +752,10 @@ virHostdevPreparePCIDevices(virHostdevManagerPtr mgr, unsigned int flags) { g_autoptr(virPCIDeviceList) pcidevs =3D NULL; + g_autofree unsigned int *searchedIOMMUs =3D NULL; int last_processed_hostdev_vf =3D -1; - size_t i; - int ret =3D -1; + size_t i, j; + int ret =3D -1, nSearchedIOMMUs =3D 0; virPCIDeviceAddressPtr devAddr =3D NULL; =20 if (!nhostdevs) @@ -735,6 +764,8 @@ virHostdevPreparePCIDevices(virHostdevManagerPtr mgr, if (!(pcidevs =3D virHostdevGetPCIHostDeviceList(hostdevs, nhostdevs))) return -1; =20 + searchedIOMMUs =3D g_new0(unsigned int, virPCIDeviceListCount(pcidevs)= ); + virObjectLock(mgr->activePCIHostdevs); virObjectLock(mgr->inactivePCIHostdevs); =20 @@ -778,13 +809,32 @@ virHostdevPreparePCIDevices(virHostdevManagerPtr mgr, goto cleanup; =20 /* VFIO devices belonging to same IOMMU group can't be - * shared across guests. Check if that's the case. */ + * shared across guests, and all of the must belong to the + * same domain. If a device isn't going to be assigned + * (flag unassigned is true) the guest will not use it, but + * the actual device must be detached together from the host + * anyway. */ if (usesVFIO) { - data.usesVFIO =3D true; - if (virPCIDeviceAddressIOMMUGroupIterate(devAddr, - virHostdevIsPCINodeDe= viceUsed, - &data) < 0) + int devIOMMUGroup =3D virPCIDeviceAddressGetIOMMUGroupNum(devA= ddr); + struct virHostdevIsAllIOMMUGroupUsedData helper =3D { + pcidevs, dom_name, virPCIDeviceGetName(pci), devIOMMUGroup= }; + bool alreadySearched =3D false; + + for (j =3D 0; j < nSearchedIOMMUs; j++) { + if (devIOMMUGroup =3D=3D searchedIOMMUs[j]) { + alreadySearched =3D true; + break; + } + } + + if (alreadySearched) + continue; + + if (virPCIDeviceAddressIOMMUGroupIterate( + devAddr, virHostdevIsAllIOMMUGroupUsed, &helper) < 0) goto cleanup; + + searchedIOMMUs[nSearchedIOMMUs++] =3D devIOMMUGroup; } } =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 8 13:04:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1576503410; cv=none; d=zohomail.com; s=zohoarc; b=BpOadEBUl2+JCdTORmx4JQ+1nZqeC020S8syNncW4wHX789J4rj4djFy4LflCAP17b3i2rmNYGR+NOh7QdmIjB+gJYDfP5MHtHP5+Oj5XDF7gdGJfFUj23pDhupPJyKFhxi+JsLOcfJMXuWIa34b4q7Mez0L91J5pW5e7/EkFMM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576503410; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZqOzvELP3z9ptcglz8K+uxnSdd5K9I9IBe8iXyL9SIc=; b=etvybNRY19XrTafiPeOOSA/29gwD4349m24WWYQ1NKFxf5glWAPEeRmyWOzm8hk02uefvz8lh9AH3tkfhGjD8nJZNOcV7lOuJ9+JP9INxFhSZXwW4IqwL1BfC68wk4HSsr76Djs9220byo2uqmzFpZodn9qlhXDteKbd/LNKRXk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1576503410656549.9702511279794; Mon, 16 Dec 2019 05:36:50 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-425-nITNrKjuOu6L_NOAABGXrg-1; Mon, 16 Dec 2019 08:36:45 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9AA0285EE88; Mon, 16 Dec 2019 13:36:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 73B5F620A1; Mon, 16 Dec 2019 13:36:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 211ECADAB2; Mon, 16 Dec 2019 13:36:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xBGDaTQ9007573 for ; Mon, 16 Dec 2019 08:36:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5F4BE2166B2D; Mon, 16 Dec 2019 13:36:29 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5B5B82166B2A for ; Mon, 16 Dec 2019 13:36:27 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 07DFC8E5C57 for ; Mon, 16 Dec 2019 13:36:27 +0000 (UTC) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-421-Wni3GDDJOY6sEwRuZdwuUA-1; Mon, 16 Dec 2019 08:36:24 -0500 Received: by mail-qv1-f47.google.com with SMTP id x1so1386419qvr.8; Mon, 16 Dec 2019 05:36:24 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:2f19:a73a:b6c3:c24a:90f3]) by smtp.gmail.com with ESMTPSA id r12sm2414002qkm.94.2019.12.16.05.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 05:36:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576503409; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ZqOzvELP3z9ptcglz8K+uxnSdd5K9I9IBe8iXyL9SIc=; b=au2E0AErXc26UqtJF3K+gEGFOKX3xBi8iQIduDKKMNaDYIOpsMtsIXGQBHAJal8JDRo3S7 WKdQBz75KPK9EEpaCVC8TcebuJFRv3hQ+v2UB7WUEAsdIOsN3ABShga3HJBU1N/6lICS9P uDC/7Mb9rtV/sCwQt0d1EJyjdkiYIXs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Numln5020Ac8xjvO/DDg/XlQbr8q82vhxWQnfPXHzr4=; b=PQV5nCcUF1TsH5oBlGD0Mgj/Nunn+j2z8/JY9DEIEOLeXLsPMlUxLtVfcLJ07bdBpF HqI48mxPOaP2hNdAuJ9IzWVZriZO0gv18xSiLodzkaS6wz1qJxckRuLXbG+ew+S00Kvk NdZTQvqGOQBbQqfDb+S0TNyGkDLh1o2ptLtFuIzt9oFbU0Xgq+P3QWJHfxI7LBk2g09H 3wmOAea9227MH/adR09b3TB2Lhi8NzSCghAzwN4pUAxad+60US87SvSnyKLfcXSS6qKn Y+riNGVwWISAwJ8FcBhVXu46kXcZjQt/MNs9wrwgjMfO5wE1jnY1Jc8vz0AqHy+1NIS+ WfMA== X-Gm-Message-State: APjAAAUcD1CZ30MpJLt6WasArs722ufb3N4y+YaKA/cxeAGr8+JMc11O zc7nxZUurGTc7XiyJRbkTRpxfblk X-Google-Smtp-Source: APXvYqxfhetQk66zUmd23NyBMDDtp4172cDRlobUTspO2dbXHc//wMCBAUtb5CeZM6Z/fh8/URKr6A== X-Received: by 2002:a0c:f8ce:: with SMTP id h14mr956741qvo.91.1576503384028; Mon, 16 Dec 2019 05:36:24 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 16 Dec 2019 10:36:06 -0300 Message-Id: <20191216133607.3055202-5-danielhb413@gmail.com> In-Reply-To: <20191216133607.3055202-1-danielhb413@gmail.com> References: <20191216133607.3055202-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: Wni3GDDJOY6sEwRuZdwuUA-1 X-MC-Unique: nITNrKjuOu6L_NOAABGXrg-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id xBGDaTQ9007573 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , laine@laine.org, darkstego@gmail.com, crobinso@redhat.com Subject: [libvirt] [PATCH v4 4/5] formatdomain.html.in: document
X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index bfcdc026e6..281de89b10 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4152,6 +4152,20 @@ attributes: iobase and irq. Since 1.2.1 +
unassigned
+
For PCI hostdevs, <address type=3D'unassigned'/> + has a special meaning. A PCI hostdev must be assigned to the domain + with all the devices of its IOMMU group. If the admin so chooses, + it is possible to filter which devices the guest OS will actually + see, while the Libvirt domain is retaining ownership of all the + devices of the IOMMU group. Using this address type in such cases + will tell Libvirt that the device must not be assigned to the gues= t. + This avoids scenarios in which the admin might be compelled to use + a ACS patch to remove the device from the guest. + <address type=3D'unassigned'/> is an invalid ad= dress + type for all other device types. + Since 6.0.0 +
=20

Virtio-related options

--=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 8 13:04:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1576503409; cv=none; d=zohomail.com; s=zohoarc; b=eer4pSQXH/8s6tgcqi5xt5VIBYvdzqxDjaBfsvXeRlv6+rXN3rZEbycdTdeteC/Ww+hVXCQEQoVgnIjpi/RgiNrci2TsET/hBb3KBFX3x/SLvhH3MTtkocwPdNLHemgYQS6oVHU0ZgfRkcZ8vS1+JMicZQ31iImmRrqlufLrdWQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576503409; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jgEAY9fxRS3tn0xR90tfboXL7LCBRQrYVD/p+irCO14=; b=EQ+LR/Wc1uO79KToZVm4rvdw0Y7G1NteMiMA05ryg18ImdaEpsgfdXtUPO6rhEX8fMkSlHDC8itBhuJcg5mJV7Km+I7siPcv/0Zy2X2izA5jZmVNQb7QckPh8PtL+IF8AvwHIooUSJG8NQH6G4sTxssSW535BKkkgutaq/6LNs0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1576503409006991.1795161062056; Mon, 16 Dec 2019 05:36:49 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-184-OlHv02wcM5-_kk5NrTINpQ-1; Mon, 16 Dec 2019 08:36:46 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 85B778048F3; Mon, 16 Dec 2019 13:36:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4FE0B7C828; Mon, 16 Dec 2019 13:36:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CE3B418089CF; Mon, 16 Dec 2019 13:36:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xBGDaVav007585 for ; Mon, 16 Dec 2019 08:36:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0F6EC2063FF2; Mon, 16 Dec 2019 13:36:31 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0AAC72026D68 for ; Mon, 16 Dec 2019 13:36:31 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E464E1018C2B for ; Mon, 16 Dec 2019 13:36:30 +0000 (UTC) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-368-BqJNpYP2O4GvCoZhCTMt2g-1; Mon, 16 Dec 2019 08:36:26 -0500 Received: by mail-qv1-f47.google.com with SMTP id f16so508082qvi.4; Mon, 16 Dec 2019 05:36:26 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:2f19:a73a:b6c3:c24a:90f3]) by smtp.gmail.com with ESMTPSA id r12sm2414002qkm.94.2019.12.16.05.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 05:36:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576503407; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jgEAY9fxRS3tn0xR90tfboXL7LCBRQrYVD/p+irCO14=; b=AcZ6GYwmljkZe3EvyRTNttKOvIphXSLygtqEjYpkmPWjrWhG9veuy4JxyJvKXZQ0JU/qOy IuLe0iaqr7aSmSopO0k5zpB8gmKA37lf+1lU3X0U75MwH4ZxhTqjzjoc6uHuGNXBV4P8bp 9E6Nzz+IwtbxeZiy8JjhcNJph0dZca0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=o4Cv9RGIKlWrg8IXglhE7gVFL/FMZ33rxKLrwMFcSls=; b=e5H2EothVyGhJGp6E1WiyiFIxYaR/N+BeCWj+xXKlWGi6bSu0VYSXmRBXvGM4cFrVL Z5NcigWeUuSHR+4wtxSYAeH/rQ8Rgc2vGK4dX4vDECvr0YAeQKXaciDk/gCVhcpKh7qH Vdcs5WOJWecCs/kEju/JYYjuiZ1NluKPSDLtmrwmXwjZqdithiGOxRTNUra3iSfTfV7R z21WgDDKAME6HXpnU0vyROESQ9Mk2yzHuU2Wvs6biRsfPeeOMxEIeT7ij4wb22TYkB5U FZ/hBB2mxwr58UjskUWccLwEby3W860uuME9E9m7Oe7AJzBPUmB5eRMCy72sEignlUwW D54g== X-Gm-Message-State: APjAAAW+nZVI43IvqqM3ZjLrebfPcmiXXOw0vy5xp8/2SUWR6sflYa+Z f+HSVtNyuhXrk2fQCL1j5uK0lTl1 X-Google-Smtp-Source: APXvYqysJAcwYUckZRRuL080HVuCcsioJMyAvliJZLyG/jrWyRT3V66QUA87CsD866pPAjk0hbd8nA== X-Received: by 2002:a05:6214:8c3:: with SMTP id da3mr25686193qvb.249.1576503385768; Mon, 16 Dec 2019 05:36:25 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 16 Dec 2019 10:36:07 -0300 Message-Id: <20191216133607.3055202-6-danielhb413@gmail.com> In-Reply-To: <20191216133607.3055202-1-danielhb413@gmail.com> References: <20191216133607.3055202-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: BqJNpYP2O4GvCoZhCTMt2g-1 X-MC-Unique: OlHv02wcM5-_kk5NrTINpQ-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id xBGDaVav007585 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , laine@laine.org, darkstego@gmail.com, crobinso@redhat.com Subject: [libvirt] [PATCH v4 5/5] news.xml: add address type='unassigned' entry X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel Henrique Barboza --- docs/news.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 2a25b6ca49..e77cd743c8 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -54,6 +54,25 @@ written in the RST as an alternative to HTML. + + + new PCI hostdev address type: unassigned + + + A new PCI hostdev address type 'unassigned' is introduced, + giving users the option to choose which PCI hostdevs + within the same IOMMU group will not be assigned to the + guest. After this change, all PCI hostdevs of the same IOMMU + must be declared in the domain XML. Hostdevs that shouldn't + be used by the guest can be classified as + address type=3D'unassigned'. Forcing all IOMMU + hostdevs to be declared makes the user aware of what will + be detached from the host, and this new address type gives + the user an extra layer of access control of hardware + resources, denying guest access to PCI hostdevs that + it shouldn't have access to. + +
--=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list