qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 0/2] Implement versatile PCI IMAP registers
@ 2013-08-22 18:28 Peter Maydell
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Maydell @ 2013-08-22 18:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael S. Tsirkin, patches

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-22 18:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22 18:28 [Qemu-devel] [RFC 0/2] Implement versatile PCI IMAP registers Peter Maydell
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

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).