]> 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)
commit706a11525308ff919e94118bbb715402abef20f9
treef6535b9fa1d44563ea348968b11056492e41c107
parentf6df9ff4125eb2d68e2559718e373acd974cec9f
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