]> git.baikalelectronics.ru Git - kernel.git/commit
kvm, x86, mmu: Use kernel generic dynamic physical address mask
authorKai Huang <kai.huang@linux.intel.com>
Tue, 15 Jan 2019 04:28:40 +0000 (17:28 +1300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 Feb 2019 21:48:25 +0000 (22:48 +0100)
commit6897ec215029300afcab0957f081a7a76344f456
tree53ac2de1ea6674679a16f8e72634c542fc8f9b0e
parenteb654d3a8bfd704bc290d06dde2596a8f2431587
kvm, x86, mmu: Use kernel generic dynamic physical address mask

AMD's SME/SEV is no longer the only case which reduces supported
physical address bits, since Intel introduced Multi-key Total Memory
Encryption (MKTME), which repurposes high bits of physical address as
keyID, thus effectively shrinks supported physical address bits. To
cover both cases (and potential similar future features), kernel MM
introduced generic dynamaic physical address mask instead of hard-coded
__PHYSICAL_MASK in 'commit c4e771eef73fd ("x86/mm: Decouple dynamic
__PHYSICAL_MASK from AMD SME")'. KVM should use that too.

Change PT64_BASE_ADDR_MASK to use kernel dynamic physical address mask
when it is enabled, instead of sme_clr. PT64_DIR_BASE_ADDR_MASK is also
deleted since it is not used at all.

Signed-off-by: Kai Huang <kai.huang@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c