mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw@amazon.co.uk>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Jim Mattson" <jmattson@google.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	"KarimAllah Ahmed" <karahmed@amazon.de>,
	gregkh@linuxfoundation.org, stable@vger.kernel.org
Subject: [PATCH 1/9] KVM: nVMX: vmx_complete_nested_posted_interrupt() can't fail
Date: Tue,  6 Feb 2018 17:29:33 +0000	[thread overview]
Message-ID: <1517938181-15317-2-git-send-email-dwmw@amazon.co.uk> (raw)
In-Reply-To: <1517938181-15317-1-git-send-email-dwmw@amazon.co.uk>

From: David Hildenbrand <david@redhat.com>

vmx_complete_nested_posted_interrupt() can't fail, let's turn it into
a void function.

Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

(cherry picked from commit 6342c50ad12e8ce0736e722184a7dbdea4a3477f)
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
 arch/x86/kvm/vmx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index feadff3..fd890af 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4736,7 +4736,7 @@ static bool vmx_get_enable_apicv(void)
 	return enable_apicv;
 }
 
-static int vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)
+static void vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
 	int max_irr;
@@ -4747,13 +4747,13 @@ static int vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)
 	    vmx->nested.pi_pending) {
 		vmx->nested.pi_pending = false;
 		if (!pi_test_and_clear_on(vmx->nested.pi_desc))
-			return 0;
+			return;
 
 		max_irr = find_last_bit(
 			(unsigned long *)vmx->nested.pi_desc->pir, 256);
 
 		if (max_irr == 256)
-			return 0;
+			return;
 
 		vapic_page = kmap(vmx->nested.virtual_apic_page);
 		if (!vapic_page) {
@@ -4770,7 +4770,6 @@ static int vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)
 			vmcs_write16(GUEST_INTR_STATUS, status);
 		}
 	}
-	return 0;
 }
 
 static inline bool kvm_vcpu_trigger_posted_interrupt(struct kvm_vcpu *vcpu)
@@ -10491,7 +10490,8 @@ static int vmx_check_nested_events(struct kvm_vcpu *vcpu, bool external_intr)
 		return 0;
 	}
 
-	return vmx_complete_nested_posted_interrupt(vcpu);
+	vmx_complete_nested_posted_interrupt(vcpu);
+	return 0;
 }
 
 static u32 vmx_get_preemption_timer_value(struct kvm_vcpu *vcpu)
-- 
2.7.4

  reply	other threads:[~2018-02-06 17:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 17:29 [STABLE 4.9.y PATCH 0/9] Backport of KVM Speculation Control support David Woodhouse
2018-02-06 17:29 ` David Woodhouse [this message]
2018-02-06 17:29 ` [PATCH 2/9] KVM: nVMX: mark vmcs12 pages dirty on L2 exit David Woodhouse
2018-02-06 17:29 ` [PATCH 3/9] KVM: nVMX: Eliminate vmcs02 pool David Woodhouse
2018-02-06 17:29 ` [PATCH 4/9] KVM: VMX: introduce alloc_loaded_vmcs David Woodhouse
2018-02-06 17:29 ` [PATCH 5/9] KVM: VMX: make MSR bitmaps per-VCPU David Woodhouse
2018-02-06 17:29 ` [PATCH 6/9] KVM/x86: Add IBPB support David Woodhouse
2018-02-06 17:29 ` [PATCH 7/9] KVM/VMX: Emulate MSR_IA32_ARCH_CAPABILITIES David Woodhouse
2018-02-16 14:18   ` Paolo Bonzini
2018-02-16 16:29     ` Jim Mattson
2018-02-16 16:33       ` David Woodhouse
2018-02-19 13:10       ` Paolo Bonzini
2018-02-19 13:35         ` David Woodhouse
2018-02-19 14:07           ` Paolo Bonzini
2018-02-06 17:29 ` [PATCH 8/9] KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL David Woodhouse
2018-02-16  4:02   ` Jim Mattson
2018-02-16  4:16   ` Jim Mattson
2018-02-06 17:29 ` [PATCH 9/9] KVM/SVM: " David Woodhouse
2018-02-06 18:01 ` [STABLE 4.9.y PATCH 0/9] Backport of KVM Speculation Control support Paolo Bonzini
2018-02-06 21:05   ` Woodhouse, David
2018-02-08  2:49     ` Greg KH
2018-02-08 17:14       ` Greg KH
2018-02-08 17:42         ` Paolo Bonzini
2018-02-08 17:57           ` Greg KH
2018-02-09  7:58             ` Greg KH
2018-02-15 10:15 ` Thomas Voegtle
2018-02-15 10:23   ` Greg KH
2018-02-15 10:49     ` Thomas Voegtle
2018-02-15 13:57       ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1517938181-15317-2-git-send-email-dwmw@amazon.co.uk \
    --to=dwmw@amazon.co.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jmattson@google.com \
    --cc=karahmed@amazon.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®