Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-03-20 Thread Jan Beulich
>>> On 20.03.18 at 10:32, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 20 March 2018 08:12 >> >> >>> On 19.03.18 at 17:57, wrote: >> > What I meant was that safety (against underflow) is predicated on >> > iommu_lookup_page()

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-03-20 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 20 March 2018 08:12 > To: Paul Durrant > Cc: Andrew Cooper ; George Dunlap > ; Ian Jackson ; Wei Liu >

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-03-20 Thread Jan Beulich
>>> On 19.03.18 at 17:57, wrote: >> -Original Message- > [snip] >> >> How are you making sure this is a mapping that was established via >> >> the map op? Without that this can be (ab)used to ... >> >> >> >> > +put_page(page); >> >> >> >> ... underflow the

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-03-19 Thread Paul Durrant
> -Original Message- [snip] > >> How are you making sure this is a mapping that was established via > >> the map op? Without that this can be (ab)used to ... > >> > >> > +put_page(page); > >> > >> ... underflow the refcount of a page. > >> > > > > Yes, I guess I need to ensure that

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-03-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 19 March 2018 15:12 > To: Paul Durrant > Cc: Andrew Cooper ; Wei Liu > ; George Dunlap ; Ian > Jackson

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-03-19 Thread Jan Beulich
>>> On 12.02.18 at 11:47, wrote: > This patch adds iommu_ops to allow a domain with control_iommu privilege > to map and unmap pages from any guest over which it has mapping privilege > in the IOMMU. > These operations implicitly disable IOTLB flushing so that the caller

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-02-26 Thread Paul Durrant
> -Original Message- > From: Tian, Kevin [mailto:kevin.t...@intel.com] > Sent: 24 February 2018 03:02 > To: Paul Durrant ; xen-devel@lists.xenproject.org > Cc: Stefano Stabellini ; Wei Liu > ; George Dunlap

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-02-23 Thread Tian, Kevin
> From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: Friday, February 23, 2018 5:35 PM > > > -Original Message- > > From: Tian, Kevin [mailto:kevin.t...@intel.com] > > Sent: 23 February 2018 05:36 > > To: Paul Durrant ; xen- > de...@lists.xenproject.org >

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-02-23 Thread Paul Durrant
> -Original Message- > From: Tian, Kevin [mailto:kevin.t...@intel.com] > Sent: 23 February 2018 05:36 > To: Paul Durrant ; xen-devel@lists.xenproject.org > Cc: Stefano Stabellini ; Wei Liu > ; George Dunlap

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-02-22 Thread Tian, Kevin
> From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: Tuesday, February 13, 2018 5:56 PM > > > -Original Message- > > From: Tian, Kevin [mailto:kevin.t...@intel.com] > > Sent: 13 February 2018 06:56 > > To: Paul Durrant ; xen- > de...@lists.xenproject.org

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-02-13 Thread Paul Durrant
> -Original Message- > From: Tian, Kevin [mailto:kevin.t...@intel.com] > Sent: 13 February 2018 06:56 > To: Paul Durrant ; xen-devel@lists.xenproject.org > Cc: Stefano Stabellini ; Wei Liu > ; George Dunlap

Re: [Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-02-12 Thread Tian, Kevin
> From: Paul Durrant > Sent: Monday, February 12, 2018 6:47 PM > > This patch adds iommu_ops to allow a domain with control_iommu > privilege > to map and unmap pages from any guest over which it has mapping > privilege > in the IOMMU. > These operations implicitly disable IOTLB flushing so that

[Xen-devel] [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB

2018-02-12 Thread Paul Durrant
This patch adds iommu_ops to allow a domain with control_iommu privilege to map and unmap pages from any guest over which it has mapping privilege in the IOMMU. These operations implicitly disable IOTLB flushing so that the caller can batch operations and then explicitly flush the IOTLB using the