From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9gET-0002ff-MK for qemu-devel@nongnu.org; Mon, 19 Mar 2012 13:18:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9gE9-0001sH-MV for qemu-devel@nongnu.org; Mon, 19 Mar 2012 13:18:57 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:37937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9gE9-0001s3-GI for qemu-devel@nongnu.org; Mon, 19 Mar 2012 13:18:37 -0400 Received: by pbcuo5 with SMTP id uo5so1490523pbc.4 for ; Mon, 19 Mar 2012 10:18:35 -0700 (PDT) Message-ID: <4F676A67.9040801@codemonkey.ws> Date: Mon, 19 Mar 2012 12:18:31 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4F66FF17.90303@redhat.com> <4F6769AF.4090201@redhat.com> In-Reply-To: <4F6769AF.4090201@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL] Memory core regression fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Blue Swirl , qemu-devel On 03/19/2012 12:15 PM, Avi Kivity wrote: > 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: I'm become a bigger fan of not using a single branch for pull requests and instead doing what Gerd does an use a monotonically increasing branch. For instance: memory/urgent.1 memory/urgent.2 ... It avoids confusion caused by situations like this because you can immediately submit another PULL request if needed and I can just ignore the last one without fear of race conditions. At any rate, I'm going to handle this as a separate merge as your previous pull is about to be pushed. Regards, Anthony Liguori > > 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); > } >