qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: qemu-devel@nongnu.org, bochs-developers@lists.sourceforge.net
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Bill Rieske <brieske@novell.com>, Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] [patch 9/9] kvm: bios: fix smbios memory device length boundary condition
Date: Tue, 20 Jan 2009 00:30:49 -0200	[thread overview]
Message-ID: <20090120023058.105258000@amt.cnet> (raw)
In-Reply-To: 20090120023040.623163208@amt.cnet

[-- Attachment #1: 0010_smbios_16g_boundary.patch --]
[-- Type: text/plain, Size: 837 bytes --]

dev_memsize ends up 0 when it shouldn't be on 16G boundary conditions.
    
Signed-off-by: Bill Rieske <brieske@novell.com>
Signed-off-by: Avi Kivity <avi@redhat.com>

From: Bill Rieske <brieske@novell.com>

Index: bochs/bios/rombios32.c
===================================================================
--- bochs.orig/bios/rombios32.c
+++ bochs/bios/rombios32.c
@@ -2218,7 +2218,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));

  parent reply	other threads:[~2009-01-20  2:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-20  2:30 [Qemu-devel] [patch 0/9] Bochs BIOS MTRR support + SMBIOS updates Marcelo Tosatti
2009-01-20  2:30 ` [Qemu-devel] [patch 1/9] kvm: bios: update SMBIOS table to report memory above 4G Marcelo Tosatti
2009-01-20  2:30 ` [Qemu-devel] [patch 2/9] kvm: bios: generate mptable unconditionally Marcelo Tosatti
2009-01-20  2:30 ` [Qemu-devel] [patch 3/9] kvm: bios: add mtrr support Marcelo Tosatti
2009-01-20  2:30 ` [Qemu-devel] [patch 4/9] kvm: bios: smp " Marcelo Tosatti
2009-01-20  2:30 ` [Qemu-devel] [patch 5/9] kvm: bios: extend MTRRs to above 4G Marcelo Tosatti
2009-01-20  2:30 ` [Qemu-devel] [patch 6/9] kvm: bios: cleanup/consolidate above 4G memory parsing Marcelo Tosatti
2009-01-20  2:30 ` [Qemu-devel] [patch 7/9] kvm: bios: switch MTRRs to cover only the PCI range and default to WB Marcelo Tosatti
2009-01-20  2:30 ` [Qemu-devel] [patch 8/9] kvm: bios: resolve memory device roll over reporting issues with >32G guests Marcelo Tosatti
2009-01-20  2:30 ` Marcelo Tosatti [this message]
2009-01-21 21:47 ` [Qemu-devel] Re: [patch 0/9] Bochs BIOS MTRR support + SMBIOS updates Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090120023058.105258000@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=bochs-developers@lists.sourceforge.net \
    --cc=brieske@novell.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).