[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA |
Date: |
Sat, 03 Sep 2011 06:46:46 +0530 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110817 Fedora/3.1.12-1.fc14 Thunderbird/3.1.12 |
On 09/01/2011 09:25 PM, Anthony Liguori wrote:
> I think this is the wrong approach given the introduction of the memory API.
>
> I think we should have a generic memory access function that takes a
> MemoryRegion as it's first argument.
>
> The PCI bus should then expose one memory region for each device (that's how
> it can figure out where the access is coming from).
A MemoryRegion is the wrong abstraction for the device's view back into system
memory.
The new memory API really has nothing to do with DMA or an IOMMU. Think about
it:
99.999% of the time we're writing to the one MemoryRegion that is RAM (with the
other
remaining fraction being pci-pci dma tricks), except in a non-contiguous manner.
Obviously we need something else to represent the non-contiguous-ness.
I suppose you could abuse Avi's AddressSpace, with hundreds of MemoryRegion
aliases,
but that would be a horrible interface to actually use in this situation.
I think David's patch is fine, as far as it goes for the majority of the
PCI-only
devices that we emulate. As for the devices attached to more than one bus,
they'll
just have to wait until we actually hash out the underlying dma api.
r~
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, (continued)
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, Avi Kivity, 2011/09/01
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, Anthony Liguori, 2011/09/01
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, Avi Kivity, 2011/09/01
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, Anthony Liguori, 2011/09/01
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, Avi Kivity, 2011/09/02
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, Blue Swirl, 2011/09/03
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, David Gibson, 2011/09/01
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, Avi Kivity, 2011/09/02
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, Eduard - Gabriel Munteanu, 2011/09/02
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, David Gibson, 2011/09/02
- Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA,
Richard Henderson <=
Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA, Anthony Liguori, 2011/09/23
[Qemu-devel] [PATCH 10/10] intel-hda: Use PCI DMA stub functions, David Gibson, 2011/09/01
[Qemu-devel] [PATCH 03/10] eepro100: Use PCI DMA stub functions, David Gibson, 2011/09/01
[Qemu-devel] [PATCH 04/10] ac97: Use PCI DMA stub functions, David Gibson, 2011/09/01
[Qemu-devel] [PATCH 07/10] lsi53c895a: Use PCI DMA stub functions, David Gibson, 2011/09/01
[Qemu-devel] [PATCH 08/10] pcnet-pci: Use PCI DMA stub functions, David Gibson, 2011/09/01
[Qemu-devel] [PATCH 05/10] es1370: Use PCI DMA stub functions, David Gibson, 2011/09/01
[Qemu-devel] [PATCH 02/10] rtl8139: Use PCI DMA stub functions, David Gibson, 2011/09/01