qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 3/4] s390x/kvm: always ignore empty vcpu interrupt st


From: Christian Borntraeger
Subject: [Qemu-devel] [PULL 3/4] s390x/kvm: always ignore empty vcpu interrupt state
Date: Tue, 9 Jun 2015 10:39:36 +0200

From: Sascha Silbe <address@hidden>

kvm_s390_vcpu_interrupt_pre_save() and
kvm_s390_vcpu_interrupt_post_load() are essentially no-ops on hosts
without KVM_CAP_S390_IRQ_STATE. Move the capability check after the
check for saved IRQ state in kvm_s390_vcpu_interrupt_post_load() so that
migration between hosts without KVM_CAP_S390_IRQ_STATE (including save /
restore on the same host) continues to work.

Fixes: 3cda44f7bae5 ("s390x/kvm: migrate vcpu interrupt state")
Signed-off-by: Sascha Silbe <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Reviewed-by: Jens Freimann <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
---
 target-s390x/kvm.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 6de7759..070f995 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -2175,13 +2175,14 @@ int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu)
     struct kvm_s390_irq_state irq_state;
     int r;
 
+    if (cpu->irqstate_saved_size == 0) {
+        return 0;
+    }
+
     if (!kvm_check_extension(kvm_state, KVM_CAP_S390_IRQ_STATE)) {
         return -ENOSYS;
     }
 
-    if (cpu->irqstate_saved_size == 0) {
-        return 0;
-    }
     irq_state.buf = (uint64_t) cpu->irqstate;
     irq_state.len = cpu->irqstate_saved_size;
 
-- 
2.3.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]