From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Date: Thu, 27 Sep 2018 01:27:57 +0000 Subject: Re: [RFC PATCH 23/32] KVM: PPC: Book3S HV: Framework to handle HV Emulation Assist Interrupt Message-Id: <20180927012757.GA20169@fergus> List-Id: References: <1537524123-9578-24-git-send-email-paulus@ozlabs.org> In-Reply-To: <1537524123-9578-24-git-send-email-paulus@ozlabs.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org 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 > > > > 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 > > Signed-off-by: Paul Mackerras > > Reviewed-by: David Gibson > > 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. Paul.