aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc_newworld.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ppc_newworld.c')
-rw-r--r--hw/ppc_newworld.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index 639dcde000..809a1cfcbb 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -427,9 +427,16 @@ static void ppc_core99_init (ram_addr_t ram_size,
fw_cfg_add_i16(fw_cfg, FW_CFG_PPC_HEIGHT, graphic_height);
fw_cfg_add_i16(fw_cfg, FW_CFG_PPC_DEPTH, graphic_depth);
+ fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_IS_KVM, kvm_enabled());
if (kvm_enabled()) {
#ifdef CONFIG_KVM
+ uint8_t *hypercall;
+
fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_TBFREQ, kvmppc_get_tbfreq());
+ hypercall = qemu_malloc(16);
+ kvmppc_get_hypercall(env, hypercall, 16);
+ fw_cfg_add_bytes(fw_cfg, FW_CFG_PPC_KVM_HC, hypercall, 16);
+ fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_KVM_PID, getpid());
#endif
} else {
fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_TBFREQ, get_ticks_per_sec());