diff options
author | Hou Wenlong <[email protected]> | 2024-05-11 11:46:37 +0800 |
---|---|---|
committer | Sean Christopherson <[email protected]> | 2024-06-03 14:06:39 -0700 |
commit | 9ecc1c119b28d28869135a3745541c03965d52be (patch) | |
tree | 4528bf00f3f1215c01f2a08932e2a1a08a9e878d /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 4f8973e65fcd362b85942c80362cc9a7231b09fa (diff) |
KVM: x86/mmu: Only allocate shadowed translation cache for sp->role.level <= KVM_MAX_HUGEPAGE_LEVEL
Only the indirect SP with sp->role.level <= KVM_MAX_HUGEPAGE_LEVEL might
have leaf gptes, so allocation of shadowed translation cache is needed
only for it. Then, it can use sp->shadowed_translation to determine
whether to use the information in the shadowed translation cache or not.
Also, extend the WARN in FNAME(sync_spte)() to ensure that this won't
break shadow_mmu_get_sp_for_split().
Suggested-by: Lai Jiangshan <[email protected]>
Signed-off-by: Hou Wenlong <[email protected]>
Link: https://lore.kernel.org/r/5b0cda8a7456cda476b14fca36414a56f921dd52.1715398655.git.houwenlong.hwl@antgroup.com
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions