]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: fix MTRR update
authorXiao Guangrong <guangrong.xiao@linux.intel.com>
Wed, 13 May 2015 06:42:27 +0000 (14:42 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 May 2015 18:52:42 +0000 (20:52 +0200)
commit64624304d0506586c181953d590b9036544d6a7c
tree050f927bab93b172f01f5d872762eacd811560be
parent2af002355e8537ba28047751f531fa1dba4e9387
KVM: MMU: fix MTRR update

Currently, whenever guest MTRR registers are changed
kvm_mmu_reset_context is called to switch to the new root shadow page
table, however, it's useless since:
1) the cache type is not cached into shadow page's attribute so that
   the original root shadow page will be reused

2) the cache type is set on the last spte, that means we should sync
   the last sptes when MTRR is changed

This patch fixs this issue by drop all the spte in the gfn range which
is being updated by MTRR

Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c
arch/x86/kvm/mmu.h
arch/x86/kvm/x86.c