| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.12] arm/p2m: do not invalidate p2m root if it is shared with IOMMU
 Hi, On 1/28/19 3:34 PM, Andrii Anisov wrote: From: Andrii Anisov <andrii_anisov@xxxxxxxx> In case if the p2m table is shared to IOMMU, invalidating it turns IOMMU to translation faults that could be not repaired. Fixed patch check for the corresponded condition and has a comment for one introduced p2m_invalidate_root() call, but miss them for another. So put the `if` and the comment in place. This was missed on purpose. Let me explain why. The call to p2m_invalidate_root() arch_domain_creation_finished is called by *all* the domain at boot to try to optimize the set/way case. The check iommu_use_hap_pt in that context is to prevent guest not using Set/Way to become unusable under the IOMMU use-case. In your case, you seem to have a guest OS using set/way and yet sharing the P2M with the IOMMU. You have the choice between: 
        1) Crashing on IOMMU fault
	2) Become very slow and potentially unusable because you now have to go 
through the full P2M every time you do a Set/Way.
1) was my favored option because Set/Way should really not be used by the guest. It was implemented by courtesy to the guest OS and I would not rely on everything working. Can you explain what is your use-case (OS used, IOMMU, platform...)? Cheers, 
 -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel 
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |