* [Qemu-devel] [PATCH] pc: unbreak vhost
@ 2010-07-16 11:00 Michael S. Tsirkin
2010-07-16 12:39 ` [Qemu-devel] " Alex Williamson
0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2010-07-16 11:00 UTC (permalink / raw)
To: alex.williamson, Anthony Liguori, qemu-devel
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.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
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 */
--
1.7.2.rc0.14.g41c1c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH] pc: unbreak vhost
2010-07-16 11:00 [Qemu-devel] [PATCH] pc: unbreak vhost Michael S. Tsirkin
@ 2010-07-16 12:39 ` Alex Williamson
2010-07-16 13:04 ` Anthony Liguori
0 siblings, 1 reply; 3+ messages in thread
From: Alex Williamson @ 2010-07-16 12:39 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
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
Alex
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> 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 */
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH] pc: unbreak vhost
2010-07-16 12:39 ` [Qemu-devel] " Alex Williamson
@ 2010-07-16 13:04 ` Anthony Liguori
0 siblings, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2010-07-16 13:04 UTC (permalink / raw)
To: Alex Williamson; +Cc: qemu-devel, 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<mst@redhat.com>
>> ---
>> 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 */
>>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-16 13:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-16 11:00 [Qemu-devel] [PATCH] pc: unbreak vhost Michael S. Tsirkin
2010-07-16 12:39 ` [Qemu-devel] " Alex Williamson
2010-07-16 13:04 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).