diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-05 15:50:38 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-05 15:50:38 (GMT) |
commit | 4469942bbbe5ebf845e04971d8c74e9b6178f9fa (patch) | |
tree | d081da3b5a4353ae2309629925d7d8b2ec470883 /arch/x86/kvm/mtrr.c | |
parent | 4e6b6ee253ce58aa156d7f1448d1038679b26783 (diff) | |
parent | fc1a8126bf8095b10f5a79893f2d2b19227f88f2 (diff) | |
download | linux-4469942bbbe5ebf845e04971d8c74e9b6178f9fa.tar.xz |
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/kvm/mtrr.c')
-rw-r--r-- | arch/x86/kvm/mtrr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm/mtrr.c index dc0a84a..9e8bf13 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); |