qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [Qemu-devel] [PATCH qemu v17 06/12] memory: Add reporting


From: David Gibson
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH qemu v17 06/12] memory: Add reporting of supported page sizes
Date: Wed, 15 Jun 2016 16:15:15 +1000
User-agent: Mutt/1.6.1 (2016-04-27)

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 <address@hidden>
> >>>>> Reviewed-by: David Gibson <address@hidden>
> >>> 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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]