Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754575AbcLSCCB (ORCPT ); Sun, 18 Dec 2016 21:02:01 -0500 Received: from ozlabs.org ([103.22.144.67]:44747 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbcLSCB7 (ORCPT ); Sun, 18 Dec 2016 21:01:59 -0500 Date: Mon, 19 Dec 2016 11:03:04 +1100 From: David Gibson To: Thomas Huth Cc: paulus@samba.org, michael@ellerman.id.au, benh@kernel.crashing.org, sjitindarsingh@gmail.com, lvivier@redhat.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH 03/11] powerpc/kvm: Gather HPT related variables into sub-structure Message-ID: <20161219000304.GI12146@umbus.fritz.box> References: <20161215055404.29351-1-david@gibson.dropbear.id.au> <20161215055404.29351-4-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LYw3s/afESlflPpp" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2901 Lines: 77 --LYw3s/afESlflPpp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 16, 2016 at 10:24:17AM +0100, Thomas Huth wrote: > On 15.12.2016 06:53, David Gibson wrote: > > Currently, the powerpc kvm_arch structure contains a number of variables > > tracking the state of the guest's hashed page table (HPT) in KVM HV. T= his > > patch gathers them all together into a single kvm_hpt_info substructure. > > This makes life more convenient for the upcoming HPT resizing > > implementation. > >=20 > > Signed-off-by: David Gibson > > --- > > arch/powerpc/include/asm/kvm_host.h | 16 ++++--- > > arch/powerpc/kvm/book3s_64_mmu_hv.c | 90 ++++++++++++++++++-----------= -------- > > arch/powerpc/kvm/book3s_hv.c | 2 +- > > arch/powerpc/kvm/book3s_hv_rm_mmu.c | 62 ++++++++++++------------- > > 4 files changed, 87 insertions(+), 83 deletions(-) > >=20 > > diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include= /asm/kvm_host.h > > index e59b172..2673271 100644 > > --- a/arch/powerpc/include/asm/kvm_host.h > > +++ b/arch/powerpc/include/asm/kvm_host.h > > @@ -241,12 +241,20 @@ struct kvm_arch_memory_slot { > > #endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */ > > }; > > =20 > > +struct kvm_hpt_info { > > + unsigned long virt; > > + struct revmap_entry *rev; > > + unsigned long npte; > > + unsigned long mask; > > + u32 order; > > + int cma; > > +}; >=20 > While you're at it, it would be really great if you could add a comment > at the end of each line with a short description of what the variables > are about. E.g. if I just read "virt" and do not have much clue of the > code yet, I have a hard time to figure out what this means... Good idea, done. --=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 --LYw3s/afESlflPpp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYVyO1AAoJEGw4ysog2bOSK6wP/23rCX8ryh5b3qZzHS8Vrn6p nZ6O823Q6a7Fa842POa8kAECVq04zUyYwnWj5lYxoOVSawlLfkIXMOKh9dOjIJ0z ZGtZy/Ops9j8Md++2r8uRbqpS0LCJ2YGfzW6yvVtpxYM4TeGFA7Srnvt/1NtZgvY Hqc8PctcZAzNC/GnFo5XkW0/Iwy8A2sQflO1LXPFgUM/tNDoUROKTw9dcy+c6w/n xusDUTXFqao+x7l1kx1dLsb/PcEIrQvMNE8j0DpLzjuWFxuJZroIJ8JgVAuQOG6w 0RR5dqR56osxaZRai75agNWtG2BK7i4MFOQrrersv/dyf6Bdfq7RS9TzmQjeOYT4 GRcFhGMfsU2exDCyjFoa9RrQ4Tf5K23s5/AxC2t+93Qd9Bt+w/lSepmQgasOSzsC zkb3MATFNOXoSvzXkYuEuyKs+XbcigrVQItLO6cVrNyTMKG2rVQTW11VPRWF0TDB fcWUFMSa49w3huoW/2NBD/XrCHkPRQGnG2e2vmmR3l9T/ycP3tkksEdQ+IjjU+xh E3SIg2XvzigZeH76lebuHSVNbM73rAMdKzz0pN4lTSEyo17h48kE170UniY9moEr MGkAkhbj5mmFcd/xAIqCJ3S6toknMI3WzF60mF1KLDZ/aRSLI9mq9zZE95i5fr9y FqYXMfWdGR599keFWzll =hum8 -----END PGP SIGNATURE----- --LYw3s/afESlflPpp--