diff options
author | Vegard Nossum <vegard.nossum@oracle.com> | 2023-12-19 16:11:59 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2023-12-20 10:57:51 +0100 |
commit | 3b184b71dfcb156e08246f8fbe0cd088c6a6efed (patch) | |
tree | f04555f977d624f3c6a076ef06484080d42a1015 /drivers/firmware/efi/libstub/x86-5lvl.c | |
parent | 1445f6e15f7ddd80311307475191e34c0b2312e8 (diff) |
x86/asm: Always set A (accessed) flag in GDT descriptors
We have no known use for having the CPU track whether GDT descriptors
have been accessed or not.
Simplify the code by adding the flag to the common flags and removing
it everywhere else.
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20231219151200.2878271-5-vegard.nossum@oracle.com
Diffstat (limited to 'drivers/firmware/efi/libstub/x86-5lvl.c')
-rw-r--r-- | drivers/firmware/efi/libstub/x86-5lvl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/efi/libstub/x86-5lvl.c b/drivers/firmware/efi/libstub/x86-5lvl.c index 005dd9b14f95..77359e802181 100644 --- a/drivers/firmware/efi/libstub/x86-5lvl.c +++ b/drivers/firmware/efi/libstub/x86-5lvl.c @@ -13,8 +13,8 @@ bool efi_no5lvl; static void (*la57_toggle)(void *cr3); static const struct desc_struct gdt[] = { - [GDT_ENTRY_KERNEL32_CS] = GDT_ENTRY_INIT(DESC_CODE32 | _DESC_ACCESSED, 0, 0xfffff), - [GDT_ENTRY_KERNEL_CS] = GDT_ENTRY_INIT(DESC_CODE64 | _DESC_ACCESSED, 0, 0xfffff), + [GDT_ENTRY_KERNEL32_CS] = GDT_ENTRY_INIT(DESC_CODE32, 0, 0xfffff), + [GDT_ENTRY_KERNEL_CS] = GDT_ENTRY_INIT(DESC_CODE64, 0, 0xfffff), }; /* |