From 9b2fadda3e0196ffd485adde4fe9cdd6fae35300 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 21 Jun 2016 23:48:51 +0200 Subject: ppc: Rework generation of priv and inval interrupts Recent server processors use the Hypervisor Emulation Assistance interrupt for illegal instructions and *some* type of SPR accesses. Also the code was always generating inval instructions even for priv violations due to setting the wrong flags Finally, the checking for PR/HV was open coded everywhere. This reworks it all, using little helper macros for checking, and adding the HV interrupt (which gets converted back to program check in the slow path of excp_helper.c on CPUs that don't want it). Signed-off-by: Benjamin Herrenschmidt [clg: fixed checkpatch.pl errors ] Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- linux-user/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux-user') diff --git a/linux-user/main.c b/linux-user/main.c index 358ed01e96..fd88e22fe3 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1721,6 +1721,7 @@ void cpu_loop(CPUPPCState *env) queue_signal(env, info.si_signo, &info); break; case POWERPC_EXCP_PROGRAM: /* Program exception */ + case POWERPC_EXCP_HV_EMU: /* HV emulation */ /* XXX: check this */ switch (env->error_code & ~0xF) { case POWERPC_EXCP_FP: -- cgit v1.2.3-55-g7522