All of lore.kernel.org
 help / color / mirror / Atom feed
* [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; 3+ 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] 3+ 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; 3+ 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] 3+ messages in thread

* [PATCH] fix smbios memory device length boundary condition
@ 2009-01-09 23:58 Bill Rieske
  0 siblings, 0 replies; 3+ messages in thread
From: Bill Rieske @ 2009-01-09 23:58 UTC (permalink / raw)
  To: xen-devel, xen-devel-request

dev_memsize ends up 0 when it shouldn't be on 16G boundary conditions.

Signed-off-by: Bill Rieske <brieske@novell.com

diff -r 95d77829216f tools/firmware/hvmloader/smbios.c
--- a/tools/firmware/hvmloader/smbios.c Thu Jan 08 11:19:38 2009 +0000
+++ b/tools/firmware/hvmloader/smbios.c Fri Jan 09 16:40:58 2009 -0700
@@ -119,7 +119,7 @@ write_smbios_tables(void *start,
     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);
         do_struct(smbios_type_17_init(p, dev_memsize, i));
         do_struct(smbios_type_19_init(p, dev_memsize, i));
         do_struct(smbios_type_20_init(p, dev_memsize, i));

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-11 12:49 UTC | newest]

Thread overview: 3+ 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
  -- strict thread matches above, loose matches on Subject: below --
2009-01-09 23:58 Bill Rieske

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.