Re: [Xen-devel] [PATCH 03/14] AMD/IOMMU: Fix multiple reference counting errors

2019-01-31 Thread Woods, Brian
On 11/21/18 7:21 AM, Andrew Cooper wrote: > Most of these issues would be XSAs if these paths were accessible to guests. > > First, override the {get,put}_gfn() helpers to use gfn_t, which was the > original purpose of this patch. > > guest_iommu_get_table_mfn() has two bugs. First, it gets a re

Re: [Xen-devel] [PATCH 03/14] AMD/IOMMU: Fix multiple reference counting errors

2018-11-26 Thread Jan Beulich
>>> On 23.11.18 at 17:03, wrote: > On 23/11/2018 08:23, Jan Beulich wrote: > On 22.11.18 at 18:46, wrote: >>> On 22/11/2018 14:51, Jan Beulich wrote: > @@ -220,12 +219,18 @@ void guest_iommu_add_ppr_log(struct domain *d, u32 > entry[]) > unmap_domain_page(log_base); >

Re: [Xen-devel] [PATCH 03/14] AMD/IOMMU: Fix multiple reference counting errors

2018-11-23 Thread Andrew Cooper
On 23/11/2018 08:23, Jan Beulich wrote: On 22.11.18 at 18:46, wrote: >> On 22/11/2018 14:51, Jan Beulich wrote: @@ -220,12 +219,18 @@ void guest_iommu_add_ppr_log(struct domain *d, u32 entry[]) unmap_domain_page(log_base); guest_iommu_deliver_msi(d);

Re: [Xen-devel] [PATCH 03/14] AMD/IOMMU: Fix multiple reference counting errors

2018-11-23 Thread Jan Beulich
>>> On 22.11.18 at 18:46, wrote: > On 22/11/2018 14:51, Jan Beulich wrote: >>> @@ -220,12 +219,18 @@ void guest_iommu_add_ppr_log(struct domain *d, u32 >>> entry[]) >>> unmap_domain_page(log_base); >>> >>> guest_iommu_deliver_msi(d); >>> + >>> +out: >> Please indent by at least one bl

Re: [Xen-devel] [PATCH 03/14] AMD/IOMMU: Fix multiple reference counting errors

2018-11-22 Thread Andrew Cooper
On 22/11/2018 14:51, Jan Beulich wrote: > >> @@ -220,12 +219,18 @@ void guest_iommu_add_ppr_log(struct domain *d, u32 >> entry[]) >> unmap_domain_page(log_base); >> >> guest_iommu_deliver_msi(d); >> + >> +out: > Please indent by at least one blank (same further down). I thought you've

Re: [Xen-devel] [PATCH 03/14] AMD/IOMMU: Fix multiple reference counting errors

2018-11-22 Thread Jan Beulich
>>> On 21.11.18 at 14:21, wrote: > Most of these issues would be XSAs if these paths were accessible to guests. > > First, override the {get,put}_gfn() helpers to use gfn_t, which was the > original purpose of this patch. > > guest_iommu_get_table_mfn() has two bugs. First, it gets a ref on one

[Xen-devel] [PATCH 03/14] AMD/IOMMU: Fix multiple reference counting errors

2018-11-21 Thread Andrew Cooper
Most of these issues would be XSAs if these paths were accessible to guests. First, override the {get,put}_gfn() helpers to use gfn_t, which was the original purpose of this patch. guest_iommu_get_table_mfn() has two bugs. First, it gets a ref on one gfn, and puts a ref for a different gfn. Thi