From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Date: Thu, 27 Sep 2018 03:28:58 +0000 Subject: Re: [RFC PATCH 23/32] KVM: PPC: Book3S HV: Framework to handle HV Emulation Assist Interrupt Message-Id: <20180927032858.GH30868@umbus.fritz.box> MIME-Version: 1 Content-Type: multipart/mixed; boundary="2r9at8cGmvB+qaMS" List-Id: References: <1537524123-9578-24-git-send-email-paulus@ozlabs.org> In-Reply-To: <1537524123-9578-24-git-send-email-paulus@ozlabs.org> To: kvm-ppc@vger.kernel.org --2r9at8cGmvB+qaMS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > > >=20 > > > 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. > > >=20 > > > 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=3D0 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. > > >=20 > > > Signed-off-by: Suraj Jitindar Singh > > > Signed-off-by: Paul Mackerras > >=20 > > Reviewed-by: David Gibson > >=20 > > Question, though: with the new mostly-paravirt approach to nested > > virt, what HV instructions do you still need to emulate? >=20 > 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. --=20 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 --2r9at8cGmvB+qaMS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlusTnoACgkQbDjKyiDZ s5IVWA//VWa8323yOmq33HSU84jvIbHNzYh8YyBaePaROR9W2zDvc4GP/GEE4FVz XwItnh9GIvfxMIIhqGPVsBHotJptDCjWjH0Z+P9ivSnYpBBmiqH7lSn+HpA2ST1M 5zanPm5p14AUex99Y0REjPd3uVm5KeIQMCX/0V/rXDn+jVVrkxKLDQisk9cXqEIR qgCxc919K50M54tys36i9B/FmtAAQvloX1s1jhxmkZHcsQWFC98ot7LCUYyiSPGB hGg50OH3WEW5EkMIqZHwlNv/uaJkU0fK2r2MCsNpMIu+ZBMs3xeTllIdsivhqiaN 3ml2CQN1pJ09Qu3ee3kjhpmDVR1I+3JOTaq73KqFAJ99G6gW4n8oO92qNx+DCRic i29ni8oBz6wHaZED/JqaqYDaP+aiyhRTNWRFX2ayLQLh9GFu3HStXONUZWJrq1N6 HQ44D+3ijZSN4Wh7yhrChvbzgpJXSCSBc8RABR0+UYoFWI1vAOUruKNlGAitPUdL nBVIgofD+9dEgOMmEIqKaehEjstaBoeiB832DPTZDCxEuwavAz87gwGA6bnU2m/w m3bgRTc8CUEF3tFmgDqJbfyrpZ9Stf6CL/nNzC6Z+jHZeIs2x2MX5js7qp1oRngN Ztk5Zi+DIIVaX/BWhvg12HJXo4Z1RfjbDy5DaiWObpOLny+roM4= =ZryV -----END PGP SIGNATURE----- --2r9at8cGmvB+qaMS--