* [PATCH] fix smbios memory device length boundary condition
@ 2009-01-10 0:10 Bill Rieske
2009-01-11 12:49 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Bill Rieske @ 2009-01-10 0:10 UTC (permalink / raw)
To: kvm
dev_memsize ends up 0 when it shouldn't be on 16G boundary conditions.
Signed-off-by: Bill Rieske <brieske@novell.com>
diff --git a/bios/rombios32.c b/bios/rombios32.c
index ab37e13..9d2eaaa 100755
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -2115,7 +2115,7 @@ void smbios_init(void)
for ( i = 0; i < nr_mem_devs; i++ )
{
uint32_t dev_memsize = ((i == (nr_mem_devs - 1))
- ? (memsize & 0x3fff) : 0x4000);
+ ? (((memsize-1) & 0x3fff)+1) : 0x4000);
add_struct(smbios_type_17_init(p, dev_memsize, i));
add_struct(smbios_type_19_init(p, dev_memsize, i));
add_struct(smbios_type_20_init(p, dev_memsize, i));
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fix smbios memory device length boundary condition
2009-01-10 0:10 [PATCH] fix smbios memory device length boundary condition Bill Rieske
@ 2009-01-11 12:49 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-01-11 12:49 UTC (permalink / raw)
To: Bill Rieske; +Cc: kvm
Bill Rieske wrote:
> dev_memsize ends up 0 when it shouldn't be on 16G boundary conditions.
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-11 12:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-10 0:10 [PATCH] fix smbios memory device length boundary condition Bill Rieske
2009-01-11 12:49 ` Avi Kivity
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).