From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yoshiaki Tamura Subject: [PATCH 12/19] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c. Date: Tue, 8 Feb 2011 20:01:34 +0900 Message-ID: <1297162901-2629-13-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> References: <1297162901-2629-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> Cc: avi@redhat.com, anthony@codemonkey.ws, aliguori@us.ibm.com, mtosatti@redhat.com, dlaor@redhat.com, mst@redhat.com, kwolf@redhat.com, pbonzini@redhat.com, ananth@in.ibm.com, psuriset@linux.vnet.ibm.com, vatsa@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com, blauwirbel@gmail.com, ohmura.kei@lab.ntt.co.jp, Yoshiaki Tamura To: kvm@vger.kernel.org, qemu-devel@nongnu.org Return-path: Received: from sh.osrg.net ([192.16.179.4]:37057 "EHLO sh.osrg.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753453Ab1BHLDn (ORCPT ); Tue, 8 Feb 2011 06:03:43 -0500 In-Reply-To: <1297162901-2629-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- exec.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index e950df2..c81fd09 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7 @@ #include "osdep.h" #include "kvm.h" #include "qemu-timer.h" +#include "event-tap.h" #if defined(CONFIG_USER_ONLY) #include #include @@ -3632,6 +3633,9 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, io_index = (pd >> IO_MEM_SHIFT) & (IO_MEM_NB_ENTRIES - 1); if (p) addr1 = (addr & ~TARGET_PAGE_MASK) + p->region_offset; + + event_tap_mmio(addr, buf, len); + /* XXX: could force cpu_single_env to NULL to avoid potential bugs */ if (l >= 4 && ((addr1 & 3) == 0)) { -- 1.7.1.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38226 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmlLm-0003od-3a for qemu-devel@nongnu.org; Tue, 08 Feb 2011 06:03:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmlLi-0004Ry-6Q for qemu-devel@nongnu.org; Tue, 08 Feb 2011 06:03:14 -0500 Received: from sh.osrg.net ([192.16.179.4]:46562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmlLh-0004QC-Kz for qemu-devel@nongnu.org; Tue, 08 Feb 2011 06:03:10 -0500 From: Yoshiaki Tamura Date: Tue, 8 Feb 2011 20:01:34 +0900 Message-Id: <1297162901-2629-13-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> In-Reply-To: <1297162901-2629-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> References: <1297162901-2629-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> Subject: [Qemu-devel] [PATCH 12/19] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvm@vger.kernel.org, qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, mtosatti@redhat.com, ananth@in.ibm.com, mst@redhat.com, dlaor@redhat.com, vatsa@linux.vnet.ibm.com, Yoshiaki Tamura , blauwirbel@gmail.com, ohmura.kei@lab.ntt.co.jp, avi@redhat.com, pbonzini@redhat.com, psuriset@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- exec.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index e950df2..c81fd09 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7 @@ #include "osdep.h" #include "kvm.h" #include "qemu-timer.h" +#include "event-tap.h" #if defined(CONFIG_USER_ONLY) #include #include @@ -3632,6 +3633,9 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, io_index = (pd >> IO_MEM_SHIFT) & (IO_MEM_NB_ENTRIES - 1); if (p) addr1 = (addr & ~TARGET_PAGE_MASK) + p->region_offset; + + event_tap_mmio(addr, buf, len); + /* XXX: could force cpu_single_env to NULL to avoid potential bugs */ if (l >= 4 && ((addr1 & 3) == 0)) { -- 1.7.1.2