Skip to content

Minimal RAM API support

Alex Williamson kvm qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 6 repliesIn review
  2. v3 posting 2/22 patches 2 repliesSuperseded
  3. v3 posting 1/22 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches14 repliesSuperseded
v12 patches4 repliesSuperseded

Changes in v4 from the cover letter

- ram_slot -> RamSlot (per CODING_STYLE)
- drop qemu_ prefix from functions (per CODING_STYLE)
- mallocz -> malloc
- drop extraneous return from void function

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Minimal RAM API supportMakefile.objs cpu-common.h memory.c +1 more+141 -03 replies
2/2RAM API: Make use of it for x86 PChw/pc.c+3 -63 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/2] Minimal RAM API support

Update per comments, Thanks,

Alex

v4:

- ram_slot -> RamSlot (per CODING_STYLE)
- drop qemu_ prefix from functions (per CODING_STYLE)
- mallocz -> malloc
- drop extraneous return from void function

v3:

- Address review comments
- pc registers all memory below 4G in one chunk

Let me know if there are any further issues.

v2:

- Move to Makefile.objs
- Move structures to memory.c and create a callback function
- Fix memory leak

I haven't moved to the state parameter because there should only be a single instance of this per VM. The state parameter seems like it would add complications in setup and function calling, but maybe point me to an example if I'm off base.

v1:

For VFIO based device assignment, we need to know what guest memory areas are actual RAM. RAMBlocks have long since become a grab bag of misc allocations, so aren't effective for this. Anthony has had a RAM API in mind for a while now that addresses this problem. This implements just enough of it so that we have an interface to get actual guest memory physical addresses to setup the host IOMMU. We can continue building a full RAM API on top of this stub.

Anthony, feel free to add copyright to memory.c as it's based on your initial implementation. I had to add something since the file in your branch just copies a header with Frabrice's copywrite.

---

Alex Williamson (2):
RAM API: Make use of it for x86 PC
Minimal RAM API support

 Makefile.objs |    1 +
 cpu-common.h  |    2 +
 hw/pc.c       |    9 ++---
 memory.c      |   94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 memory.h      |   44 +++++++++++++++++++++++++++
 5 files changed, 144 insertions(+), 6 deletions(-)
 create mode 100644 memory.c
 create mode 100644 memory.h