From 6c03a5a402c6438f8873f81f4a24514eddf475e7 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Sat, 11 Jan 2014 18:00:00 +0100
Subject: [PATCH 10/22] sysfw: remove read-only pc_sysfw_flash_vs_rom_bug_compatible
RH-Author: Laszlo Ersek <lersek@redhat.com>
Message-id: <1389463208-6278-11-git-send-email-lersek@redhat.com>
Patchwork-id: 56624
O-Subject: [RHEL-7.0 qemu-kvm PATCH 10/18] sysfw: remove read-only pc_sysfw_flash_vs_rom_bug_compatible
Bugzilla: 1032346
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Amos Kong <akong@redhat.com>
RH-Acked-by: Andrew Jones <drjones@redhat.com>
From: Paolo Bonzini <pbonzini@redhat.com>
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 <pbonzini@redhat.com>
Message-id: 1376069702-22330-2-git-send-email-aliguori@us.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 133bb095acf536f85e7e57821596c8c844aaa583)
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
hw/block/pc_sysfw.c | 26 +-------------------------
1 file changed, 1 insertion(+), 25 deletions(-)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
hw/block/pc_sysfw.c | 26 +-------------------------
1 files changed, 1 insertions(+), 25 deletions(-)
diff --git a/hw/block/pc_sysfw.c b/hw/block/pc_sysfw.c
index 76932fc..38261b1 100644
--- a/hw/block/pc_sysfw.c
+++ b/hw/block/pc_sysfw.c
@@ -196,12 +196,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;
@@ -219,25 +213,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.7.1