Re: [PATCH kernel v2 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-07-02 Thread David Gibson
On Mon, Jul 02, 2018 at 04:32:27PM +1000, Alexey Kardashevskiy wrote: > On Mon, 2 Jul 2018 14:52:43 +1000 > David Gibson wrote: > > > On Mon, Jul 02, 2018 at 02:33:30PM +1000, Alexey Kardashevskiy wrote: > > > On Mon, 2 Jul 2018 14:08:52 +1000 > > > David Gibson wrote: > > > > > > > On Fri,

Re: [PATCH kernel v2 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-07-02 Thread Alexey Kardashevskiy
On Mon, 2 Jul 2018 14:52:43 +1000 David Gibson wrote: > On Mon, Jul 02, 2018 at 02:33:30PM +1000, Alexey Kardashevskiy wrote: > > On Mon, 2 Jul 2018 14:08:52 +1000 > > David Gibson wrote: > > > > > On Fri, Jun 29, 2018 at 05:07:47PM +1000, Alexey Kardashevskiy wrote: > > > > On Fri, 29 Jun

Re: [PATCH kernel v2 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-07-01 Thread David Gibson
On Mon, Jul 02, 2018 at 02:33:30PM +1000, Alexey Kardashevskiy wrote: > On Mon, 2 Jul 2018 14:08:52 +1000 > David Gibson wrote: > > > On Fri, Jun 29, 2018 at 05:07:47PM +1000, Alexey Kardashevskiy wrote: > > > On Fri, 29 Jun 2018 15:18:20 +1000 > > > Alexey Kardashevskiy wrote: > > > > > > >

Re: [PATCH kernel v2 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-07-01 Thread Alexey Kardashevskiy
On Mon, 2 Jul 2018 14:08:52 +1000 David Gibson wrote: > On Fri, Jun 29, 2018 at 05:07:47PM +1000, Alexey Kardashevskiy wrote: > > On Fri, 29 Jun 2018 15:18:20 +1000 > > Alexey Kardashevskiy wrote: > > > > > On Fri, 29 Jun 2018 14:57:02 +1000 > > > David Gibson wrote: > > > > > > > On

Re: [PATCH kernel v2 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-07-01 Thread David Gibson
On Fri, Jun 29, 2018 at 05:07:47PM +1000, Alexey Kardashevskiy wrote: > On Fri, 29 Jun 2018 15:18:20 +1000 > Alexey Kardashevskiy wrote: > > > On Fri, 29 Jun 2018 14:57:02 +1000 > > David Gibson wrote: > > > > > On Fri, Jun 29, 2018 at 02:51:21PM +1000, Alexey Kardashevskiy wrote: > > > > On

Re: [PATCH kernel v2 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-06-29 Thread Alexey Kardashevskiy
On Fri, 29 Jun 2018 15:18:20 +1000 Alexey Kardashevskiy wrote: > On Fri, 29 Jun 2018 14:57:02 +1000 > David Gibson wrote: > > > On Fri, Jun 29, 2018 at 02:51:21PM +1000, Alexey Kardashevskiy wrote: > > > On Fri, 29 Jun 2018 14:12:41 +1000 > > > David Gibson wrote: > > > > > > > On Tue,

Re: [PATCH kernel v2 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-06-28 Thread Alexey Kardashevskiy
On Fri, 29 Jun 2018 14:57:02 +1000 David Gibson wrote: > On Fri, Jun 29, 2018 at 02:51:21PM +1000, Alexey Kardashevskiy wrote: > > On Fri, 29 Jun 2018 14:12:41 +1000 > > David Gibson wrote: > > > > > On Tue, Jun 26, 2018 at 03:59:26PM +1000, Alexey Kardashevskiy wrote: > > > > We already

Re: [PATCH kernel v2 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-06-28 Thread David Gibson
On Fri, Jun 29, 2018 at 02:51:21PM +1000, Alexey Kardashevskiy wrote: > On Fri, 29 Jun 2018 14:12:41 +1000 > David Gibson wrote: > > > On Tue, Jun 26, 2018 at 03:59:26PM +1000, Alexey Kardashevskiy wrote: > > > We already have a check in drivers/vfio/vfio_iommu_spapr_tce.c that > > > an IOMMU

Re: [PATCH kernel v2 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-06-28 Thread Alexey Kardashevskiy
On Fri, 29 Jun 2018 14:12:41 +1000 David Gibson wrote: > On Tue, Jun 26, 2018 at 03:59:26PM +1000, Alexey Kardashevskiy wrote: > > We already have a check in drivers/vfio/vfio_iommu_spapr_tce.c that > > an IOMMU page is contained in the physical page so the PCI hardware won't > > get access to

Re: [PATCH kernel v2 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-06-28 Thread David Gibson
On Tue, Jun 26, 2018 at 03:59:26PM +1000, Alexey Kardashevskiy wrote: > We already have a check in drivers/vfio/vfio_iommu_spapr_tce.c that > an IOMMU page is contained in the physical page so the PCI hardware won't > get access to unassigned host memory. > > However we do not have this check in

[PATCH kernel v2 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-06-26 Thread Alexey Kardashevskiy
We already have a check in drivers/vfio/vfio_iommu_spapr_tce.c that an IOMMU page is contained in the physical page so the PCI hardware won't get access to unassigned host memory. However we do not have this check in KVM fastpath (H_PUT_TCE accelerated code) so the user space can pin memory