From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGhwG-0008SO-IT for qemu-devel@nongnu.org; Thu, 29 Jan 2015 00:46:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGhwE-0004UW-Mb for qemu-devel@nongnu.org; Thu, 29 Jan 2015 00:46:48 -0500 Date: Thu, 29 Jan 2015 16:47:03 +1100 From: David Gibson Message-ID: <20150129054703.GV14681@voom> References: <1422507898-4348-1-git-send-email-aik@ozlabs.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QVzQgM+zdZ3YWXqn" Content-Disposition: inline In-Reply-To: <1422507898-4348-1-git-send-email-aik@ozlabs.ru> Subject: Re: [Qemu-devel] [PATCH v3] spapr_vio/spapr_iommu: Move VIO bypass where it belongs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf --QVzQgM+zdZ3YWXqn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 29, 2015 at 04:04:58PM +1100, Alexey Kardashevskiy wrote: > Instead of tweaking a TCE table device by adding there a bypass flag, > let's add an alias to RAM and IOMMU memory region, and enable/disable > those according to the selected bypass mode. > This way IOMMU memory region can have size of the actual window rather > than ram_size which is essential for upcoming DDW support. >=20 > This moves bypass logic to VIO layer and keeps @bypass flag in TCE table > for migration compatibility only. This replaces spapr_tce_set_bypass() > calls with explicit assignment to avoid confusion as the function could > do something more that just syncing the @bypass flag. >=20 > This adds a pointer to VIO device into the sPAPRTCETable struct to provide > the sPAPRTCETable device a way to update bypass mode for the VIO device. >=20 > Signed-off-by: Alexey Kardashevskiy It looks correct to me, although I don't love the fact that the bypass is controlled by the VIO layer, but the state is stored in the TCE table. We should fix that at some point, although it will require some awkward changing to the migration stream. Reviewed-by: David Gibson --=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 --QVzQgM+zdZ3YWXqn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUyclWAAoJEGw4ysog2bOSv/wQAIkxheTVQ9KlqOJbUrIGUuCq eCn6h3OdpUGTVDrZWiPW7sqzTOXqq3WjHPmPPFd+mTGlKK8n+apxWD/PpAgB2EHn Uc+DLEjqvHQ8vTlSS4jyGfiCQ2a6cp8iIXe1XAwG5pfzHCZSND/OIc+XMu69uoTj SspR9QvXEB9mUewN3yuLagDP00sOMUrroeiuKhONXsO1efTiRaKOH2uE7/1l9n8N fe833d/gdaIvAIzUMlth3od4eTKIudOd/IupaWIjLVHWyb45n/pzD2wXGspJoGP9 vLVXU4qlCx+SHC1FvKTdLKaCfrWuu5d62vh2MDeduu1mFbItl0t+FILzQlAEO5NE FPKIo4JmvHXl5J9m6ywg7QAngcTLR6AdRniPLk4ASDEOhICN2R4JkifPe4/WMX4F XAgTklzeiYZUKJrfLdthEuQivgMbR8x5ILPY/KnxOmiPqUMqsrtPZJXkk2f8ChIQ NkgNTkQaRueml15wznZQW2nLFLViY8qyi5u2y7vhxsOr7By21F944dmUDbIe1Jk0 UfeBLRk2GxT8W9fRbvKAvM4d8mrpggpX99rj5nGzErEWkkbE7hacbFyfsjR6cjwx EgUoz2z7NXDm2i3/JKOJahaVSEitDVii/BVpBab7WmiR0ImxcRc9zX2qejiuHifm GIiuj/WfTDCGfAaDYe2R =AyIz -----END PGP SIGNATURE----- --QVzQgM+zdZ3YWXqn--