From nobody Sun May 19 12:00:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1633080664242295.3545388071352; Fri, 1 Oct 2021 02:31:04 -0700 (PDT) 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-24-02xtFmxlNqaIKPjPbCWaoQ-1; Fri, 01 Oct 2021 05:30:28 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5691484A5E3; Fri, 1 Oct 2021 09:30:23 +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 26B835F4F3; Fri, 1 Oct 2021 09:30:23 +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 6AA591800B8B; Fri, 1 Oct 2021 09:30:21 +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 1919UKYh021891 for ; Fri, 1 Oct 2021 05:30:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2A88720C3A6D; Fri, 1 Oct 2021 09:30:20 +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 256F920C3A8D for ; Fri, 1 Oct 2021 09:30:20 +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-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 01340106655C for ; Fri, 1 Oct 2021 09:30:20 +0000 (UTC) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-224-FKTg_rBvNoyTAYu5GNnzvg-1; Fri, 01 Oct 2021 05:30:18 -0400 Received: by mail-pj1-f41.google.com with SMTP id v19so6123236pjh.2 for ; Fri, 01 Oct 2021 02:30:18 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.125.135]) by smtp.googlemail.com with ESMTPSA id c24sm6103972pgj.63.2021.10.01.02.30.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 02:30:16 -0700 (PDT) X-MC-Unique: 02xtFmxlNqaIKPjPbCWaoQ-1 X-MC-Unique: FKTg_rBvNoyTAYu5GNnzvg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/Vxcy0mxF3PRzXJZKHKTcSrBx/4YC8VfXgQHj+IpSO0=; b=nEeljS88L17TBl/nKOLK37neXlXcq0jgX09zCl4dcEcs+naCgMcc/Xh1UV83rfhqc+ 3rT3wG2KcDl8ExCNZia+3lWSvNykyLnwAZrXikKH6utxHhRKVtgm4QvKgIV5IFoZBfch u6tTeckSt8jKbw6oOjtQLWrfzt99LjnXBC2IDrXIdWVBh6C06nCf/kvtHHlMU1LoW4Wq hW3W2dAlP8VWKcyf7ypOXXq+BlxH8VKBDkEwfrC9f7nbAlqi1ig2H+TkK9IbigYwteD7 ww+QyKsvRjIFO20JapEDD6kvoDhqCIi1k3bRuUvaJLlEYIq3FlWWL6E0QKyVnBMoDEi+ kQbg== X-Gm-Message-State: AOAM531bpxp254W7cC9CDmF5+7sdP8ZnaP8uU6ESrC+YxFXy/Ok5iUiH xpj6NloGLu73w+qBbi1R/tQ0hQa2AoK6Gg== X-Google-Smtp-Source: ABdhPJzVmTlWnEd5zwNvF62oLwAmSQlH/dAAi9HxNyyxqdXosiNPfo9Z3XINuw6nOC94T6LyulzUpg== X-Received: by 2002:a17:90a:a88b:: with SMTP id h11mr12018771pjq.44.1633080616867; Fri, 01 Oct 2021 02:30:16 -0700 (PDT) From: Ani Sinha To: libvir-list@redhat.com Subject: [PATCH v7 1/4] qemu: capablities: detect presence of acpi-root-pci-hotplug for i440fx machines Date: Fri, 1 Oct 2021 14:59:45 +0530 Message-Id: <20211001092948.797485-2-ani@anisinha.ca> In-Reply-To: <20211001092948.797485-1-ani@anisinha.ca> References: <20211001092948.797485-1-ani@anisinha.ca> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Ani Sinha , jusual@redhat.com, laine@redhat.com 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1633080665967100001 Content-Type: text/plain; charset="utf-8" The following change in qemu added support for a global boolean flag specif= ic to i440fx machines that would turn off or on acpi based hotplug for pci root bus: 3d7e78aa7777f ("Introduce a new flag for i440fx to disable PCI hotplug on t= he root bus") The option is passed as "-global PIIX4_PM.acpi-root-pci-hotplug=3Don" etc i= n qemu commandline. It is enabled by default. This patch adds the corresponding qe= mu capabilities in libvirt as QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG. Please note that the test specific qemu capabilities .replies files has alr= eady been updated as a part of regular refreshing them when a new qemu version is released. Hence, no updates to those files are required. Signed-off-by: Ani Sinha Reviewed-by: Laine Stump --- src/qemu/qemu_capabilities.c | 4 ++++ src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + 5 files changed, 10 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index a1be0cb74e..9d0c96a20c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -639,6 +639,9 @@ VIR_ENUM_IMPL(virQEMUCaps, "s390-pv-guest", /* QEMU_CAPS_S390_PV_GUEST */ "set-action", /* QEMU_CAPS_SET_ACTION */ "virtio-blk.queue-size", /* QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE = */ + + /* 410 */ + "piix4-acpi-root-hotplug-en", /* QEMU_CAPS_PIIX_ACPI_ROOT_PC= I_HOTPLUG */ ); =20 =20 @@ -1465,6 +1468,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsIDEDrive[] =3D { static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPiix4PM[] = =3D { { "disable_s3", QEMU_CAPS_PIIX_DISABLE_S3, NULL }, { "disable_s4", QEMU_CAPS_PIIX_DISABLE_S4, NULL }, + { "acpi-root-pci-hotplug", QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG, NULL = }, }; =20 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBRedir[]= =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index b0fa1eec35..3460daac00 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -620,6 +620,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_SET_ACTION, /* 'set-action' QMP command */ QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE, /* virtio-blk-*.queue-size */ =20 + /* 410 */ + QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG, /* -M pc PIIX4_PM.acpi-root-pci-= hotplug */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; =20 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.2.0.x86_64.xml index 515a970f28..1e5833a9f0 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -230,6 +230,7 @@ + 5002000 0 43100243 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.0.0.x86_64.xml index 02eb9a15bb..b54dd8a22e 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -238,6 +238,7 @@ + 6000000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.1.0.x86_64.xml index 678b440d92..0ad493191d 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -240,6 +240,7 @@ + 6001000 0 43100243 --=20 2.25.1 From nobody Sun May 19 12:00:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1633080643510721.619305268564; Fri, 1 Oct 2021 02:30:43 -0700 (PDT) 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-447-ZfiVMg02NlGwsegLeM3-fw-1; Fri, 01 Oct 2021 05:30:41 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0EB8C1006AA5; Fri, 1 Oct 2021 09:30:36 +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 E1D4A60BF4; Fri, 1 Oct 2021 09:30:35 +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 B0D43181A1CF; Fri, 1 Oct 2021 09:30:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1919UTUZ021927 for ; Fri, 1 Oct 2021 05:30:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5FB0914195F; Fri, 1 Oct 2021 09:30: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 57C4C1649CC for ; Fri, 1 Oct 2021 09:30:22 +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-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 75B8D811E85 for ; Fri, 1 Oct 2021 09:30:22 +0000 (UTC) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-560-c3r7AO1_O2Skp25P1H1biQ-1; Fri, 01 Oct 2021 05:30:21 -0400 Received: by mail-pf1-f171.google.com with SMTP id s16so7434568pfk.0 for ; Fri, 01 Oct 2021 02:30:20 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.125.135]) by smtp.googlemail.com with ESMTPSA id c24sm6103972pgj.63.2021.10.01.02.30.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 02:30:19 -0700 (PDT) X-MC-Unique: ZfiVMg02NlGwsegLeM3-fw-1 X-MC-Unique: c3r7AO1_O2Skp25P1H1biQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5Mp+9upOeJoNC802VhmjzepZvmStYEPzpB3URV/oo78=; b=6DpSmva5siyM/NEOQth3xlRGwougSbnAOES+CAhBXp18XqhUzRdjBRlq1rax56R3jq BbKMz0xntkoRDVZxBGbw9xn3gWImirZtrNNkzXWYjOaCzQeEp6H8aa4rAyQZfi0mzjWK yjfrkH+ZA7C1fkquoBmi2WwNttrCxVftd8CM50fiAZiE8kJqzmFBNfBg1OQmBjwehw3j PXii5sgEA/j8rU+iNlKXuiPsPo+kF0mJm7X1C71EQt7fLAbOo9vZAM6laBphnW82md46 PpBGkSLp/EBJ6S6pbkeJlNVhMvOhMcDGAVJr3kfxaLyTHYksinVvJcuR+EAWBe9KYkNL IMnQ== X-Gm-Message-State: AOAM533mfL+VYs1Kyo/0ZrwlFhgoTjG08E0m/IPpbm1DmroltAi+R+sc nyrQI28sFaqat66rHCKVJGe000dvHvBgIA== X-Google-Smtp-Source: ABdhPJygSDjFpN9SpgxFJT6v4OrHKmgPXEZwMfe9YRmFXc3NE1ngbrp0+99VNxYuMkaWUn0nnS4A4w== X-Received: by 2002:a62:cd0f:0:b0:447:b8fe:d6c2 with SMTP id o15-20020a62cd0f000000b00447b8fed6c2mr10205063pfg.70.1633080619465; Fri, 01 Oct 2021 02:30:19 -0700 (PDT) From: Ani Sinha To: libvir-list@redhat.com Subject: [PATCH v7 2/4] conf: introduce option to enable/disable pci hotplug on pci-root controller Date: Fri, 1 Oct 2021 14:59:46 +0530 Message-Id: <20211001092948.797485-3-ani@anisinha.ca> In-Reply-To: <20211001092948.797485-1-ani@anisinha.ca> References: <20211001092948.797485-1-ani@anisinha.ca> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Ani Sinha , jusual@redhat.com, laine@redhat.com 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.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1633080645406100001 This change introduces libvirt xml support to enable/disable hotplug on the pci-root controller. It adds a 'target' subelement for the pci-root control= ler with a 'hotplug' property. This property can be used to enable or disable hotplug for the pci-root controller. For example, in order to disable hotpl= ug on the pci-root controller, one has to use set '' as shown below: '' option would enable hotplug for pci-root controll= er. This is also the default value. This option is only available for pc machine types and is applicable for qemu/kvm accelerator only.This feature was introduced from qemu version 5.2 with the following change in qemu reposito= ry: 3d7e78aa7777f ("Introduce a new flag for i440fx to disable PCI hotplug on t= he root bus") The above qemu commit describes some reasons why users might to disable hot= plug on PCI root buses. Related unit tests to exercise the new conf option has also been added. Signed-off-by: Ani Sinha Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/formatdomain.rst | 14 +++++---- src/qemu/qemu_validate.c | 9 +++++- .../pc-i440fx-acpi-root-hotplug-disable.xml | 30 +++++++++++++++++++ .../pc-i440fx-acpi-root-hotplug-enable.xml | 30 +++++++++++++++++++ .../pc-i440fx-acpi-root-hotplug-disable.xml | 1 + .../pc-i440fx-acpi-root-hotplug-enable.xml | 1 + tests/qemuxml2xmltest.c | 4 +++ 7 files changed, 83 insertions(+), 6 deletions(-) create mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disa= ble.xml create mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enab= le.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-di= sable.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-en= able.xml diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 0f5d833521..467213cc29 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -3776,11 +3776,15 @@ generated by libvirt. :since:`Since 1.2.19 (QEMU on= ly).` controller's "port" configuration value, which is visible to the virtual machine. If set, port must be between 0 and 255. ``hotplug`` - pcie-root-port and pcie-switch-downstream-port controllers can also hav= e a - ``hotplug`` attribute in the ```` subelement, which is used to - disable hotplug/unplug of devices on a particular controller. The defau= lt - setting of ``hotplug`` is ``on``; it should be set to ``off`` to disable - hotplug/unplug of devices on a particular controller. :since:`Since 6.3= .0` + pci-root (:since:`Since 7.9.0`), pcie-root-port (:since:`Since 6.3.0`) = and + pcie-switch-downstream-port controllers (:since:`Since 6.3.0`) can + also have a ``hotplug`` attribute in the ```` subelement, which= is + used to disable hotplug/unplug of devices on a particular controller. F= or + the pci-root controller, the setting affects the ACPI based hotplug. Fo= r the + rest, the setting affects both ACPI based hotplug as well as PCIE native + hotplug. The default setting of ``hotplug`` is ``on``; it should be set= to + ``off`` to disable hotplug/unplug of devices on a particular controller. + ``busNr`` pci-expander-bus and pcie-expander-bus controllers can have an optional ``busNr`` attribute (1-254). This will be the bus number of the new bus= ; All diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 294cc24b36..d7e306e29d 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3872,6 +3872,14 @@ qemuValidateDomainDeviceDefControllerPCI(const virDo= mainControllerDef *cont, /* hotplug */ if (pciopts->hotplug !=3D VIR_TRISTATE_SWITCH_ABSENT) { switch ((virDomainControllerModelPCI) cont->model) { + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOT= PLUG)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("setting the %s property on a '%s' device= is not supported by this QEMU binary"), + "hotplug", "pci-root"); + return -1; + } + break; case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCIE_ROOT_PORT_HOTPLUG= )) { @@ -3882,7 +3890,6 @@ qemuValidateDomainDeviceDefControllerPCI(const virDom= ainControllerDef *cont, } break; =20 - case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.xml= b/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.xml new file mode 100644 index 0000000000..93f2779f68 --- /dev/null +++ b/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.xml @@ -0,0 +1,30 @@ + + i440fx + 56f5055c-1b8d-490c-844a-ad646a1caaaa + 1048576 + 1048576 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + + +