Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1117876pxb; Thu, 21 Oct 2021 16:17:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHFpEb2yVVb2fIrQZI0WREsCcdG5W55UiaYPLQsjdVIxcT76/CpbDtB9tKxweq4jMIzRCh X-Received: by 2002:a17:907:6297:: with SMTP id nd23mr11378320ejc.62.1634858267958; Thu, 21 Oct 2021 16:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634858267; cv=none; d=google.com; s=arc-20160816; b=lyHbcad3Udz9mXjjkcOxwP0RIl96twZc3XKtOmsqboguSj59a57/ikc5eGoVctquqG DcVm+/B9jxElmHo7Vdw/26snQZqQmh2weuvol9lPtDLiFxGvcbdwRLXRgg6XQODIvUZ8 L1pFVO98TlrY9PH0z2DmyuZKMrBCBfBWwwpCDLpdY8Zn49R7ox444hpYq4Es9rZV/z3w ZKI9qo6dX4K2U80+xHL5RDk1U9TJSfIRrCnsI/TTTvO8jj9AQ3jJqfyM1my1Q9PmZFSd 6zvCyP+zV2bWT9lY54EeQX0c/VOzIZRQy6SEdwCL2zssYNNqFQG4Da0rQigOm1KchiZE emkw== 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:date:cc:to:from:subject :message-id:dkim-signature; bh=wKAcohnofU6zZi5xsu6/8lwmIpu9eTsFr7q3/wltn1o=; b=L0FOzFaasPXDOTSgtM6TVWUwBhB9nt9kV3JI25JnW6UAX/6CsNxCIr1gLzywe+6OND 7rdenUVGoJGLPKco/m5/BMyJxEY7NtBt9g1Lx4wQz48doBrQf5Ed8DOC9orp3PEX8InR 8RTWSwRAxVQpR6Sk3OCPRTNfFRvCAnCSjwroY65RFYxYsBbyvMQas0/4PuOa3vURqrmM 52Ncm6eQijOO7nk6BYpAlbn86IHhn1Vj3h7gnDZlVLEyQHxsc+DIZgmUxBITv5oDNwrr Aq9FEpOc7V6f1okG1f2Zd9eS20ztcLplIqP/WMZYbOJ0aDFyhp6X/YnJveNoAgKdz4d8 +luA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="e5LqMy/E"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r15si12483486edd.218.2021.10.21.16.17.24; Thu, 21 Oct 2021 16:17:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="e5LqMy/E"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232351AbhJUXRH (ORCPT + 99 others); Thu, 21 Oct 2021 19:17:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54592 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232294AbhJUXRF (ORCPT ); Thu, 21 Oct 2021 19:17:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634858087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wKAcohnofU6zZi5xsu6/8lwmIpu9eTsFr7q3/wltn1o=; b=e5LqMy/EmWhAUrcR4AZfVJ24frrTeGA7VxE2Xj06OdwORcGcoxjsCT9qfq26NRVfUcAza+ WIe13tQm6qk8twjt9ACIxXLJy56cLIs5p0yJVr+kQpdNbeUUJEN1pkj3QUTRohR5S3M7DK vwxWFS+GjIw2EUzGOjPTBX68knnASes= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-42-IXnOpwpvOvCCzHdNeTAx8w-1; Thu, 21 Oct 2021 19:14:44 -0400 X-MC-Unique: IXnOpwpvOvCCzHdNeTAx8w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 30E251926DA0; Thu, 21 Oct 2021 23:14:43 +0000 (UTC) Received: from starship (unknown [10.40.192.246]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C8C95F4ED; Thu, 21 Oct 2021 23:14:40 +0000 (UTC) Message-ID: <7762e16e7fe99e09d2b6a52fb382538d03113fe5.camel@redhat.com> Subject: Re: [PATCH 6/8] KVM: x86: remove unnecessary arguments from complete_emulator_pio_in From: Maxim Levitsky To: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: fwilhelm@google.com, seanjc@google.com, oupton@google.com, stable@vger.kernel.org Date: Fri, 22 Oct 2021 02:14:39 +0300 In-Reply-To: <20211013165616.19846-7-pbonzini@redhat.com> References: <20211013165616.19846-1-pbonzini@redhat.com> <20211013165616.19846-7-pbonzini@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2021-10-13 at 12:56 -0400, Paolo Bonzini wrote: > complete_emulator_pio_in can expect that vcpu->arch.pio has been filled in, > and therefore does not need the size and count arguments. This makes things > nicer when the function is called directly from a complete_userspace_io > callback. > > No functional change intended. > > Cc: stable@vger.kernel.org > Fixes: 7ed9abfe8e9f ("KVM: SVM: Support string IO operations for an SEV-ES guest") > Signed-off-by: Paolo Bonzini > --- > arch/x86/kvm/x86.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 07d9533b471d..ef4d6a0de4d8 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -6935,11 +6935,12 @@ static int __emulator_pio_in(struct kvm_vcpu *vcpu, int size, > return emulator_pio_in_out(vcpu, size, port, count, true); > } > > -static void complete_emulator_pio_in(struct kvm_vcpu *vcpu, int size, > - unsigned short port, void *val) > +static void complete_emulator_pio_in(struct kvm_vcpu *vcpu, void *val) > { > + int size = vcpu->arch.pio.size; > memcpy(val, vcpu->arch.pio_data, size * vcpu->arch.pio.count); > - trace_kvm_pio(KVM_PIO_IN, port, size, vcpu->arch.pio.count, vcpu->arch.pio_data); > + trace_kvm_pio(KVM_PIO_IN, vcpu->arch.pio.port, size, > + vcpu->arch.pio.count, vcpu->arch.pio_data); > vcpu->arch.pio.count = 0; > } > > @@ -6950,7 +6951,7 @@ static int emulator_pio_in(struct kvm_vcpu *vcpu, int size, > return 0; > > WARN_ON(count != vcpu->arch.pio.count); > - complete_emulator_pio_in(vcpu, size, port, val); > + complete_emulator_pio_in(vcpu, val); > return 1; > } > Reviewed-by: Maxim Levitsky Best regards, Maxim Levitsky