]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MTRR: simplify kvm_mtrr_get_guest_memory_type
authorXiao Guangrong <guangrong.xiao@intel.com>
Wed, 15 Jul 2015 19:25:55 +0000 (03:25 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Jul 2015 06:21:48 +0000 (08:21 +0200)
commit40e62bf8c79d71cb532adb232c5945650e9c7934
treef6535b9fa1d44563ea348968b11056492e41c107
parentff73a0925385fbef44167a9d6c835cd6fef56733
KVM: MTRR: simplify kvm_mtrr_get_guest_memory_type

kvm_mtrr_get_guest_memory_type never returns -1 which is implied
in the current code since if @type = -1 (means no MTRR contains the
range), iter.partial_map must be true

Simplify the code to indicate this fact

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