From patchwork Wed Feb 3 08:53:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 44351 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 991D4B7D17 for ; Wed, 3 Feb 2010 20:02:41 +1100 (EST) Received: from localhost ([127.0.0.1]:53100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ncb8A-0001nh-Cc for incoming@patchwork.ozlabs.org; Wed, 03 Feb 2010 04:02:38 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ncazm-0001tf-Tl for qemu-devel@nongnu.org; Wed, 03 Feb 2010 03:53:58 -0500 Received: from [199.232.76.173] (port=56365 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ncazk-0001t8-RN for qemu-devel@nongnu.org; Wed, 03 Feb 2010 03:53:57 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Ncazg-00077P-Mn for qemu-devel@nongnu.org; Wed, 03 Feb 2010 03:53:55 -0500 Received: from thoth.sbs.de ([192.35.17.2]:20931) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ncazf-00075k-Pa for qemu-devel@nongnu.org; Wed, 03 Feb 2010 03:53:52 -0500 Received: from mail3.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id o138rmd8025873; Wed, 3 Feb 2010 09:53:48 +0100 Received: from localhost.localdomain ([139.25.173.28]) by mail3.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o138rkC3012112; Wed, 3 Feb 2010 09:53:48 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Wed, 3 Feb 2010 09:53:27 +0100 Message-Id: <899524c0e53c920d485d25425342cbaf7192e461.1265187223.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 Cc: Anthony Liguori , Glauber Costa , Alexander Graf , kvm@vger.kernel.org, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH v2 02/21] KVM: Make vmport KVM-compatible 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 The vmport "device" accesses the VCPU registers, so it requires proper cpu_synchronize_state. Add it to vmport_ioport_read, which also synchronizes vmport_ioport_write. Signed-off-by: Jan Kiszka --- hw/vmport.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/vmport.c b/hw/vmport.c index 884af3f..6c9d7c9 100644 --- a/hw/vmport.c +++ b/hw/vmport.c @@ -25,6 +25,7 @@ #include "isa.h" #include "pc.h" #include "sysemu.h" +#include "kvm.h" //#define VMPORT_DEBUG @@ -58,6 +59,8 @@ static uint32_t vmport_ioport_read(void *opaque, uint32_t addr) unsigned char command; uint32_t eax; + cpu_synchronize_state(env); + eax = env->regs[R_EAX]; if (eax != VMPORT_MAGIC) return eax;