From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40743 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZkaM-0007D0-6f for qemu-devel@nongnu.org; Fri, 16 Jul 2010 09:04:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZkaL-0000WK-1q for qemu-devel@nongnu.org; Fri, 16 Jul 2010 09:04:13 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:47458) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZkaK-0000WE-UN for qemu-devel@nongnu.org; Fri, 16 Jul 2010 09:04:13 -0400 Received: by gxk19 with SMTP id 19so1280344gxk.4 for ; Fri, 16 Jul 2010 06:04:12 -0700 (PDT) Message-ID: <4C4058C0.8030709@codemonkey.ws> Date: Fri, 16 Jul 2010 08:04:00 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <20100716110004.GA28018@redhat.com> <1279283952.20397.293.camel@x201> In-Reply-To: <1279283952.20397.293.camel@x201> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] pc: unbreak vhost List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" On 07/16/2010 07:39 AM, Alex Williamson wrote: > On Fri, 2010-07-16 at 14:00 +0300, Michael S. Tsirkin wrote: > >> Commit 44ae28f3152138e71ccad66c201d730b93374bc2 breaks vhost >> on small guests as we get a zero-sized memory slot at>4G, >> which that code does not expect. >> The removal of if (above_4g_size> 0) seems unintentional >> (commit log only mentions allocation memory in a single chunk) >> so just put it back in. >> > Yep, I already submitted an identical patch too: > > http://lists.nongnu.org/archive/html/qemu-devel/2010-07/msg00364.html > Sorry Alex, I apparently forgot to push yesterday. Let me do a quick merge and build and I'll push. Regards, Anthony Liguori > Alex > > >> Signed-off-by: Michael S. Tsirkin >> --- >> hw/pc.c | 6 ++++-- >> 1 files changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/hw/pc.c b/hw/pc.c >> index 89bd4af..77b1592 100644 >> --- a/hw/pc.c >> +++ b/hw/pc.c >> @@ -920,8 +920,10 @@ void pc_memory_init(ram_addr_t ram_size, >> below_4g_mem_size - 0x100000, >> ram_addr + 0x100000); >> #if TARGET_PHYS_ADDR_BITS> 32 >> - cpu_register_physical_memory(0x100000000ULL, above_4g_mem_size, >> - ram_addr + below_4g_mem_size); >> + if (above_4g_mem_size> 0) { >> + cpu_register_physical_memory(0x100000000ULL, above_4g_mem_size, >> + ram_addr + below_4g_mem_size); >> + } >> #endif >> >> /* BIOS load */ >> > > >