diff options
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 4 | ||||
-rw-r--r-- | arch/x86/kvm/mtrr.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 2078f92d15ac..f32f843a3631 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -1742,10 +1742,10 @@ static bool ibs_enabled(struct kvm_vcpu *vcpu) | |||
1742 | 1742 | ||
1743 | static int kvm_s390_handle_requests(struct kvm_vcpu *vcpu) | 1743 | static int kvm_s390_handle_requests(struct kvm_vcpu *vcpu) |
1744 | { | 1744 | { |
1745 | if (!vcpu->requests) | ||
1746 | return 0; | ||
1747 | retry: | 1745 | retry: |
1748 | kvm_s390_vcpu_request_handled(vcpu); | 1746 | kvm_s390_vcpu_request_handled(vcpu); |
1747 | if (!vcpu->requests) | ||
1748 | return 0; | ||
1749 | /* | 1749 | /* |
1750 | * We use MMU_RELOAD just to re-arm the ipte notifier for the | 1750 | * We use MMU_RELOAD just to re-arm the ipte notifier for the |
1751 | * guest prefix page. gmap_ipte_notify will wait on the ptl lock. | 1751 | * guest prefix page. gmap_ipte_notify will wait on the ptl lock. |
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) | |||
672 | if (iter.mtrr_disabled) | 672 | if (iter.mtrr_disabled) |
673 | return mtrr_disabled_type(); | 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 | * We just check one page, partially covered by MTRRs is | 680 | * We just check one page, partially covered by MTRRs is |
677 | * impossible. | 681 | * impossible. |
678 | */ | 682 | */ |
679 | WARN_ON(iter.partial_map); | 683 | WARN_ON(iter.partial_map); |
680 | 684 | ||
681 | /* not contained in any MTRRs. */ | ||
682 | if (type == -1) | ||
683 | return mtrr_default_type(mtrr_state); | ||
684 | |||
685 | return type; | 685 | return type; |
686 | } | 686 | } |
687 | EXPORT_SYMBOL_GPL(kvm_mtrr_get_guest_memory_type); | 687 | EXPORT_SYMBOL_GPL(kvm_mtrr_get_guest_memory_type); |