diff mbox

[0/6] Save state error handling (kill off no_migrate)

Message ID 1286470538.3020.47.camel@x201 (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Williamson Oct. 7, 2010, 4:55 p.m. UTC
None
diff mbox

Patch

kvm: update for: savevm: Allow vmsd->pre_save to return error

From: Alex Williamson <alex.williamson@redhat.com>

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---

 hw/i8254-kvm.c |    3 ++-
 hw/i8259.c     |    3 ++-
 hw/ioapic.c    |    3 ++-
 qemu-kvm-x86.c |    4 +++-
 4 files changed, 9 insertions(+), 4 deletions(-)


diff --git a/hw/i8254-kvm.c b/hw/i8254-kvm.c
index 6125213..9c62b87 100644
--- a/hw/i8254-kvm.c
+++ b/hw/i8254-kvm.c
@@ -32,7 +32,7 @@  extern VMStateDescription vmstate_pit;
 
 static PITState pit_state;
 
-static void kvm_pit_pre_save(void *opaque)
+static int kvm_pit_pre_save(void *opaque)
 {
     PITState *s = (void *)opaque;
     struct kvm_pit_state2 pit2;
@@ -64,6 +64,7 @@  static void kvm_pit_pre_save(void *opaque)
 	sc->gate = c->gate;
 	sc->count_load_time = c->count_load_time;
     }
+    return 0;
 }
 
 static int kvm_pit_post_load(void *opaque, int version_id)
diff --git a/hw/i8259.c b/hw/i8259.c
index 986dcf5..fc06c44 100644
--- a/hw/i8259.c
+++ b/hw/i8259.c
@@ -470,13 +470,14 @@  static uint32_t elcr_ioport_read(void *opaque, uint32_t addr1)
 static void kvm_kernel_pic_save_to_user(PicState *s);
 static int kvm_kernel_pic_load_from_user(PicState *s);
 
-static void pic_pre_save(void *opaque)
+static int pic_pre_save(void *opaque)
 {
     PicState *s = opaque;
 
     if (kvm_enabled() && kvm_irqchip_in_kernel()) {
         kvm_kernel_pic_save_to_user(s);
     }
+    return 0;
 }
 
 static int pic_post_load(void *opaque, int version_id)
diff --git a/hw/ioapic.c b/hw/ioapic.c
index 276c72e..4f71027 100644
--- a/hw/ioapic.c
+++ b/hw/ioapic.c
@@ -249,13 +249,14 @@  static void kvm_kernel_ioapic_load_from_user(IOAPICState *s)
 #endif
 }
 
-static void ioapic_pre_save(void *opaque)
+static int ioapic_pre_save(void *opaque)
 {
     IOAPICState *s = (void *)opaque;
  
     if (kvm_enabled() && kvm_irqchip_in_kernel()) {
         kvm_kernel_ioapic_save_to_user(s);
     }
+    return 0;
 }
 
 static int ioapic_pre_load(void *opaque)
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index fd974b3..1dcea38 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -561,11 +561,13 @@  static int kvm_enable_tpr_access_reporting(CPUState *env)
 #ifdef KVM_CAP_ADJUST_CLOCK
 static struct kvm_clock_data kvmclock_data;
 
-static void kvmclock_pre_save(void *opaque)
+static int kvmclock_pre_save(void *opaque)
 {
     struct kvm_clock_data *cl = opaque;
 
     kvm_vm_ioctl(kvm_state, KVM_GET_CLOCK, cl);
+
+    return 0;
 }
 
 static int kvmclock_post_load(void *opaque, int version_id)