From: "Jan Beulich" Subject: Re: [PATCH] IOMMU: Prevent VT-d device IOTLB operations on wrong IOMMU Date: Fri, 13 Jun 2014 12:13:45 +0100 Message-ID: <539AEAF902000078000B64ED@mail.emea.novell.com> References: <90352a46dbcbc723ec94.1402573202@malcolmc.uk.xensource.com> <53999780.4050708@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53999780.4050708@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: andrew.cooper3@citrix.com, malcolm.crossley@citrix.com Cc: yang.z.zhang@intel.com, kevin.tian@intel.com, Aravind.Gopalakrishnan@amd.com, suravee.suthikulpanit@amd.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> Andrew Cooper 06/12/14 2:05 PM >>> >>On 12/06/14 12:40, Malcolm Crossley wrote: >> --- a/xen/drivers/passthrough/ats.h >> +++ b/xen/drivers/passthrough/ats.h >> @@ -24,6 +24,7 @@ struct pci_ats_dev { >> u8 bus; >> u8 devfn; >> u16 ats_queue_depth; /* ATS device invalidation queue depth */ >> + void *iommu; > >This could really do with a comment here explaining why a void *, and >which two types of structure it could end up pointing at. Right. Or make it a transparent union in the first place. And in any case, making more clear that it's for nothing but looking at, add "const". Jan