qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/2] memory: Convert skip_dump to ram_device and avo


From: Alex Williamson
Subject: [Qemu-devel] [PATCH 0/2] memory: Convert skip_dump to ram_device and avoid memcpy
Date: Mon, 24 Oct 2016 16:59:48 -0600
User-agent: StGit/0.17.1-dirty

As based on previous RFC:

https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg05183.html

TL;DR, this adds tracing, converts skip_dump to ram_device (named
after rom_device), adds full access widths, identifies ram_device
regions based on ops pointer.

Paolo had suggested converting "skip_dump" to "device_memory", but
"ram_device" seemed like a better fit, feel free to disagree.  It
also didn't feel right to set ram_device via a separate function,
because then we need to worry about all the ways in which a
MemoryRegion might be manipulated to make sure we only apply this
attribute to the kind we want.  Much easier to have a separate
constructor that does this, we're not flipping this on and off like
romd.

Also, I had trouble documenting why I only implemented dword access
as in the RFC, it just seemed like procrastination, so let's just
support full qword.  In fact, why even care about alignment, we
really want to perform the access as prescribed by the guest driver
and performed by the guest processor.  If the driver does an invalid
width or alignment, then so should we.  At least that's my theory.
Of course this means that xp in the monitor once again can't dump
RTL MMIO in more than 4-byte chunks, but that seems like an
operator issue.  Dumping memory via xp is just a tool and if we
apply the tool to do accesses that the device is not capable of,
that's not a problem with the tool.

This fixes what I believe to be the problem Thorsten has
identified with RTL assignment and hopefully he can add a
Tested-by once confirmed.  Thanks,

Alex

---

Alex Williamson (2):
      memory: Replace skip_dump flag with "ram_device"
      memory: Don't use memcpy for ram_device regions


 hw/vfio/common.c      |    9 ++----
 hw/vfio/spapr.c       |    2 +
 include/exec/memory.h |   46 +++++++++++++++++++----------
 memory.c              |   79 +++++++++++++++++++++++++++++++++++++++++++++++--
 memory_mapping.c      |    2 +
 trace-events          |    2 +
 6 files changed, 114 insertions(+), 26 deletions(-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]