Received: by 10.223.185.116 with SMTP id b49csp1116940wrg; Fri, 23 Feb 2018 12:13:02 -0800 (PST) X-Google-Smtp-Source: AH8x225BXMHHhQ4HVsNHlvD6Zs3qJnI1cf4s3eFV5BY8dOGdVmjphOnZ0Hhd2DMrzNs5tc93dR3k X-Received: by 10.99.119.72 with SMTP id s69mr2306045pgc.224.1519416781962; Fri, 23 Feb 2018 12:13:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519416781; cv=none; d=google.com; s=arc-20160816; b=A5cl4JnegBa4rNOvkizTG0WJ03175NUjK6SbGSbbX6XUz5UZbu0B9Av1nU1zgrSO7v 6PvAl1zYOZwIeUaypjFMfKM0VNDFE2ZTw2Ix51yvL5cg16V0k66tj9lU4iSweUIycO6d kaLvgJlcGFwcWBIqIirw3HMuyajQzNlDfNm7Trg+sNnhfY4G9VBbHxJaoimMm5zBFm8z pqPDTGb+4Yr1H4DoCO2ZXeWDFLDwNPCBYZ+CJUvEX7Tity89NjvtkQQcP6cVYVL8Zxvs uxDrJYgJspEQuL9rkuWdm56Lg6u14Jex6I47h+tZ0mPR/13STkxQ/h4kxTMdd0DiosBi IdJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=MFcI+LycOHjBpRrkkcZ6W0MIWp1u1VHbbYrgT23H28g=; b=uWc4yqJTc5pGs7IqNOpzt0CmTrNVSB/5QEUif0ts+a9PLCSS+TLQAXiRvPPUwPWfIN r7hk/cqsikbPVRoH1477N6vdsNPMD39olyNvnPuqqfh+OwRmURXfHWC8gU1tFd4LPLvF SsrdKYwCseZA4JgX8BGP8qDaEEhZVBg1r12/IikUnme7Cs/s/36E5cdOFwRPBkHMqzE2 fmdtk+Z/o98/4BoucPEkH+rx/dxBrTj12bUFeXuzluZdYzQhv5XRLu7VYITt0SXe/nkY /UUUU/XpAILc3e7j1aRcntNImqVTNCOXonNfsFJ0RHwyz6v++S/cG94aQqqTx2Y8arsv mvWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si2306496pfk.217.2018.02.23.12.12.47; Fri, 23 Feb 2018 12:13:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932926AbeBWSlp (ORCPT + 99 others); Fri, 23 Feb 2018 13:41:45 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40688 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932914AbeBWSlm (ORCPT ); Fri, 23 Feb 2018 13:41:42 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C71F51214; Fri, 23 Feb 2018 18:41:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Hildenbrand , Paolo Bonzini , David Woodhouse , Jack Wang Subject: [PATCH 4.4 189/193] KVM: nVMX: vmx_complete_nested_posted_interrupt() cant fail Date: Fri, 23 Feb 2018 19:27:02 +0100 Message-Id: <20180223170355.959731589@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Hildenbrand (cherry picked from commit 6342c50ad12e8ce0736e722184a7dbdea4a3477f) vmx_complete_nested_posted_interrupt() can't fail, let's turn it into a void function. Signed-off-by: David Hildenbrand Signed-off-by: Paolo Bonzini Signed-off-by: David Woodhouse [jwang: port to 4.4] Signed-off-by: Jack Wang Signed-off-by: Greg Kroah-Hartman --- arch/x86/kvm/vmx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -4512,7 +4512,7 @@ static int vmx_cpu_uses_apicv(struct kvm return enable_apicv && lapic_in_kernel(vcpu); } -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; @@ -4523,13 +4523,13 @@ static int vmx_complete_nested_posted_in 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); __kvm_apic_update_irr(vmx->nested.pi_desc->pir, vapic_page); @@ -4542,7 +4542,6 @@ static int vmx_complete_nested_posted_in vmcs_write16(GUEST_INTR_STATUS, status); } } - return 0; } static inline bool kvm_vcpu_trigger_posted_interrupt(struct kvm_vcpu *vcpu) @@ -10155,7 +10154,8 @@ static int vmx_check_nested_events(struc 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)