Received: by 10.223.176.5 with SMTP id f5csp690067wra; Fri, 9 Feb 2018 05:45:37 -0800 (PST) X-Google-Smtp-Source: AH8x227n9146rWa2ZlnV5Mq8BGbmADQIrK2SGj6RRW7gZTqeXvQRtoZAlIsIc+3zl6oi3xOiIOS1 X-Received: by 10.99.166.2 with SMTP id t2mr2431260pge.234.1518183937475; Fri, 09 Feb 2018 05:45:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518183937; cv=none; d=google.com; s=arc-20160816; b=wMAygieMf0E2WY+xjiwPgl4tbP1ux36NyHtWLP4aWy0g8j1CjsvuM+OaCAshH8c1iX TaXP/2QdtWnnrwOZizU67jtIpUQFQ+09LwxOgtdgF7/tQtPsXDAYlBkuewAs9TzlffQq NOZResoR3g2RBP8mwL7faCbZDfrb/fAI/4E9jbboU8hIGyEuMzwI+4cDqCxvljc5uJiI pRZNy6JXde5IogRPdg8cBM0bb73NfsOoeubXL9CrGtBStPZNu/dF1V8RcEREdOjWreO3 xWyKnfjTORfTX42EaKDksr1JIIGZN9/DkOzndWRdk/7PEwfJfs3HjsV+yNIKUD17/lPE QtBA== 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=+UgfLrIM6wN8Cze0JJYrWwftb625NWUhP39JdLuJjns=; b=MdSaEbxoq5Do4fFjxjuFKfxDJGjnza0nFmcQAWoLqSeWT1l6WF6u9gFK1L6aag0Tsb r9Z937+UvGsofx4h3yGW0dXiDIMoMbxxM5Txua+sbRwbC6HGAynJJpKElzA8CtToPgVQ eNM75nJpw5khW71Xjx3xZqSqN1lXABDmRyhzVUEtDyhutJoi/jhnI2Jrbod89BjnnOUJ FRBxG+TT6nhsPCGF0bBIsX7VJQGZ8VIXjFmoCfeyGJXO8Fgv5kSROeDWYTEzzv1s2fau mLhvn38Hhkozn+0FzLhj0GOItcO7lWVKZFYdiOA17CSriUrg18jdj7kvCG0xeegmuev3 CjaQ== 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 r7si1732304pfh.174.2018.02.09.05.45.23; Fri, 09 Feb 2018 05:45:37 -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 S1752868AbeBINnz (ORCPT + 99 others); Fri, 9 Feb 2018 08:43:55 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51130 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbeBINnx (ORCPT ); Fri, 9 Feb 2018 08:43:53 -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 54E8EF5E; Fri, 9 Feb 2018 13:43:52 +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 Subject: [PATCH 4.9 77/92] KVM: nVMX: vmx_complete_nested_posted_interrupt() cant fail Date: Fri, 9 Feb 2018 14:39:46 +0100 Message-Id: <20180209133936.784785649@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180209133931.211869118@linuxfoundation.org> References: <20180209133931.211869118@linuxfoundation.org> User-Agent: quilt/0.65 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.9-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 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 @@ -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_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); @@ -4766,7 +4766,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) @@ -10482,7 +10481,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)