target/arm: Handle VIRQ and VFIQ in arm_cpu_do_interrupt_aarch32()

To run a VM in 32-bit EL1 our AArch32 interrupt handling code
needs to be able to cope with VIRQ and VFIQ exceptions.
These behave like IRQ and FIQ except that we don't need to try
to route them to Monitor mode.

Backports commit 87a4b270348c69a446ebcddc039bfae31b1675cb from qemu
This commit is contained in:
Peter Maydell 2018-03-01 22:59:01 -05:00 committed by Lioncash
parent ebae552174
commit 0db334c0e4
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -5647,6 +5647,20 @@ static void arm_cpu_do_interrupt_aarch32_(CPUState *cs)
new_mode = ARM_CPU_MODE_MON; new_mode = ARM_CPU_MODE_MON;
} }
break; break;
case EXCP_VIRQ:
new_mode = ARM_CPU_MODE_IRQ;
addr = 0x18;
/* Disable IRQ and imprecise data aborts. */
mask = CPSR_A | CPSR_I;
offset = 4;
break;
case EXCP_VFIQ:
new_mode = ARM_CPU_MODE_FIQ;
addr = 0x1c;
/* Disable FIQ, IRQ and imprecise data aborts. */
mask = CPSR_A | CPSR_I | CPSR_F;
offset = 4;
break;
case EXCP_SMC: case EXCP_SMC:
new_mode = ARM_CPU_MODE_MON; new_mode = ARM_CPU_MODE_MON;
addr = 0x08; addr = 0x08;