From patchwork Thu Feb 3 21:54:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 81758 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0BFBCB70E9 for ; Fri, 4 Feb 2011 11:12:07 +1100 (EST) Received: from localhost ([127.0.0.1]:49401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl7Ln-0000dc-He for incoming@patchwork.ozlabs.org; Thu, 03 Feb 2011 17:08:27 -0500 Received: from [140.186.70.92] (port=48845 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl78e-00056E-UN for qemu-devel@nongnu.org; Thu, 03 Feb 2011 16:55:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pl789-0007JH-Am for qemu-devel@nongnu.org; Thu, 03 Feb 2011 16:54:22 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:37161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pl789-0007Im-3k for qemu-devel@nongnu.org; Thu, 03 Feb 2011 16:54:21 -0500 Received: from smtp05.web.de ( [172.20.4.166]) by fmmailgate01.web.de (Postfix) with ESMTP id 595D418732794; Thu, 3 Feb 2011 22:54:20 +0100 (CET) Received: from [92.75.142.139] (helo=localhost.localdomain) by smtp05.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1Pl788-0008TA-00; Thu, 03 Feb 2011 22:54:20 +0100 From: Jan Kiszka To: qemu-devel@nongnu.org, Anthony Liguori Date: Thu, 3 Feb 2011 22:54:13 +0100 Message-Id: X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX18IklFebFWX2vxOXiq2K+u83OLauHo4iT3fCwqP V4SGWtVrwGLHa4vTliUPFnZsxMwHdUbVj7nH1eWoXd4S30V1mI ZMJ9QPD6M= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.221 Cc: kvm@vger.kernel.org, Gleb Natapov , Marcelo Tosatti , Alexander Graf , Blue Swirl , Avi Kivity Subject: [Qemu-devel] [0.14?][PATCH v3 3/4] ioapic: Add support for qemu-kvm's vmstate v2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka qemu-kvm carries the IOAPIC base address in its v2 vmstate. We only support the default base address so far, and saving even that in the device state was rejected. Add a padding field to be able to read qemu-kvm's old state, but increase our version to 3, indicating that we are not saving a valid address. This also gives downstream the chance to change to stop evaluating the base_address and move to v3 as well. Signed-off-by: Jan Kiszka --- hw/ioapic.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 8c46c1d..fb3d173 100644 --- a/hw/ioapic.c +++ b/hw/ioapic.c @@ -244,13 +244,14 @@ static int ioapic_post_load(void *opaque, int version_id) static const VMStateDescription vmstate_ioapic = { .name = "ioapic", - .version_id = 2, + .version_id = 3, .post_load = ioapic_post_load, .minimum_version_id = 1, .minimum_version_id_old = 1, .fields = (VMStateField []) { VMSTATE_UINT8(id, IOAPICState), VMSTATE_UINT8(ioregsel, IOAPICState), + VMSTATE_UNUSED_V(2, 8), /* to account for qemu-kvm's v2 format */ VMSTATE_UINT32_V(irr, IOAPICState, 2), VMSTATE_UINT64_ARRAY(ioredtbl, IOAPICState, IOAPIC_NUM_PINS), VMSTATE_END_OF_LIST()