From: Peter Maydell <peter.maydell@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
patches@linaro.org, qemu-devel@nongnu.org,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH 0/2] Drop support for qdev taddr properties
Date: Tue, 2 Apr 2013 18:07:42 +0100 [thread overview]
Message-ID: <CAFEAcA-vh7jhLt0sceAfnKKpy2tMbXNXxYoBziLO3QOztYNETQ@mail.gmail.com> (raw)
In-Reply-To: <515B0A79.50906@redhat.com>
On 2 April 2013 17:42, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 02/04/2013 18:10, Peter Maydell ha scritto:
>> Aside: I may try to get rid of the DMAADDR property too at some
>> point, because what the sysbus-ohci device should actually be doing
>> is taking a MemoryRegion* [or maybe a DMAContext*]
>
> Avi had patches to unify DMAContext and MemoryRegion. I should revive
> them perhaps.
Yes please.
>> representing what
>> it should be DMAing into, rather than the current "DMA into the
>> system address space at addr + some constant offset" hack. One
>> thing at a time, though.
>
> That's a general problem with sysbus. I guess if you need another
> address space you should define your own bus, like PCI does.
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. (it does let you pass
a DMAContext, but maybe that goes away with the patches you
mention above; it's only used for spapr.)
NB that "the PCI address space", ie the view of the world that
the host controller sees when it makes a PCI access, is not
the same as the address space that another bus mastering PCI
device sees when it does a DMA access. Chances are good that
the former shouldn't have any of the system's RAM in it and
the latter should. (This is easy to handle though, you just
create container MemoryRegions for each and pass them to the
PCI code and make sure that you're using the right one at
any particular point.)
-- PMM
next prev parent reply other threads:[~2013-04-02 17:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 16:10 [Qemu-devel] [PATCH 0/2] Drop support for qdev taddr properties Peter Maydell
2013-04-02 16:10 ` [Qemu-devel] [PATCH 1/2] hw/sm501: Use correct setter for sysbus-ohci dma-address property Peter Maydell
2013-04-02 16:10 ` [Qemu-devel] [PATCH 2/2] qdev: Drop taddr properties Peter Maydell
2013-04-02 16:42 ` [Qemu-devel] [PATCH 0/2] Drop support for qdev " Paolo Bonzini
2013-04-02 17:07 ` Peter Maydell [this message]
2013-04-02 19:09 ` Paolo Bonzini
2013-04-02 20:33 ` Peter Maydell
2013-04-02 20:39 ` Paolo Bonzini
2013-04-02 20:43 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFEAcA-vh7jhLt0sceAfnKKpy2tMbXNXxYoBziLO3QOztYNETQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=aliguori@us.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).