Re: [RFC PATCH 20/32] KVM: PPC: Book3S HV: Nested guest entry via hypercall

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

 



On Thu, Sep 27, 2018 at 11:45:21AM +1000, Paul Mackerras wrote:
> On Thu, Sep 27, 2018 at 10:57:17AM +1000, David Gibson wrote:
> > On Wed, Sep 26, 2018 at 08:59:22PM +1000, Paul Mackerras wrote:
> > > On Wed, Sep 26, 2018 at 03:41:07PM +1000, David Gibson wrote:
> > > > On Fri, Sep 21, 2018 at 08:01:51PM +1000, Paul Mackerras wrote:
> > > > > +	if (!kvm_is_radix(vcpu->kvm))
> > > > > +		return H_FUNCTION;
> > > > 
> > > > Would it be safer / cleaner to have this instead check that the L1 has
> > > > completed an H_SET_PARTITION_TABLE?  Which wouldn't be allowed for an
> > > > HPT guest.
> > > 
> > > There is no valid bit in the PTCR value, and the PTCR could have been
> > > set via the one-reg interface without there having been a
> > > H_SET_PARTITION_TABLE in the lifetime of this KVM instance (for
> > > example when the L1 guest has been migrated in from another machine),
> > > so I don't see a foolproof way to do what you suggest.
> > 
> > Ah, right.
> > 
> > Would checking if the vPTCR is != it's initial value (0?) do the job?
> > (AFAICT PTCR==0 would be unusable, even if technically allowed).
> 
> If I did check PTCR, what error code would you suggest?  I'm sure
> you'd tell me not to use H_FUNCTION. :)

Probably H_NOT_AVAILABLE?  That's what I use if you attempt an HPT
resize from an RPT guest.

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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux