Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp960608pxb; Wed, 6 Apr 2022 05:22:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxV46GPWgWJ9gn2ZGGNikFWH5T9lLmBblXRoTNfKJuVOKH2oe2yO/jPt+EpnWCKNLZhYV29 X-Received: by 2002:a05:6a00:1808:b0:4fd:dee2:6369 with SMTP id y8-20020a056a00180800b004fddee26369mr8539320pfa.43.1649247778288; Wed, 06 Apr 2022 05:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649247778; cv=none; d=google.com; s=arc-20160816; b=S/ScfeFmtBZRR1oZVuZHubzGLMCS6NfBcTn5NvUVk8uw8AuIp6tagiwdN4KDHR4BsG 8dtu6lBmQpu5aqoWF+Q2ZH7y9fjh/a1iZrIk85rXdG6SmbtkGFsD1towRl8fnzxBwnnL St2Dmhsn8/oQvY9agP5D6qMF2yATj3aTAo2VIfZDps4h+GpK/bVBX1jG/A8rhF30KHpF XrikZxhImFuCjkmS8PikEoBgITgAE/vBLc0WeAacV9iglcOl4P2Fs1CQLQDALfR3l4HO 43tSJsae2wloky3EApTAJCeTyRkrvpClS3t6G8JmdikomK7PyUPlUTeEX1pyVjtPMlrq VzUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VAXUYyR+5aldHtmO/+E/PudP2eD63/b/JM+6B/HFuM0=; b=EfDWGvYRqS0ekgGVvwWsHWHA6uHc7w2Rf5E3/YNktKikIvuEE0daf+TxxvUhM+4CMY I4/WVxL7YOV2mPYp42+p5TtN+OyId3iWjVGdcKT8L/H/ETLz5SODIVnPwIhGpHJm+Btq Sjw/XE5YVLWTN1jQdB19xpx59lLTyXbcxNIabupMT4tGDWzQChWX/8RaoWx8iBxH1HUH XThmQSg9vQwXOD2jakWgHqbZHTu7u6iRb18Uh7ozFTTlhgxeTX32TXSl+HPDpc9hoBK2 1rCcYX5Sid5QS4U9HaHkOYTXUE2S/1cboNXqISleqFCj1eLIay1pzMOoYJLJe4Xacq1M rY/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e3gQU+wl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q132-20020a632a8a000000b00381640eeca2si15305846pgq.4.2022.04.06.05.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:22:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e3gQU+wl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 778986DA4F1; Wed, 6 Apr 2022 04:20:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377541AbiDEUgl (ORCPT + 99 others); Tue, 5 Apr 2022 16:36:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352880AbiDEKFQ (ORCPT ); Tue, 5 Apr 2022 06:05:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E79E221819; Tue, 5 Apr 2022 02:53:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 34D8BB81C9B; Tue, 5 Apr 2022 09:53:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A0FDC385A2; Tue, 5 Apr 2022 09:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152436; bh=YmpZLRTg0VYSCq0h7FNTg3T582pHsUuY2WzC52Y/wWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e3gQU+wlCxVAoj0fV3qV+WjmXBnsr9jAA/4Dl/N1yL2qWJd3bDgrCAIvgFDBmDJar m7i+gm11Um3Z81JQZr1SjEdE0BgsIM9N4Kjh9rBsVDjm45Pxrxo9/PPPnVwul1ecfL RT3jnTLPIF7ElSrsI54xlTAn/BaF+m4z/iBWOmpU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vitaly Kuznetsov , Paolo Bonzini Subject: [PATCH 5.15 775/913] KVM: x86: hyper-v: Drop redundant ex parameter from kvm_hv_flush_tlb() Date: Tue, 5 Apr 2022 09:30:37 +0200 Message-Id: <20220405070403.063242780@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vitaly Kuznetsov commit 82c1ead0d678af31e5d883656c12096a0004178b upstream. 'struct kvm_hv_hcall' has all the required information already, there's no need to pass 'ex' additionally. No functional change intended. Cc: stable@vger.kernel.org # 5.14.x Signed-off-by: Vitaly Kuznetsov Message-Id: <20220222154642.684285-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman --- arch/x86/kvm/hyperv.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -1749,7 +1749,7 @@ struct kvm_hv_hcall { sse128_t xmm[HV_HYPERCALL_MAX_XMM_REGISTERS]; }; -static u64 kvm_hv_flush_tlb(struct kvm_vcpu *vcpu, struct kvm_hv_hcall *hc, bool ex) +static u64 kvm_hv_flush_tlb(struct kvm_vcpu *vcpu, struct kvm_hv_hcall *hc) { int i; gpa_t gpa; @@ -1765,7 +1765,8 @@ static u64 kvm_hv_flush_tlb(struct kvm_v int sparse_banks_len; bool all_cpus; - if (!ex) { + if (hc->code == HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST || + hc->code == HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE) { if (hc->fast) { flush.address_space = hc->ingpa; flush.flags = hc->outgpa; @@ -2246,32 +2247,20 @@ int kvm_hv_hypercall(struct kvm_vcpu *vc kvm_hv_hypercall_complete_userspace; return 0; case HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST: - if (unlikely(!hc.rep_cnt || hc.rep_idx)) { - ret = HV_STATUS_INVALID_HYPERCALL_INPUT; - break; - } - ret = kvm_hv_flush_tlb(vcpu, &hc, false); - break; - case HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE: - if (unlikely(hc.rep)) { - ret = HV_STATUS_INVALID_HYPERCALL_INPUT; - break; - } - ret = kvm_hv_flush_tlb(vcpu, &hc, false); - break; case HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST_EX: if (unlikely(!hc.rep_cnt || hc.rep_idx)) { ret = HV_STATUS_INVALID_HYPERCALL_INPUT; break; } - ret = kvm_hv_flush_tlb(vcpu, &hc, true); + ret = kvm_hv_flush_tlb(vcpu, &hc); break; + case HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE: case HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX: if (unlikely(hc.rep)) { ret = HV_STATUS_INVALID_HYPERCALL_INPUT; break; } - ret = kvm_hv_flush_tlb(vcpu, &hc, true); + ret = kvm_hv_flush_tlb(vcpu, &hc); break; case HVCALL_SEND_IPI: if (unlikely(hc.rep)) {