Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1940985pxf; Fri, 19 Mar 2021 22:34:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMkB1QnSC6fqqDFWIyo2Nc5+gQ85PDXOp6Nk87Gcr61vnHTQTatEmgPbpI2MBhyOfHN3YX X-Received: by 2002:a05:6402:2215:: with SMTP id cq21mr14092687edb.281.1616218494643; Fri, 19 Mar 2021 22:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616218494; cv=none; d=google.com; s=arc-20160816; b=L1oiLv79N7dassUh/569yVagpRjLn5iNjhkeTKkzLLGilqGH0mcjlpaxzrzq/9IbNX LAErAA1IZiXXDn3Pb1fYVVWSCpTDHtbManJ6DkYygFNHZNxZCS8shYlkRATPIAzHla6H hFxpkvJ5QT2VGgrBh00mtANdbB6K805h5FV2A1Wmn9PKb3wVoiHmy1APjypS3EHbZIsZ DiNTq70Lyi9jVYH/esFTRqsze0R3+xi94GKYz8Oe2mNp7EbIe++fb5DIJ0PsXk5Iazh+ HskS2ilsz4gFyscwt385s8RL31202Qok/qOEaamCPkSnlhzUEkXY7hBOY3ZJaQiyC4y9 lRbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=J3dVHYyPLLYK+/fjLt1QByORvvHqzjgGQxzlyWvSTq0=; b=OzQACawR/7UpORN2Xbk+jbbgzF9hJJvIr3K8smMAJkvEu1NlK94J/u+K8nizudNR62 GU8cK8xuiJgfpYbNjQtA8eWeYmqLtxDmEQUbRUl3//ckomDRHG05q5PQsEfcRJnAa0/L VWwDcevGMcibwfC1FIlTGGELQ74N0ttVJjwoRXgPxcOxwXBGxNOA1EHomo49MCSwCHt0 AJMQZp5JQrm4OWvF+2JBjPQJeEsmSfoWhIeEZNZH3wmyjhIBcTTzzKUFjKQQK50HlncB R7sbc8oNWiVjZQb6x1RpmDH7wF4YjOJ5cPEh8kxV9O7SqcNyJH3ErVoQapL8OMc3OjzQ usTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LrSSZtt0; 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 js21si5716301ejc.447.2021.03.19.22.34.32; Fri, 19 Mar 2021 22:34:54 -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=LrSSZtt0; 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 S229894AbhCTE6D (ORCPT + 99 others); Sat, 20 Mar 2021 00:58:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29347 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbhCTE5m (ORCPT ); Sat, 20 Mar 2021 00:57:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616216261; 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=J3dVHYyPLLYK+/fjLt1QByORvvHqzjgGQxzlyWvSTq0=; b=LrSSZtt0wVwLgb4eU1I74xQz4CVbd+GhUEIQ4S6RBBjrM6P14SWYud8szG2crHVOFGptOq 03Q2KdJYnZQ1pfIxjBHekRfZf9mQyROm6ojNw3e5nKFXLZYoYfKEWOrGsph6ID2I9+UxP+ GcczKzAWv+UAliQT6p8kS5gi+wCs3l0= 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-519-t7vHDpVgNUa3n5WbSuuKqA-1; Sat, 20 Mar 2021 00:57:39 -0400 X-MC-Unique: t7vHDpVgNUa3n5WbSuuKqA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86B041007467; Sat, 20 Mar 2021 04:57:37 +0000 (UTC) Received: from thuth.remote.csb (ovpn-112-13.ams2.redhat.com [10.36.112.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4AB445C1D1; Sat, 20 Mar 2021 04:57:32 +0000 (UTC) Subject: Re: [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs To: Claudio Imbrenda , linux-kernel@vger.kernel.org Cc: borntraeger@de.ibm.com, frankja@linux.ibm.com, david@redhat.com, cohuck@redhat.com, kvm@vger.kernel.org, linux-s390@vger.kernel.org, stable@vger.kernel.org References: <20210319193354.399587-1-imbrenda@linux.ibm.com> <20210319193354.399587-2-imbrenda@linux.ibm.com> From: Thomas Huth Message-ID: Date: Sat, 20 Mar 2021 05:57:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210319193354.399587-2-imbrenda@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/03/2021 20.33, Claudio Imbrenda wrote: > A new function _kvm_s390_real_to_abs will apply prefixing to a real address > with a given prefix value. > > The old kvm_s390_real_to_abs becomes now a wrapper around the new function. > > This is needed to avoid code duplication in vSIE. > > Cc: stable@vger.kernel.org > Signed-off-by: Claudio Imbrenda > --- > arch/s390/kvm/gaccess.h | 23 +++++++++++++++++------ > 1 file changed, 17 insertions(+), 6 deletions(-) > > diff --git a/arch/s390/kvm/gaccess.h b/arch/s390/kvm/gaccess.h > index daba10f76936..7c72a5e3449f 100644 > --- a/arch/s390/kvm/gaccess.h > +++ b/arch/s390/kvm/gaccess.h > @@ -18,17 +18,14 @@ > > /** > * kvm_s390_real_to_abs - convert guest real address to guest absolute address > - * @vcpu - guest virtual cpu > + * @prefix - guest prefix > * @gra - guest real address > * > * Returns the guest absolute address that corresponds to the passed guest real > - * address @gra of a virtual guest cpu by applying its prefix. > + * address @gra of by applying the given prefix. > */ > -static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu, > - unsigned long gra) > +static inline unsigned long _kvm_s390_real_to_abs(u32 prefix, unsigned long gra) Just a matter of taste, but maybe this could be named differently? kvm_s390_real2abs_prefix() ? kvm_s390_prefix_real_to_abs()? Anyway: Reviewed-by: Thomas Huth