From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7qbD-0004QX-Bj for qemu-devel@nongnu.org; Fri, 09 Aug 2013 13:35:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7qb4-00029W-E3 for qemu-devel@nongnu.org; Fri, 09 Aug 2013 13:35:39 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:33996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7qb4-00029Q-8C for qemu-devel@nongnu.org; Fri, 09 Aug 2013 13:35:30 -0400 Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Aug 2013 11:35:29 -0600 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id DD0871FF0044 for ; Fri, 9 Aug 2013 11:30:00 -0600 (MDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r79HZBf6048648 for ; Fri, 9 Aug 2013 11:35:15 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r79HZASB009771 for ; Fri, 9 Aug 2013 11:35:10 -0600 From: Anthony Liguori Date: Fri, 9 Aug 2013 12:35:00 -0500 Message-Id: <1376069702-22330-2-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1376069702-22330-1-git-send-email-aliguori@us.ibm.com> References: <1376069702-22330-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH v3 1/3] sysfw: remove read-only pc_sysfw_flash_vs_rom_bug_compatible List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Markus Armbruster From: Paolo Bonzini The variable is not written anymore. This cleans up after 9e1c2ec (which accidentally left variable pc_sysfw_flash_vs_rom_bug_compatible behind, value always zero), and buries dead code from commit dafb82e (which resurrected the pc_sysfw code for pc_sysfw_flash_vs_rom_bug_compatible by mistake). Signed-off-by: Paolo Bonzini --- hw/block/pc_sysfw.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/hw/block/pc_sysfw.c b/hw/block/pc_sysfw.c index 7db68f0..71ee631 100644 --- a/hw/block/pc_sysfw.c +++ b/hw/block/pc_sysfw.c @@ -199,12 +199,6 @@ static void old_pc_system_rom_init(MemoryRegion *rom_memory, bool isapc_ram_fw) bios); } -/* - * Bug-compatible flash vs. ROM selection enabled? - * A few older machines enable this. - */ -bool pc_sysfw_flash_vs_rom_bug_compatible; - void pc_system_firmware_init(MemoryRegion *rom_memory) { DriveInfo *pflash_drv; @@ -222,25 +216,7 @@ void pc_system_firmware_init(MemoryRegion *rom_memory) pflash_drv = drive_get(IF_PFLASH, 0, 0); - if (pc_sysfw_flash_vs_rom_bug_compatible) { - /* - * This is a Bad Idea, because it makes enabling/disabling KVM - * guest-visible. Do it only in bug-compatibility mode. - */ - if (kvm_enabled()) { - if (pflash_drv != NULL) { - fprintf(stderr, "qemu: pflash cannot be used with kvm enabled\n"); - exit(1); - } else { - /* In old pc_sysfw_flash_vs_rom_bug_compatible mode, we assume - * that KVM cannot execute from device memory. In this case, we - * use old rom based firmware initialization for KVM. But, since - * this is different from non-kvm mode, this behavior is - * undesirable */ - sysfw_dev->rom_only = 1; - } - } - } else if (pflash_drv == NULL) { + if (pflash_drv == NULL) { /* When a pflash drive is not found, use rom-mode */ sysfw_dev->rom_only = 1; } else if (kvm_enabled() && !kvm_readonly_mem_enabled()) { -- 1.8.0