From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: [PATCH] vga: Mark VBE area as reserved in e820 tables Date: Thu, 14 Oct 2010 12:36:23 -0600 Message-ID: <20101014183546.23575.34968.stgit@s20.home> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, jes.sorensen@redhat.com, anthony@codemonkey.ws, alex.williamson@redhat.com To: qemu-devel@nongnu.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:23777 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755921Ab0JNSg1 (ORCPT ); Thu, 14 Oct 2010 14:36:27 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Otherwise the guest might try to use the range for device hotplug. Signed-off-by: Alex Williamson --- 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);