From: David Gibson <david@gibson.dropbear.id.au>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH qemu v17 06/12] memory: Add reporting of supported page sizes
Date: Wed, 15 Jun 2016 16:15:15 +1000 [thread overview]
Message-ID: <20160615061515.GH21472@voom.fritz.box> (raw)
In-Reply-To: <bb990d9e-490d-692f-136d-93da7255138d@ozlabs.ru>
[-- Attachment #1: Type: text/plain, Size: 2357 bytes --]
On Wed, Jun 08, 2016 at 04:05:48PM +1000, Alexey Kardashevskiy wrote:
> 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::translate
> >>>>> uses when translating, however this information is not available outside
> >>>>> 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 <aik@ozlabs.ru>
> >>>>> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> >>> 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 and
> >>> 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.
> >
> > 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 return
> - one page size or a mask. What should it be now?
Eh, make it a single page size for now. We can extend it to a mask if
we ever need it. But for clarity, best to call it 'get_min_page_size'
or 'get_granularity'.
> > That might be useful at some point
> > in the future. For now, it's sufficient for the replay to use the
> > smallest pagesize.
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-06-15 6:27 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1464771463-37214-1-git-send-email-aik@ozlabs.ru>
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 01/12] vmstate: Define VARRAY with VMS_ALLOC Alexey Kardashevskiy
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 02/12] spapr_iommu: Introduce "enabled" state for TCE table Alexey Kardashevskiy
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 03/12] spapr_iommu: Migrate full state Alexey Kardashevskiy
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 04/12] spapr_iommu: Add root memory region Alexey Kardashevskiy
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 05/12] spapr_pci: Reset DMA config on PHB reset Alexey Kardashevskiy
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 06/12] memory: Add reporting of supported page sizes Alexey Kardashevskiy
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 07/12] vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2) Alexey Kardashevskiy
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 08/12] spapr_pci: Add and export DMA resetting helper Alexey Kardashevskiy
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 09/12] vfio: Add host side DMA window capabilities Alexey Kardashevskiy
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 10/12] vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2) Alexey Kardashevskiy
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 11/12] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW) Alexey Kardashevskiy
2016-06-01 8:57 ` [Qemu-devel] [PATCH qemu v17 12/12] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping listening Alexey Kardashevskiy
[not found] ` <201606010902.u518wwmb029353@mx0a-001b2d01.pphosted.com>
2016-06-02 3:35 ` [Qemu-devel] [PATCH qemu v17 06/12] memory: Add reporting of supported page sizes David Gibson
2016-06-06 13:31 ` Paolo Bonzini
2016-06-07 3:42 ` Alexey Kardashevskiy
2016-06-08 6:00 ` David Gibson
2016-06-08 6:05 ` Alexey Kardashevskiy
2016-06-14 21:41 ` Alexey Kardashevskiy
2016-06-15 6:15 ` David Gibson [this message]
[not found] ` <201606010900.u518wvH7046287@mx0a-001b2d01.pphosted.com>
2016-06-02 4:18 ` [Qemu-devel] [PATCH qemu v17 07/12] vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2) David Gibson
[not found] ` <201606010902.u518x15j023604@mx0a-001b2d01.pphosted.com>
2016-06-02 4:19 ` [Qemu-devel] [PATCH qemu v17 08/12] spapr_pci: Add and export DMA resetting helper David Gibson
[not found] ` <201606010901.u518wwEL029369@mx0a-001b2d01.pphosted.com>
2016-06-03 7:23 ` [Qemu-devel] [PATCH qemu v17 09/12] vfio: Add host side DMA window capabilities David Gibson
[not found] ` <201606011012.u51A9A6i023070@mx0a-001b2d01.pphosted.com>
2016-06-03 7:37 ` [Qemu-devel] [PATCH qemu v17 10/12] vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2) David Gibson
2016-06-06 6:45 ` Alexey Kardashevskiy
2016-06-08 5:56 ` David Gibson
[not found] ` <201606010902.u51902Zl007699@mx0a-001b2d01.pphosted.com>
2016-06-03 15:37 ` [Qemu-devel] [PATCH qemu v17 06/12] memory: Add reporting of supported page sizes Alex Williamson
[not found] ` <201606010900.u51900Om007391@mx0a-001b2d01.pphosted.com>
2016-06-03 16:13 ` [Qemu-devel] [PATCH qemu v17 07/12] vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2) Alex Williamson
2016-06-06 6:04 ` Alexey Kardashevskiy
2016-06-06 17:20 ` Alex Williamson
2016-06-07 3:10 ` Alexey Kardashevskiy
[not found] ` <201606010901.u518x843001647@mx0a-001b2d01.pphosted.com>
2016-06-03 16:32 ` [Qemu-devel] [PATCH qemu v17 09/12] vfio: Add host side DMA window capabilities Alex Williamson
[not found] ` <201606010901.u518x7AQ001537@mx0a-001b2d01.pphosted.com>
2016-06-03 16:50 ` [Qemu-devel] [PATCH qemu v17 10/12] vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2) Alex Williamson
[not found] ` <201606011013.u51A9ALx023064@mx0a-001b2d01.pphosted.com>
2016-06-03 16:59 ` [Qemu-devel] [PATCH qemu v17 12/12] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping listening Alex Williamson
[not found] ` <201606010901.u518x1wF023568@mx0a-001b2d01.pphosted.com>
2016-06-06 5:57 ` [Qemu-devel] [PATCH qemu v17 11/12] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW) David Gibson
2016-06-06 8:12 ` Alexey Kardashevskiy
2016-06-08 5:57 ` David Gibson
2016-06-08 6:09 ` Alexey Kardashevskiy
2016-06-09 4:28 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160615061515.GH21472@voom.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).