diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2017-02-20 10:47:09 +1100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-03-01 11:23:39 +1100 |
commit | b7b0b1f13a9d0b77b3dcb7696de420c2e805ca25 (patch) | |
tree | 98a854a1303e0c918569d48bcc58621cefddd4a8 /target/ppc/translate_init.c | |
parent | c6404adebf923fdd9ee5edf92594dcf5df3b5b10 (diff) |
target/ppc: Merge cpu_ppc_set_vhyp() with cpu_ppc_set_papr()
cpu_ppc_set_papr() sets up various aspects of CPU state for use with PAPR
paravirtualized guests. However, it doesn't set the virtual hypervisor,
so callers must also call cpu_ppc_set_vhyp() so that PAPR hypercalls are
handled properly. This is a bit silly, so fold setting the virtual
hypervisor into cpu_ppc_set_papr().
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Diffstat (limited to 'target/ppc/translate_init.c')
-rw-r--r-- | target/ppc/translate_init.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index be35cbd3a2..a1405e9e13 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -8835,18 +8835,14 @@ POWERPC_FAMILY(POWER9)(ObjectClass *oc, void *data) } #if !defined(CONFIG_USER_ONLY) - -void cpu_ppc_set_vhyp(PowerPCCPU *cpu, PPCVirtualHypervisor *vhyp) -{ - cpu->vhyp = vhyp; -} - -void cpu_ppc_set_papr(PowerPCCPU *cpu) +void cpu_ppc_set_papr(PowerPCCPU *cpu, PPCVirtualHypervisor *vhyp) { CPUPPCState *env = &cpu->env; ppc_spr_t *lpcr = &env->spr_cb[SPR_LPCR]; ppc_spr_t *amor = &env->spr_cb[SPR_AMOR]; + cpu->vhyp = vhyp; + /* PAPR always has exception vectors in RAM not ROM. To ensure this, * MSR[IP] should never be set. * |