[libvirt PATCH 3/5] tests: add AMD SEV bits into qemu-6.1.0 replies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently we only have AMD SEV bits in qemu-2.12.0 replies which is way
too old to test new features that require AMD SEV as well.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml       |  5 ++++-
 tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml       |  5 ++++-
 tests/domaincapsdata/qemu_6.1.0.x86_64.xml           |  5 ++++-
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies | 12 +++++++-----
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml     |  7 +++++++
 5 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml
index 057824d795..9fcba182fa 100644
--- a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml
@@ -210,6 +210,9 @@
     <genid supported='yes'/>
     <backingStoreInput supported='yes'/>
     <backup supported='no'/>
-    <sev supported='no'/>
+    <sev supported='yes'>
+      <cbitpos>47</cbitpos>
+      <reducedPhysBits>1</reducedPhysBits>
+    </sev>
   </features>
 </domainCapabilities>
diff --git a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
index 6c84207231..a1e4efb249 100644
--- a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
@@ -213,6 +213,9 @@
     <genid supported='yes'/>
     <backingStoreInput supported='yes'/>
     <backup supported='no'/>
-    <sev supported='no'/>
+    <sev supported='yes'>
+      <cbitpos>47</cbitpos>
+      <reducedPhysBits>1</reducedPhysBits>
+    </sev>
   </features>
 </domainCapabilities>
diff --git a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml
index 1934035547..008e74a65e 100644
--- a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml
@@ -210,6 +210,9 @@
     <genid supported='yes'/>
     <backingStoreInput supported='yes'/>
     <backup supported='no'/>
-    <sev supported='no'/>
+    <sev supported='yes'>
+      <cbitpos>47</cbitpos>
+      <reducedPhysBits>1</reducedPhysBits>
+    </sev>
   </features>
 </domainCapabilities>
diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies
index 75d7b8efd0..bbd2b16bb9 100644
--- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies
+++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies
@@ -28554,11 +28554,13 @@
 }
 
 {
-  "id": "libvirt-49",
-  "error": {
-    "class": "GenericError",
-    "desc": "SEV is not enabled in KVM"
-  }
+  "return": {
+    "reduced-phys-bits": 1,
+    "cbitpos": 47,
+    "cert-chain": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA",
+    "pdh": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA"
+  },
+  "id": "libvirt-49"
 }
 
 {
diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
index c7a1205bba..3720c26e98 100644
--- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
@@ -180,6 +180,7 @@
   <flag name='tpm-emulator'/>
   <flag name='mch'/>
   <flag name='mch.extended-tseg-mbytes'/>
+  <flag name='sev-guest'/>
   <flag name='usb-storage.werror'/>
   <flag name='vfio-pci.display'/>
   <flag name='blockdev'/>
@@ -3340,4 +3341,10 @@
   <machine type='tcg' name='pc-q35-2.5' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram'/>
   <machine type='tcg' name='pc-i440fx-3.0' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram'/>
   <machine type='tcg' name='pc-q35-2.11' hotplugCpus='yes' maxCpus='288' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram'/>
+  <sev>
+    <cbitpos>47</cbitpos>
+    <reducedPhysBits>1</reducedPhysBits>
+    <pdh>AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA</pdh>
+    <certChain>AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA</certChain>
+  </sev>
 </qemuCaps>
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux