[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/arm64: Avoid trying to map of paddr(start) as a block entry in boot_pgtable
On Thu, 2014-01-09 at 16:59 +0800, Chen Baozi wrote: > Block entries are only supported after first-level table. Since the physical > address of 'start' is usally less than 512GB, Thanks, but I don't believe this is universally true. I've not been to check but I am reasonably sure that the architectural maximum phys addr on v8 is more than 2^39. We've already seen a processor whose RAM starts at 128GB, it's not beyond the realm of possibility that another processor might map it higher up. > this section of codes wouldn't > be executed and therefore useless. Remove this part of codes to avoid > potiential bug if it tries to map paddr(start) as a level-0 block entry by > accident. I think this bug should be fixed rather than just deleting the code. This probably means we need boot_first to be split into two pages in order to support both the 1:1 mapping and the final virtual mapping. I think the fix for this can wait for 4.5 since processors with RAM above 512GB are not something we've actually seen in reality, and they are broken whether we remove the existing code or not so sticking with the status quo is the lowest risk WRT accidentally breaking existing systems. > Thus, we need to specified that xen image should be loaded at the address less > than 512GB. > Signed-off-by: Chen Baozi <baozich@xxxxxxxxx> > --- > xen/arch/arm/arm64/head.S | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S > index 31afdd0..bebddf0 100644 > --- a/xen/arch/arm/arm64/head.S > +++ b/xen/arch/arm/arm64/head.S > @@ -266,18 +266,7 @@ skip_bss: > orr x2, x1, x3 /* + rights for linear PT */ > str x2, [x4, #0] /* Map it in slot 0 */ > > - /* ... map of paddr(start) in boot_pgtable */ > - lsr x1, x19, #39 /* Offset of base paddr in boot_pgtable > */ > - cbz x1, 1f /* It's in slot 0, map in boot_first > - * or boot_second later on */ > - > - lsl x2, x1, #39 /* Base address for 512GB mapping */ > - mov x3, #PT_MEM /* x2 := Section mapping */ > - orr x2, x2, x3 > - lsl x1, x1, #3 /* x1 := Slot offset */ > - str x2, [x4, x1] /* Mapping of paddr(start)*/ > - > -1: /* Setup boot_first: */ > + /* Setup boot_first: */ > ldr x4, =boot_first /* Next level into boot_first */ > add x4, x4, x20 /* x4 := paddr(boot_first) */ > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |