diff options
| author | Binbin Wu <[email protected]> | 2023-09-13 20:42:16 +0800 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2023-11-28 17:54:04 -0800 |
| commit | a130066f74008858ac425b7497d231742474a0ea (patch) | |
| tree | 8b05d6e2436130af31bf1536a5c3a06219714295 /lib/crypto/mpi/mpi-add.c | |
| parent | 538ac9a92d669c4ccfc64739a32efab2793cea1d (diff) | |
KVM: x86/mmu: Drop non-PA bits when getting GFN for guest's PGD
Drop non-PA bits when getting GFN for guest's PGD with the maximum theoretical
mask for guest MAXPHYADDR.
Do it unconditionally because it's harmless for 32-bit guests, querying 64-bit
mode would be more expensive, and for EPT the mask isn't tied to guest mode.
Using PT_BASE_ADDR_MASK would be technically wrong (PAE paging has 64-bit
elements _except_ for CR3, which has only 32 valid bits), it wouldn't matter
in practice though.
Opportunistically use GENMASK_ULL() to define __PT_BASE_ADDR_MASK.
Signed-off-by: Binbin Wu <[email protected]>
Tested-by: Xuelian Guo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-add.c')
0 files changed, 0 insertions, 0 deletions