mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target/ppc: Implement HEIR SPR
The hypervisor emulation assistance interrupt modifies HEIR to contain the value of the instruction which caused the exception. Only TCG raises HEAI interrupts so this can be made TCG-only. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
5a5d3b23cb
commit
a3c020d85e
3 changed files with 40 additions and 1 deletions
|
@ -1642,13 +1642,28 @@ static void powerpc_excp_books(PowerPCCPU *cpu, int excp)
|
|||
case POWERPC_EXCP_HDECR: /* Hypervisor decrementer exception */
|
||||
case POWERPC_EXCP_HDSI: /* Hypervisor data storage exception */
|
||||
case POWERPC_EXCP_SDOOR_HV: /* Hypervisor Doorbell interrupt */
|
||||
case POWERPC_EXCP_HV_EMU:
|
||||
case POWERPC_EXCP_HVIRT: /* Hypervisor virtualization */
|
||||
srr0 = SPR_HSRR0;
|
||||
srr1 = SPR_HSRR1;
|
||||
new_msr |= (target_ulong)MSR_HVB;
|
||||
new_msr |= env->msr & ((target_ulong)1 << MSR_RI);
|
||||
break;
|
||||
#ifdef CONFIG_TCG
|
||||
case POWERPC_EXCP_HV_EMU: {
|
||||
uint32_t insn = ppc_ldl_code(env, env->nip);
|
||||
env->spr[SPR_HEIR] = insn;
|
||||
if (is_prefix_insn(env, insn)) {
|
||||
uint32_t insn2 = ppc_ldl_code(env, env->nip + 4);
|
||||
env->spr[SPR_HEIR] <<= 32;
|
||||
env->spr[SPR_HEIR] |= insn2;
|
||||
}
|
||||
srr0 = SPR_HSRR0;
|
||||
srr1 = SPR_HSRR1;
|
||||
new_msr |= (target_ulong)MSR_HVB;
|
||||
new_msr |= env->msr & ((target_ulong)1 << MSR_RI);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case POWERPC_EXCP_VPU: /* Vector unavailable exception */
|
||||
case POWERPC_EXCP_VSXU: /* VSX unavailable exception */
|
||||
case POWERPC_EXCP_FU: /* Facility unavailable exception */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue