[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v12 8/9] mm / iommu: include need_iommu() test in iommu_use_hap_pt()

Hi Paul,

On 10/01/2018 11:51 AM, Paul Durrant wrote:
-----Original Message-----
From: Julien Grall [mailto:julien.grall@xxxxxxx]
Sent: 01 October 2018 11:37
To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
Cc: Jun Nakajima <jun.nakajima@xxxxxxxxx>; George Dunlap
<George.Dunlap@xxxxxxxxxx>; Jan Beulich <jbeulich@xxxxxxxx>; Andrew Cooper
<Andrew.Cooper3@xxxxxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>
Subject: Re: [PATCH v12 8/9] mm / iommu: include need_iommu() test in

Hi Paul,

On 09/27/2018 03:33 PM, Paul Durrant wrote:
The name 'iommu_use_hap_pt' suggests that that P2M table is in use as
domain's IOMMU pagetable which, prior to this patch, is not strictly
since the macro did not test whether the domain actually has IOMMU

Well, I think we assume that iommu_use_hap_pt() will only be called when
need_iommu(d) == 1.


At the end, you will still need to check
need_iommu(d) outside because iommu_use_hap_pt() may now return 0 for
domain without IOMMU or for domain not sharing p2m with the IOMMU.

Do you expect an improvement in long-term?

Yes. The ultimate goal is the patch to split up need_iommu() into separate 
macros for 'domain has IOMMU pt' and 'domain needs explicit sync of IOMMU pt' 
and this seems like a logical step. For 'need explicit sync of IOMMU pt' to 
true then 'has IOMMU pt' clearly needs to be true, so I wanted the macro for 
'sharing IOMMU pt' to have the same predicate.

Make senses. It didn't occur to me that was in preparation of the next patch.

For the Arm bits:

Acked-by: Julien Grall <julien.grall@xxxxxxx>


Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.