diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2025-03-04 14:59:56 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-03-19 13:12:29 +0300 |
commit | 634ab76159a842f890743fb435f74c228e06bb04 (patch) | |
tree | 3b2b6b8c5fe830c45f8776694b1696d15cb077b7 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 440a65b7d25fb06f85ee5d99c5ac492d49a15370 (diff) | |
download | linux-634ab76159a842f890743fb435f74c228e06bb04.tar.xz |
x86/mm: Always set the ASID valid bit for the INVLPGB instruction
When executing the INVLPGB instruction on a bare-metal host or hypervisor, if
the ASID valid bit is not set, the instruction will flush the TLB entries that
match the specified criteria for any ASID, not just the those of the host. If
virtual machines are running on the system, this may result in inadvertent
flushes of guest TLB entries.
When executing the INVLPGB instruction in a guest and the INVLPGB instruction is
not intercepted by the hypervisor, the hardware will replace the requested ASID
with the guest ASID and set the ASID valid bit before doing the broadcast
invalidation. Thus a guest is only able to flush its own TLB entries.
So to limit the host TLB flushing reach, always set the ASID valid bit using an
ASID value of 0 (which represents the host/hypervisor). This will will result in
the desired effect in both host and guest.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250304120449.GHZ8bsYYyEBOKQIxBm@fat_crate.local
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions