From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>, patches@linaro.org
Subject: [Qemu-devel] [RFC 0/2] Implement versatile PCI IMAP registers
Date: Thu, 22 Aug 2013 19:28:10 +0100 [thread overview]
Message-ID: <1377196092-7482-1-git-send-email-peter.maydell@linaro.org> (raw)
This RFC patchset implements the versatile PCI controller's
IMAP registers correctly. These registers deal with the mapping
of the system address space into PCI space, ie they control
what bits of RAM are written to by bus-mastering PCI devices.
(At the moment we just use the system memory space as the
PCI DMA address space, which means that there is always a
flat 1:1 mapping, which is what Linux happens to expect.)
This is an RFC for two reasons:
(1) I needed to add support to the PCI core code for
"allow this device to respond if its MMIO BARs are
programmed for address zero", and I'm not sure I did
this the right way.
(2) since the core code doesn't forbid a PCI device from
doing a bus-master access back into its own MMIO bars,
it's possible for a guest to configure the controller into
a hall-of-mirrors mapping of the PCI and system memory
spaces into each other such that an access would loop
infinitely. This will probably result in infinite
recursion in QEMU in render_memory_region().
Suggestions for how to avoid this welcome...
thanks
-- PMM
Peter Maydell (2):
hw/pci: Add PCI capability to allow BARs at 0
hw/pci-host/versatile: Implement IMAP registers
hw/pci-host/versatile.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++
hw/pci/pci.c | 3 +-
include/hw/pci/pci.h | 3 ++
3 files changed, 77 insertions(+), 1 deletion(-)
--
1.7.9.5
next reply other threads:[~2013-08-22 18:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-22 18:28 Peter Maydell [this message]
2013-08-22 18:28 ` [Qemu-devel] [RFC 1/2] hw/pci: Add PCI capability to allow BARs at 0 Peter Maydell
2013-08-22 18:28 ` [Qemu-devel] [RFC 2/2] hw/pci-host/versatile: Implement IMAP registers 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=1377196092-7482-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=mst@redhat.com \
--cc=patches@linaro.org \
--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).