From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypcb6-0000XD-3t for qemu-devel@nongnu.org; Tue, 05 May 2015 09:09:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ypcb0-00018m-Kz for qemu-devel@nongnu.org; Tue, 05 May 2015 09:09:16 -0400 Date: Tue, 5 May 2015 22:34:46 +1000 From: David Gibson Message-ID: <20150505123446.GR14090@voom.redhat.com> References: <1429964684-23872-1-git-send-email-aik@ozlabs.ru> <1429964684-23872-9-git-send-email-aik@ozlabs.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ReoOxgzMK1Uj1WV+" Content-Disposition: inline In-Reply-To: <1429964684-23872-9-git-send-email-aik@ozlabs.ru> Subject: Re: [Qemu-devel] [PATCH qemu v7 08/14] spapr_pci: Do complete reset of DMA config when resetting PHB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Alex Williamson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf --ReoOxgzMK1Uj1WV+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 25, 2015 at 10:24:38PM +1000, Alexey Kardashevskiy wrote: > On a system reset, DMA configuration has to reset too. At the moment > it clears the table content. This is enough for the single table case > but with DDW, we will also have to disable all DMA windows except > the default one. Furthermore according to sPAPR, if the guest removed > the default window and created a huge one at the same zero offset on > a PCI bus, the reset handler has to recreate the default window with > the default properties (2GB big, 4K pages). >=20 > This reworks SPAPR PHB code to disable the existing DMA window on reset > and then configure and enable the default window. > Without DDW that means that the same window will be disabled and then > enabled with no other change in behaviour. >=20 > This changes the table creation to do it in one place in PHB (VFIO PHB > just inherits the behaviour from PHB). The actual table allocation is > done from the reset handler and this is where dma_init_window() is called. >=20 > This disables all DMA windows on a PHB reset. It does not make any > difference now as there is just one DMA window but it will later with DDW > patches. >=20 > This makes spapr_phb_dma_reset() and spapr_phb_dma_remove_window() public > as these will be used in DDW RTAS "ibm,reset-pe-dma-window" and > "ibm,remove-pe-dma-window" handlers later; the handlers will reside in > hw/ppc/spapr_rtas_ddw.c. >=20 > Signed-off-by: Alexey Kardashevskiy 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 --ReoOxgzMK1Uj1WV+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVSLjmAAoJEGw4ysog2bOSkqEP/i08yN9zk+eIgSakHTveaijP VUbBuaNnj9OXDbpe6q4DdfIRCM6Ua2Yt8B3ztgAd59qUayMgKqnWVhY2x8AMckrb 59HMMTGT2I5ribz78Gz8Y38g4clHChg2RvDhg64OKf0VKRg2HwXrFgJF5kQhGQTa MvhrZjsdt7uteDQiHi7yOie5ZSdZGpj6Dt/uUGnzbfW+fbnQ0YhCgDHgwDQT4ynU VuzvP25/DD3kcpK+Yl8WLcs0e38oTHFutu1q/E5eJr1D+ctgvDL07AZyayPebM8s 7C5x9+buFkehbRozWYvKjA+tKYP06DzRvZFVrohBAeNW79tre3ATJHzAkTccShmV EWPFLrYc05AhnzkaTDM/P7JL2cE4hlLpUIcQd8IOMU/6ng8k9RZ+gEJil9bd/dQc VOLWd+Mhyn5V8M5FBsMnPJbcgzZWFY6mSaWMszEZk60/4fHU9068M+D/jgUNaC7G EwyEeSjdLWn4uDze41YiS6SK0N1RHzxy6QPQgdCyHhOAekiV92/FPyILKwuHUNB6 zAUOiDWZb0RGJPBTypdKdWeMBXQmcbNWjPmcHbsnSXwDN+WL183ihBLpiYe0YJUV Xdujbfhb8NUPb9OdMjygm0Q9gU6mXUKUARSp/YR8bxowJ9tzAVIoLplHeGLXF19w F6qozjS0HUv+0A3DlBr4 =bi4f -----END PGP SIGNATURE----- --ReoOxgzMK1Uj1WV+--