Blame SOURCES/kvm-sysfw-remove-read-only-pc_sysfw_flash_vs_rom_bug_com.patch

0a122b
From 6c03a5a402c6438f8873f81f4a24514eddf475e7 Mon Sep 17 00:00:00 2001
0a122b
From: Laszlo Ersek <lersek@redhat.com>
0a122b
Date: Sat, 11 Jan 2014 18:00:00 +0100
0a122b
Subject: [PATCH 10/22] sysfw: remove read-only pc_sysfw_flash_vs_rom_bug_compatible
0a122b
0a122b
RH-Author: Laszlo Ersek <lersek@redhat.com>
0a122b
Message-id: <1389463208-6278-11-git-send-email-lersek@redhat.com>
0a122b
Patchwork-id: 56624
0a122b
O-Subject: [RHEL-7.0 qemu-kvm PATCH 10/18] sysfw: remove read-only pc_sysfw_flash_vs_rom_bug_compatible
0a122b
Bugzilla: 1032346
0a122b
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
0a122b
RH-Acked-by: Amos Kong <akong@redhat.com>
0a122b
RH-Acked-by: Andrew Jones <drjones@redhat.com>
0a122b
0a122b
From: Paolo Bonzini <pbonzini@redhat.com>
0a122b
0a122b
The variable is not written anymore.
0a122b
0a122b
This cleans up after 9e1c2ec (which accidentally left variable
0a122b
pc_sysfw_flash_vs_rom_bug_compatible behind, value always zero), and
0a122b
buries dead code from commit dafb82e (which resurrected the pc_sysfw
0a122b
code for pc_sysfw_flash_vs_rom_bug_compatible by mistake).
0a122b
0a122b
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
0a122b
Message-id: 1376069702-22330-2-git-send-email-aliguori@us.ibm.com
0a122b
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
0a122b
(cherry picked from commit 133bb095acf536f85e7e57821596c8c844aaa583)
0a122b
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
0a122b
---
0a122b
 hw/block/pc_sysfw.c | 26 +-------------------------
0a122b
 1 file changed, 1 insertion(+), 25 deletions(-)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 hw/block/pc_sysfw.c |   26 +-------------------------
0a122b
 1 files changed, 1 insertions(+), 25 deletions(-)
0a122b
0a122b
diff --git a/hw/block/pc_sysfw.c b/hw/block/pc_sysfw.c
0a122b
index 76932fc..38261b1 100644
0a122b
--- a/hw/block/pc_sysfw.c
0a122b
+++ b/hw/block/pc_sysfw.c
0a122b
@@ -196,12 +196,6 @@ static void old_pc_system_rom_init(MemoryRegion *rom_memory, bool isapc_ram_fw)
0a122b
                                 bios);
0a122b
 }
0a122b
 
0a122b
-/*
0a122b
- * Bug-compatible flash vs. ROM selection enabled?
0a122b
- * A few older machines enable this.
0a122b
- */
0a122b
-bool pc_sysfw_flash_vs_rom_bug_compatible;
0a122b
-
0a122b
 void pc_system_firmware_init(MemoryRegion *rom_memory)
0a122b
 {
0a122b
     DriveInfo *pflash_drv;
0a122b
@@ -219,25 +213,7 @@ void pc_system_firmware_init(MemoryRegion *rom_memory)
0a122b
 
0a122b
     pflash_drv = drive_get(IF_PFLASH, 0, 0);
0a122b
 
0a122b
-    if (pc_sysfw_flash_vs_rom_bug_compatible) {
0a122b
-        /*
0a122b
-         * This is a Bad Idea, because it makes enabling/disabling KVM
0a122b
-         * guest-visible.  Do it only in bug-compatibility mode.
0a122b
-         */
0a122b
-        if (kvm_enabled()) {
0a122b
-            if (pflash_drv != NULL) {
0a122b
-                fprintf(stderr, "qemu: pflash cannot be used with kvm enabled\n");
0a122b
-                exit(1);
0a122b
-            } else {
0a122b
-                /* In old pc_sysfw_flash_vs_rom_bug_compatible mode, we assume
0a122b
-                 * that KVM cannot execute from device memory. In this case, we
0a122b
-                 * use old rom based firmware initialization for KVM. But, since
0a122b
-                 * this is different from non-kvm mode, this behavior is
0a122b
-                 * undesirable */
0a122b
-                sysfw_dev->rom_only = 1;
0a122b
-            }
0a122b
-        }
0a122b
-    } else if (pflash_drv == NULL) {
0a122b
+    if (pflash_drv == NULL) {
0a122b
         /* When a pflash drive is not found, use rom-mode */
0a122b
         sysfw_dev->rom_only = 1;
0a122b
     } else if (kvm_enabled() && !kvm_readonly_mem_enabled()) {
0a122b
-- 
0a122b
1.7.1
0a122b