]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: consider host cache mode in MMIO page check
authorHaozhong Zhang <haozhong.zhang@intel.com>
Wed, 20 Dec 2017 07:29:29 +0000 (15:29 +0800)
committerRadim Krčmář <rkrcmar@redhat.com>
Tue, 16 Jan 2018 15:40:09 +0000 (16:40 +0100)
commit3b7528770c89df4a5e9b5ed8bfc5d83f624d437e
tree9a877c25b1e61c226ed1d225702ca3331f05a5b3
parent79d4addf8bcc65dc48f97c31a053d33f01655489
KVM: MMU: consider host cache mode in MMIO page check

Some reserved pages, such as those from NVDIMM DAX devices, are not
for MMIO, and can be mapped with cached memory type for better
performance. However, the above check misconceives those pages as
MMIO.  Because KVM maps MMIO pages with UC memory type, the
performance of guest accesses to those pages would be harmed.
Therefore, we check the host memory type in addition and only treat
UC/UC-/WC pages as MMIO.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reported-by: Cuevas Escareno, Ivan D <ivan.d.cuevas.escareno@intel.com>
Reported-by: Kumar, Karthik <karthik.kumar@intel.com>
Reviewed-by: Xiao Guangrong <xiaoguangrong@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/mmu.c