[v2,09/13] s390x: Exit on vcpu reset error
diff mbox series

Message ID 20191129094809.26684-10-frankja@linux.ibm.com
State New
Headers show
  • s390x: Protected Virtualization support
Related show

Commit Message

Janosch Frank Nov. 29, 2019, 9:48 a.m. UTC
If a vcpu is not properly reset it might be better to just end the VM.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
 target/s390x/kvm.c | 2 ++
 1 file changed, 2 insertions(+)

diff mbox series

diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 5b1ed3acb4..15b041a601 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -424,11 +424,13 @@  static void kvm_s390_reset_vcpu(S390CPU *cpu, unsigned long type)
         if (kvm_vcpu_ioctl(cs, KVM_S390_VCPU_RESET, type)) {
             error_report("CPU reset type %ld failed on CPU %i",
                          type, cs->cpu_index);
+            exit(1);
     if (kvm_vcpu_ioctl(cs, KVM_S390_INITIAL_RESET, NULL)) {
         error_report("Initial CPU reset failed on CPU %i", cs->cpu_index);
+        exit(1);