On 2 April 2013 20:09, Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 02/04/2013 19:07, Peter Maydell ha scritto:
>> It's not a problem with sysbus, it's a problem with people
>> being lazy about implementing things that do DMA. For instance
>> PCI doesn't take a MemoryRegion* for DMA, it just assumes it
>> can DMA into the system address space.
>
> PCI does provide its own DMAContext*, which includes an AddressSpace.
> This address space ("view of the world") is different for each device.

Yes, but (unless you're using the legacy stuff spapr uses)
it generates it via get_system_memory(), which is always
wrong (though often close enough that Linux will work right).

>> (it does let you pass
>> a DMAContext, but maybe that goes away with the patches you
>> mention above; it's only used for spapr.)
>
> It is extended so that it is also used for spapr with those patches.

I'm confused. Do you mean that it's changed so that spapr passes
a MemoryRegion* rather than a DMAContext*, or so that everything
uses a DMAContext* ? (The comments in pci.c suggest that the former
is the intended approach.)

-- PMM

Reply via email to