From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Date: Thu, 27 Sep 2018 03:28:03 +0000 Subject: Re: [RFC PATCH 20/32] KVM: PPC: Book3S HV: Nested guest entry via hypercall Message-Id: <20180927032803.GG30868@umbus.fritz.box> MIME-Version: 1 Content-Type: multipart/mixed; boundary="H3QWGwNgsl3Q7pDd" List-Id: References: <1537524123-9578-21-git-send-email-paulus@ozlabs.org> In-Reply-To: <1537524123-9578-21-git-send-email-paulus@ozlabs.org> To: kvm-ppc@vger.kernel.org --H3QWGwNgsl3Q7pDd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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; > > > >=20 > > > > 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. > > >=20 > > > 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. > >=20 > > Ah, right. > >=20 > > Would checking if the vPTCR is !=3D it's initial value (0?) do the job? > > (AFAICT PTCR=3D=3D0 would be unusable, even if technically allowed). >=20 > 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. --=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 --H3QWGwNgsl3Q7pDd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlusTkMACgkQbDjKyiDZ s5JtVhAAlNkHO79mHxqvwqzBGBLHM12bYYuwlIV1fMb0W+F/9SL09IiFoFQRYnIu qNp3EMvn8BKFCuVrFK5B3BH5TbqwwvpV5T/4B9LNf2XWlSIC5PjNnbYv+eVP1CrA NWismO/8KyZqNhA2AqNr8r/VtFxDgeMk4vP/jOSJgL8pg8Kg5/VQSuNTptgYWo19 Ko9BLRQjY0lll4hJ6NaSC78kvjpWga4E0FbDIg/VvP6PhAXQ9NF9BeE9Pu5nwU0H RaaWh+Misfs9Y87/2b1Es3c7EomgPdEc827pRjRd80YFIwNq7qbbBYzmidsxVfp+ eWhNvmJZalhAK1J++yKveYo0CRZ0HemYJUcwM1vcEx8i1Hm0QIzV6x2Rmj/3oWtD ZXSy5/qlwGJAlENkiSnQE8tQNFkqE98qppjM/GD5HDMVgiLXrhtB+kI+IxIYVZ4r 4/xhCkqhjuYDpk9WBFPEuFh8y563q75rjAPBayKSu5gfBDH7L02Wu/Y8MDB+LaB6 kgCjf3YoFY/vXsDkSFJHamZeomi5E7l7BGXdHaXknRxDqzrpyy3z5Wm6Kj4awmtR pJFhczU/07LBntw3IS2dDVSTk5uRa3NxzVFvv7GU/nytK1KoYbz3t5gzHYm6efez wkhySa62a8ZLYhle1x/P7+psWXHXDaN5toKIZ5nUiW/POXPaFO8= =2r5H -----END PGP SIGNATURE----- --H3QWGwNgsl3Q7pDd--