diff mbox

[5/6] pc_sysfw: allow flash memory to be used with KVM

Message ID 1367137941-4310-6-git-send-email-jordan.l.justen@intel.com
State New
Headers show

Commit Message

jordan.l.justen@intel.com April 28, 2013, 8:32 a.m. UTC
This requires the KVM READONLY memory capability.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
---
 hw/block/pc_sysfw.c |    3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/hw/block/pc_sysfw.c b/hw/block/pc_sysfw.c
index aad8614..e88d67e 100644
--- a/hw/block/pc_sysfw.c
+++ b/hw/block/pc_sysfw.c
@@ -237,6 +237,9 @@  void pc_system_firmware_init(MemoryRegion *rom_memory)
             old_pc_system_rom_init(rom_memory);
             return;
         }
+    } else if (kvm_enabled() && !kvm_readonly_mem_enabled()) {
+        fprintf(stderr, "qemu: pflash with kvm requires KVM readonly memory support\n");
+        exit(1);
     }
 
     /* If a pflash drive is not found, then create one using