]> git.openpandora.org Git - pandora-kernel.git/commitdiff
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)
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

index f735548748450ea8843af48b9cb8f4e6f265ff4c..f2d60cce7595f31decfc382daa9311d77da65e69 100644 (file)
@@ -345,12 +345,15 @@ enum {
 struct kvm_mtrr_range {
        u64 base;
        u64 mask;
+       struct list_head node;
 };
 
 struct kvm_mtrr {
        struct kvm_mtrr_range var_ranges[KVM_NR_VAR_MTRR];
        mtrr_type fixed_ranges[KVM_NR_FIXED_MTRR_REGION];
        u64 deftype;
+
+       struct list_head head;
 };
 
 struct kvm_vcpu_arch {
Simple merge
Simple merge
Simple merge