From patchwork Thu Oct 7 16:55:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 238461 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o97GtlHU024075 for ; Thu, 7 Oct 2010 16:55:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752786Ab0JGQzp (ORCPT ); Thu, 7 Oct 2010 12:55:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11218 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175Ab0JGQzo (ORCPT ); Thu, 7 Oct 2010 12:55:44 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o97GtefZ032695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 7 Oct 2010 12:55:40 -0400 Received: from [10.3.113.109] (ovpn-113-109.phx2.redhat.com [10.3.113.109]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o97GtdKD024456; Thu, 7 Oct 2010 12:55:39 -0400 Subject: Re: [PATCH 0/6] Save state error handling (kill off no_migrate) From: Alex Williamson To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org, cam@cs.ualberta.ca, quintela@redhat.com, anthony@codemonkey.ws, qemu-devel In-Reply-To: <20101006204546.32127.70109.stgit@s20.home> References: <20101006204546.32127.70109.stgit@s20.home> Date: Thu, 07 Oct 2010 10:55:38 -0600 Message-ID: <1286470538.3020.47.camel@x201> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 07 Oct 2010 16:55:48 +0000 (UTC) kvm: update for: savevm: Allow vmsd->pre_save to return error From: Alex Williamson Signed-off-by: Alex Williamson --- 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)