From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF8D7C433C1 for ; Tue, 23 Mar 2021 02:37:39 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 330D6619A9 for ; Tue, 23 Mar 2021 02:37:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 330D6619A9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4F4Frx65vxz30Jh for ; Tue, 23 Mar 2021 13:37:37 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=201602 header.b=JqVG9Oh2; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2401:3900:2:1::2; helo=ozlabs.org; envelope-from=dgibson@ozlabs.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=201602 header.b=JqVG9Oh2; dkim-atps=neutral Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4F4Fq41J6Sz30Bw for ; Tue, 23 Mar 2021 13:35:59 +1100 (AEDT) Received: by ozlabs.org (Postfix, from userid 1007) id 4F4Fq309lCz9sW1; Tue, 23 Mar 2021 13:35:59 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1616466959; bh=2kfSreEfH+nJfxXsLlaxLYjo4wAQxD2RREwfr0zjpFw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JqVG9Oh2f2CXMez/zZjE68LyCMKvWlgO8VuVu/Ib6QG7foxFyPohqeX+igs7T9n7q f4mix3uf4m8mhf+nC6u1ZPN6cokMMvHCeiUiWREXCWda3g4X0EW5HFFlDX26TDjPmM 9jAqDQ3zBI5v/YyLd/qN8jEcVlZ/vdBXG3IaS10Y= Date: Tue, 23 Mar 2021 13:34:27 +1100 From: David Gibson To: Bharata B Rao Subject: Re: [PATCH v6 5/6] KVM: PPC: Book3S HV: Add KVM_CAP_PPC_RPT_INVALIDATE capability Message-ID: References: <20210311083939.595568-1-bharata@linux.ibm.com> <20210311083939.595568-6-bharata@linux.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="R/F4QHJkQivBKsaB" Content-Disposition: inline In-Reply-To: <20210311083939.595568-6-bharata@linux.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farosas@linux.ibm.com, aneesh.kumar@linux.ibm.com, npiggin@gmail.com, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" --R/F4QHJkQivBKsaB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 11, 2021 at 02:09:38PM +0530, Bharata B Rao wrote: > Now that we have H_RPT_INVALIDATE fully implemented, enable > support for the same via KVM_CAP_PPC_RPT_INVALIDATE KVM capability >=20 > Signed-off-by: Bharata B Rao Reviewed-by: David Gibson > --- > Documentation/virt/kvm/api.rst | 18 ++++++++++++++++++ > arch/powerpc/kvm/powerpc.c | 3 +++ > include/uapi/linux/kvm.h | 1 + > 3 files changed, 22 insertions(+) >=20 > diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.= rst > index 1a2b5210cdbf..d769cef5f904 100644 > --- a/Documentation/virt/kvm/api.rst > +++ b/Documentation/virt/kvm/api.rst > @@ -6227,6 +6227,24 @@ KVM_RUN_BUS_LOCK flag is used to distinguish betwe= en them. > This capability can be used to check / enable 2nd DAWR feature provided > by POWER10 processor. > =20 > +7.24 KVM_CAP_PPC_RPT_INVALIDATE > +------------------------------ > + > +:Capability: KVM_CAP_PPC_RPT_INVALIDATE > +:Architectures: ppc > +:Type: vm > + > +This capability indicates that the kernel is capable of handling > +H_RPT_INVALIDATE hcall. > + > +In order to enable the use of H_RPT_INVALIDATE in the guest, > +user space might have to advertise it for the guest. For example, > +IBM pSeries (sPAPR) guest starts using it if "hcall-rpt-invalidate" is > +present in the "ibm,hypertas-functions" device-tree property. > + > +This capability is enabled for hypervisors on platforms like POWER9 > +that support radix MMU. > + > 8. Other capabilities. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =20 > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > index a2a68a958fa0..be33b5321a76 100644 > --- a/arch/powerpc/kvm/powerpc.c > +++ b/arch/powerpc/kvm/powerpc.c > @@ -682,6 +682,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, lon= g ext) > r =3D !!(hv_enabled && kvmppc_hv_ops->enable_dawr1 && > !kvmppc_hv_ops->enable_dawr1(NULL)); > break; > + case KVM_CAP_PPC_RPT_INVALIDATE: > + r =3D 1; > + break; > #endif > default: > r =3D 0; > diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h > index f6afee209620..2b2370475cec 100644 > --- a/include/uapi/linux/kvm.h > +++ b/include/uapi/linux/kvm.h > @@ -1078,6 +1078,7 @@ struct kvm_ppc_resize_hpt { > #define KVM_CAP_DIRTY_LOG_RING 192 > #define KVM_CAP_X86_BUS_LOCK_EXIT 193 > #define KVM_CAP_PPC_DAWR1 194 > +#define KVM_CAP_PPC_RPT_INVALIDATE 195 > =20 > #ifdef KVM_CAP_IRQ_ROUTING > =20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --R/F4QHJkQivBKsaB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAmBZU7MACgkQbDjKyiDZ s5JhIhAAz+EYMl6D7R/Sq629K/gEpJd5rxo0oL5r/Sc+R1c5cU28JcsYsPp3LIt2 6ivj3BJmMytPTbLINEQsO07D/6JrpxSvDwpuDn9LnB7YlQxE5H+9Qod+fZjvVY7D Q81FaWpWjGC1IUecPAortygI2jTff+2k4KbnceuwPo5mBNP/ej2oYxELsHkbWIUd MhlCLcK/n6MUX24XlcnhmKVN0ymNBSt6WLIb94kE4Oxz4d29IaWKWNXY1z+uOYyJ 0fIfjn+JnHKM3wEiutUpT6Sxf2Dr0FdFVRZtOHuxJsOk152FBDIjohPHGPsA2BLj vo5rzWialNHFsqVjRIm5QeOMMAPBNVZ8zmJFr3SkAfHw8Kra2z91BLuDBF6fddKe GK4nxHYf+STJx1DE8xWbMaDjz0bQPu8/uJ5+lg3OGlRyLqRhS/82BLeJ5LgJpMxA lflMa78/Cct5a5n6LYVH7mej2jzzjhq8AZrz08eS5FISetVtLa6Mnqbi3sF8twcF 5F9/Lys/tW54ACCEulXEEQl7u/kMqLmzhZyWZOfs4UrzhmvGCnisQp+xjhjzLqx5 OuosdjyjaB/TyOixxtX2aVD0jgBSMV80CPbs8oHAabvPrmOnrApd0It1zA7NZtZZ CIM1fM3Eb8CSniZSgO3kuEGKrBMtHg2z27FpzZY6MjqDDoSdQF8= =rB5k -----END PGP SIGNATURE----- --R/F4QHJkQivBKsaB--