From nobody Thu Apr 25 20:14:35 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 1631417227827944.5615136953338; Sat, 11 Sep 2021 20:27:07 -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-180-z7ddAkw_PaaK5aXbqolKIA-1; Sat, 11 Sep 2021 23:27:04 -0400 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 0A8698015C7; Sun, 12 Sep 2021 03:26:59 +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 46D1377F30; Sun, 12 Sep 2021 03:26:58 +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 1BD964A702; Sun, 12 Sep 2021 03:26:55 +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 18C3Qpux032395 for ; Sat, 11 Sep 2021 23:26:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id D62D31112853; Sun, 12 Sep 2021 03:26:51 +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 D1D0F1112852 for ; Sun, 12 Sep 2021 03:26:48 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.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 B4DDB811E76 for ; Sun, 12 Sep 2021 03:26:48 +0000 (UTC) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-428-Bt3G5OMUNZuXJiMq5SQRrg-1; Sat, 11 Sep 2021 23:26:46 -0400 Received: by mail-pj1-f43.google.com with SMTP id j1so3958930pjv.3 for ; Sat, 11 Sep 2021 20:26:46 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.79.166]) by smtp.googlemail.com with ESMTPSA id w5sm2854343pfu.160.2021.09.11.20.26.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 20:26:45 -0700 (PDT) X-MC-Unique: z7ddAkw_PaaK5aXbqolKIA-1 X-MC-Unique: Bt3G5OMUNZuXJiMq5SQRrg-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=RbL8q0YnnaZd0K/rCM8gGm40j7Re7tZlluThq1Xlb00=; b=eXR9uUUyxtkzkR+NQkEwe1+qkJzz0rI/XBM6IYgWnPg0KifSVXiIcHX1+VjCyi3Hti KrfXLPcSc+1BY1uN+FBfU/t9a5LqSVnnnhYp72B7eNoBzPYm1Y3KybO8NYPsUWnoxYk7 Ye6/Jq2x7iVi3U8KwRPhrrBhD+JuivEyfTQRK54DI1vaMOIK7Hi6OQkyNYRkTdqQAfoe TgtfowkmfvVM2k43fCw0/6+jtgCzNS7z3tg1+/PCvaOC0xERBYK2WPdgTh0oxgmDQEwY jzUFOWNNqsv1ngZ/MOhVafxFp34D+u1XoEgtiApwASkeshd9OoKnhrp1s+VaIGPxDqmr tDTQ== X-Gm-Message-State: AOAM531cUt5e9XnxpNva/dQBTwEg9RHLkGfBmt+N5ANYKGGvYgO76z8D OM3VdMThpIZP/2svduCXWWeK7jvFgsMDkg== X-Google-Smtp-Source: ABdhPJz4Vv3YvJR7KawWiiyDbcLuwlCFXZ2Ulb914QRQMzpCeM5OFs8P8ty3KL06cMvmAuZtdI4HCA== X-Received: by 2002:a17:90a:2:: with SMTP id 2mr5725494pja.77.1631417205381; Sat, 11 Sep 2021 20:26:45 -0700 (PDT) From: Ani Sinha To: libvir-list@redhat.com Subject: [PATCH v3 1/5] qemu: capablities: detect presence of acpi-pci-hotplug-with-bridge-support Date: Sun, 12 Sep 2021 08:56:27 +0530 Message-Id: <20210912032631.2853520-2-ani@anisinha.ca> In-Reply-To: <20210912032631.2853520-1-ani@anisinha.ca> References: <20210912032631.2853520-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@anisinha.ca, 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.13 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: 1631417229750100001 Content-Type: text/plain; charset="utf-8" qemu added support for i440fx specific global boolean flag PIIX4_PM.acpi-pci-hotplug-with-bridge-support around version 2.1. This flag is enabled by default. When disabled, it turns off acpi pci hotplug for cold plugged pci bridges in i440fx machine types. Very recently, in qemu version 6.1, the same global option was also added f= or q35 machine types as well. ICH9-LPC.acpi-pci-hotplug-with-bridge-support This option turns on or off acpi based hotplug for cold plugged pcie bridges like pcie root ports. This flag is also enabled by default. Please refer to the following qemu changes: c0e427d6eb5fef ("hw/acpi/ich9: Enable ACPI PCI hot-plug") 17858a16950860 ("hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35") This patch adds the corresponding qemu capabilities in libvirt. For i440fx, the capability is detected as QEMU_CAPS_PIIX_ACPI_HOTPLUG_BRIDGE. For q35, the capability is detected as QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE. 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 | 6 ++++++ src/qemu/qemu_capabilities.h | 4 ++++ tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 + 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 | 2 ++ 14 files changed, 23 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f27a621f8c..c954e42382 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -638,6 +638,10 @@ VIR_ENUM_IMPL(virQEMUCaps, "query-display-options", /* QEMU_CAPS_QUERY_DISPLAY_OPTIONS = */ "s390-pv-guest", /* QEMU_CAPS_S390_PV_GUEST */ "set-action", /* QEMU_CAPS_SET_ACTION */ + "piix4-acpi-hotplug-bridge", /* QEMU_CAPS_PIIX_ACPI_HOTPLUG_= BRIDGE */ + + /* 410 */ + "ich9-acpi-hotplug-bridge", /* QEMU_CAPS_ICH9_ACPI_HOTPLUG_B= RIDGE */ ); =20 =20 @@ -1465,6 +1469,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-pci-hotplug-with-bridge-support", QEMU_CAPS_PIIX_ACPI_HOTPLUG_= BRIDGE, NULL }, }; =20 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBRedir[]= =3D { @@ -1517,6 +1522,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsVirtioGpu[] =3D { static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsICH9[] =3D= { { "disable_s3", QEMU_CAPS_ICH9_DISABLE_S3, NULL }, { "disable_s4", QEMU_CAPS_ICH9_DISABLE_S4, NULL }, + { "acpi-pci-hotplug-with-bridge-support", QEMU_CAPS_ICH9_ACPI_HOTPLUG_= BRIDGE, NULL }, }; =20 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBNECXHCI= [] =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index f3379f556c..f53009b6e9 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -618,6 +618,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker for= syntax-check */ QEMU_CAPS_QUERY_DISPLAY_OPTIONS, /* 'query-display-options' qmp comman= d present */ QEMU_CAPS_S390_PV_GUEST, /* -object s390-pv-guest,... */ QEMU_CAPS_SET_ACTION, /* 'set-action' QMP command */ + QEMU_CAPS_PIIX_ACPI_HOTPLUG_BRIDGE, /* -M pc PIIX4_PM.acpi-pci-hotplug= -with-bridge-support */ + + /* 410 */ + QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE, /* -M q35 ICH9-LPC.acpi-pci-hotplu= g-with-bridge-support */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.11.0.x86_64.xml index 631f644144..e557e9395d 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml @@ -189,6 +189,7 @@ + 2011000 0 43100288 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.12.0.x86_64.xml index d74dc5ebd5..c70e81ac0b 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -200,6 +200,7 @@ + 2011090 0 43100289 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_3.0.0.x86_64.xml index 2cc3c11820..20f58b120f 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -206,6 +206,7 @@ + 3000000 0 43100239 diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_3.1.0.x86_64.xml index bcc4c44d28..275415b1a7 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml @@ -210,6 +210,7 @@ + 3000092 0 43100240 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.0.0.x86_64.xml index e999d7574c..3356602fa7 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -218,6 +218,7 @@ + 4000000 0 43100240 diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.1.0.x86_64.xml index 80c3e3cbed..4ee761c4cb 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml @@ -225,6 +225,7 @@ + 4001000 0 43100241 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.2.0.x86_64.xml index 99f9375c04..cc59ffb331 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -236,6 +236,7 @@ + 4002000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.0.0.x86_64.xml index 03fc7d4106..40b2a61aaa 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -243,6 +243,7 @@ + 5000000 0 43100241 diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.1.0.x86_64.xml index fc0b502ef9..28c7b0e020 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -245,6 +245,7 @@ + 5001000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.2.0.x86_64.xml index cb1226fc04..126bae2401 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -246,6 +246,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 d03b8aa726..b01db2dfbe 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -254,6 +254,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 8239f4266a..b136853aba 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -256,6 +256,8 @@ + + 6001000 0 43100243 --=20 2.25.1 From nobody Thu Apr 25 20:14:35 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 1631417248787831.9757152611447; Sat, 11 Sep 2021 20:27:28 -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-211-bCHIWtNXMuCTpZPj0-lG-w-1; Sat, 11 Sep 2021 23:27:26 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6A4F18015C7; Sun, 12 Sep 2021 03:27:21 +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 4722319C59; Sun, 12 Sep 2021 03:27:21 +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 1825A1805986; Sun, 12 Sep 2021 03:27:21 +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 18C3QpqF032393 for ; Sat, 11 Sep 2021 23:26:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 828732166BA2; Sun, 12 Sep 2021 03:26:51 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D8252166B3F for ; Sun, 12 Sep 2021 03:26:51 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.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 651C7185A794 for ; Sun, 12 Sep 2021 03:26:51 +0000 (UTC) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-542-2FMhtfm5Pv-NpBXWFV3wDA-1; Sat, 11 Sep 2021 23:26:49 -0400 Received: by mail-pg1-f180.google.com with SMTP id w8so5912235pgf.5 for ; Sat, 11 Sep 2021 20:26:49 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.79.166]) by smtp.googlemail.com with ESMTPSA id w5sm2854343pfu.160.2021.09.11.20.26.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 20:26:47 -0700 (PDT) X-MC-Unique: bCHIWtNXMuCTpZPj0-lG-w-1 X-MC-Unique: 2FMhtfm5Pv-NpBXWFV3wDA-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=njrbSwCuzsL0JB56z/2JtUXrUgr34/Um5Ik+X3bSvJI=; b=1eYTwiGiVSsc6iKOo4mw0X2Uy+/ptVzQfu4InrnifZieeuSq4Fc5zAJxXhMk/kDQ+7 3NsCmLBYNkbiVrtdWkId8rSARAy+adAaGc98SyEiDvWKoqRrWm6JZyewMEO+P8GdZB4K 7qHXebHnTsrKuJF/pfQ8eWSvqiCXLvdknDCCypennl1zHSTgDPvVQUXyEknIcmrj+EfY GS+VroOX2U17+MS+herqoiM05dR6YyXmNdjitTgv5cQ9yv738ADLyU6Z28sIpvIzeR7b y8N3Iz50iKo96Ha3nwvputfKb9wYR4T7keTxAIid5GzDBSTspC8d83NeH/d9ngsUAcg2 OdBQ== X-Gm-Message-State: AOAM532s+0y1Kz39a6gvU7MXnBhopeMAlfzdOX5CbE3VMnDicYzChdS8 dvNWSu/xrkwy2b+Iqul5+Nt4htRthYVBIA== X-Google-Smtp-Source: ABdhPJwmuYfrPtF2oDLgUoDosK4bNmMTLhW/+5T4DIeJ/jWgywUfu47JKRcjQ/QCgW5uXNnTzwm84g== X-Received: by 2002:a05:6a00:124f:b0:416:4ed7:e4c6 with SMTP id u15-20020a056a00124f00b004164ed7e4c6mr4960822pfi.85.1631417207630; Sat, 11 Sep 2021 20:26:47 -0700 (PDT) From: Ani Sinha To: libvir-list@redhat.com Subject: [PATCH v3 2/5] qemu: capablities: detect presence of acpi-root-pci-hotplug for i440fx machines Date: Sun, 12 Sep 2021 08:56:28 +0530 Message-Id: <20210912032631.2853520-3-ani@anisinha.ca> In-Reply-To: <20210912032631.2853520-1-ani@anisinha.ca> References: <20210912032631.2853520-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.6 X-loop: libvir-list@redhat.com Cc: ani@anisinha.ca, 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.23 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: 1631417250419100001 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 | 2 ++ src/qemu/qemu_capabilities.h | 1 + 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, 6 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c954e42382..706169a5cf 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -642,6 +642,7 @@ VIR_ENUM_IMPL(virQEMUCaps, =20 /* 410 */ "ich9-acpi-hotplug-bridge", /* QEMU_CAPS_ICH9_ACPI_HOTPLUG_B= RIDGE */ + "piix4-acpi-root-hotplug-en", /* QEMU_CAPS_PIIX_ACPI_ROOT_PC= I_HOTPLUG */ ); =20 =20 @@ -1470,6 +1471,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsPiix4PM[] =3D { { "disable_s3", QEMU_CAPS_PIIX_DISABLE_S3, NULL }, { "disable_s4", QEMU_CAPS_PIIX_DISABLE_S4, NULL }, { "acpi-pci-hotplug-with-bridge-support", QEMU_CAPS_PIIX_ACPI_HOTPLUG_= BRIDGE, 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 f53009b6e9..b0f9559d95 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -622,6 +622,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ =20 /* 410 */ QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE, /* -M q35 ICH9-LPC.acpi-pci-hotplu= g-with-bridge-support */ + QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG, /* -M pc PIIX4_PM.acpi-root-pci-= hotplug */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.2.0.x86_64.xml index 126bae2401..da52eda200 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -247,6 +247,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 b01db2dfbe..d75760f1f8 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -255,6 +255,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 b136853aba..8fd3c51f4e 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -258,6 +258,7 @@ + 6001000 0 43100243 --=20 2.25.1 From nobody Thu Apr 25 20:14:35 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 1631417284277488.65896442653843; Sat, 11 Sep 2021 20:28: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-51-cDaiREivNJCd0r0qYvMh3w-1; Sat, 11 Sep 2021 23:27:29 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8CD57362FC; Sun, 12 Sep 2021 03:27:24 +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 6C72119C59; Sun, 12 Sep 2021 03:27:24 +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 378874EA29; Sun, 12 Sep 2021 03:27:24 +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 18C3QuMc032426 for ; Sat, 11 Sep 2021 23:26:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id AC501202DCF2; Sun, 12 Sep 2021 03:26:56 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A7A8D2026D65 for ; Sun, 12 Sep 2021 03:26:53 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.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 7C39D800883 for ; Sun, 12 Sep 2021 03:26:53 +0000 (UTC) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-196-GFRoMY_9MpGMFQ-OtVVngw-1; Sat, 11 Sep 2021 23:26:51 -0400 Received: by mail-pj1-f47.google.com with SMTP id rj12-20020a17090b3e8c00b001991428ded8so3243300pjb.1 for ; Sat, 11 Sep 2021 20:26:51 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.79.166]) by smtp.googlemail.com with ESMTPSA id w5sm2854343pfu.160.2021.09.11.20.26.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 20:26:49 -0700 (PDT) X-MC-Unique: cDaiREivNJCd0r0qYvMh3w-1 X-MC-Unique: GFRoMY_9MpGMFQ-OtVVngw-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=OvaSdEqYiQlSMXptUFECgZEIr28T4y5TLwn2vhh1H80=; b=SapCTN+qZ+h4kLz3asVLvHDyHFm6LjyPZ4CKTcWNzrUNQtpDWr9nof1ehB3kAl8Afx tGukMp2gJHBM48AZY6CYK8Tk9Bt7s5GECdFbSzmTJRtC3a7xe5nSPdoKY+W1CC5lUDsd m9XQ63f2TifMjutKR5geHaY4uMLwICmMudPA+kLNGhCgsJc4hXLjJGrPGmuVLFDpbyQ+ ipK79zKSPr9RbFXtZUnV2rGCVrdcHdbNMxXOvhfTvNEKM+cBHkb0cLMWq/OQ28jz7wWO rqmTt8Cg4JjWXeHcm8+1Zx78iHOYkBL2Xci7MWrEHlg/cNvfYQUYhERMtdGjRF/6T6x6 yW2g== X-Gm-Message-State: AOAM532eIrnnBGQyR01CRojJcd57Sy9Mh7sMIgBhga4YA4IZ/91nKKMt 8jyI5R5Oj/7lK93Y3clfDRTpMSr4enY/Zg== X-Google-Smtp-Source: ABdhPJwhyd/cn5SrC54AgCggRzmf8dLe8CWR/tNGV2kvfj9KarlZybkr/i8ELSSQifE3XMURuRBD9A== X-Received: by 2002:a17:90a:e612:: with SMTP id j18mr5420376pjy.163.1631417210162; Sat, 11 Sep 2021 20:26:50 -0700 (PDT) From: Ani Sinha To: libvir-list@redhat.com Subject: [PATCH v3 3/5] conf: introduce acpi-hotplug-bridge and acpi-root-hotplug pm options Date: Sun, 12 Sep 2021 08:56:29 +0530 Message-Id: <20210912032631.2853520-4-ani@anisinha.ca> In-Reply-To: <20210912032631.2853520-1-ani@anisinha.ca> References: <20210912032631.2853520-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@anisinha.ca, 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.23 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: 1631417285062100003 Content-Type: text/plain; charset="utf-8" This change introduces libvirt xml support for the following two pm options: The above two options are only available for qemu driver and that too for x= 86 guests only. Both of them are global options. 'acpi-hotplug-bridge' option enables or disables ACPI hotplug support for c= old plugged bridges. Examples of cold plugged bridges include PCI-PCI bridge (pci-bridge controller) for pc machines and pcie-root-port controller for q= 35 machines. Being global options, no other bridge specific options for pci-br= idge controller or pcie-root-port controllers are required. For pc machine type = in x86, this option is available in qemu for a long time, from version 2.1. Please see the changes in qemu.git: 9e047b982452c6 ("piix4: add acpi pci hotplug support") 133a2da488062e ("pc: acpi: generate AML only for PCI0 devices if PCI bridge= hotplug is disabled") For q35 machine type, this was introduced in qemu 6.1 with the following changes in qemu.git: (a) c0e427d6eb5fef ("hw/acpi/ich9: Enable ACPI PCI hot-plug") (b) 17858a16950860 ("hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35") The reasons for enabling ACPI based hotplug for PCIe (q35) based machines (= as opposed to native hotplug) are outlined in (b). It is possible that some us= ers might still want to use native hotplug on PCIe. Therefore, this config opti= on enables users to choose either ACPI based hotplug or native hotplug for cold plugged bridges (for example for pcie root port controller in q35 machines). 'acpi-root-hotplug' option enables or disables ACPI based hotplug for PCI r= oot bus (pci-root controller). This option is only available for pc machine typ= e. This additional option enables users to disable hotplug for all devices in = the system without adding an additional PCI-PCI bridge, putting the devices beh= ind the bridge and using the existing "acpi-hotplug-bridge" option to disable hotplug on that bridge. This feature was introduced from qemu version 5.2 w= ith the following change in qemu.git: 3d7e78aa7777f ("Introduce a new flag for i440fx to disable PCI hotplug on t= he root bus") The above qemu commit describes some compelling reasons why users might to disable hotplug on PCI root buses. This change also adds related unit tests to exercise the new conf options. Signed-off-by: Ani Sinha --- docs/formatdomain.rst | 36 ++++++++++++--- docs/schemas/domaincommon.rng | 17 +++++++ src/conf/domain_conf.c | 21 ++++++++- src/conf/domain_conf.h | 2 + .../pc-i440fx-acpi-hotplug-bridge-disable.xml | 17 +++++++ .../pc-i440fx-acpi-root-hotplug-disable.xml | 17 +++++++ .../q35-acpi-hotplug-bridge-disable.xml | 17 +++++++ .../pc-i440fx-acpi-hotplug-bridge-disable.xml | 31 +++++++++++++ .../pc-i440fx-acpi-root-hotplug-disable.xml | 31 +++++++++++++ .../q35-acpi-hotplug-bridge-disable.xml | 45 +++++++++++++++++++ tests/qemuxml2xmltest.c | 9 ++++ 11 files changed, 236 insertions(+), 7 deletions(-) create mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-di= sable.xml create mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disa= ble.xml create mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.= xml create mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-= disable.xml create mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-di= sable.xml create mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disabl= e.xml diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index ad3b4ea92c..c8b04c625c 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -1793,16 +1793,40 @@ advertisements to the guest OS. (NB: Only qemu driv= er support) + + ... =20 ``pm`` - These elements enable ('yes') or disable ('no') BIOS support for S3 - (suspend-to-mem) and S4 (suspend-to-disk) ACPI sleep states. If nothing= is - specified, then the hypervisor will be left with its default value. - Note: This setting cannot prevent the guest OS from performing a suspen= d as - the guest OS itself can choose to circumvent the unavailability of the = sleep - states (e.g. S4 by turning off completely). + These elements enable ('yes') or disable ('no') certain BIOS advertisem= ents. + If nothing is specified, then the hypervisor will be left with its defa= ult value. + The following BIOS options are available: + +``suspend-to-mem`` + support for S3 (suspend-to-mem) ACPI sleep states. +``suspend-to-disk`` + support for S4 (suspend-to-disk) ACPI sleep states. + + Note that for the above two options, the setting cannot prevent the gue= st OS + from performing a suspend as the guest OS itself can choose to circumve= nt the + unavailability of the sleep states (e.g. S4 by turning off completely). + +``acpi-hotplug-bridge`` + :since:`Since 7.8.0` This option enables or disables BIOS ACPI based ho= tplug support + for cold plugged bridges. It is available only for x86 guests, both for= q35 and pc + machine types. For pc machines, the support is available from `QEMU 2.1= 2`. For q35 + machines, the support is available from `QEMU 6.1`. Examples of cold pl= ugged bridges + include PCI-PCI bridges for pc machine types (pci-bridge controller). F= or q35 machines, + it includes PCIE root ports (pcie-root-port controller). This is a glob= al option that + affects all bridges. No other bridge specific option is required to be = specified. + +``acpi-root-hotplug`` + :since:`Since 7.8.0 (QEMU 5.2)` This option enables or disables BIOS AC= PI based + hotplug support for PCI root bus (pci-root controller). This is availab= le only + for x86 guests, only for pc machine type. For q35 machines, PCIE root c= omplex, + the pcie-root controller, does not support hotplug capability. This is = also a global + option. =20 :anchor:`` =20 diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 11fa24f398..a51efb933d 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4333,6 +4333,16 @@ + + + + + + + + + + @@ -4344,6 +4354,13 @@ + + + + + + +