| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH V3] xen/arm: Restrict "p2m_ipa_bits" according to the IOMMU requirements
 Hi, On 11/09/2019 18:59, Oleksandr Tyshchenko wrote: --- xen/arch/arm/p2m.c | 41 ++++++++++++++++++++++++++++---- xen/arch/arm/setup.c | 9 +++++-- xen/drivers/passthrough/arm/ipmmu-vmsa.c | 18 ++------------ xen/drivers/passthrough/arm/smmu.c | 11 +++------ xen/include/asm-arm/p2m.h | 9 +++++++ 5 files changed, 58 insertions(+), 30 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 2374e92..d5e2539 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -34,7 +34,11 @@ static unsigned int __read_mostly max_vmid = MAX_VMID_8_BIT;#define P2M_ROOT_PAGES (1<<P2M_ROOT_ORDER) -unsigned int __read_mostly p2m_ipa_bits;+/* + * Set larger than any possible value, so the number of IPA bits can be + * restricted by external entity (e.g. IOMMU). + */ +unsigned int __read_mostly p2m_ipa_bits = 64;/* Helpers to lookup the properties of each level */ Isn't this check meant to be for Arm32? If so, this path is not called by arm32. See the #ifdef CONFIG_ARM_32 above. Also, I would suggest to reword the message to: "P2M: Not able to support %⁻bit IPA at the moment.\n" The rest of the code looks good to me. 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  |