acpi: make ROMs resizeable
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest8 patches 1 replyIn review
- v28 patches 4 repliesSuperseded
- v15 patches 76 repliesSuperseded
Changes in v3 from the cover letter
- Address Paolo's comments: drop an unused function, fix up comment.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | memory: add memory_region_set_sizeinclude/ memory.c | +26 | 0 replies | |
| 2/8 | exec: cpu_physical_memory_set/clear_dirty_rangeexec.c include/ | +13 | 0 replies | |
| 3/8 | exec: split length -> used_length/max_lengtharch_init.c exec.c include/ | +40 | 0 replies | |
| 4/8 | exec: qemu_ram_alloc_resizeable, qemu_ram_resizeexec.c include/ include/ | +84 | 0 replies | |
| 5/8 | arch_init: support resizing on incoming migrationarch_init.c | +8 | 0 replies | |
| 6/8 | memory: API to allocate resizeable RAM MRinclude/ memory.c | +41 | 0 replies | |
| 7/8 | acpi-build: make ROMs RAM blocks resizeablehw/ hw/ hw/ +1 more | +32 | 0 replies | |
| 8/8 | qemu_ram_resize: document assumptionsexec.c | +7 | 0 replies |
Reviews trailers per patch
None of the 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Paolo Bonzini |
|---|---|
| Series | R-b |
| 1/8 | |
| 2/8 | |
| 3/8 | |
| 4/8 | |
| 5/8 | |
| 6/8 | |
| 7/8 | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v3 0/8] acpi: make ROMs resizeable
This is v3 of the patchset.
Changes since v2:
- Address Paolo's comments: drop an unused function, fix up comment.
Changes since v1:
- Any RAM can now be resizeable - there's no requirement that it's device RAM any longer.
- For simplicity, max_size RAM is always pre-allocated
- Added memory_region_set_size, to keep MR size consistent in case MR is guest visible (even though for current users, it never is)
At the moment we migrate ROMs which reside in fw cfg, which allows changing ROM code at will, and supports migrating largish blocks early, with good performance.
However, we are running into a problem: changing size breaks migration every time.
This already requires somewhat messy compatibility support in acpi generation code, and it looks like there'll be more to come.
While recent patches by Paolo and others might make it easier to keep table size static for specific machine types, having a safety net in case we do need to change it sounds like a good idea.
Rather than try to guess the correct size once and for all, this patchset tries to make code future-proof, by adding support for resizeable ram blocks.
A (possibly very high) amount of space in ram_addr_t space is reserved and allocated in host for each block, but never used by fw cfg. If incoming block size differs from current size, block is reallocated. FW CFG is also notified and updated accordingly.
As reviewers felt that making all RAM "resizeable" in this way might make debugging migration harder, these patches set a per-block flag and only allow resizing for blocks where this was explicitly requested.
Note: migration stream is unaffected by these patches. This makes it possible to enable this functionality unconditionally, for all machine types.
In the future, this API might be handy for other things, besides ROMs.
Michael S. Tsirkin (8):
memory: add memory_region_set_size
exec: cpu_physical_memory_set/clear_dirty_range
exec: split length -> used_length/max_length
exec: qemu_ram_alloc_resizeable, qemu_ram_resize
arch_init: support resizing on incoming migration
memory: API to allocate resizeable RAM MR
acpi-build: make ROMs RAM blocks resizeable
qemu_ram_resize: document assumptions
hw/lm32/lm32_hwsetup.h | 3 +- include/exec/cpu-all.h | 12 +++-- include/exec/memory.h | 34 ++++++++++++ include/exec/ram_addr.h | 22 ++++++-- include/hw/loader.h | 4 +- arch_init.c | 28 +++++----- exec.c | 136 +++++++++++++++++++++++++++++++++++++----------- hw/core/loader.c | 18 +++++-- hw/i386/acpi-build.c | 19 +++++-- memory.c | 33 ++++++++++++ 10 files changed, 249 insertions(+), 60 deletions(-)
Signature · 1 line
MST