From: Anthony Liguori Subject: [PATCH 2/3] Fix option ROM loading Date: Wed, 5 Sep 2007 10:35:01 -0500 Message-ID: <11890065032226-git-send-email-aliguori@us.ibm.com> References: <118900650250-git-send-email-aliguori@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , Avi Kivity To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: In-Reply-To: <118900650250-git-send-email-aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Make sure to copy the option ROMs into physical memory so they're visible to KVM guests. With the older BIOS, this allows -boot n to work although the CVS BIOS does not work. Signed-off-by: Anthony Liguori diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c index a5c08bc..f2917ca 100644 --- a/qemu/hw/pc.c +++ b/qemu/hw/pc.c @@ -585,6 +585,11 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, int boot_device, } cpu_register_physical_memory(0xd0000 + option_rom_offset, size, offset | IO_MEM_ROM); + + if (kvm_allowed) + memcpy(phys_ram_base + 0xd0000 + option_rom_offset, + phys_ram_base + offset, size); + option_rom_offset += size + 2047; option_rom_offset -= (option_rom_offset % 2048); } ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/