From patchwork Mon Mar 19 17:15:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 147593 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 49D5BB6FE0 for ; Tue, 20 Mar 2012 04:15:49 +1100 (EST) Received: from localhost ([::1]:55341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9gBP-0001k7-4g for incoming@patchwork.ozlabs.org; Mon, 19 Mar 2012 13:15:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9gBD-0001jK-0e for qemu-devel@nongnu.org; Mon, 19 Mar 2012 13:15:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9gBB-0001Md-4W for qemu-devel@nongnu.org; Mon, 19 Mar 2012 13:15:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9gBA-0001MX-T3 for qemu-devel@nongnu.org; Mon, 19 Mar 2012 13:15:33 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2JHFUjg022180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Mar 2012 13:15:30 -0400 Received: from balrog.usersys.redhat.com (dhcp-4-85.tlv.redhat.com [10.35.4.85]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2JHFSvZ017021; Mon, 19 Mar 2012 13:15:28 -0400 Message-ID: <4F6769AF.4090201@redhat.com> Date: Mon, 19 Mar 2012 19:15:27 +0200 From: Avi Kivity User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: qemu-devel , Anthony Liguori , Blue Swirl References: <4F66FF17.90303@redhat.com> In-Reply-To: <4F66FF17.90303@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: Re: [Qemu-devel] [PULL] Memory core regression fixes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On 03/19/2012 11:40 AM, Avi Kivity wrote: > The last memory core pull introduced a couple of regressions; here are > the fixes. > > Please pull from: > > git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/urgent > I've tacked on another patch to this branch, fixing a xen regression: commit 0a1b357f1555ce410d2d0d5f947b5415587ac4d8 Author: Anthony PERARD Date: Mon Mar 19 15:54:34 2012 +0000 exec: fix guest memory access for Xen In cpu_physical_memory_rw, a change has been introduced and qemu_get_ram_ptr is no longuer called with the ram addr we want to access, but only with the section address. This patch fixes this. (All other call to qemu_get_ram_ptr are already called with the right address.) This patch fixes Xen guest. Signed-off-by: Anthony PERARD Signed-off-by: Avi Kivity } diff --git a/exec.c b/exec.c index a3818ff..265e895 100644 --- a/exec.c +++ b/exec.c @@ -3856,8 +3856,8 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, } } else { /* RAM case */ - ptr = qemu_get_ram_ptr(section->mr->ram_addr) - + section_addr(section, addr); + ptr = qemu_get_ram_ptr(section->mr->ram_addr + + section_addr(section, addr)); memcpy(buf, ptr, l); qemu_put_ram_ptr(ptr);