From nobody Sun May 19 05:50:53 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 1632795896942953.6319102856829; Mon, 27 Sep 2021 19:24:56 -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-279-D1AV3qHWPwW08W9AGW2eLg-1; Mon, 27 Sep 2021 22:24:53 -0400 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 D261C19067F4; Tue, 28 Sep 2021 02:24:48 +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 B388D102AE41; Tue, 28 Sep 2021 02:24:48 +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 8582B4EA37; Tue, 28 Sep 2021 02:24:48 +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 18S2KFm0013360 for ; Mon, 27 Sep 2021 22:20:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 05B931112840; Tue, 28 Sep 2021 02:20:15 +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 000981112C3E for ; Tue, 28 Sep 2021 02:20:01 +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-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7AEA1801E8D for ; Tue, 28 Sep 2021 02:20:01 +0000 (UTC) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-355-v8Vz0ZnUPT-f-1yNBdkqNQ-1; Mon, 27 Sep 2021 22:19:59 -0400 Received: by mail-pf1-f181.google.com with SMTP id q23so17577356pfs.9 for ; Mon, 27 Sep 2021 19:19:58 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.155.236]) by smtp.googlemail.com with ESMTPSA id w1sm514344pjy.49.2021.09.27.19.19.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 19:19:57 -0700 (PDT) X-MC-Unique: D1AV3qHWPwW08W9AGW2eLg-1 X-MC-Unique: v8Vz0ZnUPT-f-1yNBdkqNQ-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=90zoZE46/M6C0tDYOq4tfqKbFl8yja62tb6d8n03Gvo=; b=8Jhzk89G5qV6aYwIvztr9DHgb69V0u0BIPLNXDK9D74o/gDqAjENZPQKoHoVzIdn15 k+GuWNBKL8gpKlEVwgvjUvoZtM/26ytl3x3+khrTHlnV17hmqeGJVAPYMhLMFn+Zli5W XFFZkkbw9hPJXjsV4ZBzU5cfko04EUvPYnCL9sO4/CULLP2eHqILfIa3xHbJi/NANgUV Y7eWyEq2ytxUXpQp+JEax4p5MNkFsZyDZ7Ra3KWReq+NdITbO569Tx5gUFaBts2AFBnX WXGLh0cSCJYKlChjesJRglm/N1TfHfvF5cqLnS3ng/S+0LOzpii9mXHaFZhlXFmI40S/ 7TdA== X-Gm-Message-State: AOAM533XcpRtaq5krcn2vQ9btkmW9sGUjDsVJQT8tvlIjuYE9NOL4FRe +BQwaeo9lM/EzHzw6MQooSUIM8GqCWXGew== X-Google-Smtp-Source: ABdhPJzYwlCIR2XOnBRM0EbFL5MZUEgQ92VrHq16r5a3pENXMKr6+irQheLxvKh2cHAyRMkOAl+sOg== X-Received: by 2002:a62:1842:0:b0:44b:3341:fe46 with SMTP id 63-20020a621842000000b0044b3341fe46mr2812085pfy.73.1632795597765; Mon, 27 Sep 2021 19:19:57 -0700 (PDT) From: Ani Sinha To: libvir-list@redhat.com Subject: [PATCH v6 1/4] qemu: capablities: detect presence of acpi-root-pci-hotplug for i440fx machines Date: Tue, 28 Sep 2021 07:49:39 +0530 Message-Id: <20210928021942.450247-2-ani@anisinha.ca> In-Reply-To: <20210928021942.450247-1-ani@anisinha.ca> References: <20210928021942.450247-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.3 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.84 on 10.5.11.22 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: 1632795898722100001 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 Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 db5432c9fc..71aca20c4c 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 097f28bd40..c2d1e352bd 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 e09880e937..ffd0e66d00 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -233,6 +233,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 571336c1fa..658a1e742f 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -241,6 +241,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 74b87847d0..5bb21fec47 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -243,6 +243,7 @@ + 6001000 0 43100243 --=20 2.25.1 From nobody Sun May 19 05:50:53 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 163279582727043.288795196269916; Mon, 27 Sep 2021 19:23:47 -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-554-cTfMwvDAONKDN3hKTSpFtg-1; Mon, 27 Sep 2021 22:23:44 -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 EFF31802C89; Tue, 28 Sep 2021 02:23:39 +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 BBF0460C13; Tue, 28 Sep 2021 02:23:39 +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 596CF4E58F; Tue, 28 Sep 2021 02:23:38 +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 18S2K9Vk013350 for ; Mon, 27 Sep 2021 22:20:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 80547201B069; Tue, 28 Sep 2021 02:20:09 +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 7B7B9201B06B for ; Tue, 28 Sep 2021 02:20:06 +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-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B6C42100B8DA for ; Tue, 28 Sep 2021 02:20:06 +0000 (UTC) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-539-DrmMOW-nMSi4o7GZVkIV1A-1; Mon, 27 Sep 2021 22:20:02 -0400 Received: by mail-pf1-f170.google.com with SMTP id q23so17577442pfs.9 for ; Mon, 27 Sep 2021 19:20:02 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.155.236]) by smtp.googlemail.com with ESMTPSA id w1sm514344pjy.49.2021.09.27.19.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 19:20:01 -0700 (PDT) X-MC-Unique: cTfMwvDAONKDN3hKTSpFtg-1 X-MC-Unique: DrmMOW-nMSi4o7GZVkIV1A-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=Gr2fiEsrdAeIHNpw9C47RZjcrnjg6qBH01peJ/MnbEI=; b=zv/mhl5uZ7dzVDNi/E+TqUuKU1r91kT7XdrqlcBDFh+OHB8QThrrP8g8iYb/IqZa9O CfkxRPAg1hVsxVRmD0mVs3MQBDOquEgyYadTonFPguGK6eznJxU8ATJ7Kpp1FFnKUZ4v 3IKK1NSe6N8J2s6Zm5zzS/xKJZzyUjJr4UwT1WYAMWUEujZHyH+ZukIXfriL8nacewo9 AthY71hZRr2BaaUpsgoMNrTaK46OV4hzsFPNst4ZGltOgPOAfPF809zdKYfUE1xacRFL XAk6RCv2TvllneJgXDij/+K1DpEtPSDGjuzvx8i6MAxTJQ+diaGGvmGUGrapKYea64uC c0EQ== X-Gm-Message-State: AOAM530+oWpJe9IzyiUgFc3WVec+eyf9Mwcc0JbEGGfKCO1SyyWQ64k2 WvKY04ZNbkKU0DaMDmdriREi2wN9D22Eqw== X-Google-Smtp-Source: ABdhPJzH27TFcOItudsPSYTrz7feLt/8T9RmULVqoDk2OMpCo6WN+ud3MGnM5cyGm7sG1I6BCgjvtw== X-Received: by 2002:a63:710d:: with SMTP id m13mr2347448pgc.467.1632795601306; Mon, 27 Sep 2021 19:20:01 -0700 (PDT) From: Ani Sinha To: libvir-list@redhat.com Subject: [PATCH v6 2/4] conf: introduce option to enable/disable pci hotplug on pci-root controller Date: Tue, 28 Sep 2021 07:49:40 +0530 Message-Id: <20210928021942.450247-3-ani@anisinha.ca> In-Reply-To: <20210928021942.450247-1-ani@anisinha.ca> References: <20210928021942.450247-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.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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1632795829242100001 Content-Type: text/plain; charset="utf-8" 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 | 12 ++++---- 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, 81 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..e2a1768ba7 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -3776,11 +3776,13 @@ 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.8.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. T= he + 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 13fbfd01b2..203b2b231a 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3879,6 +3879,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= )) { @@ -3889,7 +3897,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 + + + + +
+ + + +