Received: by 10.223.176.5 with SMTP id f5csp925549wra; Tue, 6 Feb 2018 09:34:29 -0800 (PST) X-Google-Smtp-Source: AH8x224E8FRoZSRmcvIwqvVzJBoF0mYM8GHTC/ebghTBp4KTd/uEWLFlCd8l7I+IFiOZ2zhr2ZSu X-Received: by 2002:a17:902:28c3:: with SMTP id f61-v6mr3210424plb.264.1517938468904; Tue, 06 Feb 2018 09:34:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517938468; cv=none; d=google.com; s=arc-20160816; b=XVZiCAUIIxksi+a5lYcqLhLtxabsfm8IXw2DybT14Xlzvp9EI3Rm5MbnJy2SwSsB1S eH6LpfMdapxB57n9C7xzt9Oz/knufaCPp2pou1yThTkeELH3peTk7HAaRzGmj6gHIdDU e3mPlVW/NOavKtcw2gTwXTkt9TRawavZwaLAKJTIkEobxisQKMqReHbX6rMowUfmfguN MbjXMRUqPtdOIRGuSpxOi9LsKPOBh76s+W+msSzi6ZGQ/ZKAABJ/O4+V7HRH2Dw7obLS j84bjqxaco1vz1ZWN7O4TA4y0F7mFKMgM0F3YLyPtUM0uShp7y6wFtFTT7bIOi1mQ2gZ zOXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=gdERRKgfLgZCCLZpxZCP/5aYAqGWcaVwv/MEzUgmByg=; b=lqfw1og37/eww1eCYoIduzHh2a3ZfMItJ4WLbGuMtYFdG4eU2DzMmQIfiwxDu14xOH fiopg5HyqqSl64E1Be8jNj4iUt6Vwh+klD3OqEIi95NoJDb6toZNeInoj8xA2hco2O9X htAWZ4AtL0XmP0c3MYeSfgylxSzy+pd+CvJShxK8s3hAEm7jvWR2zYtNo3eq1tPgHVaV GfeMUKnVMg8nuiPxmIlFxBDbiNiLxiCJK3uuqEsmiuWXQLKGOA+XNAOSjOFyjFidnYaD hJfE0I9VsJxd/QQ+RxfDiHeK5u5TQS6sdsnGOvMZ+7DlneXkanjPkT4S7UJMMMDQ0oPM 1bAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.co.uk header.s=amazon201209 header.b=H06SpKhZ; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5-v6si6752268plk.196.2018.02.06.09.34.15; Tue, 06 Feb 2018 09:34:28 -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; dkim=pass header.i=@amazon.co.uk header.s=amazon201209 header.b=H06SpKhZ; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753029AbeBFRbm (ORCPT + 99 others); Tue, 6 Feb 2018 12:31:42 -0500 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:11107 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752912AbeBFRbF (ORCPT ); Tue, 6 Feb 2018 12:31:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.co.uk; i=@amazon.co.uk; q=dns/txt; s=amazon201209; t=1517938265; x=1549474265; h=from:to:subject:date:message-id:in-reply-to:references; bh=gdERRKgfLgZCCLZpxZCP/5aYAqGWcaVwv/MEzUgmByg=; b=H06SpKhZjiahnEacdNxfaPUIwt73sYK4n9oPs3V3n9UUSW8L/GfPbqW2 J+Q+VejLaxPuvHh5okDUQPCuxZTJ0RaQ2xAv61VVz73Q+y3yL7ewAaGeA blSVC+JdEEie1BBL2vaztaP2SzdrP6TJ8PTWbjJ1Ls40DiPet+tx5EWJx 4=; X-IronPort-AV: E=Sophos;i="5.46,469,1511827200"; d="scan'208";a="718429365" Received: from sea3-co-svc-lb6-vlan2.sea.amazon.com (HELO email-inbound-relay-2a-f14f4a47.us-west-2.amazon.com) ([10.47.22.34]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Feb 2018 17:29:58 +0000 Received: from uc8d3ff76b9bc5848a9cc.ant.amazon.com (pdx2-ws-svc-lb17-vlan3.amazon.com [10.247.140.70]) by email-inbound-relay-2a-f14f4a47.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id w16HTjns046750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Feb 2018 17:29:47 GMT Received: from uc8d3ff76b9bc5848a9cc.ant.amazon.com (localhost [127.0.0.1]) by uc8d3ff76b9bc5848a9cc.ant.amazon.com (8.15.2/8.15.2/Debian-3) with ESMTP id w16HTjlA020655; Tue, 6 Feb 2018 17:29:45 GMT Received: (from dwmw@localhost) by uc8d3ff76b9bc5848a9cc.ant.amazon.com (8.15.2/8.15.2/Submit) id w16HTiwp020654; Tue, 6 Feb 2018 17:29:44 GMT From: David Woodhouse To: Paolo Bonzini , Jim Mattson , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, KarimAllah Ahmed , 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 Message-Id: <1517938181-15317-2-git-send-email-dwmw@amazon.co.uk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517938181-15317-1-git-send-email-dwmw@amazon.co.uk> References: <1517938181-15317-1-git-send-email-dwmw@amazon.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Hildenbrand 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 (cherry picked from commit 6342c50ad12e8ce0736e722184a7dbdea4a3477f) Signed-off-by: David Woodhouse --- 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