From nobody Sun Dec 14 12:17:08 2025 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=fail header.i=@intel.com; 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=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1751264797109264.542971332878; Sun, 29 Jun 2025 23:26:37 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 3247D146E; Mon, 30 Jun 2025 02:26:36 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 3862A14B1; Mon, 30 Jun 2025 02:22:30 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B9D1B14D5; Mon, 30 Jun 2025 02:22:21 -0400 (EDT) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 85F23148A for ; Mon, 30 Jun 2025 02:22:02 -0400 (EDT) Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2025 23:22:02 -0700 Received: from spr-s2600bt.bj.intel.com ([10.240.192.127]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2025 23:22:00 -0700 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1751264523; x=1782800523; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AELSNg1iq+z5GPaYY4cwTgDNJ0WRyr9s9ml/+UPwSDQ=; b=k9XKcwmnp+rSi43ctt0gtrefQCVoyjW2DM7h0Tr/QusH1WwS9/1lIdK1 Fs3itYV1zig04GyqkIsvBc3y6FVjrLZYwa6kZpDw8LtDL3F2OBo0MO2rL UEaN723NNjZIYtpd3A//WqdjVtLHV/EXNCEcfTxWgQ/auL/Cc1KVIBfXP CCYeZjTp/F2D+30YkjWNzOe/jaq/K97M8cWbWQiEZGga4VvGsK7tZ8oE6 ABcczcRTkhuqWF9CYVGKccn+IGdL+Te4L3duoyNlBXIrPAQ6Hs/5iPw7p sMa2Q1TkP/KEz5ahb6zEe5PEGmbRsR21lxLrvaE93T+fTXqBLMkxyOpzH g==; X-CSE-ConnectionGUID: Bx5ILYlDQw6Vp26C44IBnA== X-CSE-MsgGUID: EtEewb6bRAOWVO69xLyDjg== X-IronPort-AV: E=McAfee;i="6800,10657,11479"; a="70912533" X-IronPort-AV: E=Sophos;i="6.16,277,1744095600"; d="scan'208";a="70912533" X-CSE-ConnectionGUID: B9qQFJ0cTYqIeJ74hALWng== X-CSE-MsgGUID: MYD0p3eSQUa8TkWHiTRrHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,277,1744095600"; d="scan'208";a="153549349" From: Zhenzhong Duan To: devel@lists.libvirt.org Subject: [PATCH v3 10/21] conf: Expose TDX type in domain launch security capability Date: Mon, 30 Jun 2025 14:17:21 +0800 Message-Id: <20250630061732.303374-11-zhenzhong.duan@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250630061732.303374-1-zhenzhong.duan@intel.com> References: <20250630061732.303374-1-zhenzhong.duan@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: E3XTZYO2MT43GDF4VFNG7IBORDX3ILEO X-Message-ID-Hash: E3XTZYO2MT43GDF4VFNG7IBORDX3ILEO X-MailFrom: zhenzhong.duan@intel.com 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 CC: phrdina@redhat.com, pkrempa@redhat.com, jjongsma@redhat.com, jsuchane@redhat.com, chenyi.qiang@intel.com, isaku.yamahata@intel.com, xiaoyao.li@intel.com, chao.p.peng@intel.com, Zhenzhong Duan 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: fail (Header signature does not verify) X-ZM-MESSAGEID: 1751264798227116600 Content-Type: text/plain; charset="utf-8" As the tdx launch security type support is added, expose it in domain capabilities so that domain definition validation check can take effect. Signed-off-by: Zhenzhong Duan Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_capabilities.c | 2 ++ tests/domaincapsdata/qemu_10.1.0-q35.x86_64+inteltdx.xml | 6 +++++- tests/domaincapsdata/qemu_10.1.0-tcg.x86_64+inteltdx.xml | 6 +++++- tests/domaincapsdata/qemu_10.1.0.x86_64+inteltdx.xml | 6 +++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f4f77a491c..d2b59ba1f4 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -6776,6 +6776,8 @@ virQEMUCapsFillDomainLaunchSecurity(virQEMUCaps *qemu= Caps, if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_S390_PV_GUEST) && virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPO= RT)) VIR_DOMAIN_CAPS_ENUM_SET(launchSecurity->sectype, VIR_DOMAIN_LAUNC= H_SECURITY_PV); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_TDX_GUEST)) + VIR_DOMAIN_CAPS_ENUM_SET(launchSecurity->sectype, VIR_DOMAIN_LAUNC= H_SECURITY_TDX); =20 if (launchSecurity->sectype.values =3D=3D 0) { launchSecurity->supported =3D VIR_TRISTATE_BOOL_NO; diff --git a/tests/domaincapsdata/qemu_10.1.0-q35.x86_64+inteltdx.xml b/tes= ts/domaincapsdata/qemu_10.1.0-q35.x86_64+inteltdx.xml index 61aa1aafd0..fafa28ecbe 100644 --- a/tests/domaincapsdata/qemu_10.1.0-q35.x86_64+inteltdx.xml +++ b/tests/domaincapsdata/qemu_10.1.0-q35.x86_64+inteltdx.xml @@ -774,6 +774,10 @@ xmm_input - + + + tdx + + diff --git a/tests/domaincapsdata/qemu_10.1.0-tcg.x86_64+inteltdx.xml b/tes= ts/domaincapsdata/qemu_10.1.0-tcg.x86_64+inteltdx.xml index 1d2795c4df..eba8023fc8 100644 --- a/tests/domaincapsdata/qemu_10.1.0-tcg.x86_64+inteltdx.xml +++ b/tests/domaincapsdata/qemu_10.1.0-tcg.x86_64+inteltdx.xml @@ -1821,6 +1821,10 @@ xmm_input - + + + tdx + + diff --git a/tests/domaincapsdata/qemu_10.1.0.x86_64+inteltdx.xml b/tests/d= omaincapsdata/qemu_10.1.0.x86_64+inteltdx.xml index 6048a66b87..9ea7d779b5 100644 --- a/tests/domaincapsdata/qemu_10.1.0.x86_64+inteltdx.xml +++ b/tests/domaincapsdata/qemu_10.1.0.x86_64+inteltdx.xml @@ -774,6 +774,10 @@ xmm_input - + + + tdx + + --=20 2.34.1