[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/52] PPC: KVM: Fix g3beige and mac99 when HV is loa
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 01/52] PPC: KVM: Fix g3beige and mac99 when HV is loaded |
Date: |
Thu, 4 Sep 2014 19:19:49 +0200 |
On PPC we have 2 different styles of KVM: PR and HV. HV can only virtualize
sPAPR guests while PR can virtualize everything that's reasonably close to
the host hardware platform.
As long as only one kernel module (PR or HV) is loaded, the "default" kvm type
is the module that's loaded. So if your hardware only supports PR mode you can
easily spawn a Mac VM.
However, if both HV and PR are loaded we default to HV mode. And in that case
the Mac machines have to explicitly ask for PR mode to get a working VM.
Fix this up by explicitly having the Mac machines ask for PR style KVM. This
fixes bootup of Mac VMs on systems where bot HV and PR kvm modules are loaded
for me.
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc/mac_newworld.c | 7 +++++++
hw/ppc/mac_oldworld.c | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 1ec4bb4..0693168 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -477,12 +477,19 @@ static void ppc_core99_init(MachineState *machine)
qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
}
+static int core99_kvm_type(const char *arg)
+{
+ /* Always force PR KVM */
+ return 2;
+}
+
static QEMUMachine core99_machine = {
.name = "mac99",
.desc = "Mac99 based PowerMAC",
.init = ppc_core99_init,
.max_cpus = MAX_CPUS,
.default_boot_order = "cd",
+ .kvm_type = core99_kvm_type,
};
static void core99_machine_init(void)
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index cd9bdbc..ec7ed38 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -346,6 +346,12 @@ static void ppc_heathrow_init(MachineState *machine)
qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
}
+static int heathrow_kvm_type(const char *arg)
+{
+ /* Always force PR KVM */
+ return 2;
+}
+
static QEMUMachine heathrow_machine = {
.name = "g3beige",
.desc = "Heathrow based PowerMAC",
@@ -355,6 +361,7 @@ static QEMUMachine heathrow_machine = {
.is_default = 1,
#endif
.default_boot_order = "cd", /* TOFIX "cad" when Mac floppy is implemented
*/
+ .kvm_type = heathrow_kvm_type,
};
static void heathrow_machine_init(void)
--
1.8.1.4
- [Qemu-devel] [PULL 04/52] linux-user: Split PPC Trampoline Encoding from Register Save, (continued)
- [Qemu-devel] [PULL 04/52] linux-user: Split PPC Trampoline Encoding from Register Save, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 12/52] spapr: fix possible memory leak, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 09/52] hw/ppc/spapr_hcall.c: Fix typo in function names, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 02/52] ppc: spapr-rtas - implement os-term rtas call, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 07/52] linux-user: Implement do_setcontext for PPC64, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 05/52] linux-user: Enable Signal Handlers on PPC64, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 13/52] spapr: Move DT memory node rendering to a helper, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 08/52] linux-user: Handle PPC64 ELFv2 Function Pointers, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 15/52] spapr: Refactor spapr_populate_memory() to allow memoryless nodes, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 10/52] spapr: add uuid/host details to device tree, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 01/52] PPC: KVM: Fix g3beige and mac99 when HV is loaded,
Alexander Graf <=
- [Qemu-devel] [PULL 17/52] spapr: Add a helper for node0_size calculation, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 16/52] spapr: Split memory nodes to power-of-two blocks, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 06/52] linux-user: Properly Dereference PPC64 ELFv1 Signal Handler Pointer, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 18/52] spapr: Fix ibm, associativity for memory nodes, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 19/52] loader: Add load_image_size() to replace load_image(), Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 14/52] spapr: Use DT memory node rendering helper for other nodes, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 11/52] PPC: mac99: Move NVRAM to page boundary when necessary, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 21/52] ppc: debug stub: Get trap instruction opcode from KVM, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 23/52] ppc: Add software breakpoint support, Alexander Graf, 2014/09/04
- [Qemu-devel] [PULL 20/52] spapr: Locate RTAS and device-tree based on real RMA, Alexander Graf, 2014/09/04