Re: [PATCH 2/5] x86/pvh: Use correct size value in GDT descriptor
From: Andrew Cooper
Date: Thu Sep 26 2024 - 10:29:18 EST
On 26/09/2024 11:41 am, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@xxxxxxxxxx>
>
> The size field in a GDT descriptor is offset by 1, so subtract 1 from
> the calculated range.
>
> Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
I realise this is probably nitpicking, but the GDT descriptor has a
limit field, which is (intentionally) not a size field.
This is why there's a difference of 1 between them.
Working in terms of limits rather than sizes avoids needing a 16th bit
on the segment limit circuitry, which mattered for the 286.
~Andrew