From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: [PATCH v2 3/5] Qemu: do not mark bios readonly Date: Thu, 25 Oct 2012 17:22:12 +0800 Message-ID: <508904C4.7030409@linux.vnet.ibm.com> References: <50890462.5010307@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , Jan Kiszka , Anthony Liguori , "Kevin O'Connor" , Liu Sheng , KVM , qemu-devel@nongnu.org To: Xiao Guangrong Return-path: Received: from e23smtp04.au.ibm.com ([202.81.31.146]:40000 "EHLO e23smtp04.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759270Ab2JYJXP (ORCPT ); Thu, 25 Oct 2012 05:23:15 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 25 Oct 2012 19:18:39 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9P9MGp841681002 for ; Thu, 25 Oct 2012 20:22:16 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q9P9MFIj022084 for ; Thu, 25 Oct 2012 20:22:16 +1100 In-Reply-To: <50890462.5010307@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: In isapc, no i440x device exists in guest that means seabios can not make 0xc0000 to 0x1000000 writable It works fine in current code since the guest can happily write readonly memory. In order to support readonly slot in Qemu, we do not make the bios readonly anymore Signed-off-by: Xiao Guangrong --- hw/pc_sysfw.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/hw/pc_sysfw.c b/hw/pc_sysfw.c index b45f0ac..2d56fc7 100644 --- a/hw/pc_sysfw.c +++ b/hw/pc_sysfw.c @@ -156,7 +156,6 @@ static void old_pc_system_rom_init(MemoryRegion *rom_memory) bios = g_malloc(sizeof(*bios)); memory_region_init_ram(bios, "pc.bios", bios_size); vmstate_register_ram_global(bios); - memory_region_set_readonly(bios, true); ret = rom_add_file_fixed(bios_name, (uint32_t)(-bios_size), -1); if (ret != 0) { bios_error: @@ -179,7 +178,6 @@ static void old_pc_system_rom_init(MemoryRegion *rom_memory) 0x100000 - isa_bios_size, isa_bios, 1); - memory_region_set_readonly(isa_bios, true); /* map all the bios at the top of memory */ memory_region_add_subregion(rom_memory, -- 1.7.7.6