KVM: x86: apply guest MTRR virtualization on host reserved pages
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Jul 2015 12:38:13 +0000 (14:38 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jul 2015 11:25:27 +0000 (13:25 +0200)
commitfd717f11015f673487ffc826e59b2bad69d20fe5
treeea98f02afb5b24e2868861ae26b56308e3027051
parente098223b789b4a618dacd79e5e0dad4a9d5018d1
KVM: x86: apply guest MTRR virtualization on host reserved pages

Currently guest MTRR is avoided if kvm_is_reserved_pfn returns true.
However, the guest could prefer a different page type than UC for
such pages. A good example is that pass-throughed VGA frame buffer is
not always UC as host expected.

This patch enables full use of virtual guest MTRRs.

Suggested-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Tested-by: Joerg Roedel <jroedel@suse.de> (on AMD)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c