public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: qemu-devel@nongnu.org
Cc: kvm@vger.kernel.org, jes.sorensen@redhat.com,
	anthony@codemonkey.ws, alex.williamson@redhat.com
Subject: [PATCH] vga: Mark VBE area as reserved in e820 tables
Date: Thu, 14 Oct 2010 12:36:23 -0600	[thread overview]
Message-ID: <20101014183546.23575.34968.stgit@s20.home> (raw)

Otherwise the guest might try to use the range for device hotplug.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---

 hw/vga.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/hw/vga.c b/hw/vga.c
index 966185e..90f9dc0 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -2331,6 +2331,14 @@ void vga_init(VGACommonState *s)
 void vga_init_vbe(VGACommonState *s)
 {
 #ifdef CONFIG_BOCHS_VBE
+#if defined (TARGET_I386)
+    if (e820_add_entry(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+                       VGA_RAM_SIZE, E820_RESERVED) < 0) {
+        fprintf(stderr,
+                "Warning: unable to register VBE range as e820 reserved\n");
+    }
+#endif
+
     /* XXX: use optimized standard vga accesses */
     cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
                                  VGA_RAM_SIZE, s->vram_offset);


             reply	other threads:[~2010-10-14 18:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14 18:36 Alex Williamson [this message]
2010-10-15  8:22 ` [PATCH] vga: Mark VBE area as reserved in e820 tables Gerd Hoffmann
2010-10-15 14:41   ` Alex Williamson

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=20101014183546.23575.34968.stgit@s20.home \
    --to=alex.williamson@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=jes.sorensen@redhat.com \
    --cc=kvm@vger.kernel.org \
    --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