lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Dec 2016 11:03:04 +1100
From:   David Gibson <david@...son.dropbear.id.au>
To:     Thomas Huth <thuth@...hat.com>
Cc:     paulus@...ba.org, michael@...erman.id.au, benh@...nel.crashing.org,
        sjitindarsingh@...il.com, lvivier@...hat.com,
        linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org
Subject: Re: [PATCH 03/11] powerpc/kvm: Gather HPT related variables into
 sub-structure

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.  This
> > patch gathers them all together into a single kvm_hpt_info substructure.
> > This makes life more convenient for the upcoming HPT resizing
> > implementation.
> > 
> > Signed-off-by: David Gibson <david@...son.dropbear.id.au>
> > ---
> >  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(-)
> > 
> > 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 */
> >  };
> >  
> > +struct kvm_hpt_info {
> > +	unsigned long virt;
> > +	struct revmap_entry *rev;
> > +	unsigned long npte;
> > +	unsigned long mask;
> > +	u32 order;
> > +	int cma;
> > +};
> 
> 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.

-- 
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

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ