summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorLinus Torvalds2015-08-05 17:50:38 +0200
committerLinus Torvalds2015-08-05 17:50:38 +0200
commit4469942bbbe5ebf845e04971d8c74e9b6178f9fa (patch)
treed081da3b5a4353ae2309629925d7d8b2ec470883 /arch/x86
parentMerge tag 'md/4.2-rc5-fixes' of git://neil.brown.name/md (diff)
parentKVM: MTRR: Use default type for non-MTRR-covered gfn before WARN_ON (diff)
downloadkernel-qcow2-linux-4469942bbbe5ebf845e04971d8c74e9b6178f9fa.tar.gz
kernel-qcow2-linux-4469942bbbe5ebf845e04971d8c74e9b6178f9fa.tar.xz
kernel-qcow2-linux-4469942bbbe5ebf845e04971d8c74e9b6178f9fa.zip
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fixes from Paolo Bonzini: "Just two very small & simple patches" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: MTRR: Use default type for non-MTRR-covered gfn before WARN_ON KVM: s390: Fix hang VCPU hang/loop regression
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/mtrr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm/mtrr.c
index dc0a84a6f309..9e8bf13572e6 100644
--- a/arch/x86/kvm/mtrr.c
+++ b/arch/x86/kvm/mtrr.c
@@ -672,16 +672,16 @@ u8 kvm_mtrr_get_guest_memory_type(struct kvm_vcpu *vcpu, gfn_t gfn)
if (iter.mtrr_disabled)
return mtrr_disabled_type();
+ /* not contained in any MTRRs. */
+ if (type == -1)
+ return mtrr_default_type(mtrr_state);
+
/*
* We just check one page, partially covered by MTRRs is
* impossible.
*/
WARN_ON(iter.partial_map);
- /* not contained in any MTRRs. */
- if (type == -1)
- return mtrr_default_type(mtrr_state);
-
return type;
}
EXPORT_SYMBOL_GPL(kvm_mtrr_get_guest_memory_type);