From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [PATCH 08/19] KVM: PPC: Book3S HV: add a VC_BASE control to the XIVE native device Date: Mon, 4 Feb 2019 15:49:34 +1100 Message-ID: <20190204044933.GC1927@umbus.fritz.box> References: <20190107184331.8429-1-clg@kaod.org> <20190107184331.8429-9-clg@kaod.org> <20190122051430.GE15124@blackberry> <8c45581e-466e-a390-e9cd-a06b5939d2af@kaod.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UFHRwCdBEJvubb2X" Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org To: =?iso-8859-1?Q?C=E9dric?= Le Goater Return-path: Content-Disposition: inline In-Reply-To: <8c45581e-466e-a390-e9cd-a06b5939d2af@kaod.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" List-Id: kvm.vger.kernel.org --UFHRwCdBEJvubb2X Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 23, 2019 at 05:56:26PM +0100, C=E9dric Le Goater wrote: > On 1/22/19 6:14 AM, Paul Mackerras wrote: > > On Mon, Jan 07, 2019 at 07:43:20PM +0100, C=E9dric Le Goater wrote: > >> The ESB MMIO region controls the interrupt sources of the guest. QEMU > >> will query an fd (GET_ESB_FD ioctl) and map this region at a specific > >> address for the guest to use. The guest will obtain this information > >> using the H_INT_GET_SOURCE_INFO hcall. To inform KVM of the address > >> setting used by QEMU, add a VC_BASE control to the KVM XIVE device > >=20 > > This needs a little more explanation. I *think* the only way this > > gets used is that it gets returned to the guest by the new > > hypercalls. If that is indeed the case it would be useful to mention > > that in the patch description, because otherwise taking a value that > > userspace provides and which looks like it is an address, and not > > doing any validation on it, looks a bit scary. >=20 > I think we have solved this problem in another email thread.=20 >=20 > The H_INT_GET_SOURCE_INFO hcall does not need to be implemented in KVM > as all the source information should already be available in QEMU. In > that case, there is no need to inform KVM of where the ESB pages are=20 > mapped in the guest address space. So we don't need that extra control > on the KVM device. This is good news. Ah, good to hear. I thought this looked strange. --=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 --UFHRwCdBEJvubb2X Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlxXxF0ACgkQbDjKyiDZ s5JCZRAA03WzDXc4NHhQ38Q+zz1qA2QmDhJK4TB/QzJSUwnnw0CKwXpeVE84h57Z CxS96Uct2BL0GFrNJ+h6SX868QwxH/54TRMtEdX6BEl21XcnDkqFbCqwpqNwoWRa +jsEsEPYXWEr0/JA94RTPSsuprFfAUTe88+thpGmdoAffGK6lMlKuQukJENirY/W YinqShutDg+YRF/90qrqUgNXGc56UDBN7KiWJL4nDhaWXs+VqYSUY/pkeyu8G8+D xEXtKVomC3ORULxLKUbkWUSMHpCVuK4wkb6SYH7TC7qhEtE7iiluZc6QaMuaa/ls Ccg7LfShxf5lTQE7AO/hZo/4TXSZRinLqp0Ms2bSQqsAK+GbXgDDAphgXEbEp1It r0mucPLgAiohKKffyYeQ8YmS4zmoW2yiFFqOxwOHIhyfag1ijJuWtVXY9CVkkaA5 AcxphN3v9Hd3fY1m5rm/NU/5ZuTHqkcvgQ4V1cNEjWAIhO26G6ysrRJBQIU8fftL cVOqL01yFqqtWzmAiGGbRGBbE8MSLj34dKT9f4R/v7Fikn7c6BiPqaZwbEnoqJij 0YH/SzRU0f5Y2xBqaiL/4w1Sr5serY2jX2VXRLDaSNgMEdbWkSVLAOixSHtlUA88 SaDU8q5pbyBSE8JrG7N2WKpUGWhp7UfIYq2k8mBPGm8JPoW1Ols= =Gl8u -----END PGP SIGNATURE----- --UFHRwCdBEJvubb2X--