RE: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-24 Thread Michael Ellerman
Ram Pai writes: > On Wed, Jul 22, 2020 at 12:06:06PM +1000, Michael Ellerman wrote: >> Ram Pai writes: >> > An instruction accessing a mmio address, generates a HDSI fault. This >> > fault is >> > appropriately handled by the Hypervisor. However in the case of >> > secureVMs, the >> > fault

RE: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-22 Thread Michael Ellerman
Ram Pai writes: > On Wed, Jul 22, 2020 at 12:06:06PM +1000, Michael Ellerman wrote: >> Ram Pai writes: >> > An instruction accessing a mmio address, generates a HDSI fault. This >> > fault is >> > appropriately handled by the Hypervisor. However in the case of >> > secureVMs, the >> > fault

RE: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-22 Thread Ram Pai
On Wed, Jul 22, 2020 at 12:06:06PM +1000, Michael Ellerman wrote: > Ram Pai writes: > > An instruction accessing a mmio address, generates a HDSI fault. This > > fault is > > appropriately handled by the Hypervisor. However in the case of secureVMs, > > the > > fault is delivered to the

RE: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-22 Thread Ram Pai
On Wed, Jul 22, 2020 at 12:42:05AM -0700, Ram Pai wrote: > On Wed, Jul 22, 2020 at 03:02:32PM +1000, Paul Mackerras wrote: > > On Thu, Jul 16, 2020 at 01:32:13AM -0700, Ram Pai wrote: > > > An instruction accessing a mmio address, generates a HDSI fault. This > > > fault is > > > appropriately

Re: Re: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-22 Thread Ram Pai
On Wed, Jul 22, 2020 at 03:02:32PM +1000, Paul Mackerras wrote: > On Thu, Jul 16, 2020 at 01:32:13AM -0700, Ram Pai wrote: > > An instruction accessing a mmio address, generates a HDSI fault. This > > fault is > > appropriately handled by the Hypervisor. However in the case of secureVMs, > >

Re: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-21 Thread Paul Mackerras
On Thu, Jul 16, 2020 at 01:32:13AM -0700, Ram Pai wrote: > An instruction accessing a mmio address, generates a HDSI fault. This fault > is > appropriately handled by the Hypervisor. However in the case of secureVMs, > the > fault is delivered to the ultravisor. > > Unfortunately the

Re: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-21 Thread Benjamin Herrenschmidt
On Wed, 2020-07-22 at 12:06 +1000, Michael Ellerman wrote: > Ram Pai writes: > > An instruction accessing a mmio address, generates a HDSI fault. This > > fault is > > appropriately handled by the Hypervisor. However in the case of secureVMs, > > the > > fault is delivered to the ultravisor.

Re: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-21 Thread Michael Ellerman
Ram Pai writes: > An instruction accessing a mmio address, generates a HDSI fault. This fault > is > appropriately handled by the Hypervisor. However in the case of secureVMs, > the > fault is delivered to the ultravisor. > > Unfortunately the Ultravisor has no correct-way to fetch the

Re: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-21 Thread Nicholas Piggin
Excerpts from Ram Pai's message of July 16, 2020 6:32 pm: > An instruction accessing a mmio address, generates a HDSI fault. This fault > is > appropriately handled by the Hypervisor. However in the case of secureVMs, > the > fault is delivered to the ultravisor. Why not a ucall if you're

Re: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-21 Thread Laurent Dufour
Le 20/07/2020 à 22:24, Segher Boessenkool a écrit : On Mon, Jul 20, 2020 at 03:10:41PM -0500, Segher Boessenkool wrote: On Mon, Jul 20, 2020 at 11:39:56AM +0200, Laurent Dufour wrote: Le 16/07/2020 à 10:32, Ram Pai a écrit : + if (is_secure_guest()) {

Re: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-20 Thread Segher Boessenkool
On Mon, Jul 20, 2020 at 03:10:41PM -0500, Segher Boessenkool wrote: > On Mon, Jul 20, 2020 at 11:39:56AM +0200, Laurent Dufour wrote: > > Le 16/07/2020 à 10:32, Ram Pai a écrit : > > >+ if (is_secure_guest()) {\ > > >+ __asm__ __volatile__("mfsprg0

Re: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-20 Thread Segher Boessenkool
On Mon, Jul 20, 2020 at 11:39:56AM +0200, Laurent Dufour wrote: > Le 16/07/2020 à 10:32, Ram Pai a écrit : > >+if (is_secure_guest()) {\ > >+__asm__ __volatile__("mfsprg0 %3;" \ > >+"lnia %2;"

Re: [RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-20 Thread Laurent Dufour
Le 16/07/2020 à 10:32, Ram Pai a écrit : An instruction accessing a mmio address, generates a HDSI fault. This fault is appropriately handled by the Hypervisor. However in the case of secureVMs, the fault is delivered to the ultravisor. Unfortunately the Ultravisor has no correct-way to fetch