Re: [PATCH 4/4] KVM: PPC: Book3S HV: Provide a method for userspace to read and write the HPT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux