[PATCH] KVM: PPC: Book3S PR: Do not fail emulation with mtspr/mfspr for unknown SPRs
Thomas Huth
thuth at redhat.com
Tue Apr 4 18:00:32 AEST 2017
On 04.04.2017 08:25, Paul Mackerras wrote:
> On Mon, Apr 03, 2017 at 01:23:15PM +0200, Thomas Huth wrote:
>> According to the PowerISA 2.07, mtspr and mfspr should not generate
>> an illegal instruction exception when being used with an undefined SPR,
>> but rather treat the instruction as a NOP, inject a privilege exception
>> or an emulation assistance exception - depending on the SPR number.
>
> The emulation assist interrupt is a hypervisor interrupt, so the guest
> would not be expecting to receive it. On a real machine, the
> hypervisor would synthesize an illegal instruction type program
> interrupt as described in the last programming note in section 6.5.9
> of Book III of Power ISA v2.07B. Since we are the hypervisor here, we
> should synthesize a program interrupt rather than an emulation assist
> interrupt.
Ah, right, we're doing this in other spots, too, so a PROGILL is indeed
more consistent here. I'll send a v2 ...
Thomas
More information about the Linuxppc-dev
mailing list