On Thu, Sep 27, 2018 at 11:27:57AM +1000, Paul Mackerras wrote: > On Thu, Sep 27, 2018 at 11:08:26AM +1000, David Gibson wrote: > > On Fri, Sep 21, 2018 at 08:01:54PM +1000, Paul Mackerras wrote: > > > From: Suraj Jitindar Singh <sjitindarsingh@xxxxxxxxx> > > > > > > A HEAI (hypervisor emulation assistance interrupt) occurs when a > > > hypervisor resource or instruction is used in a privileged but > > > non-hypervisor state and the LPCR_EVIRT bit is set in LPCR. When > > > this occurs bit 45 is set in HSRR1. Detect the occurrence of this, > > > and if userspace has enabled the nested virtualization capability > > > on the VM, then call the code to handle it accordingly. > > > > > > With LPCR[EVIRT] set, we also get HEAI (without bit 45 set) for > > > mfspr or mtspr to unimplemented SPR numbers. For these accesses, > > > we emulate the EVIRT=0 behaviour, which is to make the access > > > a no-op for privileged software unless it is accessing SPR 0, > > > 4, 5 or 6. Problem-state accesses and accesses to SPR 0, 4, 5 > > > or 6 generate an illegal-instruction type program interrupt. > > > > > > Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@xxxxxxxxx> > > > Signed-off-by: Paul Mackerras <paulus@xxxxxxxxxx> > > > > Reviewed-by: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> > > > > Question, though: with the new mostly-paravirt approach to nested > > virt, what HV instructions do you still need to emulate? > > Currently just tlbie. If we add a H_TLBIE then not even that. Ok. It does seem like paravirting the tlbie might be a good idea, if it lets us drop the whole extra instruction emulation infrastructure. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Attachment:
signature.asc
Description: PGP signature