Enable HMP access to the cprsave QMP command.
Usage: cprsave
Signed-off-by: Maran Wilson
Signed-off-by: Steve Sistare
---
hmp-commands.hx | 18 ++
include/monitor/hmp.h | 1 +
monitor/hmp-cmds.c| 10 ++
3 files changed, 29 insertions(+)
diff --git a/hmp
drivers suspend methods flush
outstanding requests and re-initialize the devices, and thus there is no
device state to save and restore.
Signed-off-by: Steve Sistare
Signed-off-by: Maran Wilson
---
include/migration/vmstate.h | 1 +
include/sysemu/sysemu.h | 2 ++
migration/block.c
Provide the SAVEVM_FOREACH and SAVEVM_FORALL macros to loop over all save
VM state handlers. The former will filter handlers based on the operation
in the later patch "savevm: VM handlers mode mask". The latter loops over
all handlers.
No functional change.
Signed-off-by: Ste
Enable HMP access to the cprinfo QMP command.
Usage: cprinfo
Signed-off-by: Steve Sistare
---
hmp-commands.hx | 13 +
include/monitor/hmp.h | 1 +
monitor/hmp-cmds.c| 10 ++
3 files changed, 24 insertions(+)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index
trace_vfio_descriptors
trace_ram_block_add
Signed-off-by: Steve Sistare
---
accel/kvm/kvm-all.c| 8 ++--
accel/kvm/trace-events | 3 ++-
exec.c | 3 +++
hw/pci/msix.c | 1 +
hw/pci/pci.c | 10 ++
hw/pci/trace-events| 5 +++--
hw/vfio
Provide the cprinfo QMP command. This returns a string with a space-
separated list of modes supported by cprsave, and can be used by clients
as a feature test to check if the running QEMU instance supports cprsave.
Syntax:
{'command':'cprinfo', 'returns':'str'}
Signed-off-by: Steve Sistare
Signed-off-by: Steve Sistare
---
include/qemu/osdep.h | 1 +
util/oslib-posix.c | 9 +
util/oslib-win32.c | 4
3 files changed, 14 insertions(+)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 45c217a..bb28df1 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu
From: Mark Kanda
Add an fd argument to qio_channel_socket_accept. If not -1, the channel
uses that fd instead of accepting a new socket connection. All callers
pass -1 in this patch, so no functional change.
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
include/io/channel
If stdin is is a char backend device, then restore original stdin terminal
settings in before re-exec'ing. Otherwise, the new qemu sees the modified
settings as initial settings, and does not restore the true initial settings
when it exits.
Signed-off-by: Steve Sistare
---
chardev/char-stdio.c
Save and restore pty descriptors across cprsave and cprload.
Signed-off-by: Steve Sistare
---
chardev/char-pty.c | 38 +++---
chardev/char.c | 2 ++
include/chardev/char.h | 1 +
3 files changed, 30 insertions(+), 11 deletions(-)
diff --git
state of the device. However, the reconstruction is not complete until
cprload is called, and vfio_pci_post_load uses the msi data to rebuild
interrupt structures and attach the interrupts to the new KVM instance.
Lastly, vfio device reset is suppressed when the VM is started.
Signed-off-by: Steve
lid)
return; <-- instead, return here
kvm_update_clock()
kvm_vm_ioctl(kvm_state, KVM_GET_CLOCK, ) <-- overwritten
Signed-off-by: Steve Sistare
---
hw/i386/kvm/clock.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/i386/kvm/clo
cprsave and cprload require that guest ram be backed by an externally
visible shared file. Check that in cprsave.
Signed-off-by: Steve Sistare
---
exec.c| 32
include/exec/memory.h | 2 ++
migration/savevm.c| 4
3 files changed, 38
Add new trace points trace_vfio_pci_config and trace_vfio_msix_table to dump
PCI config space and MSI data.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.c| 99
hw/vfio/trace-events | 2 ++
2 files changed, 101 insertions(+)
diff
to suspended in
qemu_system_suspend did not disable ticks. To fix, call cpu_disable_ticks
from save_cpr_snapshot.
Signed-off-by: Steve Sistare
---
migration/savevm.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/migration/savevm.c b/migration/savevm.c
index f101039..00f493b 100644
Add functions for saving fd's and ram extents in the environment via
setenv, and for reading them back via getenv.
Signed-off-by: Steve Sistare
Signed-off-by: Mark Kanda
---
MAINTAINERS | 7 +++
include/qemu/cutils.h | 1 +
include/qemu/env.h| 31
util
operations. If the VM was running at cprsave time, then VM execution
resumes.
Syntax:
{'command':'cprload', 'data':{'file':'str'}}
Signed-off-by: Steve Sistare
Signed-off-by: Maran Wilson
---
include/sysemu/sysemu.h | 2 ++
migration/savevm.c | 34 ++
monitor
the (typically updated) qemu binary with the
original argv.
On qemu restart, ram_block_add() finds the env vars that describe preserved
RAM segments and does not reallocate them.
Signed-off-by: Steve Sistare
---
exec.c| 36 ++--
include/exec/memory.h | 2
From: Mark Kanda
Iterate through the VNC displays and save/restore the socket fds.
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
include/sysemu/sysemu.h | 2 +
migration/savevm.c | 3 +
ui/vnc.c| 153 +++-
3
From: Mark Kanda
Save and restore QMP compatibility negotiation status across cprsave and
cprload.
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
include/sysemu/sysemu.h | 1 +
migration/savevm.c | 1 +
monitor/qmp.c | 42
Modify the gdb server so a continue command appears to resume execution
when in RUN_STATE_SUSPENDED. Do not print the next gdb prompt, but do not
actually resume instruction fetch. While in this "fake" running mode, a
ctrl-C returns the user to the gdb prompt.
Signed-off-by: Ste
. To fix, reset the
owner prior to exec.
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
hw/virtio/vhost.c | 12
include/sysemu/sysemu.h | 1 +
migration/savevm.c | 1 +
3 files changed, 14 insertions(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index
|
VM status: running |
Mark Kanda (5):
char: qio_channel_socket_accept reuse fd
char: save/restore chardev socket fds
ui: save/restore vnc socket fds
monitor: save/restore QMP negotiation status
vhost: reset vhost devices upon cprsave
Steve Sistare
Enable HMP access to the cprload QMP command.
Usage: cprload
Signed-off-bu: Maran Wilson
Signed-off-by: Steve Sistare
---
hmp-commands.hx | 13 +
include/monitor/hmp.h | 1 +
monitor/hmp-cmds.c| 8
3 files changed, 22 insertions(+)
diff --git a/hmp
memory. Subsequent patches complete its implementation.
Signed-off-by: Steve Sistare
---
hmp-commands.hx | 4 +++-
include/migration/vmstate.h | 1 +
migration/savevm.c | 4 +++-
monitor/qmp-cmds.c | 2 +-
qapi/migration.json | 1 +
5 files changed, 9
-by: Steve Sistare
---
qemu-options.hx | 9 +
softmmu/vl.c| 15 ++-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index 708583b..8505cf2 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3668,6 +3668,15 @@ SRST
. If
QEMU_START_FREEZE is set, then set autostart=0, like the -S option.
Signed-off-by: Steve Sistare
---
softmmu/vl.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 951994f..7016e39 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -4501,6 +4501,11 @@ void qemu_init(int
Massage the code to simplify the later patch "exec, memory: exec(3) to
restart".
No functional change.
Signed-off-by: Steve Sistare
---
exec.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/exec.c b/exec.c
index 02160e0..359e437 100644
--
-by: Steve Sistare
---
include/sysemu/sysemu.h | 1 +
softmmu/vl.c| 30 ++
2 files changed, 31 insertions(+)
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 5360da5..4dfc4ca 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
Allow pci_update_mappings to be called from other modules.
No change in functionality.
Signed-off-by: Steve Sistare
---
hw/pci/pci.c | 3 +--
include/hw/pci/pci.h | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index de0fae1..7343e00
by
SAVEVM_FOREACH if its mask includes the savevm_state.mode. Unmodified
handler declarations have a zero mask field, which implicitly enables the
handler for all modes.
No functional change for the VMS_MIGRATE and VMS_SNAPSHOT modes.
Signed-off-by: Steve Sistare
---
include/migration/register.h | 3
/
Signed-off-by: Steve Sistare
---
include/qemu/osdep.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index bb28df1..7ce555a 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -390,6 +390,11 @@ void qemu_anon_ram_free(void *ptr, size_t
From: Mark Kanda
Iterate through the character devices and save/restore the socket fds.
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
chardev/char-socket.c | 35 +++
chardev/char.c | 14 ++
include/chardev/char.h | 5
Modify the gdb server so a continue command appears to resume execution
when in RUN_STATE_SUSPENDED. Do not print the next gdb prompt, but do not
actually resume instruction fetch. While in this "fake" running mode, a
ctrl-C returns the user to the gdb prompt.
Signed-off-by: Ste
) signal SIGCONT
Breakpoint 1, rcu_init () at util/rcu.c:380
Signed-off-by: Steve Sistare
---
qemu-options.hx | 14 ++
softmmu/vl.c| 32
2 files changed, 46 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
x4000 ":3a:10.0 base BAR 3"
Signed-off-by: Steve Sistare
---
accel/kvm/kvm-all.c| 8 ++--
accel/kvm/trace-events | 3 ++-
exec.c | 3 +++
hw/pci/msix.c | 1 +
hw/pci/pci.c | 10 ++
hw/pci/trace-events| 5 +++--
hw/vfio/common
Modify the gdb server so a continue command appears to resume execution
when in RUN_STATE_SUSPENDED. Do not print the next gdb prompt, but do not
actually resume instruction fetch. While in this "fake" running mode, a
ctrl-C returns the user to the gdb prompt.
Signed-off-by: Ste
to Daniel P. Berrange for suggesting SIGSTOP.
Signed-off-by: Steve Sistare
---
qemu-options.hx | 14 ++
softmmu/vl.c| 23 +++
2 files changed, 37 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index 708583b..42edd70 100644
--- a/qemu-options.hx
-by: Steve Sistare
---
include/sysemu/sysemu.h | 1 +
softmmu/vl.c| 30 ++
2 files changed, 31 insertions(+)
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 408eb56..2ab9f95 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
Factor out the post-accept actions into a subroutine that can be used in a
subsequent patch. No functional change.
Signed-off-by: Steve Sistare
---
io/channel-socket.c | 43 ---
1 file changed, 24 insertions(+), 19 deletions(-)
diff --git a/io/channel
Use qf_file_open to simplify a few functions in savevm.c.
No functional change.
Signed-off-by: Steve Sistare
---
migration/savevm.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index a843d20..994ad1a 100644
Add the maintainers for cpr related files.
Signed-off-by: Steve Sistare
---
MAINTAINERS | 11 +++
1 file changed, 11 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 0886eb3..93044e7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2631,6 +2631,17 @@ F: net/colo*
F: net/filter
Define qemu_clr_cloexec, analogous to qemu_set_cloexec.
Reviewed-by: Dr. David Alan Gilbert
Signed-off-by: Steve Sistare
---
include/qemu/osdep.h | 1 +
util/oslib-posix.c | 9 +
util/oslib-win32.c | 4
3 files changed, 14 insertions(+)
diff --git a/include/qemu/osdep.h b
Add functions for saving fd's and other values in the environment via
setenv, and for reading them back via getenv.
Signed-off-by: Steve Sistare
Signed-off-by: Mark Kanda
---
include/qemu/env.h | 27
util/Makefile.objs | 2 +-
util/env.c | 119
Export vfio_address_spaces and vfio_listener_skipped_section.
Add optional eventfd arg to vfio_add_kvm_msi_virq.
Refactor vector use into a helper vfio_vector_init.
All for use by cpr in a subsequent patch. No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/common.c
Save and restore pty descriptors across cprsave and cprload.
Signed-off-by: Steve Sistare
---
chardev/char-pty.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/chardev/char-pty.c b/chardev/char-pty.c
index 1cc501a..0916f9e 100644
--- a/chardev/char-pty.c
prior to exec.
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
hw/virtio/vhost.c | 11 +++
include/hw/virtio/vhost.h | 1 +
migration/cpr.c | 1 +
3 files changed, 13 insertions(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 1a1384e..42aa44c
Add QEMU_CHAR_FEATURE_CPR for devices that support cpr.
Add the chardev close_on_cpr option for devices that can be closed on cpr
and reopened after exec.
cpr is allowed only if either QEMU_CHAR_FEATURE_CPR or close_on_cpr is set
for all chardevs in the configuration.
Signed-off-by: Steve Sistare
.
Signed-off-by: Steve Sistare
---
exec.c | 6 +-
include/migration/cpr.h | 17 +
include/sysemu/sysemu.h | 1 +
migration/Makefile.objs | 2 +-
migration/cpr.c | 187
migration/savevm.h | 2 +
softmmu/vl.c
Set QEMU_CHAR_FEATURE_CPR for devices that trivially support cpr.
char-stdio is slightly less trivial. Allow the gdb server by
closing it on exec.
Signed-off-by: Steve Sistare
---
chardev/char-mux.c | 1 +
chardev/char-null.c| 1 +
chardev/char-serial.c | 1 +
chardev/char-stdio.c
Add the only-cpr-capable option, which causes qemu to exit with an error
if any devices that are not capable of cpr are added. This guarantees that
a cprsave operation will not fail with an unsupported device error.
Signed-off-by: Steve Sistare
---
chardev/char-socket.c | 1 +
exec.c
refactor all patches into a shorter and easier to review series
Steve Sistare (17):
as_flat_walk
qemu_ram_volatile
oslib: qemu_clr_cloexec
util: env var helpers
vl: memfd-alloc option
vl: add helper to request re-exec
cpr
pci: export functions for cpr
vfio-pci: refactor for cpr
vfi
e.
Arguments: none
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
hmp-commands.hx | 44
include/monitor/hmp.h | 3 +++
monitor/hmp-cmds.c| 48
3 files changed, 95 insertions(
VFIO_DMA_MAP_FLAG_RESUME to
inform the kernel of the new VA's. Lastly, it starts the VM and suppresses
vfio device reset.
Signed-off-by: Steve Sistare
---
hw/pci/pci.c | 4 +
hw/vfio/Makefile.objs | 2 +-
hw/vfio/common.c | 59 +-
hw/vfio/cpr.c
-by: Mark Kanda
Signed-off-by: Steve Sistare
---
include/monitor/monitor.h | 2 ++
migration/cpr.c | 2 ++
monitor/monitor.c | 5 +
monitor/qmp.c | 43 +++
4 files changed, 52 insertions(+)
diff --git a/include/monitor
Signed-off-by: Steve Sistare
---
chardev/char-socket.c | 30 ++
include/io/channel-socket.h | 12
io/channel-socket.c | 9 +
stubs/Makefile.objs | 1 +
stubs/cpr.c | 3 +++
5 files changed, 55 insertions
Export msix_is_pending and msix_init_vector_notifiers for use by cpr.
No functional change.
Signed-off-by: Steve Sistare
---
hw/pci/msix.c | 20 ++--
hw/pci/pci.c | 3 +--
include/hw/pci/msix.h | 5 +
include/hw/pci/pci.h | 1 +
4 files changed, 21
Allocate anonymous memory using memfd_create if the memfd-alloc option is
set.
Signed-off-by: Steve Sistare
---
exec.c | 38 ++
include/sysemu/sysemu.h | 1 +
qemu-options.hx | 11 +++
softmmu/vl.c| 4
trace
. Syntax:
{ 'struct': 'CprInfo', 'data': { 'modes': [ 'CprMode' ] } }
{ 'command': 'cprinfo', 'returns': 'CprInfo' }
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
monitor/qmp-cmds.c| 31 +++
qapi/Makefile.objs| 3 ++-
qapi/cpr.json | 68
Add a function that returns true if any ram_list block represents
volatile memory.
Signed-off-by: Steve Sistare
---
exec.c| 30 ++
include/exec/memory.h | 8
slirp | 2 +-
3 files changed, 39 insertions(+), 1 deletion
Add an iterator over the sections of a flattened address space.
Signed-off-by: Steve Sistare
---
include/exec/memory.h | 3 +++
softmmu/memory.c | 17 +
2 files changed, 20 insertions(+)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 307e527..8dba065
instead of defining new ones
- close monitor socket during cpr
- support memory-backend-memfd
- fix a few unreported bugs
Steve Sistare (18):
as_flat_walk
qemu_ram_volatile
oslib: qemu_clr_cloexec
util: env var helpers
machine: memfd-alloc option
vl: add helper to request re-exec
Allocate anonymous memory using memfd_create if the memfd-alloc machine
option is set.
Signed-off-by: Steve Sistare
---
hw/core/machine.c | 19 +++
include/hw/boards.h | 1 +
qemu-options.hx | 5 +
softmmu/physmem.c | 41
Add functions for saving fd's and other values in the environment via
setenv, and for reading them back via getenv.
Signed-off-by: Steve Sistare
---
include/qemu/env.h | 23 +
util/env.c | 99 ++
util/meson.build | 1
-by: Steve Sistare
---
include/sysemu/runstate.h | 1 +
include/sysemu/sysemu.h | 1 +
softmmu/globals.c | 1 +
softmmu/runstate.c| 28
softmmu/vl.c | 1 +
5 files changed, 32 insertions(+)
diff --git a/include/sysemu/runstate.h b/include
Add the only-cpr-capable option, which causes qemu to exit with an error
if any devices that are not capable of cpr are added. This guarantees that
a cprsave operation will not fail with an unsupported device error.
Signed-off-by: Steve Sistare
---
chardev/char-socket.c | 4
hw/vfio
Add the maintainers for cpr related files.
Signed-off-by: Steve Sistare
---
MAINTAINERS | 11 +++
1 file changed, 11 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 36055f1..b69bbf5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2843,6 +2843,17 @@ F: net/colo*
F: net/filter
Define qemu_clr_cloexec, analogous to qemu_set_cloexec.
Reviewed-by: Dr. David Alan Gilbert
Signed-off-by: Steve Sistare
---
include/qemu/osdep.h | 1 +
util/oslib-posix.c | 9 +
util/oslib-win32.c | 4
3 files changed, 14 insertions(+)
diff --git a/include/qemu/osdep.h b
Export vfio_address_spaces and vfio_listener_skipped_section.
Add optional eventfd arg to vfio_add_kvm_msi_virq.
Refactor vector use into a helper vfio_vector_init.
All for use by cpr in a subsequent patch. No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/common.c
Preserve memory-backend-memfd memory objects during cpr.
Signed-off-by: Steve Sistare
---
backends/hostmem-memfd.c | 21 -
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c
index 69b0ae3..3503c89 100644
Add a function that returns true if any ram_list block represents
volatile memory.
Signed-off-by: Steve Sistare
---
include/exec/memory.h | 8
softmmu/memory.c | 30 ++
2 files changed, 38 insertions(+)
diff --git a/include/exec/memory.h b/include
Add QEMU_CHAR_FEATURE_CPR for devices that support cpr.
Add the chardev close_on_cpr option for devices that can be closed on cpr
and reopened after exec.
cpr is allowed only if either QEMU_CHAR_FEATURE_CPR or close_on_cpr is set
for all chardevs in the configuration.
Signed-off-by: Steve Sistare
Finish cpr for vfio-pci by preserving eventfd's and vector state.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.c | 110 --
1 file changed, 108 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index f7ac9f03
VFIO_DMA_MAP_FLAG_VADDR to
inform the kernel of the new VA's. Lastly, it starts the VM and suppresses
vfio device reset.
This functionality is delivered by 2 patches for clarity. Part 2 adds
eventfd and vector support.
Signed-off-by: Steve Sistare
---
hw/pci/msi.c | 4 ++
hw/pci/pci.c
patch.
Signed-off-by: Steve Sistare
---
include/migration/cpr.h | 17 +
include/sysemu/runstate.h | 1 +
migration/cpr.c | 188 ++
migration/meson.build | 1 +
migration/savevm.h| 2 +
softmmu/physmem.c | 6
. Syntax:
{ 'struct': 'CprInfo', 'data': { 'modes': [ 'CprMode' ] } }
{ 'command': 'cprinfo', 'returns': 'CprInfo' }
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
monitor/qmp-cmds.c| 31 +
qapi/cpr.json | 76
Add an iterator over the sections of a flattened address space.
Signed-off-by: Steve Sistare
---
include/exec/memory.h | 17 +
softmmu/memory.c | 18 ++
2 files changed, 35 insertions(+)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index
Use qf_file_open to simplify a few functions in savevm.c.
No functional change.
Signed-off-by: Steve Sistare
---
migration/savevm.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index 52e2d72..d02bce2 100644
e.
Arguments: none
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
hmp-commands.hx | 44
include/monitor/hmp.h | 3 +++
monitor/hmp-cmds.c| 48
3 files changed, 95 insertions(
Save accepted socket fds in the environment before cprsave, and look for
fds in the environment after cprload. Reject cprsave if a socket enables
the TLS or websocket option. Allow a monitor socket by closing it on exec.
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
chardev/char
prior to exec.
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
hw/virtio/vhost.c | 11 +++
include/hw/virtio/vhost.h | 1 +
migration/cpr.c | 1 +
3 files changed, 13 insertions(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index e2163a0..8c0c9c3
Export msix_is_pending and msix_init_vector_notifiers for use by cpr.
No functional change.
Signed-off-by: Steve Sistare
---
hw/pci/msix.c | 20 ++--
hw/pci/pci.c | 3 +--
include/hw/pci/msix.h | 5 +
include/hw/pci/pci.h | 1 +
4 files changed, 21
Save and restore pty descriptors across cprsave and cprload.
Signed-off-by: Steve Sistare
---
chardev/char-pty.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/chardev/char-pty.c b/chardev/char-pty.c
index a2d1e7c..c91151d 100644
--- a/chardev/char-pty.c
Set QEMU_CHAR_FEATURE_CPR for devices that trivially support cpr.
char-stdio is slightly less trivial. Allow the gdb server by
closing it on exec.
Signed-off-by: Steve Sistare
---
chardev/char-mux.c | 1 +
chardev/char-null.c| 1 +
chardev/char-serial.c | 1 +
chardev/char-stdio.c
Save and restore pty descriptors across cprsave and cprload.
Signed-off-by: Steve Sistare
---
chardev/char-pty.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/chardev/char-pty.c b/chardev/char-pty.c
index a2d1e7c..c91151d 100644
--- a/chardev/char-pty.c
VFIO_DMA_MAP_FLAG_VADDR to
inform the kernel of the new VA's. Lastly, it starts the VM and suppresses
vfio device reset.
This functionality is delivered by 2 patches for clarity. Part 2 adds
eventfd and vector support.
Signed-off-by: Steve Sistare
---
MAINTAINERS | 1 +
hw
: export functions for cpr
vfio-pci: refactor for cpr
vfio-pci: cpr part 1
vfio-pci: cpr part 2
hostmem-memfd: cpr support
chardev: cpr framework
chardev: cpr for simple devices
chardev: cpr for pty
cpr: only-cpr-capable option
simplify savevm
Mark Kanda, Steve Sistare (4):
cpr: QMP
Export vfio_address_spaces and vfio_listener_skipped_section.
Add optional eventfd arg to vfio_add_kvm_msi_virq.
Refactor vector use into a helper vfio_vector_init.
All for use by cpr in a subsequent patch. No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/common.c
cprexec calls cprexec(). Syntax:
{ 'command': 'cprexec', 'data': { 'argv': [ 'str' ] } }
Add the restart mode:
{ 'enum': 'CprMode', 'data': [ 'reboot', 'restart' ] }
Signed-off-by: Steve Sistare
---
monitor/qmp-cmds.c | 5 +
qapi/cpr.json | 16 +++-
2 files changed
with new virtual addresses in the qemu
process.
The restart mode supports vfio devices in a subsequent patch.
Signed-off-by: Steve Sistare
---
migration/cpr.c | 21 +
softmmu/physmem.c | 6 +-
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/migration
Add the only-cpr-capable option, which causes qemu to exit with an error
if any devices that are not capable of cpr are added. This guarantees that
a cprexec operation will not fail with an unsupported device error.
Signed-off-by: Steve Sistare
---
MAINTAINERS | 1 +
chardev/char
ents: none
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
hmp-commands.hx | 44
include/monitor/hmp.h | 3 +++
monitor/hmp-cmds.c| 48
3 files changed, 95 insertions(+)
diff -
Finish cpr for vfio-pci by preserving eventfd's and vector state.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.c | 118 +-
1 file changed, 116 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 0f5c542..07bd360
execution resumes. If the VM was suspended at cprsave time, then
the caller must issue a system_wakeup command to resume.
Signed-off-by: Steve Sistare
---
MAINTAINERS | 7 +++
include/migration/cpr.h | 17 ++
include/sysemu/runstate.h | 1 +
migration/cpr.c | 149
Export msix_is_pending, msix_init_vector_notifiers, and pci_update_mappings
for use by cpr. No functional change.
Signed-off-by: Steve Sistare
---
hw/pci/msix.c | 20 ++--
hw/pci/pci.c | 3 +--
include/hw/pci/msix.h | 5 +
include/hw/pci/pci.h | 1 +
4
Add an iterator over the sections of a flattened address space.
Signed-off-by: Steve Sistare
---
include/exec/memory.h | 17 +
softmmu/memory.c | 18 ++
2 files changed, 35 insertions(+)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index
:
{ 'struct': 'CprInfo', 'data': { 'modes': [ 'CprMode' ] } }
{ 'command': 'cprinfo', 'returns': 'CprInfo' }
Signed-off-by: Mark Kanda
Signed-off-by: Steve Sistare
---
MAINTAINERS | 1 +
monitor/qmp-cmds.c| 31 +
qapi/cpr.json | 74
cprsave
mode may be "restart"
cprexec
Call cprexec().
Arguments:
command : command line to execute, with space-separated arguments
Signed-off-by: Steve Sistare
---
hmp-commands.hx | 20 +++-
include/monitor/hmp.h | 1 +
monitor/hmp-cmds
Add functions for saving fd's and other values in the environment via
setenv, and for reading them back via getenv.
Signed-off-by: Steve Sistare
---
MAINTAINERS| 2 ++
include/qemu/env.h | 23 +
util/env.c | 95
Set QEMU_CHAR_FEATURE_CPR for devices that trivially support cpr.
char-stdio is slightly less trivial. Allow the gdb server by
closing it on exec.
Signed-off-by: Steve Sistare
---
chardev/char-mux.c | 1 +
chardev/char-null.c| 1 +
chardev/char-serial.c | 1 +
chardev/char-stdio.c
1 - 100 of 595 matches
Mail list logo