From nobody Wed Mar 12 16:38:18 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=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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741092194; cv=none; d=zohomail.com; s=zohoarc; b=CapF/55/RgWy+LzkVJpCwcDBcEL8xHMmr9NbErbbvVZQkR+DRSuA0veG/kRfbFgIkzLvmFtU5f3qHyrk76ndoh8++GN04S4iIcdSqxgEnBC+aIKBMTz8IFtIa0a17dO6X1IoInq9x9zjTIxeMc8Hm2xlmkc7MHEIS52nZLzlWZw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741092194; 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=jqZuEtVz09vkt3WvR6BPRMllI5ZUf/F/f+a4gVIQ6iU=; b=PHnyBFfDiqw3i6MnZlRBLtDqDuZPoimbT2ugpLTGN7lh+kAS/cKnaK9YUqhcnKT2DjS7/CBfy3pete21tcML2nuAyzCo1QtkXnGUB17qkC2ZoupydLkKwRmHaAqgtC3p+H0LdYmW7IIVfM6LdH0m06EHhYmlMrpafOFJyOuErDA= 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 1741092194069769.705656126487; Tue, 4 Mar 2025 04:43:14 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 6E6E1147A; Tue, 4 Mar 2025 07:43:13 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 32F551470; Tue, 4 Mar 2025 07:39:21 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 484BE1347; Tue, 4 Mar 2025 07:39:16 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 D14BD1347 for ; Tue, 4 Mar 2025 07:38:58 -0500 (EST) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-189-ARtboXy6N7Sh2EAxmxftZw-1; Tue, 04 Mar 2025 07:38:52 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3D9031944EB9 for ; Tue, 4 Mar 2025 12:38:51 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.15]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 682F719560AB for ; Tue, 4 Mar 2025 12:38:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,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/relaxed; d=redhat.com; s=mimecast20190719; t=1741091938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jqZuEtVz09vkt3WvR6BPRMllI5ZUf/F/f+a4gVIQ6iU=; b=ajse7GOdArLI0oZ2ZbZJN6NNYAR1ms8TGPA0ArLSuQuWyQuOuVPednHFd3XIp5y5UGXQIL QKyikNk1YCWVrj3yCdgGp6axit0hbelWcSFF36HmEdkoJNknvtvgzy1o7y9hPuzzSP7hCj Yz6aGm+Hm8hWQu1wvf52/0PEPw0VnHg= X-MC-Unique: ARtboXy6N7Sh2EAxmxftZw-1 X-Mimecast-MFC-AGG-ID: ARtboXy6N7Sh2EAxmxftZw_1741091931 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 8/8] qemuxmlconftest: Add '+amdsev' versions of the rest of 'launch-security-sev*' cases Date: Tue, 4 Mar 2025 13:38:33 +0100 Message-ID: <87e398945f5a677d5ec29be4de0053873f25b22b.1741091571.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ZX4XF7-0MvVRQMXCtzEGXMyoqRSch5Cbk32PPG3fxdc_1741091931 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: Y2RTW3THI3VYEQVBPBXNANA5VGAHB6EL X-Message-ID-Hash: Y2RTW3THI3VYEQVBPBXNANA5VGAHB6EL X-MailFrom: pkrempa@redhat.com 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header 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 @redhat.com) X-ZM-MESSAGEID: 1741092196844019000 Content-Type: text/plain; charset="utf-8" While the 'launch-security-sev-direct' and 'launch-security-sev-snp' cases use "latest" caps, they use the non-sev variant and add-in the relevant capabilities. To do the test properly we can add '+amdsev' variant which uses caps fetched from a real host that does support all the capabilities. The output files are identical, although they are not added as symlinks to prevent headaches if they do diverge at some point. Signed-off-by: Peter Krempa --- ...urity-sev-direct.x86_64-latest+amdsev.args | 38 ++++++++++ ...curity-sev-direct.x86_64-latest+amdsev.xml | 48 ++++++++++++ ...security-sev-snp.x86_64-latest+amdsev.args | 42 +++++++++++ ...-security-sev-snp.x86_64-latest+amdsev.xml | 73 +++++++++++++++++++ tests/qemuxmlconftest.c | 21 +++--- 5 files changed, 211 insertions(+), 11 deletions(-) create mode 100644 tests/qemuxmlconfdata/launch-security-sev-direct.x86_64= -latest+amdsev.args create mode 100644 tests/qemuxmlconfdata/launch-security-sev-direct.x86_64= -latest+amdsev.xml create mode 100644 tests/qemuxmlconfdata/launch-security-sev-snp.x86_64-la= test+amdsev.args create mode 100644 tests/qemuxmlconfdata/launch-security-sev-snp.x86_64-la= test+amdsev.xml diff --git a/tests/qemuxmlconfdata/launch-security-sev-direct.x86_64-latest= +amdsev.args b/tests/qemuxmlconfdata/launch-security-sev-direct.x86_64-late= st+amdsev.args new file mode 100644 index 0000000000..09df8a7cb6 --- /dev/null +++ b/tests/qemuxmlconfdata/launch-security-sev-direct.x86_64-latest+amdsev= .args @@ -0,0 +1,38 @@ +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 pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram,confid= ential-guest-support=3Dlsec0,acpi=3Doff \ +-accel kvm \ +-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 \ +-kernel /vmlinuz \ +-initrd /initrd \ +-append runme \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","no= de-name":"libvirt-1-storage","read-only":false}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-stor= age","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-object '{"qom-type":"sev-guest","id":"lsec0","cbitpos":47,"reduced-phys-b= its":1,"policy":1,"dh-cert-file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest= 1/dh_cert.base64","session-file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest= 1/session.base64","kernel-hashes":true}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/launch-security-sev-direct.x86_64-latest= +amdsev.xml b/tests/qemuxmlconfdata/launch-security-sev-direct.x86_64-lates= t+amdsev.xml new file mode 100644 index 0000000000..e289b1e95e --- /dev/null +++ b/tests/qemuxmlconfdata/launch-security-sev-direct.x86_64-latest+amdsev= .xml @@ -0,0 +1,48 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + /vmlinuz + /initrd + runme + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + +
+ + +
+ + + + +