|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/arm64: Fix incorrect DIRECTMAP_SIZE calculation
Hi Julien,
On 17/01/2023 10:35, Julien Grall wrote:
>
>
> Hi Michal,
>
> It is not clear to me why this was sent In-reply-to the other patch. If
> they are meant to form a series, then this should have a cover letter +
> each patch should be numbered.
>
> If they are truly separate, then please don't thread them.
They were meant to be separated. I will form a series for v2 to make the
commiting easier.
>
> On 16/01/2023 14:41, Michal Orzel wrote:
>> The direct mapped area occupies L0 slots from 256 to 265 (i.e. 10 slots),
>
> I would write "265 included" or similar so it shows why this is a problem.
Ok.
>
>> resulting in 5TB (512GB * 10) of virtual address space. However, due to
>> incorrect slot subtraction (we take 9 slots into account) we set
>> DIRECTMAP_SIZE to 4.5TB instead. Fix it.
>
> I would clarify that we only support up to 2TB. So this is a latent
> issue. This would make clear that...
Ok.
>
>>
>> Fixes: 5263507b1b4a ("xen: arm: Use a direct mapping of RAM on arm64")
>
> ... while this is fixing a bug, it is not going to be a candidate for
> backport.
>
>> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
>> ---
>> xen/arch/arm/include/asm/config.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/xen/arch/arm/include/asm/config.h
>> b/xen/arch/arm/include/asm/config.h
>> index 0fefed1b8aa9..16213c8b677f 100644
>> --- a/xen/arch/arm/include/asm/config.h
>> +++ b/xen/arch/arm/include/asm/config.h
>> @@ -157,7 +157,7 @@
>> #define FRAMETABLE_NR (FRAMETABLE_SIZE / sizeof(*frame_table))
>>
>> #define DIRECTMAP_VIRT_START SLOT0(256)
>> -#define DIRECTMAP_SIZE (SLOT0_ENTRY_SIZE * (265-256))
>> +#define DIRECTMAP_SIZE (SLOT0_ENTRY_SIZE * (266 - 256))
>> #define DIRECTMAP_VIRT_END (DIRECTMAP_VIRT_START + DIRECTMAP_SIZE - 1)
>>
>> #define XENHEAP_VIRT_START directmap_virt_start
>
> Cheers,
>
> --
> Julien Grall
~Michal
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |