All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/5] pc: make ROMs resizeable
@ 2014-11-17 20:08 Michael S. Tsirkin
  2014-11-17 20:08 ` [Qemu-devel] [PATCH 1/5] cpu: add cpu_physical_memory_clear_dirty_range_nocode Michael S. Tsirkin
                   ` (7 more replies)
  0 siblings, 8 replies; 82+ messages in thread
From: Michael S. Tsirkin @ 2014-11-17 20:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, dgilbert, Juan Quintela

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.

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
for each block, but never allocated.
If incoming block size differs from current size, block is
reallocated. FW CFG is also notified and updated accordingly.

To simplify things, I didn't add support for resizing
actual RAM: device RAM such as fw cfg ROMs are never mapped
into guests directly, so instead I added an API to
flag device RAM explicitly, and manage them using
simple alloc/free/realloc

Considering this promises to rid us of worries about ROM size considerations
once and for all, I thinking about pushing this as a "kind of bugfix" before
2.2, so we don't need to maintain more band-aids in 2.3 and on.

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 might be handy for other things,
such as changing kernels loaded on command line
across migrations.

Note: cross version migration testing still ongoing,
I'll definitely complete that before pushing it out.

Michael S. Tsirkin (5):
  cpu: add cpu_physical_memory_clear_dirty_range_nocode
  exec: qemu_ram_alloc_device, qemu_ram_resize
  arch_init: support resizing on incoming migration
  memory: interface to allocate device ram
  acpi-build: make ROMs device RAM, make them resizeable

 hw/lm32/lm32_hwsetup.h  |   3 +-
 include/exec/cpu-all.h  |   8 +++-
 include/exec/memory.h   |  22 ++++++++++
 include/exec/ram_addr.h |  15 +++++++
 include/hw/loader.h     |   4 +-
 arch_init.c             |  13 +++---
 exec.c                  | 113 +++++++++++++++++++++++++++++++++++++++++++-----
 hw/core/loader.c        |  18 ++++++--
 hw/i386/acpi-build.c    |  19 +++++---
 memory.c                |  17 ++++++++
 10 files changed, 202 insertions(+), 30 deletions(-)

-- 
MST

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

end of thread, other threads:[~2014-11-24 13:48 UTC | newest]

Thread overview: 82+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-17 20:08 [Qemu-devel] [PATCH 0/5] pc: make ROMs resizeable Michael S. Tsirkin
2014-11-17 20:08 ` [Qemu-devel] [PATCH 1/5] cpu: add cpu_physical_memory_clear_dirty_range_nocode Michael S. Tsirkin
2014-11-19  9:10   ` Juan Quintela
2014-11-17 20:08 ` [Qemu-devel] [PATCH 2/5] exec: qemu_ram_alloc_device, qemu_ram_resize Michael S. Tsirkin
2014-11-17 20:15   ` Michael S. Tsirkin
2014-11-18  6:03   ` Paolo Bonzini
2014-11-18  7:49     ` Michael S. Tsirkin
2014-11-19  9:19       ` Juan Quintela
2014-11-19  9:33         ` Michael S. Tsirkin
2014-11-19 10:11           ` Juan Quintela
2014-11-19 10:21             ` Michael S. Tsirkin
2014-11-19 10:45               ` Juan Quintela
2014-11-19 13:28                 ` Michael S. Tsirkin
2014-11-19 13:44                   ` Paolo Bonzini
2014-11-19 13:57                     ` Juan Quintela
2014-11-19 14:13                       ` Dr. David Alan Gilbert
2014-11-19 14:22                         ` Paolo Bonzini
2014-11-19 14:26                           ` Dr. David Alan Gilbert
2014-11-19 14:28                             ` Paolo Bonzini
2014-11-19 14:59                               ` Dr. David Alan Gilbert
2014-11-19 15:38                                 ` Michael S. Tsirkin
2014-11-19 15:53                                   ` Dr. David Alan Gilbert
2014-11-19 14:22                         ` Juan Quintela
2014-11-19 14:20                       ` Paolo Bonzini
2014-11-19 16:39                         ` Juan Quintela
2014-11-19 16:56                           ` Paolo Bonzini
2014-11-19 16:27                     ` Kevin O'Connor
2014-11-19 17:01                       ` Paolo Bonzini
2014-11-20  8:12                         ` Gerd Hoffmann
2014-11-20 10:00                           ` Paolo Bonzini
2014-11-19 13:49                   ` Juan Quintela
2014-11-19 13:51                     ` Paolo Bonzini
2014-11-19 14:03                       ` Juan Quintela
2014-11-19 14:11                         ` Paolo Bonzini
2014-11-19 14:16                           ` Dr. David Alan Gilbert
2014-11-19 14:28                             ` Paolo Bonzini
2014-11-19 14:20                           ` Juan Quintela
2014-11-19 15:43                             ` Michael S. Tsirkin
2014-11-19 10:16           ` Markus Armbruster
2014-11-19 10:30             ` Michael S. Tsirkin
2014-11-19 10:50               ` Juan Quintela
2014-11-19 13:36                 ` Michael S. Tsirkin
2014-11-19 13:51                   ` Juan Quintela
2014-11-19 15:46                     ` Michael S. Tsirkin
2014-11-19 16:45                       ` Juan Quintela
2014-11-19 18:28                         ` Paolo Bonzini
2014-11-20 13:35               ` Markus Armbruster
2014-11-20 14:04                 ` Michael S. Tsirkin
2014-11-24 13:48                   ` Paolo Bonzini
2014-11-19 13:58   ` Peter Maydell
2014-11-19 14:07     ` Juan Quintela
2014-11-19 14:10       ` Peter Maydell
2014-11-19 14:18         ` Juan Quintela
2014-11-19 16:08           ` Stefan Hajnoczi
2014-11-19 14:19         ` Paolo Bonzini
2014-11-19 14:21           ` Peter Maydell
2014-11-19 14:30             ` Paolo Bonzini
2014-11-19 15:16               ` Michael S. Tsirkin
2014-11-19 16:50           ` Juan Quintela
2014-11-19 15:12         ` Michael S. Tsirkin
2014-11-19 15:04     ` Michael S. Tsirkin
2014-11-17 20:08 ` [Qemu-devel] [PATCH 3/5] arch_init: support resizing on incoming migration Michael S. Tsirkin
2014-11-17 20:08 ` [Qemu-devel] [PATCH 4/5] memory: interface to allocate device ram Michael S. Tsirkin
2014-11-17 20:21   ` Peter Maydell
2014-11-18 11:54     ` Michael S. Tsirkin
2014-11-17 20:09 ` [Qemu-devel] [PATCH 5/5] acpi-build: make ROMs device RAM, make them resizeable Michael S. Tsirkin
2014-11-17 20:11 ` [Qemu-devel] [PATCH 0/5] pc: make ROMs resizeable Michael S. Tsirkin
2014-11-19  7:29   ` Amit Shah
2014-11-18 14:47 ` Markus Armbruster
2014-11-18 15:00   ` Michael S. Tsirkin
2014-11-19  8:16     ` Markus Armbruster
2014-11-19 13:41       ` Michael S. Tsirkin
2014-11-19  7:31 ` Amit Shah
2014-11-19  8:15   ` Michael S. Tsirkin
2014-11-19  8:22     ` Amit Shah
2014-11-19 13:33       ` Michael S. Tsirkin
2014-11-19 13:52         ` Juan Quintela
2014-11-19 16:01           ` Michael S. Tsirkin
2014-11-19 13:52   ` Peter Maydell
2014-11-19 14:41     ` Paolo Bonzini
2014-11-19 15:34       ` Michael S. Tsirkin
2014-11-19 16:40       ` Juan Quintela

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.