All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@ozlabs.org>
To: kvm-ppc@vger.kernel.org
Subject: Re: [RFC PATCH 23/32] KVM: PPC: Book3S HV: Framework to handle HV Emulation Assist Interrupt
Date: Thu, 27 Sep 2018 01:27:57 +0000	[thread overview]
Message-ID: <20180927012757.GA20169@fergus> (raw)
In-Reply-To: <1537524123-9578-24-git-send-email-paulus@ozlabs.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 <sjitindarsingh@gmail.com>
> > 
> > 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@gmail.com>
> > Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
> 
> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> 
> 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.

  parent reply	other threads:[~2018-09-27  1:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21 10:01 [RFC PATCH 23/32] KVM: PPC: Book3S HV: Framework to handle HV Emulation Assist Interrupt Paul Mackerras
2018-09-27  1:08 ` David Gibson
2018-09-27  1:27 ` Paul Mackerras [this message]
2018-09-27  3:28 ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180927012757.GA20169@fergus \
    --to=paulus@ozlabs.org \
    --cc=kvm-ppc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.