[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN v1 8/9] xen/arm: Other adaptations required to support 32bit paddr
Hi, On 20/12/2022 15:24, Ayan Kumar Halder wrote: On 16/12/2022 10:23, Julien Grall wrote:Each adaptations are distinct, so I would prefer if they are in in separate patch.This will also make clear which components you touched because I would be surprised if this is really the only place where we need adaptation. Maybe that's because you didn't compile everything (which is fine).On 15/12/2022 19:32, Ayan Kumar Halder wrote:1. Supersections are supported only for paddr greater than 32 bits.Two questions: * Can you outline why we can't keep the code around?For PA_32, the following bitoperation will overflow :-*ipa |= (paddr_t)(pte.supersec.extbase1) << L1DESC_SUPERSECTION_EXT_BASE1_SHIFT; *ipa |= (paddr_t)(pte.supersec.extbase2) << L1DESC_SUPERSECTION_EXT_BASE2_SHIFT;Also, pte.supersec.extbase1 and pte.supersec.extbase2 are not valid for PA_32. Refer xen/arch/arm/include/asm/short-desc.h You are right about extbase1 and extbase2. See below for the supersection support. unsigned int extbase2:4; /* Extended base address, PA[39:36] */ unsigned int extbase1:4; /* Extended base address, PA[35:32] */* Can you give a pointer to the Arm Arm that says supersection is not supported?I could not find any sentence in Arm Arm which says supersection is **not** supported on 32 bit PA.However,Refer"ARM DDI 0487I.a ID081822", G5.4 "The VMSAv8-32 Short-descriptor translation table format", G5-9163"Support for Supersections is **optional**, except that an implementation that supports more than 32 bits of PA must also support Supersections to provide access to the entire PA space."Also, G5.1.3 "Address spaces in VMSAv8-32", G5-9149"AArch32 defines two translation table formats. The Long-descriptor format gives access to the full 40-bit IPA or PA space at a granularity of 4KB. The Short-descriptor format:Gives access to a 32-bit PA space at 4KB granularity.Gives access to a 40-bit PA space, but only at 16MB granularity, by the use of Supersections."from the above 2 snippets, I inferred that supersections are only supported for PAs greater than 32 bits.I could not find any evidence of supersections supported for 32 bit PA. From what you quoted above supersection is optional unless the processor support more than 32-bit PA. IOW, an implementer is free to implement the feature even if it is not strictly necessary when the processor only supports 32-bit PA. This because it is useful to reduce the TLB contention. So if we want to #ifdef some code, then only the two lines using L1DESC_SUPERSECTION_EXT_BASE{1, 2}_SHIFT should be protected. The rest should stay as-is. Cheers, -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |