[PATCH v3 2/6] qemu: add default panic device to S390 guests

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

 



This patch adds by default a panic device with model s390 to S390 guests.

Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
---
 src/qemu/qemu_domain.c                                              | 6 +++++-
 tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.xml | 1 +
 tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.xml  | 1 +
 tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.xml | 1 +
 tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.xml  | 1 +
 tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.xml   | 1 +
 .../qemuxml2xmloutdata/qemuxml2xmlout-iothreads-disk-virtio-ccw.xml | 1 +
 tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml     | 1 +
 8 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 6897fe0..4384c26 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1509,6 +1509,7 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
         break;
     case VIR_ARCH_S390X:
         addDefaultUSB = false;
+        addPanicDevice = true;
         break;
 
     case VIR_ARCH_SPARC:
@@ -1587,7 +1588,10 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
         size_t j;
         for (j = 0; j < def->npanics; j++) {
             if (def->panics[j]->model == VIR_DOMAIN_PANIC_MODEL_DEFAULT ||
-                def->panics[j]->model == VIR_DOMAIN_PANIC_MODEL_PSERIES)
+                (ARCH_IS_PPC64(def->os.arch) &&
+                     def->panics[j]->model == VIR_DOMAIN_PANIC_MODEL_PSERIES) ||
+                (ARCH_IS_S390(def->os.arch) &&
+                     def->panics[j]->model == VIR_DOMAIN_PANIC_MODEL_S390))
                 break;
         }
 
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.xml
index 1658e12..7ccdc67 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.xml
@@ -20,6 +20,7 @@
       <target dev='vda' bus='virtio'/>
     </disk>
     <memballoon model='none'/>
+    <panic model='s390'/>
   </devices>
   <keywrap>
     <cipher name='aes' state='off'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.xml
index 3d676aa..a02523d 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.xml
@@ -20,6 +20,7 @@
       <target dev='vda' bus='virtio'/>
     </disk>
     <memballoon model='none'/>
+    <panic model='s390'/>
   </devices>
   <keywrap>
     <cipher name='aes' state='on'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.xml
index f3bc8af..7f0c871 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.xml
@@ -20,6 +20,7 @@
       <target dev='vda' bus='virtio'/>
     </disk>
     <memballoon model='none'/>
+    <panic model='s390'/>
   </devices>
   <keywrap>
     <cipher name='dea' state='off'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.xml
index 1e0660f..d4721dc 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.xml
@@ -20,6 +20,7 @@
       <target dev='vda' bus='virtio'/>
     </disk>
     <memballoon model='none'/>
+    <panic model='s390'/>
   </devices>
   <keywrap>
     <cipher name='dea' state='on'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.xml
index 6acee07..5483040 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.xml
@@ -20,5 +20,6 @@
       <target dev='vda' bus='virtio'/>
     </disk>
     <memballoon model='none'/>
+    <panic model='s390'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-iothreads-disk-virtio-ccw.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-iothreads-disk-virtio-ccw.xml
index b6f7d30..f6d1039 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-iothreads-disk-virtio-ccw.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-iothreads-disk-virtio-ccw.xml
@@ -31,5 +31,6 @@
     <memballoon model='virtio'>
       <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x000a'/>
     </memballoon>
+    <panic model='s390'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml
index 3f349b2..42ad4e4 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml
@@ -20,5 +20,6 @@
       <target type='virtio' port='0'/>
     </console>
     <memballoon model='none'/>
+    <panic model='s390'/>
   </devices>
 </domain>
-- 
2.3.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]