Received: from eggs.gnu.org ([2001:4830:134:3::10]:36847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAWcr-0003lg-Oi for qemu-devel@nongnu.org; Wed, 08 Jun 2016 02:06:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAWcm-00046c-GK for qemu-devel@nongnu.org; Wed, 08 Jun 2016 02:06:00 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:34819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAWcl-000469-3J for qemu-devel@nongnu.org; Wed, 08 Jun 2016 02:05:56 -0400 Received: by mail-pf0-x244.google.com with SMTP id t190so2684640pfb.2 for ; Tue, 07 Jun 2016 23:05:54 -0700 (PDT) References: <1464771463-37214-1-git-send-email-aik@ozlabs.ru> <201606010902.u518wwmb029353@mx0a-001b2d01.pphosted.com> <20160602033558.GK15455@voom.fritz.box> <3901766f-6adc-b04d-f498-00bbbd0a3724@redhat.com> <20160608060006.GY9226@voom.fritz.box> From: Alexey Kardashevskiy Message-ID: Date: Wed, 8 Jun 2016 16:05:48 +1000 MIME-Version: 1.0 In-Reply-To: <20160608060006.GY9226@voom.fritz.box> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="crcQu36PR27BBj3RmjgWeT0D9PISfNQmF" Subject: Re: [Qemu-devel] [PATCH qemu v17 06/12] memory: Add reporting of supported page sizes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson , Paolo Bonzini Cc: Alex Williamson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --crcQu36PR27BBj3RmjgWeT0D9PISfNQmF From: Alexey Kardashevskiy To: David Gibson , Paolo Bonzini Cc: Alex Williamson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf Message-ID: Subject: Re: [Qemu-devel] [PATCH qemu v17 06/12] memory: Add reporting of supported page sizes References: <1464771463-37214-1-git-send-email-aik@ozlabs.ru> <201606010902.u518wwmb029353@mx0a-001b2d01.pphosted.com> <20160602033558.GK15455@voom.fritz.box> <3901766f-6adc-b04d-f498-00bbbd0a3724@redhat.com> <20160608060006.GY9226@voom.fritz.box> In-Reply-To: <20160608060006.GY9226@voom.fritz.box> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable On 08/06/16 16:00, David Gibson wrote: > On Mon, Jun 06, 2016 at 03:31:04PM +0200, Paolo Bonzini wrote: >> >> >> On 02/06/2016 05:35, David Gibson wrote: >>> On Wed, Jun 01, 2016 at 06:57:37PM +1000, Alexey Kardashevskiy wrote:= >>>>> Every IOMMU has some granularity which MemoryRegionIOMMUOps::transl= ate >>>>> uses when translating, however this information is not available ou= tside >>>>> the translate context for various checks. >>>>> >>>>> This adds a get_page_sizes callback to MemoryRegionIOMMUOps and >>>>> a wrapper for it so IOMMU users (such as VFIO) can know the actual >>>>> page size(s) used by an IOMMU. >>>>> >>>>> As IOMMU MR represents a guest IOMMU, this uses TARGET_PAGE_SIZE >>>>> as fallback. >>>>> >>>>> This removes vfio_container_granularity() and uses new helper in >>>>> memory_region_iommu_replay() when replaying IOMMU mappings on added= >>>>> IOMMU memory region. >>>>> >>>>> Signed-off-by: Alexey Kardashevskiy >>>>> Reviewed-by: David Gibson >>> Paolo, >>> >>> Looks like you were left off the CC for this one. >>> >>> I think this is ready to go - do you want to merge, comment or ack an= d >>> we'll take it either through my tree or Alex's? >> >> It's okay for you to merge, but the callback should be called >> "get_page_size" or "get_replay_granularity". The plural is weird. >=20 > Hm, no, it really could return multiple page sizes if the logical > (guest side) IOMMU supports them. It could but it does not now and I cannot see it coming in near future so= I am really confused now about the naming and what the callback should retu= rn - one page size or a mask. What should it be now? > That might be useful at some point > in the future. For now, it's sufficient for the replay to use the > smallest pagesize. >=20 --=20 Alexey --crcQu36PR27BBj3RmjgWeT0D9PISfNQmF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXV7W8AAoJEIYTPdgrwSC5dJYP/iIAoLPrXz/8kOW8A2SmDnr2 qacJZBxvhd55RJn1t01TAumBVqf/sXLUDpg80vMFjPrgaRVRl46umpHOBxW8cV+H d3mS2OKrYFI0o6GcMjQjt2VgN99lJ3YfZEBOELKQIPdVD2BD1+DlTdESDiX1KuJe 9JPAmdi5vNeAvRL192O/AuWTIshIhvkVp25D04r79JTwUn1SGH3mXlkfF7FQ1t4S EKywulFKgOs7VVDRxoG1IFmSeQdkjqNEElv79Y1P1u4P0QqPATXjG3+mQS+sW2Gp pG5/DW87UUqNtCK/V72WcB7wG7XKvE2bZKWaRAx4fYZegLDDnwdn+Ow8fbCoUysB TXAqy7Wg52Ox+CFfDvDlI+dt8vjc3/Wfsrny8TiHVrBnpN8rNEftl+eLjoHLtuMz De1VKW2rJCMrN0YGvYl7ZFtOjUkkZHpA2Fka11pAoE6s74DKYUDH6V2FA7lcbtk6 rf1W7nbJanY9jCs42qWqLnorDYRIRiZ+3OOTqnXvclkN+tNuCF3xBY2xPJTcaSUS L7T/eUHi2JYRTqq1saUTLTXFLv3Xs7i6XZeYcfHhj9wjspKGYi9LTESQ0avIGYla xZEPw0elIH0ZjbcYvThhChHNmhCQz7/KjdOs9k8n54MndzzvdknyrPFecu4vSZUD kxxBxgE/SWPgA0mOFPmy =GWAr -----END PGP SIGNATURE----- --crcQu36PR27BBj3RmjgWeT0D9PISfNQmF--