KVM: MTRR: sort variable MTRRs
authorXiao Guangrong <guangrong.xiao@linux.intel.com>
Mon, 15 Jun 2015 08:55:31 +0000 (16:55 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 Jun 2015 15:16:28 +0000 (17:16 +0200)
commit19efffa244071ccd0385b240d03adb38feaab04e
treed6fce4bc6222d5ae0be4d42099b516e9ce70a96e
parenta13842dc668b40daef4327294a6d3bdc8bd30276
KVM: MTRR: sort variable MTRRs

Sort all valid variable MTRRs based on its base address, it will help us to
check a range to see if it's fully contained in variable MTRRs

Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
[Fix list insertion sort, simplify var_mtrr_range_is_valid to just
 test the V bit. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mtrr.c
arch/x86/kvm/x86.c
arch/x86/kvm/x86.h