summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2024-10-09 18:04:41 +0200
committerJuergen Gross <jgross@suse.com>2024-10-29 17:23:32 +0100
commitbb12f48cd150666b96858443e0fc26e92bb7e498 (patch)
treede66b64e1f4f3c31b2e346fdde5416eb95486564 /arch
parente8fbc0d9cab6c1ee6403f42c0991b0c1d5dbc092 (diff)
x86/pvh: Use correct size value in GDT descriptor
The limit field in a GDT descriptor is an inclusive bound, and therefore one less than the size of the covered range. Reviewed-by: Jason Andryuk <jason.andryuk@amd.com> Tested-by: Jason Andryuk <jason.andryuk@amd.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Message-ID: <20241009160438.3884381-9-ardb+git@google.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/platform/pvh/head.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S
index ce4fd8d33da4..5a196fb3ebd8 100644
--- a/arch/x86/platform/pvh/head.S
+++ b/arch/x86/platform/pvh/head.S
@@ -224,7 +224,7 @@ SYM_CODE_END(pvh_start_xen)
.section ".init.data","aw"
.balign 8
SYM_DATA_START_LOCAL(gdt)
- .word gdt_end - gdt_start
+ .word gdt_end - gdt_start - 1
.long _pa(gdt_start) /* x86-64 will overwrite if relocated. */
.word 0
SYM_DATA_END(gdt)