@@ -2851,6 +2851,9 @@ static void spapr_machine_init(MachineState *machine)
/* Enable H_PAGE_INIT */
kvmppc_enable_h_page_init();
+
+ /* Enable H_PURR */
+ kvmppc_enable_h_purr();
}
/* allocate RAM */
@@ -2075,6 +2075,11 @@ void kvmppc_enable_h_page_init(void)
kvmppc_enable_hcall(kvm_state, H_PAGE_INIT);
}
+void kvmppc_enable_h_purr(void)
+{
+ kvmppc_enable_hcall(kvm_state, H_PURR);
+}
+
void kvmppc_set_papr(PowerPCCPU *cpu)
{
CPUState *cs = CPU(cpu);
@@ -24,6 +24,7 @@ void kvmppc_enable_logical_ci_hcalls(void);
void kvmppc_enable_set_mode_hcall(void);
void kvmppc_enable_clear_ref_mod_hcalls(void);
void kvmppc_enable_h_page_init(void);
+void kvmppc_enable_h_purr(void);
void kvmppc_set_papr(PowerPCCPU *cpu);
int kvmppc_set_compat(PowerPCCPU *cpu, uint32_t compat_pvr);
void kvmppc_set_mpic_proxy(PowerPCCPU *cpu, int mpic_proxy);
@@ -145,6 +146,10 @@ static inline void kvmppc_enable_h_page_init(void)
{
}
+static inline void kvmppc_enable_h_purr(void)
+{
+}
+
static inline void kvmppc_set_papr(PowerPCCPU *cpu)
{
}
Enable in-kernel handling of the hcall H_PURR. This means that if the kernel implements an hcall handler for H_PURR, it will be used. Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> --- hw/ppc/spapr.c | 3 +++ target/ppc/kvm.c | 5 +++++ target/ppc/kvm_ppc.h | 5 +++++ 3 files changed, 13 insertions(+)