From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Date: Tue, 02 Oct 2018 04:56:11 +0000 Subject: Re: [PATCH kernel] powerpc/powernv/ioda: Allocate indirect TCE levels of cached userspace addresses Message-Id: <20181002045611.GG1886@umbus.fritz.box> MIME-Version: 1 Content-Type: multipart/mixed; boundary="bFsKbPszpzYNtEU6" List-Id: References: <20180928064539.39050-1-aik@ozlabs.ru> In-Reply-To: <20180928064539.39050-1-aik@ozlabs.ru> To: Alexey Kardashevskiy Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org --bFsKbPszpzYNtEU6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 28, 2018 at 04:45:39PM +1000, Alexey Kardashevskiy wrote: > The powernv platform maintains 2 TCE tables for VFIO - a hardware TCE > table and a table with userspace addresses; the latter is used for > marking pages dirty when corresponging TCEs are unmapped from > the hardware table. >=20 > a68bd1267b72 ("powerpc/powernv/ioda: Allocate indirect TCE levels > on demand") enabled on-demand allocation of the hardware table, > however it missed the other table so it has still been fully allocated > at the boot time. This fixes the issue by allocating a single level, > just like we do for the hardware table. >=20 > Fixes: a68bd1267b72 ("powerpc/powernv/ioda: Allocate indirect TCE levels = on demand") > Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson > --- > arch/powerpc/platforms/powernv/pci-ioda-tce.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/arch/powerpc/platforms/powernv/pci-ioda-tce.c b/arch/powerpc= /platforms/powernv/pci-ioda-tce.c > index fe96910..7639b21 100644 > --- a/arch/powerpc/platforms/powernv/pci-ioda-tce.c > +++ b/arch/powerpc/platforms/powernv/pci-ioda-tce.c > @@ -299,7 +299,7 @@ long pnv_pci_ioda2_table_alloc_pages(int nid, __u64 b= us_offset, > if (alloc_userspace_copy) { > offset =3D 0; > uas =3D pnv_pci_ioda2_table_do_alloc_pages(nid, level_shift, > - levels, tce_table_size, &offset, > + tmplevels, tce_table_size, &offset, > &total_allocated_uas); > if (!uas) > goto free_tces_exit; --=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 --bFsKbPszpzYNtEU6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAluy+msACgkQbDjKyiDZ s5LwMw//Vt5pl31GWaIpcNLPkO/qMdoTn3DE5CGtOHd14ZpOsWMzpNWTHB74KIei oyGStiNX1YeK7K0BwgVSvSXsaSRONvZ7WFRPmNmLnVnV0P2ZT3tBZN69wDK2VKKw n4IgqNEyoegt/RmlggdpwNQ37N4CRQdvHdvnPSeV7LiUxV0FOIjlWKVuchnvWcxw UzcZyV3L1Bxx/iO5ug7om5CdNYhttNhvWKVmgIif6N9I5Lhi7UrcgvK5N0gmQ1N7 F7Vs8pv48LlN1qpR76zMqr7nEY6cystzaKUdwM9KrJvboHmuNQ2sRx3Q46T4UBn4 Q/oYpm25Ds37dxoYvEGfKKL6uaD1VOz1x4G5WJosLQQPrsNZYKcr48e7w7Jr6sRF 0EsMk62wSEgWG3WJGtO7UspKWQpg+6GM8LbelIikxil34sqVZZEP9m4XqtzniBpq IG8cXMIgv+OcXlG8hwGDIpTrg3XkL3CGpMQHKdEIrt87anfpjd3cwf+Be5td3kjt PiOnhCrRJWGUWmDr7EGELEzOU+fDP3gx+53KDl2NDSpVn+fQmh8ehU9x8aNWyH8P bSmvCW5oUiTH33gRDSbNPfJjGpFspktyiIfGdlREmFD7H+kPFSNQOvhGdZBIQ/re SXnAGjRKM1N4cveSWOK5RKLwWZtgEuU7/fJjrFnoRQTegqeZnvc= =GwZg -----END PGP SIGNATURE----- --bFsKbPszpzYNtEU6--