[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] pci: Simpler implementation of PCI_COMMAND_
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] pci: Simpler implementation of PCI_COMMAND_MASTER bit |
Date: |
Wed, 24 Apr 2013 14:36:46 +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:
> In commit 1c380f9460522f32c8dd2577b2a53d518ec91c6d "pci: honor
> PCI_COMMAND_MASTER" the PCI_COMMAND_MASTER bit of the PCI command register
> was implemented by toggling the enable bit on a memory region alias
> interposed between the PCI device's dma address space and the main
> system memory region.
>
> Introducing an extra alias region for every PCI device just to implement
> that bit seems like serious overkill. Furthermore, it doesn't work when
> there's a (guest side) iommu present, since that uses a different path for
> constructing the PCI device's dma address space.
>
> This patch removes the aliased window, instead implementing
> PCI_COMMAND_MASTER with tests in the PCI DMA functions.
>
> Signed-off-by: David Gibson <address@hidden>
This doesn't work.
You have no guarantee that PCI devices use the PCI DMA functions. The
device could just pass the DMAContext to another function, and indeed
the OHCI controller does exactly that.
This will be even simpler after IOMMU/DMAContext are also unified in the
AddressSpace framework.
Paolo
- [Qemu-devel] [0/5] RFC: Preparations for supporting VFIO with guest IOMMUs, David Gibson, 2013/04/24
- [Qemu-devel] [PATCH 1/5] pci: Simpler implementation of PCI_COMMAND_MASTER bit, David Gibson, 2013/04/24
- Re: [Qemu-devel] [PATCH 1/5] pci: Simpler implementation of PCI_COMMAND_MASTER bit,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 3/5] vfio: Associate VFIO groups with DMAContexts, David Gibson, 2013/04/24
- [Qemu-devel] [PATCH 4/5] vfio: Move container list to DMAContext, David Gibson, 2013/04/24
- Re: [Qemu-devel] [PATCH 4/5] vfio: Move container list to DMAContext, Alex Williamson, 2013/04/24
- Re: [Qemu-devel] [PATCH 4/5] vfio: Move container list to DMAContext, Paolo Bonzini, 2013/04/24
- Re: [Qemu-devel] [PATCH 4/5] vfio: Move container list to DMAContext, David Gibson, 2013/04/25
- Re: [Qemu-devel] [PATCH 4/5] vfio: Move container list to DMAContext, Paolo Bonzini, 2013/04/26
- Re: [Qemu-devel] [PATCH 4/5] vfio: Move container list to DMAContext, Alexey Kardashevskiy, 2013/04/26
- Re: [Qemu-devel] [PATCH 4/5] vfio: Move container list to DMAContext, Paolo Bonzini, 2013/04/26
- Re: [Qemu-devel] [PATCH 4/5] vfio: Move container list to DMAContext, Alexey Kardashevskiy, 2013/04/26