Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: MTRR: Use default type for non-MTRR-covered gfn before WARN_ON

The patch was munged on commit to re-order these tests resulting in
excessive warnings when trying to do device assignment. Return to
original ordering: https://lkml.org/lkml/2015/7/15/769

Fixes: 3e5d2fdceda1 ("KVM: MTRR: simplify kvm_mtrr_get_guest_memory_type")
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Alex Williamson and committed by
Paolo Bonzini
fc1a8126 7307f70c

+4 -4
+4 -4
arch/x86/kvm/mtrr.c
··· 672 672 if (iter.mtrr_disabled) 673 673 return mtrr_disabled_type(); 674 674 675 + /* not contained in any MTRRs. */ 676 + if (type == -1) 677 + return mtrr_default_type(mtrr_state); 678 + 675 679 /* 676 680 * We just check one page, partially covered by MTRRs is 677 681 * impossible. 678 682 */ 679 683 WARN_ON(iter.partial_map); 680 - 681 - /* not contained in any MTRRs. */ 682 - if (type == -1) 683 - return mtrr_default_type(mtrr_state); 684 684 685 685 return type; 686 686 }