qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/5] pci: Don't create an address space object f


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 2/5] pci: Don't create an address space object for every PCI device
Date: Wed, 24 Apr 2013 14:34:21 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 24/04/2013 14:01, David Gibson ha scritto:
> So while its true that the DMAContext handling needs to be better
> integrated with the MemoryRegion and AddressSpace handling, that commit
> wasn't actually a step in the right direction for it.  Since then, the
> DMAContext has been extended so it can backend onto an AddressSpace, and
> thereby, a MemoryRegion.  Effectively a DMAContext is now an AddressSpace
> with iommu translation handling on top.
> 
> Therefore, this patch essentially reverts the earlier commit, making all
> PCI devices by default shared the global dma_context_memory which backs
> onto main system memory.  Those cases which need to set up different DMA
> address spaces for each PCI device should supply a suitable dma_context_fn
> in the bus to correctly assign / create suitable DMAContext structures.

I think this will be handled correctly when I submit IOMMU AddressSpace
patches (next week or so).  The structure will be

        PCI device 1                           PCI device 2
    ---------------------------------------------------------------
       AddressSpace 1                          AddressSpace 2
           |                                       |
           | (enable/disable)                      | (enable/disable)
           '-------------------.  .----------------'
                               v  v
                         IOMMU AddressSpace
                                |
                                | (translation)
                                v
                           system memory

VFIO will be able to access the IOMMU AddressSpace simply via
pci_dev->iommu, and that field will be ==-identical  for different PCI
devices.

Paolo




reply via email to

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