kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Alexander Graf <agraf@suse.de>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 4/4] KVM: PPC: Book3S HV: Provide a method for userspace to read and write the HPT
Date: Tue, 20 Nov 2012 10:59:46 +1100	[thread overview]
Message-ID: <20121119235946.GB30665@drongo> (raw)
In-Reply-To: <F0A61BC8-B475-4F38-B556-FA5478692313@suse.de>

On Mon, Nov 19, 2012 at 01:53:44PM +0100, Alexander Graf wrote:

> > +static inline unsigned long slb_pgsize_encoding(unsigned long psize)
> > +{
> > +	unsigned long senc = 0;
> > +
> > +	if (psize > 0x1000) {
> > +		senc = SLB_VSID_L;
> > +		if (psize == 0x10000)
> > +			senc |= SLB_VSID_LP_01;
> 
> Is this always accurate?

It's accurate for page sizes of 4k, 64k and 16M on POWER7, and for
page sizes of 4k and 16M on PPC970, which is all we support.  This
function was just moved from book3s_hv.c anyway.  I'll add a comment
to it.

> > +/* For KVM_PPC_GET_HTAB_FD */
> > +struct kvm_get_htab_fd {
> > +	__u64	flags;
> > +	__u64	start_index;
> 
> Please add some padding here, in case we need more information passed down. 16 bytes should be enough.

OK.

> The actual protocol looks quite good :). And if it doesn't work for us anymore, we can always bump it to a new protocol using the flags in the above ioctl.

Right.  That's why I made it give an error if any unknown flags are
set.

Regards,
Paul.

      reply	other threads:[~2012-11-19 23:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14  4:30 [PATCH 0/4] KVM: PPC: Book3S HV: HPT read/write functions for userspace Paul Mackerras
2012-11-14  4:31 ` [PATCH 1/4] KVM: PPC: Book3S HV: Restructure HPT entry creation code Paul Mackerras
2012-11-19 12:54   ` Alexander Graf
2012-11-14  4:32 ` [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs Paul Mackerras
2012-11-19 12:36   ` Alexander Graf
2012-11-19 17:20     ` Scott Wood
2012-11-19 17:40       ` Alexander Graf
2012-11-19 23:25     ` Paul Mackerras
2012-11-14  4:32 ` [PATCH 3/4] KVM: PPC: Book3S HV: Make a HPTE removal function available Paul Mackerras
2012-11-14  4:33 ` [PATCH 4/4] KVM: PPC: Book3S HV: Provide a method for userspace to read and write the HPT Paul Mackerras
2012-11-19 12:53   ` Alexander Graf
2012-11-19 23:59     ` Paul Mackerras [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121119235946.GB30665@drongo \
    --to=paulus@samba.org \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).