From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:50022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB5uT-0001kp-TU for qemu-devel@nongnu.org; Mon, 01 Apr 2019 19:00:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hB5uS-00061Z-BS for qemu-devel@nongnu.org; Mon, 01 Apr 2019 19:00:09 -0400 Date: Tue, 2 Apr 2019 09:52:14 +1100 From: David Gibson Message-ID: <20190401225214.GA9231@umbus.fritz.box> References: <155414129703.574858.5054152366329409898.stgit@bahia.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline In-Reply-To: <155414129703.574858.5054152366329409898.stgit@bahia.lan> Subject: Re: [Qemu-devel] [PATCH for-4.0 0/2] spapr: Fix extended config space accesses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Alex Williamson , Marcel Apfelbaum , =?iso-8859-1?Q?C=E9dric?= Le Goater --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 01, 2019 at 07:54:57PM +0200, Greg Kurz wrote: > Recent commit c2077e2ca0da7 added stricter checks that now prevent > a guest to access the extended config space of a PCIe device connected > attached to a PHB on a pseries machine. >=20 > PAPR compatible PHBs act like legacy PCI busses, but they do allow access > to the full 4k config space of PCIe devices. As discussed several times on > the list ([1] and [2]), we cannot really change PAPR PHB to have a true > PCIe root bus since it would call for massive and unwanted changes in > libvirt. >=20 > This series tries to address the issue with a new PCI bus class method > that tells if the PCI bus supports extended config space accesses, > instead of relying on pci_bus_is_express() which wants a PCIe root bus. > A new legacy PCI bus type is added to implement the PAPR behaviour. >=20 > Note that this fixes a potential 4.0 regression, hence the for-4.0 tag. >=20 > [1] https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg07377.html > https://lists.gnu.org/archive/html/qemu-devel/2016-11/msg02839.html >=20 > [2] https://lists.gnu.org/archive/html/qemu-ppc/2017-01/msg00034.html So, I actually had some patches I'd been working on that address both the c2077e2ca0da7 issue and the PAPR fixup in what I think is a cleaner manner. Can't remember now if I posted and they got lost, or I didn't get around to posting. Nonetheless, at this point we're fixing a real regression on PAPR. I'll look at cleaning this up post 4.0. Reviewed-by: David Gibson