From nobody Sat Nov 23 16:18:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=none dis=none) header.from=szczek.dev ARC-Seal: i=1; a=rsa-sha256; t=1723453836; cv=none; d=zohomail.com; s=zohoarc; b=LbMWvG/qhoxUZGHz7Nf7GIfP65+MUm7pg/r5n7g2G6o5AT4TExIyYbe2BPM7+suby/OpM0W032ufBm4BFdf9I9fA4ZlIxWHr8kf+SJBZy08sWN0Jc5jEbl96n9Q3PN2E4/jiEPGYB32YCFd/fiCzUHyzQiTq5zcz6mqzJODZXNM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723453836; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=mLwrqQWXoVWH/6gHqQXwbYQC6P2NHek6lhYFUlJ/YTo=; b=h4Pj02uVLxVSo9oqVKG+7kgvDPvDhNMBUA0rHNM3JXpTeNj9WBAG+MP/kT/s2CqiFfnSivRDfjKf0c/CS1DJveMtABL8R/Q3LpjlHHQBwvtqYqZR6lOZYWL17ez1PO7mdppavbbscaZHQjvxtUgpQvNOco3nc5zbGWSVoxO2wYA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1723453836227770.3067775481318; Mon, 12 Aug 2024 02:10:36 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 0FCB41610; Mon, 12 Aug 2024 05:10:35 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 0D1E415C4; Mon, 12 Aug 2024 05:08:55 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 76FE713C8; Sun, 11 Aug 2024 12:54:39 -0400 (EDT) Received: from mail-41103.protonmail.ch (mail-41103.protonmail.ch [185.70.41.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id BB20C130F for ; Sun, 11 Aug 2024 12:54:38 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szczek.dev; s=protonmail3; t=1723395271; x=1723654471; bh=mLwrqQWXoVWH/6gHqQXwbYQC6P2NHek6lhYFUlJ/YTo=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=rTZPurt5oWQ5cGteZMx9wuZy1js994NeCBM5XwkReNZ3KzgrbHUsgurgwwnZH2kTP UX49+6AGRwJ51Ta4uvDHvRK9Qa9ad/JhgnXOg0AnLvxjLBfdWh4br8A8O2onR1N++u XzSnETQxW3/DfnVzg9Qph6oRqyoC/VtEXOPtem6zTVytusF2hZHuoHSt1aVygRSLAb OpDHL55D6uIXDM4L3NdVED9gfYb4eDILmL/zNhxjoDi26Aq0aVNM+ARal74HctCLH9 2AC2efNWy0DyGNRre0jluLHprYPBNDl84EwBFmEP6K9hiaMhcvBBGJobxodu15FvLt cWPo9tbQICSsQ== Date: Sun, 11 Aug 2024 16:54:26 +0000 To: "devel@lists.libvirt.org" From: =?utf-8?Q?Kamil_Szcz=C4=99k?= Subject: [PATCH v2 1/6] qemu: Improve PS/2 controller detection Message-ID: In-Reply-To: References: Feedback-ID: 37679334:user:proton X-Pm-Message-ID: 48282a382993ed7ded0c915b77b0575e89f5c5ea MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MailFrom: kamil@szczek.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 Message-ID-Hash: Y773APF32OMRJROZZDIWNPTOG3YJSEHE X-Message-ID-Hash: Y773APF32OMRJROZZDIWNPTOG3YJSEHE X-Mailman-Approved-At: Mon, 12 Aug 2024 09:08:49 -0400 X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: pass (identity @szczek.dev) X-ZM-MESSAGEID: 1723453837613116600 Content-Type: text/plain; charset="utf-8" Up until now, we've assumed that all x86 machines have a PS/2 controller built-in. This assumption was correct until QEMU v4.2 introduced a new x86-based machine type - microvm. Due to this assumption, a pair of unnecessary PS/2 inputs are implicitly added to all microvm domains. This patch fixes that by whitelisting machine types which are known to include the i8042 PS/2 controller. Signed-off-by: Kamil Szcz=C4=99k --- src/qemu/qemu_capabilities.c | 20 ++++++++++++++++++++ src/qemu/qemu_capabilities.h | 5 ++++- src/qemu/qemu_domain.c | 28 +++++++++++++++++++++++++--- src/qemu/qemu_domain.h | 1 + src/qemu/qemu_validate.c | 4 ++-- 5 files changed, 52 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2f66a49711..2765fba7c8 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1360,6 +1360,13 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes= [] =3D { { "vhost-user-vga", QEMU_CAPS_DEVICE_VHOST_USER_VGA }, { "ramfb", QEMU_CAPS_DEVICE_RAMFB }, { "max-arm-cpu", QEMU_CAPS_ARM_MAX_CPU }, + /* + * The i8042 controller is a built-in device and is not user-creatable. + * However, since not all machine types include this controller, you s= hould + * avoid checking for this capability directly. + * + * Prefer using virQEMUCapsSupportsI8042() instead. + */ { "i8042", QEMU_CAPS_DEVICE_I8042 }, { "rng-builtin", QEMU_CAPS_OBJECT_RNG_BUILTIN }, { "tpm-spapr", QEMU_CAPS_DEVICE_TPM_SPAPR }, @@ -6008,6 +6015,19 @@ virQEMUCapsSupportsVmport(virQEMUCaps *qemuCaps, STREQ(def->os.machine, "isapc"); } =20 +bool +virQEMUCapsSupportsI8042(virQEMUCaps *qemuCaps, + const virDomainDef *def) +{ + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_I8042)) + return false; + + return qemuDomainIsI440FX(def) || + qemuDomainIsQ35(def) || + qemuDomainIsXenFV(def) || + STREQ(def->os.machine, "isapc"); +} + =20 /* * The preferred machine to use if none is listed explicitly diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index edeb870e01..659efd9182 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -535,7 +535,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_SMP_DIES, /* -smp dies=3D */ =20 /* 350 */ - QEMU_CAPS_DEVICE_I8042, /* PS/2 controller */ + QEMU_CAPS_DEVICE_I8042, /* PS/2 controller, use virQEMUCapsSupportsI80= 42() to query this capability */ QEMU_CAPS_OBJECT_RNG_BUILTIN, /* -object rng-builtin */ X_QEMU_CAPS_VIRTIO_NET_FAILOVER, /* virtio-net-*.failover */ QEMU_CAPS_DEVICE_TPM_SPAPR, /* -device tpm-spapr */ @@ -718,6 +718,9 @@ void virQEMUCapsInitProcessCapsInterlock(virQEMUCaps *q= emuCaps); bool virQEMUCapsSupportsVmport(virQEMUCaps *qemuCaps, const virDomainDef *def); =20 +bool virQEMUCapsSupportsI8042(virQEMUCaps *qemuCaps, + const virDomainDef *def); + const char *virQEMUCapsGetBinary(virQEMUCaps *qemuCaps); virArch virQEMUCapsGetArch(virQEMUCaps *qemuCaps); unsigned int virQEMUCapsGetVersion(virQEMUCaps *qemuCaps); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f87ba6ba51..2b4bb54efc 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3925,9 +3925,10 @@ virXMLNamespace virQEMUDriverDomainXMLNamespace =3D { =20 =20 static int -qemuDomainDefAddImplicitInputDevice(virDomainDef *def) +qemuDomainDefAddImplicitInputDevice(virDomainDef *def, + virQEMUCaps *qemuCaps) { - if (ARCH_IS_X86(def->os.arch)) { + if (virQEMUCapsSupportsI8042(qemuCaps, def)) { if (virDomainDefMaybeAddInput(def, VIR_DOMAIN_INPUT_TYPE_MOUSE, VIR_DOMAIN_INPUT_BUS_PS2) < 0) @@ -4166,7 +4167,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, bool addITCOWatchdog =3D false; =20 /* add implicit input devices */ - if (qemuDomainDefAddImplicitInputDevice(def) < 0) + if (qemuDomainDefAddImplicitInputDevice(def, qemuCaps) < 0) return -1; =20 /* Add implicit PCI root controller if the machine has one */ @@ -9177,6 +9178,21 @@ qemuDomainMachineIsMipsMalta(const char *machine, return false; } =20 +static bool +qemuDomainMachineIsXenFV(const char *machine, + const virArch arch) +{ + if (!ARCH_IS_X86(arch)) + return false; + + if (STREQ(machine, "xenfv") || + STRPREFIX(machine, "xenfv-")) { + return true; + } + + return false; +} + =20 /* You should normally avoid this function and use * qemuDomainHasBuiltinIDE() instead. */ @@ -9263,6 +9279,12 @@ qemuDomainIsLoongArchVirt(const virDomainDef *def) return qemuDomainMachineIsLoongArchVirt(def->os.machine, def->os.arch); } =20 +bool +qemuDomainIsXenFV(const virDomainDef *def) +{ + return qemuDomainMachineIsXenFV(def->os.machine, def->os.arch); +} + =20 bool qemuDomainHasPCIRoot(const virDomainDef *def) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index af0bb04c45..1179b0d6dc 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -838,6 +838,7 @@ bool qemuDomainIsLoongArchVirt(const virDomainDef *def); bool qemuDomainIsRISCVVirt(const virDomainDef *def); bool qemuDomainIsPSeries(const virDomainDef *def); bool qemuDomainIsMipsMalta(const virDomainDef *def); +bool qemuDomainIsXenFV(const virDomainDef *def); bool qemuDomainHasPCIRoot(const virDomainDef *def); bool qemuDomainHasPCIeRoot(const virDomainDef *def); bool qemuDomainHasBuiltinIDE(const virDomainDef *def); diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index b885fe7c77..6f7aeababe 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4868,8 +4868,8 @@ qemuValidateDomainDeviceDefInput(const virDomainInput= Def *input, int cap; int ccwCap; =20 - if (input->bus =3D=3D VIR_DOMAIN_INPUT_BUS_PS2 && !ARCH_IS_X86(def->os= .arch) && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_I8042)) { + if (input->bus =3D=3D VIR_DOMAIN_INPUT_BUS_PS2 && + !virQEMUCapsSupportsI8042(qemuCaps, def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("%1$s is not supported by this QEMU binary"), virDomainInputBusTypeToString(input->bus)); --=20 2.45.0 From nobody Sat Nov 23 16:18:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=none dis=none) header.from=szczek.dev ARC-Seal: i=1; a=rsa-sha256; t=1723453863; cv=none; d=zohomail.com; s=zohoarc; b=jmwdHtd5F2Wbeog/5ImqEDagp1bmYI07sw8HkGcg2jO9t++n8QvirDsVKv1frS4CyVbzOd9P3zemrY+R9tQBg0PC5WkMdwqBiSCnnWshSKLqzO2UH3vuHJBrXsrbJ3eKE/sGf6HycVOBYBC9RNjULbVF2bJhZFtRWsf0G1JJ6HA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723453863; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=MvnYEawdrsN5cyJps0mWeFAk8Ia5UMoRue5ttrKnAoA=; b=SDGZ1VjEzHWFwRos7SrcahEFAGy9pVClcmnn4SeQ3cRQttZOGkibSCAC84ayhENi1UIAgGVLXk/rBDREZ6WCnWc5u+EfOScdFvkdVF4XUbT4CemjRFN4WvnsBXgGzfQ7+eX/Flz0JowyiLdUd/PX/V2ALuxcBouSZrJWUIMAwhc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1723453863895257.1514276317016; Mon, 12 Aug 2024 02:11:03 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id C48EF1575; Mon, 12 Aug 2024 05:11:02 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 49B3815CF; Mon, 12 Aug 2024 05:08:58 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9812013E9; Sun, 11 Aug 2024 12:55:37 -0400 (EDT) Received: from mail-41103.protonmail.ch (mail-41103.protonmail.ch [185.70.41.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 0ABC213C8 for ; Sun, 11 Aug 2024 12:55:37 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szczek.dev; s=protonmail3; t=1723395330; x=1723654530; bh=MvnYEawdrsN5cyJps0mWeFAk8Ia5UMoRue5ttrKnAoA=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=ZofPR/6m0ItA5YQurK5gaFCDmDsUy+W+X6FFpud4uLSZbR7v1IN/dERomVUKMpW0o 3ZT6kHd2YP4N4WDQosMg2CirF9fT5zukG7rR012IYmGp5iZmnNEgcOEo7xEPfT4xce kyy35x4i3aCVAo8ApgUr/aUMQHn3bMbu7xxd8sZVkJqln75i5YbqjiDJVBZZUp4PJa OEcT5rzNW2QMkpGixPELOLth2f7IpPbeFwwIxPH7mhLUp5CNH02NUdjF953iJWsOc/ IfIC7AJ7o0ptL3gSHNVTJ0wUIQszDv+WRosIO2SSuXhpHuIUFJCkIWb4CWK1u99rAA 6Q+l0VEcjbZyw== Date: Sun, 11 Aug 2024 16:55:27 +0000 To: "devel@lists.libvirt.org" From: =?utf-8?Q?Kamil_Szcz=C4=99k?= Subject: [PATCH v2 2/6] qemu_capabilities: Introduce QEMU_CAPS_MACHINE_I8042_OPT Message-ID: In-Reply-To: References: Feedback-ID: 37679334:user:proton X-Pm-Message-ID: 0a11fb6c47fab9427df850a4bc9416614cd64976 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MailFrom: kamil@szczek.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 Message-ID-Hash: DS2FVMTBPGZMKPYUFDROKF7QFMDRJD6T X-Message-ID-Hash: DS2FVMTBPGZMKPYUFDROKF7QFMDRJD6T X-Mailman-Approved-At: Mon, 12 Aug 2024 09:08:49 -0400 X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: pass (identity @szczek.dev) X-ZM-MESSAGEID: 1723453864534116600 Content-Type: text/plain; charset="utf-8" This capability tells us whether given QEMU binary supports the '-machine xxx,i8042=3Don/off' toggle used to enable/disable PS/2 controller emulation. A few facts: - This option was introduced in QEMU 7.0 and defaults to 'on' - QEMU versions before 7.0 enabled i8042 controller emulation implicitly - This option (and i8042 controller emulation itself) is only supported by descendants of the generic PC machine type (e.g. i440fx, q35, etc.) Signed-off-by: Kamil Szcz=C4=99k --- src/qemu/qemu_capabilities.c | 22 ++++++++++++++++++++++ src/qemu/qemu_capabilities.h | 4 ++++ 2 files changed, 26 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2765fba7c8..191a04ea53 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -714,6 +714,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "netdev.user", /* QEMU_CAPS_NETDEV_USER */ "acpi-erst", /* QEMU_CAPS_DEVICE_ACPI_ERST */ "intel-iommu.dma-translation", /* QEMU_CAPS_INTEL_IOMMU_DMA_= TRANSLATION */ + "machine-i8042-opt", /* QEMU_CAPS_MACHINE_I8042_OPT */ ); =20 =20 @@ -1754,6 +1755,10 @@ static struct virQEMUCapsStringFlags virQEMUCapsMach= inePropsGeneric[] =3D { { "confidential-guest-support", QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SU= PPORT }, }; =20 +static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsGenericPC[] = =3D { + { "i8042", QEMU_CAPS_MACHINE_I8042_OPT }, +}; + static virQEMUCapsObjectTypeProps virQEMUCapsMachineProps[] =3D { { "pseries", virQEMUCapsMachinePropsPSeries, G_N_ELEMENTS(virQEMUCapsMachinePropsPSeries), @@ -1764,6 +1769,9 @@ static virQEMUCapsObjectTypeProps virQEMUCapsMachineP= rops[] =3D { { "none", virQEMUCapsMachinePropsGeneric, G_N_ELEMENTS(virQEMUCapsMachinePropsGeneric), -1 }, + { "generic-pc", virQEMUCapsMachinePropsGenericPC, + G_N_ELEMENTS(virQEMUCapsMachinePropsGenericPC), + -1 }, }; =20 static void @@ -2900,6 +2908,7 @@ virQEMUCapsProbeQMPMachineProps(virQEMUCaps *qemuCaps, g_auto(GStrv) values =3D NULL; =20 if (STRNEQ(canon, "none") && + (!ARCH_IS_X86(qemuCaps->arch) || STRNEQ(canon, "generic-pc")) = && !virQEMUCapsIsMachineSupported(qemuCaps, virtType, canon)) { continue; } @@ -6028,6 +6037,19 @@ virQEMUCapsSupportsI8042(virQEMUCaps *qemuCaps, STREQ(def->os.machine, "isapc"); } =20 +bool +virQEMUCapsSupportsI8042Toggle(virQEMUCaps *qemuCaps, + const virDomainDef *def) +{ + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_I8042_OPT)) + return false; + + return qemuDomainIsI440FX(def) || + qemuDomainIsQ35(def) || + qemuDomainIsXenFV(def) || + STREQ(def->os.machine, "isapc"); +} + =20 /* * The preferred machine to use if none is listed explicitly diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 659efd9182..5b03d28a2c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -693,6 +693,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_NETDEV_USER, /* -netdev user */ QEMU_CAPS_DEVICE_ACPI_ERST, /* -device acpi-erst */ QEMU_CAPS_INTEL_IOMMU_DMA_TRANSLATION, /* intel-iommu.dma-translation = */ + QEMU_CAPS_MACHINE_I8042_OPT, /* -machine xxx,i8042=3Don/off */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; @@ -721,6 +722,9 @@ bool virQEMUCapsSupportsVmport(virQEMUCaps *qemuCaps, bool virQEMUCapsSupportsI8042(virQEMUCaps *qemuCaps, const virDomainDef *def); =20 +bool virQEMUCapsSupportsI8042Toggle(virQEMUCaps *qemuCaps, + const virDomainDef *def); + const char *virQEMUCapsGetBinary(virQEMUCaps *qemuCaps); virArch virQEMUCapsGetArch(virQEMUCaps *qemuCaps); unsigned int virQEMUCapsGetVersion(virQEMUCaps *qemuCaps); --=20 2.45.0 From nobody Sat Nov 23 16:18:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=none dis=none) header.from=szczek.dev ARC-Seal: i=1; a=rsa-sha256; t=1723453980; cv=none; d=zohomail.com; s=zohoarc; b=JOH3Nv5zKWfWuV0WGOVlJXmrExzoIiqymrxf2A8T33i7S4FF8TRyXFuRRKCaKeVhVWY07Gp8p0sUw1TqQl6cjCV3OE+35GQpj6t4yN5JlKQibqc3OISmHzyCyfy+gvp/hcSs2q2qO6H4+0x2VMgqWMdzY/H67dvINLonpse1wJI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723453980; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=+dL9AM2z9ee8BInWCyHMYy/5ecX915N68qqBWPHDGYs=; b=OGwmyJGHs6GRl4Lz46Dxdw+dkXKHiy1FihOhWLdWxKeqQn5rC4Ommr2l62N/lVx9xmzZGHtcgd1Hoz2bvrdGiOzMzmt69OF373+WjKXXW5lbQKQ5Mq9xD+VruhmIMSynDhAqRXqEm3IG5vtHvniSTm1R8c3RG9jKdsXFZ+WTz4Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1723453980835913.7404551096785; Mon, 12 Aug 2024 02:13:00 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 74AC015E1; Mon, 12 Aug 2024 05:12:59 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A630015D1; Mon, 12 Aug 2024 05:09:00 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 17DBA13C8; Sun, 11 Aug 2024 12:56:47 -0400 (EDT) Received: from mail-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 847FA130F for ; Sun, 11 Aug 2024 12:56:44 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szczek.dev; s=protonmail3; t=1723395402; x=1723654602; bh=+dL9AM2z9ee8BInWCyHMYy/5ecX915N68qqBWPHDGYs=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Nm6HbxxobJbhSGlgecKMQr/YE2W/Batst69NE9szFoIPpdfEopsKAGwltLCQfQ8pS 2L14ezK9EJhmG9trZ7eu8p9CcAkCYaA51IvVSA23o2BWpGKSf2KY7apvCyuUiQVEIb W3K4z6FIMp04N/ZyvdIDx23yVLjUEvmzryxUcnuy0PpSOljj6s52apedi1p7F5/Yoh pOJXwmQLYq1V1P53THwfQz59MHcboLpvfWQhbzD4nciwSeeOBhVfEuaKpRybWZB61b 9d6nmekLW3/afQM0ieKshjFUJw5RfWPqs4a9OjzNuRIYLtpQ1sMXuJ10b00gl8Ry89 njBbmKRqdD+rQ== Date: Sun, 11 Aug 2024 16:56:36 +0000 To: "devel@lists.libvirt.org" From: =?utf-8?Q?Kamil_Szcz=C4=99k?= Subject: [PATCH v2 3/6] qemucapabilitiesdata: Add data for QEMU_CAPS_MACHINE_I8042_OPT Message-ID: In-Reply-To: References: Feedback-ID: 37679334:user:proton X-Pm-Message-ID: 2e4d5613d8ec97c78bcb4bbd292c2b4b45f430ef MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MailFrom: kamil@szczek.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 Message-ID-Hash: KZK4CYFBA5Q746APNIRKOGSZTWRXJMLL X-Message-ID-Hash: KZK4CYFBA5Q746APNIRKOGSZTWRXJMLL X-Mailman-Approved-At: Mon, 12 Aug 2024 09:08:49 -0400 X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: pass (identity @szczek.dev) X-ZM-MESSAGEID: 1723453983073116600 Content-Type: text/plain; charset="utf-8" The new QEMU_CAPS_MACHINE_I8042_OPT capability introduced a necessity to perform a QEMU monitor query for properties of the generic PC machine type. Below is an overview of how these properties changed over time in QEMU versions currently supported by libvirt: 5.2 -> 6.0 + x-oem-table-id + x-oem-id + max-fw-size + confidential-guest-support 6.0 -> 6.1 + smp + bus-lock-ratelimit + default_bus_bypass_iommu 6.1 -> 6.2 + sgx-epc + default-bus-bypass-iommu - default_bus_bypass_iommu 6.2 -> 7.0 + smbios-entry-point-type + i8042 7.0 -> 7.1 + pic + boot + memory 7.1 -> 8.0 no changes 8.0 -> 8.1 - device-memory-region-size 8.1 -> 8.2 no changes 8.2 -> 9.0 + fd-bootchk 9.0 -> 9.1 no changes Signed-off-by: Kamil Szcz=C4=99k --- .../caps_5.2.0_x86_64.replies | 169 ++++++++++-- .../caps_6.0.0_x86_64.replies | 189 ++++++++++++-- .../caps_6.1.0_x86_64.replies | 203 +++++++++++++-- .../caps_6.2.0_x86_64.replies | 212 ++++++++++++++-- .../caps_7.0.0_x86_64.replies | 225 ++++++++++++++-- .../caps_7.0.0_x86_64.xml | 1 + .../caps_7.1.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_7.1.0_x86_64.xml | 1 + .../caps_7.2.0_x86_64+hvf.replies | 240 ++++++++++++++++-- .../caps_7.2.0_x86_64+hvf.xml | 1 + .../caps_7.2.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_7.2.0_x86_64.xml | 1 + .../caps_8.0.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_8.0.0_x86_64.xml | 1 + .../caps_8.1.0_x86_64.replies | 236 +++++++++++++++-- .../caps_8.1.0_x86_64.xml | 1 + .../caps_8.2.0_x86_64.replies | 236 +++++++++++++++-- .../caps_8.2.0_x86_64.xml | 1 + .../caps_9.0.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_9.0.0_x86_64.xml | 1 + .../caps_9.1.0_x86_64.replies | 240 ++++++++++++++++-- .../caps_9.1.0_x86_64.xml | 1 + 22 files changed, 2665 insertions(+), 254 deletions(-) diff --git a/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_5.2.0_x86_64.replies index 58ac2c0eaa..3f5405d83e 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.replies @@ -22907,10 +22907,143 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "string" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "smbus", + "type": "bool" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "pit", + "type": "bool" + }, + { + "name": "sata", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "hpet", + "type": "bool" + } + ], "id": "libvirt-41" } =20 +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -24689,12 +24822,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -24702,12 +24835,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -24715,12 +24848,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -26004,12 +26137,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -26087,16 +26220,16 @@ "capability": "validate-uuid" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV is not enabled in KVM" @@ -26111,7 +26244,7 @@ "name": "host" } }, - "id": "libvirt-47" + "id": "libvirt-48" } =20 { @@ -26420,7 +26553,7 @@ } } }, - "id": "libvirt-47" + "id": "libvirt-48" } =20 { @@ -26434,7 +26567,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -26743,7 +26876,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -26758,7 +26891,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -27067,7 +27200,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_6.0.0_x86_64.replies index 88948d306a..5380b322d2 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.replies @@ -24735,10 +24735,163 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "string" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "pit", + "type": "bool" + }, + { + "name": "hpet", + "type": "bool" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "type": "bool" + } + ], "id": "libvirt-41" } =20 +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -26560,12 +26713,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -26573,12 +26726,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -26586,12 +26739,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -27899,12 +28052,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -27986,12 +28139,12 @@ "capability": "background-snapshot" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { @@ -28001,7 +28154,7 @@ "cert-chain": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA= ", "pdh": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAA= OAAA" }, - "id": "libvirt-46" + "id": "libvirt-47" } =20 { @@ -28012,7 +28165,7 @@ "name": "host" } }, - "id": "libvirt-47" + "id": "libvirt-48" } =20 { @@ -28333,7 +28486,7 @@ } } }, - "id": "libvirt-47" + "id": "libvirt-48" } =20 { @@ -28347,7 +28500,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -28668,7 +28821,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -28683,7 +28836,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -29004,7 +29157,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_6.1.0_x86_64.replies index 5872007954..6fb37d63d5 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.replies @@ -25009,10 +25009,177 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "string" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "pit", + "type": "bool" + }, + { + "name": "hpet", + "type": "bool" + }, + { + "name": "default_bus_bypass_iommu", + "type": "bool" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "type": "bool" + } + ], "id": "libvirt-41" } =20 +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -27022,12 +27189,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -27035,12 +27202,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -27048,12 +27215,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -28373,12 +28540,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -28460,16 +28627,16 @@ "capability": "background-snapshot" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "Failed to open /dev/sev: No such file or directory" @@ -28484,7 +28651,7 @@ "name": "host" } }, - "id": "libvirt-47" + "id": "libvirt-48" } =20 { @@ -28807,7 +28974,7 @@ } } }, - "id": "libvirt-47" + "id": "libvirt-48" } =20 { @@ -28821,7 +28988,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -29144,7 +29311,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -29159,7 +29326,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -29482,7 +29649,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_6.2.0_x86_64.replies index bd7e1f00a4..b2b6bcdf0d 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.replies @@ -28257,10 +28257,182 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } =20 +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "string" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "pit", + "type": "bool" + }, + { + "name": "hpet", + "type": "bool" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -30282,12 +30454,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -30295,12 +30467,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -30308,12 +30480,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -31633,12 +31805,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -31720,16 +31892,16 @@ "capability": "background-snapshot" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -31738,11 +31910,11 @@ =20 { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } =20 { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -31757,7 +31929,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -32090,7 +32262,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -32104,7 +32276,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -32437,7 +32609,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -32452,7 +32624,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -32785,7 +32957,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_7.0.0_x86_64.replies index 9c639b3c31..1ad960c99b 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.replies @@ -28827,10 +28827,195 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "string" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "pit", + "description": "Enable/disable Intel 8254 programmable interval time= r emulation", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], "id": "libvirt-41" } =20 +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -30888,12 +31073,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -30901,12 +31086,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -30914,12 +31099,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -32243,12 +32428,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -32330,16 +32515,16 @@ "capability": "background-snapshot" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -32348,7 +32533,7 @@ =20 { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } =20 { @@ -32369,7 +32554,7 @@ } ] }, - "id": "libvirt-47" + "id": "libvirt-48" } =20 { @@ -32380,7 +32565,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -32717,7 +32902,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -32731,7 +32916,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -33068,7 +33253,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -33083,7 +33268,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -33420,7 +33605,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.0.0_x86_64.xml index fea02f7728..23b626aa16 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml @@ -188,6 +188,7 @@ + 7000000 43100243 v7.0.0 diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_7.1.0_x86_64.replies index 302a34fd49..cd2116d05a 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.replies @@ -29615,10 +29615,210 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } =20 +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "link" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -31555,12 +31755,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -31568,12 +31768,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -31581,12 +31781,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -32910,12 +33110,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -33005,16 +33205,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -33023,11 +33223,11 @@ =20 { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } =20 { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -33042,7 +33242,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -33380,7 +33580,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -33394,7 +33594,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -33732,7 +33932,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -33747,7 +33947,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -34085,7 +34285,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.1.0_x86_64.xml index 9737e3d083..81c4cc474b 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml @@ -193,6 +193,7 @@ + 7001000 43100244 v7.1.0 diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies b/tes= ts/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies index 0cfbbb7aa0..c85be45cd1 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies @@ -30612,10 +30612,210 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } =20 +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "link" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -32552,12 +32752,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -32565,12 +32765,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -32578,12 +32778,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -33907,12 +34107,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -34002,16 +34202,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -34020,11 +34220,11 @@ =20 { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } =20 { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -34039,7 +34239,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -34377,7 +34577,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -34391,7 +34591,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -34729,7 +34929,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -34744,7 +34944,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -35082,7 +35282,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml b/tests/q= emucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml index 55dcbf203e..18d74d6e8c 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml @@ -197,6 +197,7 @@ + 7002000 43100245 v7.2.0 diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_7.2.0_x86_64.replies index 0f4ba1722f..4b56adeafa 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.replies @@ -30612,10 +30612,210 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } =20 +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "link" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -32552,12 +32752,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -32565,12 +32765,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -32578,12 +32778,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -33907,12 +34107,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -34002,16 +34202,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -34020,11 +34220,11 @@ =20 { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } =20 { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -34039,7 +34239,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -34377,7 +34577,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -34391,7 +34591,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -34729,7 +34929,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -34744,7 +34944,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -35082,7 +35282,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.2.0_x86_64.xml index 1253c860ee..fb52a30f04 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml @@ -197,6 +197,7 @@ + 7002000 43100245 v7.2.0 diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_8.0.0_x86_64.replies index fc5aab3828..4cad376388 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.replies @@ -32086,10 +32086,210 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } =20 +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "link" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "device-memory-region-size", + "type": "int" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -34133,12 +34333,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -34146,12 +34346,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -34159,12 +34359,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -35605,12 +35805,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -35700,16 +35900,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -35718,11 +35918,11 @@ =20 { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } =20 { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -35737,7 +35937,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -36080,7 +36280,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -36094,7 +36294,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -36437,7 +36637,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -36452,7 +36652,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -36901,7 +37101,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_8.0.0_x86_64.xml index d3901fef05..91a4ca7f4a 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml @@ -201,6 +201,7 @@ + 8000000 43100244 v8.0.0 diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_8.1.0_x86_64.replies index 3972c34b48..888a5d3b6a 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.replies @@ -32946,10 +32946,206 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "link" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], "id": "libvirt-41" } =20 +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -35329,12 +35525,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -35342,12 +35538,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -35355,12 +35551,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -36818,12 +37014,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -36921,16 +37117,16 @@ "capability": "dirty-limit" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -36939,11 +37135,11 @@ =20 { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } =20 { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -36958,7 +37154,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -37321,7 +37517,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -37335,7 +37531,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -37698,7 +37894,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -37713,7 +37909,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -38182,7 +38378,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_8.1.0_x86_64.xml index f8a9993ede..a792c0e365 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml @@ -203,6 +203,7 @@ + 8001000 43100245 v8.1.0 diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_8.2.0_x86_64.replies index cc2190dfd3..33e4978c38 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.replies @@ -33638,10 +33638,206 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, + "id": "libvirt-41" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "link" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], "id": "libvirt-41" } =20 +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -36021,12 +36217,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -36034,12 +36230,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -36047,12 +36243,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -37523,12 +37719,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -37626,16 +37822,16 @@ "capability": "dirty-limit" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -37644,11 +37840,11 @@ =20 { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } =20 { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -37663,7 +37859,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -38030,7 +38226,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -38044,7 +38240,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -38411,7 +38607,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -38426,7 +38622,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -38899,7 +39095,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_8.2.0_x86_64.xml index 43d7105c2d..c049500cbc 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml @@ -206,6 +206,7 @@ + 8002000 43100246 v8.2.0 diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_9.0.0_x86_64.replies index 5d36853ce3..89fefb863b 100644 --- a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.replies @@ -33880,10 +33880,210 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } =20 +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "link" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "fd-bootchk", + "type": "bool" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -36263,12 +36463,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -36276,12 +36476,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -36289,12 +36489,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -37769,12 +37969,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -37876,16 +38076,16 @@ "capability": "mapped-ram" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -37894,11 +38094,11 @@ =20 { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } =20 { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -37913,7 +38113,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -38281,7 +38481,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -38295,7 +38495,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -38663,7 +38863,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -38678,7 +38878,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -39152,7 +39352,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_9.0.0_x86_64.xml index e96af86a92..ea0ff8d444 100644 --- a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml @@ -208,6 +208,7 @@ + 9000000 43100245 v9.0.0 diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.replies b/tests/q= emucapabilitiesdata/caps_9.1.0_x86_64.replies index 73fb8f195b..771ec5b0cd 100644 --- a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.replies @@ -34379,10 +34379,210 @@ } =20 { - "execute": "query-cpu-definitions", + "execute": "qom-list-properties", + "arguments": { + "typename": "generic-pc-machine" + }, "id": "libvirt-41" } =20 +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "boot", + "description": "Boot configuration", + "type": "BootConfiguration" + }, + { + "name": "memory", + "description": "Memory size configuration", + "type": "MemorySizeConfiguration" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "confidential-guest-support", + "description": "Set confidential guest scheme to support", + "type": "link" + }, + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "memory-encryption", + "description": "Set memory encryption object to use", + "type": "string" + }, + { + "name": "smp", + "description": "CPU topology", + "type": "SMPConfiguration" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "memory-backend", + "description": "Set RAM backendValid value is ID of hostmem based ba= ckend", + "type": "link" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "smm", + "description": "Enable SMM", + "type": "OnOffAuto" + }, + { + "name": "acpi", + "description": "Enable ACPI", + "type": "OnOffAuto" + }, + { + "name": "pit", + "description": "Enable i8254 PIT", + "type": "OnOffAuto" + }, + { + "name": "pic", + "description": "Enable i8259 PIC", + "type": "OnOffAuto" + }, + { + "name": "x-oem-table-id", + "description": "Override the default value of field OEM Table ID in = ACPI table header.The string may be up to 8 bytes in size", + "type": "string" + }, + { + "name": "bus-lock-ratelimit", + "description": "Set the ratelimit for the bus locks acquired in VMs", + "type": "uint64_t" + }, + { + "name": "sgx-epc", + "description": "SGX EPC device", + "type": "SgxEPC" + }, + { + "name": "x-oem-id", + "description": "Override the default value of field OEMID in ACPI ta= ble header.The string may be up to 6 bytes in size", + "type": "string" + }, + { + "name": "max-fw-size", + "description": "Maximum combined firmware size", + "type": "size" + }, + { + "name": "default-bus-bypass-iommu", + "type": "bool" + }, + { + "name": "sata", + "description": "Enable/disable Serial ATA bus", + "type": "bool" + }, + { + "name": "vmport", + "description": "Enable vmport (pc & q35)", + "type": "OnOffAuto" + }, + { + "name": "i8042", + "type": "bool" + }, + { + "name": "hpet", + "description": "Enable/disable high precision event timer emulation", + "type": "bool" + }, + { + "name": "smbios-entry-point-type", + "description": "SMBIOS Entry Point type [32, 64]", + "type": "str" + }, + { + "name": "max-ram-below-4g", + "description": "Maximum ram below the 4G boundary (32bit boundary)", + "type": "size" + }, + { + "name": "fd-bootchk", + "type": "bool" + }, + { + "name": "smbus", + "description": "Enable/disable system management bus", + "type": "bool" + } + ], + "id": "libvirt-41" +} + +{ + "execute": "query-cpu-definitions", + "id": "libvirt-42" +} + { "return": [ { @@ -36931,12 +37131,12 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -36944,12 +37144,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -36957,12 +37157,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -38445,12 +38645,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -38544,16 +38744,16 @@ "capability": "mapped-ram" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { - "id": "libvirt-46", + "id": "libvirt-47", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -38562,11 +38762,11 @@ =20 { "execute": "query-sgx-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } =20 { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "Could not open '/dev/sgx_vepc': No such file or directory" @@ -38581,7 +38781,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -38959,7 +39159,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -38973,7 +39173,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -39351,7 +39551,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -39366,7 +39566,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -39854,7 +40054,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_9.1.0_x86_64.xml index c3cb6efc61..612a68e468 100644 --- a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml @@ -206,6 +206,7 @@ + 9000090 43100246 v9.1.0-rc0-121-g75c7f57403 --=20 2.45.0 From nobody Sat Nov 23 16:18:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=none dis=none) header.from=szczek.dev ARC-Seal: i=1; a=rsa-sha256; t=1723454013; cv=none; d=zohomail.com; s=zohoarc; b=B+X9qGw++BJKZ4vngw/vlSQ7GEl4PQZvVW7RdEdJbZaa+yrVd5zL1cWOMab2DaXDAa0elmddKIZ9g7h1l/ebqtKUTM5fv0lWuCUXcGE793FLsLEdAvtxDGbh4eW/Y2140nGhpzJcJCiOOxnpuQBXkaKP4zrjVwQeo9f5nYrTZcI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723454013; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ZzmzYper7+P0hGk5nS0+SyZX/JircJb84vge38Ixg/c=; b=U2ZVM5JM1u/E8MeILBvJbCoQQ0rhpsQ1aIfZ1LsNy0qekOwfeRe7L5EVVNjMRRTMg9anR3i9QlP+pM6FmBxHeZcihTg9J0paqeQSkuedF1+3B43U2FKoorR8QZak54Yw++LTDGwmgqNMzKaxhKLmgLXXFFlFl7jzFNqmFjax71o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1723454012999833.4771162397249; Mon, 12 Aug 2024 02:13:32 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id EB87D1612; Mon, 12 Aug 2024 05:13:31 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id B994915E5; Mon, 12 Aug 2024 05:09:03 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 1EFA513C8; Sun, 11 Aug 2024 12:57:29 -0400 (EDT) Received: from mail-4018.proton.ch (mail-4018.proton.ch [185.70.40.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 3EF41130F for ; Sun, 11 Aug 2024 12:57:28 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-Greylist: delayed 175 seconds by postgrey-1.37 at lists.libvirt.org; Sun, 11 Aug 2024 12:57:28 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szczek.dev; s=protonmail3; t=1723395447; x=1723654647; bh=ZzmzYper7+P0hGk5nS0+SyZX/JircJb84vge38Ixg/c=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=GOCsvlD9ULV5GPRxd0crI/IErjQ+vlHl2Dy2xzZuBLoeK2uSub+9X/icqAY+lE73R HAEou0hgL2yuYVg1Q4MasQUWeyoz5F7l87/UY4LTMeJ9rfmedprxJduKjzI6VmMFJK losQ4ti7gYYvhM68I2ZvMi/PnG+yfe372rbnDhJhqvxXQqq5/qQPZKLv1fdiflos21 dg9utBKRPlxgU3RYN1OPAiJCViS2yNUtcPMPa8fc43cvCvduyfHOvqCvFsjhOMu2ul +5+JLXiEmsSoA0nl6fG2Fjvuzd/UBhEWlY9vz/F+ZFSOW+SKCQdd49Z7+wwcmFEbto d/9lJyaSAZ5TA== Date: Sun, 11 Aug 2024 16:57:24 +0000 To: "devel@lists.libvirt.org" From: =?utf-8?Q?Kamil_Szcz=C4=99k?= Subject: [PATCH v2 4/6] qemu: Introduce 'ps2' feature Message-ID: In-Reply-To: References: Feedback-ID: 37679334:user:proton X-Pm-Message-ID: 9431b8e0b2788af19b437826b5940eeb57dc1ba0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MailFrom: kamil@szczek.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 Message-ID-Hash: 3ZQSCSEJ5JLLOAKORZZDQWYLAJN7IUCQ X-Message-ID-Hash: 3ZQSCSEJ5JLLOAKORZZDQWYLAJN7IUCQ X-Mailman-Approved-At: Mon, 12 Aug 2024 09:08:49 -0400 X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: pass (identity @szczek.dev) X-ZM-MESSAGEID: 1723454015077116600 Content-Type: text/plain; charset="utf-8" This introduces a new 'ps2' feature which, when disabled, results in no implicit PS/2 bus input devices being automatically added to the domain and addition of the 'i8042=3Doff' machine option to the QEMU command-line. A notable side effect of disabling the i8042 controller in QEMU is that the vmport device won't be created. For this reason we will not allow setting the vmport feature if the ps2 feature is explicitly disabled. Signed-off-by: Kamil Szcz=C4=99k --- docs/formatdomain.rst | 5 +++++ src/conf/domain_conf.c | 6 +++++- src/conf/domain_conf.h | 1 + src/conf/domain_validate.c | 23 +++++++++++++++++++++++ src/conf/schemas/domaincommon.rng | 5 +++++ src/qemu/qemu_command.c | 5 +++++ src/qemu/qemu_domain.c | 3 ++- src/qemu/qemu_validate.c | 23 +++++++++++++++++++++++ 8 files changed, 69 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index e1e219bcb5..12c34887dd 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -2262,6 +2262,11 @@ are: exceptions when enabled (``on``). If the attribute is not defined, the hypervisor default will be used. :since:`Since 10.4.0` (QEMU/KVM and ARM virt guests only) +``ps2`` + Depending on the ``state`` attribute (values ``on``, ``off``) enable or + disable the emulation of a PS/2 controller used by ``ps2`` bus input de= vices. + If the attribute is not defined, the hypervisor default will be used. + :since:`Since 10.7.0` (QEMU only) =20 Time keeping ------------ diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d950921667..a897b0b727 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -185,6 +185,7 @@ VIR_ENUM_IMPL(virDomainFeature, "tcg", "async-teardown", "ras", + "ps2", ); =20 VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, @@ -17019,7 +17020,8 @@ virDomainFeaturesDefParse(virDomainDef *def, case VIR_DOMAIN_FEATURE_HTM: case VIR_DOMAIN_FEATURE_NESTED_HV: case VIR_DOMAIN_FEATURE_CCF_ASSIST: - case VIR_DOMAIN_FEATURE_RAS: { + case VIR_DOMAIN_FEATURE_RAS: + case VIR_DOMAIN_FEATURE_PS2: { virTristateSwitch state; =20 if (virXMLPropTristateSwitch(nodes[i], "state", @@ -20883,6 +20885,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_FEATURE_NESTED_HV: case VIR_DOMAIN_FEATURE_CCF_ASSIST: case VIR_DOMAIN_FEATURE_RAS: + case VIR_DOMAIN_FEATURE_PS2: if (src->features[i] !=3D dst->features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("State of feature '%1$s' differs: source:= '%2$s', destination: '%3$s'"), @@ -27685,6 +27688,7 @@ virDomainDefFormatFeatures(virBuffer *buf, case VIR_DOMAIN_FEATURE_NESTED_HV: case VIR_DOMAIN_FEATURE_CCF_ASSIST: case VIR_DOMAIN_FEATURE_RAS: + case VIR_DOMAIN_FEATURE_PS2: switch ((virTristateSwitch) def->features[i]) { case VIR_TRISTATE_SWITCH_LAST: case VIR_TRISTATE_SWITCH_ABSENT: diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index eae621f900..f65cdd87b6 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2181,6 +2181,7 @@ typedef enum { VIR_DOMAIN_FEATURE_TCG, VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN, VIR_DOMAIN_FEATURE_RAS, + VIR_DOMAIN_FEATURE_PS2, =20 VIR_DOMAIN_FEATURE_LAST } virDomainFeature; diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 39b8d67928..56f1092841 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -2744,6 +2744,29 @@ virDomainInputDefValidate(const virDomainInputDef *i= nput, return -1; } =20 + switch ((virDomainInputBus) input->bus) { + case VIR_DOMAIN_INPUT_BUS_PS2: + if (def->features[VIR_DOMAIN_FEATURE_PS2] =3D=3D VIR_TRISTATE_SWIT= CH_OFF) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("ps2 bus inputs require the ps2 feature not t= o be disabled")); + return -1; + } + break; + + case VIR_DOMAIN_INPUT_BUS_DEFAULT: + case VIR_DOMAIN_INPUT_BUS_USB: + case VIR_DOMAIN_INPUT_BUS_XEN: + case VIR_DOMAIN_INPUT_BUS_PARALLELS: + case VIR_DOMAIN_INPUT_BUS_VIRTIO: + case VIR_DOMAIN_INPUT_BUS_NONE: + break; + + case VIR_DOMAIN_INPUT_BUS_LAST: + default: + virReportEnumRangeError(virDomainInputBus, input->bus); + return -1; + } + return 0; } =20 diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index 05ba697924..a71f1d97b9 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -6917,6 +6917,11 @@ + + + + + diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 28914c9c34..bb6fee4bfd 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6888,6 +6888,11 @@ qemuAppendDomainFeaturesMachineParam(virBuffer *buf, virBufferAsprintf(buf, ",ras=3D%s", str); } =20 + if (def->features[VIR_DOMAIN_FEATURE_PS2] !=3D VIR_TRISTATE_SWITCH_ABS= ENT) { + const char *str =3D virTristateSwitchTypeToString(def->features[VI= R_DOMAIN_FEATURE_PS2]); + virBufferAsprintf(buf, ",i8042=3D%s", str); + } + return 0; } =20 diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2b4bb54efc..d1767c326d 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3928,7 +3928,8 @@ static int qemuDomainDefAddImplicitInputDevice(virDomainDef *def, virQEMUCaps *qemuCaps) { - if (virQEMUCapsSupportsI8042(qemuCaps, def)) { + if (virQEMUCapsSupportsI8042(qemuCaps, def) && + def->features[VIR_DOMAIN_FEATURE_PS2] !=3D VIR_TRISTATE_SWITCH_OFF= ) { if (virDomainDefMaybeAddInput(def, VIR_DOMAIN_INPUT_TYPE_MOUSE, VIR_DOMAIN_INPUT_BUS_PS2) < 0) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 6f7aeababe..88774f5383 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -143,6 +143,13 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, _("vmport is not available with this QEMU b= inary")); return -1; } + + if (def->features[i] =3D=3D VIR_TRISTATE_SWITCH_ON && + def->features[VIR_DOMAIN_FEATURE_PS2] =3D=3D VIR_TRISTATE_= SWITCH_OFF) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("vmport feature requires the ps2 feature = not to be disabled")); + return -1; + } break; =20 case VIR_DOMAIN_FEATURE_VMCOREINFO: @@ -242,6 +249,22 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, } break; =20 + case VIR_DOMAIN_FEATURE_PS2: + if (def->features[i] !=3D VIR_TRISTATE_SWITCH_ABSENT && + !virQEMUCapsSupportsI8042(qemuCaps, def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("ps2 feature is not available with this Q= EMU binary")); + return -1; + } + + if (def->features[i] !=3D VIR_TRISTATE_SWITCH_ABSENT && + !virQEMUCapsSupportsI8042Toggle(qemuCaps, def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("ps2 feature state cannot be controlled w= ith this QEMU binary")); + return -1; + } + break; + case VIR_DOMAIN_FEATURE_SMM: case VIR_DOMAIN_FEATURE_KVM: case VIR_DOMAIN_FEATURE_XEN: --=20 2.45.0 From nobody Sat Nov 23 16:18:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=none dis=none) header.from=szczek.dev ARC-Seal: i=1; a=rsa-sha256; t=1723454071; cv=none; d=zohomail.com; s=zohoarc; b=Cc+UllbDR4DDSdNMFuiFbntqqZdm7Rnlti/D3F8IfbxoMRby0XG1NeTz2LduIg27tU4GZFC++vN1jaKZMQOjunJwy97vNXlGB1eI7O3h0FSS111JlbG6kX/DWJ6+Yc+6VPrBd8loOgn4yyqJRZv19y7ukcylcoR3YurmqcszsMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723454071; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=HnfLejkdtYBcy+ODUka1EO4TVWupXQ2kqO49Sj5cuF4=; b=OEYiEVWo+CHFq0b/GHlTUNdAj2mBdxFJT4PaB4iFcG84haCoxnH3qot+029t+HhcivnJXghDIEqPUi06qXeCAXdIQYXWXWDmsa1t4p5U4A2EzCwJJz13bfQ2lHjpCPPv4SpeFsujVPt0VUAVyp488xhkwYphkKixV12ecaEN8pQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 172345407177436.010562551571184; Mon, 12 Aug 2024 02:14:31 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B303015AC; Mon, 12 Aug 2024 05:14:30 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 0A39C15E8; Mon, 12 Aug 2024 05:09:06 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 306FA13E9; Sun, 11 Aug 2024 12:58:30 -0400 (EDT) Received: from mail-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 23D7713C8 for ; Sun, 11 Aug 2024 12:58:29 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szczek.dev; s=protonmail3; t=1723395507; x=1723654707; bh=HnfLejkdtYBcy+ODUka1EO4TVWupXQ2kqO49Sj5cuF4=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=k56R0LXJREEM4GXD6cl/XF9wraQH8jw904slUQb6XZWz+P7DmYEQQjZpV4etAaiv9 IdnHLkyP7yUdaBp5KYVuV761NJqq/PMRIVg5EMo8CGA4SchpkD+bzRGkMhzuO9Pfi5 GmVlYRHCj6ddpCf/QTRaBKOe4OcuMzUF4U/E5dUsJpCTHmziv9R4lI20+ZTLfZC41p eo9uf02gEV6i+GfRzeRp8rSIKXBmXtkWLKLb5k4kJGs08nE0Eqm13X3OtUMZIH8AQl 6ozIeo18RFpBsoH4WOl5/pR6a8h1SHa6h1NtcmUAm02jA9nIa3aWBu34gyOEQ8vT7j YaCxqb496tbDQ== Date: Sun, 11 Aug 2024 16:58:22 +0000 To: "devel@lists.libvirt.org" From: =?utf-8?Q?Kamil_Szcz=C4=99k?= Subject: [PATCH v2 5/6] qemuxmlconftest: Add test cases for the new 'ps2' feature Message-ID: In-Reply-To: References: Feedback-ID: 37679334:user:proton X-Pm-Message-ID: 3ffa9c8ec64a5d5efd2a2d55ef074d95c354fe5a MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MailFrom: kamil@szczek.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 Message-ID-Hash: B2O4KVZYTZOP4SPSOB56RYPELKM4NAJH X-Message-ID-Hash: B2O4KVZYTZOP4SPSOB56RYPELKM4NAJH X-Mailman-Approved-At: Mon, 12 Aug 2024 09:08:49 -0400 X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: pass (identity @szczek.dev) X-ZM-MESSAGEID: 1723454073456116600 Content-Type: text/plain; charset="utf-8" Introduce tests to verify that the 'ps2' feature is correctly parsed when given either 'dirty' XML from a user or 'clean' canonical XML, as produced by libvirt. This also tests the transformation from libvirt's internal state to the aforementioned canonical form and to a QEMU command line. As a bonus, we also test some known bad configurations: - When user explicitly adds ps2 bus inputs, but also explicitly disables the 'ps2' feature. - When user explicitly enables the 'vmport' feature, but also explicitly disables the 'ps2' feature. This is not supported by QEMU and will result in vmport device not being created without emitting any warning or error. Signed-off-by: Kamil Szcz=C4=99k --- ...-off-explicit-ps2-inputs.x86_64-latest.err | 1 + .../machine-i8042-off-explicit-ps2-inputs.xml | 19 +++++++++++ ...hine-i8042-off-vmport-on.x86_64-latest.err | 1 + .../machine-i8042-off-vmport-on.xml | 18 ++++++++++ .../machine-i8042-off.x86_64-6.2.0.err | 1 + .../machine-i8042-off.x86_64-latest.args | 33 ++++++++++++++++++ .../machine-i8042-off.x86_64-latest.xml | 32 +++++++++++++++++ tests/qemuxmlconfdata/machine-i8042-off.xml | 17 ++++++++++ .../machine-i8042-on.x86_64-6.2.0.err | 1 + .../machine-i8042-on.x86_64-latest.args | 33 ++++++++++++++++++ .../machine-i8042-on.x86_64-latest.xml | 34 +++++++++++++++++++ tests/qemuxmlconfdata/machine-i8042-on.xml | 17 ++++++++++ tests/qemuxmlconftest.c | 6 ++++ 13 files changed, 213 insertions(+) create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-in= puts.x86_64-latest.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-in= puts.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-vmport-on.x86_6= 4-latest.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off-vmport-on.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-6.2.0.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.a= rgs create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.x= ml create mode 100644 tests/qemuxmlconfdata/machine-i8042-off.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-6.2.0.err create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.ar= gs create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/machine-i8042-on.xml diff --git a/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.x8= 6_64-latest.err b/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inpu= ts.x86_64-latest.err new file mode 100644 index 0000000000..4fed60aa37 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.x86_64-la= test.err @@ -0,0 +1 @@ +unsupported configuration: ps2 bus inputs require the ps2 feature not to b= e disabled diff --git a/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.xm= l b/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.xml new file mode 100644 index 0000000000..f90677670b --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off-explicit-ps2-inputs.xml @@ -0,0 +1,19 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 1 + + hvm + + + + + + /usr/bin/qemu-system-x86_64 + + + + + + diff --git a/tests/qemuxmlconfdata/machine-i8042-off-vmport-on.x86_64-lates= t.err b/tests/qemuxmlconfdata/machine-i8042-off-vmport-on.x86_64-latest.err new file mode 100644 index 0000000000..0c3b7280c0 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off-vmport-on.x86_64-latest.err @@ -0,0 +1 @@ +unsupported configuration: vmport feature requires the ps2 feature not to = be disabled diff --git a/tests/qemuxmlconfdata/machine-i8042-off-vmport-on.xml b/tests/= qemuxmlconfdata/machine-i8042-off-vmport-on.xml new file mode 100644 index 0000000000..957da054b8 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off-vmport-on.xml @@ -0,0 +1,18 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 1 + + hvm + + + + + + + /usr/bin/qemu-system-x86_64 + + + + diff --git a/tests/qemuxmlconfdata/machine-i8042-off.x86_64-6.2.0.err b/tes= ts/qemuxmlconfdata/machine-i8042-off.x86_64-6.2.0.err new file mode 100644 index 0000000000..3a12712915 --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off.x86_64-6.2.0.err @@ -0,0 +1 @@ +unsupported configuration: ps2 feature state cannot be controlled with thi= s QEMU binary diff --git a/tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.args b/t= ests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.args new file mode 100644 index 0000000000..e340d164fc --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.args @@ -0,0 +1,33 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine q35,usb=3Doff,i8042=3Doff,dump-guest-core=3Doff,memory-backend=3D= pc.ram,acpi=3Doff \ +-accel tcg \ +-cpu qemu64 \ +-m size=3D219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=3Doff \ +-watchdog-action reset \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.xml b/te= sts/qemuxmlconfdata/machine-i8042-off.x86_64-latest.xml new file mode 100644 index 0000000000..b5c503e6df --- /dev/null +++ b/tests/qemuxmlconfdata/machine-i8042-off.x86_64-latest.xml @@ -0,0 +1,32 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + +
+ + +