From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7jhD-0007gE-7q for qemu-devel@nongnu.org; Thu, 17 Jul 2014 07:18:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7jTC-0004yl-TH for qemu-devel@nongnu.org; Thu, 17 Jul 2014 07:04:13 -0400 Received: from mail.ispras.ru ([83.149.199.45]:47415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7jTC-0004xP-GS for qemu-devel@nongnu.org; Thu, 17 Jul 2014 07:03:26 -0400 From: Pavel Dovgalyuk Date: Thu, 17 Jul 2014 15:03:29 +0400 Message-ID: <20140717110329.8352.10419.stgit@PASHA-ISP> In-Reply-To: <20140717110153.8352.80175.stgit@PASHA-ISP> References: <20140717110153.8352.80175.stgit@PASHA-ISP> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RFC PATCH v2 16/49] target: save cpu state fields List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, pavel.dovgaluk@ispras.ru, pbonzini@redhat.com, fred.konrad@greensocs.com This patch adds interrupt fields to VMState for correct saving the CPU state. Signed-off-by: Pavel Dovgalyuk --- target-arm/machine.c | 5 ++++- target-i386/machine.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/target-arm/machine.c b/target-arm/machine.c index 3bcc7cc..29bfc10 100644 --- a/target-arm/machine.c +++ b/target-arm/machine.c @@ -218,7 +218,7 @@ static int cpu_post_load(void *opaque, int version_id) const VMStateDescription vmstate_arm_cpu = { .name = "cpu", - .version_id = 20, + .version_id = 21, .minimum_version_id = 20, .pre_save = cpu_pre_save, .post_load = cpu_post_load, @@ -259,6 +259,9 @@ const VMStateDescription vmstate_arm_cpu = { VMSTATE_UINT64(env.exception.vaddress, ARMCPU), VMSTATE_TIMER(gt_timer[GTIMER_PHYS], ARMCPU), VMSTATE_TIMER(gt_timer[GTIMER_VIRT], ARMCPU), + /* Fields required by replay */ + VMSTATE_UINT32_V(parent_obj.interrupt_request, ARMCPU, 21), + VMSTATE_INT32_V(parent_obj.exception_index, ARMCPU, 21), VMSTATE_END_OF_LIST() }, .subsections = (VMStateSubsection[]) { diff --git a/target-i386/machine.c b/target-i386/machine.c index 16d2f6a..9dfac33 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -605,7 +605,7 @@ static const VMStateDescription vmstate_msr_hyperv_time = { VMStateDescription vmstate_x86_cpu = { .name = "cpu", - .version_id = 12, + .version_id = 13, .minimum_version_id = 3, .pre_save = cpu_pre_save, .post_load = cpu_post_load, @@ -702,6 +702,9 @@ VMStateDescription vmstate_x86_cpu = { VMSTATE_UINT64_V(env.xcr0, X86CPU, 12), VMSTATE_UINT64_V(env.xstate_bv, X86CPU, 12), VMSTATE_YMMH_REGS_VARS(env.ymmh_regs, X86CPU, CPU_NB_REGS, 12), + /* Fields required by replay */ + VMSTATE_UINT32_V(parent_obj.interrupt_request, X86CPU, 13), + VMSTATE_INT32_V(parent_obj.exception_index, X86CPU, 13), VMSTATE_END_OF_LIST() /* The above list is not sorted /wrt version numbers, watch out! */ },