Re: [PATCH 4/4] powerpc/mm/radix: Workaround prefetch issue with KVM

2017-07-18 Thread Benjamin Herrenschmidt
On Wed, 2017-07-19 at 12:29 +1000, Balbir Singh wrote: > > > diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S > > b/arch/powerpc/kvm/book3s_hv_rmhandlers.S > > index 6ea4b53..4fb3581b 100644 > > --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S > > +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S >

Re: [PATCH 4/4] powerpc/mm/radix: Workaround prefetch issue with KVM

2017-07-18 Thread Balbir Singh
On Fri, 2017-07-14 at 11:52 +1000, Benjamin Herrenschmidt wrote: > There's a somewhat architectural issue with Radix MMU and KVM. > > When coming out of a guest with AIL (ie, MMU enabled), we start > executing hypervisor code with the PID register still containing > whatever the guest has been

Re: [PATCH 4/4] powerpc/mm/radix: Workaround prefetch issue with KVM

2017-07-14 Thread Benjamin Herrenschmidt
On Fri, 2017-07-14 at 11:21 +0530, Aneesh Kumar K.V wrote: > > > There is still an issue with malicious guests purposefully setting > > the PID register to a value in the host range. Hopefully future HW > > can prevent that, but in the meantime, we handle it with a pair of > > kludges: > > > >

Re: [PATCH 4/4] powerpc/mm/radix: Workaround prefetch issue with KVM

2017-07-13 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > There's a somewhat architectural issue with Radix MMU and KVM. > > When coming out of a guest with AIL (ie, MMU enabled), we start > executing hypervisor code with the PID register still containing > whatever the guest has been using. >

[PATCH 4/4] powerpc/mm/radix: Workaround prefetch issue with KVM

2017-07-13 Thread Benjamin Herrenschmidt
There's a somewhat architectural issue with Radix MMU and KVM. When coming out of a guest with AIL (ie, MMU enabled), we start executing hypervisor code with the PID register still containing whatever the guest has been using. The problem is that the CPU can (and will) then start prefetching or