]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MTRR: improve kvm_mtrr_get_guest_memory_type
authorXiao Guangrong <guangrong.xiao@linux.intel.com>
Mon, 15 Jun 2015 08:55:28 +0000 (16:55 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 Jun 2015 15:16:28 +0000 (17:16 +0200)
commit98aa20c5aef8d2fd4e85ea6bc1cd35cb5dc5a686
treed0864737cd476d0ebd9951fa35f80baff628115f
parentf238f5a0fb1ad624b72175dba54928ef54c9bfee
KVM: MTRR: improve kvm_mtrr_get_guest_memory_type

 - kvm_mtrr_get_guest_memory_type() only checks one page in MTRRs so
   that it's unnecessary to check to see if the range is partially
   covered in MTRR

 - optimize the check of overlap memory type and add some comments
   to explain the precedence

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