mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
virtio,acpi: features, fixes, cleanups.
vdpa support virtio-mem support a handy script for disassembling acpi tables misc fixes and cleanups Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAl8EY+MPHG1zdEByZWRo YXQuY29tAAoJECgfDbjSjVRpOMkIAMMhfbzZXlwv1xiQ/pMTtEqXDnLeic7NK6xF RJkAFlMM+eEXBRZLYJXhPAFjneTA813vR0xlygHn2pYhCF3ozTfLqEABfQsG0w+d VDSYTnFHAx2GwGGQBNYltsIs+8lAADYhlo9VG/qC5nAsNaoVBeTJLuF96un1WGDz vWH0Cx/AG+yhiKvlSHA/CCSXMVGVTkRfUCjGF8Yq0mVtx23OZ9blQkJRkGfHWctB GxQlh/b+4YLaXhy+V1+/Iu2U45KgKN7qrsyKvHBMgKd2qazowr/D8Aexh4hN/eg5 jibmxurDHXze+VUDCySy6qLBBySNkz++qLKfPOQ0iszDHLXQzOQ= =H/KL -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging virtio,acpi: features, fixes, cleanups. vdpa support virtio-mem support a handy script for disassembling acpi tables misc fixes and cleanups Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 07 Jul 2020 13:00:35 BST # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: (41 commits) vhost-vdpa: introduce vhost-vdpa net client vhost-vdpa: introduce vhost-vdpa backend vhost_net: introduce set_config & get_config vhost: implement vhost_force_iommu method vhost: introduce new VhostOps vhost_force_iommu vhost: implement vhost_vq_get_addr method vhost: introduce new VhostOps vhost_vq_get_addr vhost: implement vhost_dev_start method vhost: introduce new VhostOps vhost_dev_start vhost: check the existence of vhost_set_iotlb_callback virtio-pci: implement queue_enabled method virtio-bus: introduce queue_enabled method vhost_net: use the function qemu_get_peer net: introduce qemu_get_peer MAINTAINERS: add VT-d entry docs: vhost-user: add Virtio status protocol feature tests/acpi: remove stale allowed tables numa: Auto-enable NUMA when any memory devices are possible virtio-mem: Exclude unplugged memory during migration virtio-mem: Add trace events ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org> # Conflicts: # hw/arm/virt.c # hw/virtio/trace-events
This commit is contained in:
commit
c8eaf81fd2
67 changed files with 2639 additions and 169 deletions
|
|
@ -338,12 +338,18 @@ bool migration_incoming_colo_enabled(void)
|
|||
|
||||
void migration_incoming_disable_colo(void)
|
||||
{
|
||||
ram_block_discard_disable(false);
|
||||
migration_colo_enabled = false;
|
||||
}
|
||||
|
||||
void migration_incoming_enable_colo(void)
|
||||
int migration_incoming_enable_colo(void)
|
||||
{
|
||||
if (ram_block_discard_disable(true)) {
|
||||
error_report("COLO: cannot disable RAM discard");
|
||||
return -EBUSY;
|
||||
}
|
||||
migration_colo_enabled = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void migrate_add_address(SocketAddress *address)
|
||||
|
|
@ -1772,6 +1778,13 @@ bool migration_in_postcopy_after_devices(MigrationState *s)
|
|||
return migration_in_postcopy() && s->postcopy_after_devices;
|
||||
}
|
||||
|
||||
bool migration_in_incoming_postcopy(void)
|
||||
{
|
||||
PostcopyState ps = postcopy_state_get();
|
||||
|
||||
return ps >= POSTCOPY_INCOMING_DISCARD && ps < POSTCOPY_INCOMING_END;
|
||||
}
|
||||
|
||||
bool migration_is_idle(void)
|
||||
{
|
||||
MigrationState *s = current_migration;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#include "qemu/notify.h"
|
||||
#include "qemu/rcu.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/balloon.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "trace.h"
|
||||
#include "hw/boards.h"
|
||||
|
|
@ -520,20 +519,6 @@ int postcopy_ram_incoming_init(MigrationIncomingState *mis)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Manage a single vote to the QEMU balloon inhibitor for all postcopy usage,
|
||||
* last caller wins.
|
||||
*/
|
||||
static void postcopy_balloon_inhibit(bool state)
|
||||
{
|
||||
static bool cur_state = false;
|
||||
|
||||
if (state != cur_state) {
|
||||
qemu_balloon_inhibit(state);
|
||||
cur_state = state;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* At the end of a migration where postcopy_ram_incoming_init was called.
|
||||
*/
|
||||
|
|
@ -565,8 +550,6 @@ int postcopy_ram_incoming_cleanup(MigrationIncomingState *mis)
|
|||
mis->have_fault_thread = false;
|
||||
}
|
||||
|
||||
postcopy_balloon_inhibit(false);
|
||||
|
||||
if (enable_mlock) {
|
||||
if (os_mlock() < 0) {
|
||||
error_report("mlock: %s", strerror(errno));
|
||||
|
|
@ -1160,12 +1143,6 @@ int postcopy_ram_incoming_setup(MigrationIncomingState *mis)
|
|||
}
|
||||
memset(mis->postcopy_tmp_zero_page, '\0', mis->largest_page_size);
|
||||
|
||||
/*
|
||||
* Ballooning can mark pages as absent while we're postcopying
|
||||
* that would cause false userfaults.
|
||||
*/
|
||||
postcopy_balloon_inhibit(true);
|
||||
|
||||
trace_postcopy_ram_enable_notify();
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "qemu/sockets.h"
|
||||
#include "qemu/bitmap.h"
|
||||
#include "qemu/coroutine.h"
|
||||
#include "exec/memory.h"
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/inet.h>
|
||||
|
|
@ -4016,8 +4017,14 @@ void rdma_start_incoming_migration(const char *host_port, Error **errp)
|
|||
Error *local_err = NULL;
|
||||
|
||||
trace_rdma_start_incoming_migration();
|
||||
rdma = qemu_rdma_data_init(host_port, &local_err);
|
||||
|
||||
/* Avoid ram_block_discard_disable(), cannot change during migration. */
|
||||
if (ram_block_discard_is_required()) {
|
||||
error_setg(errp, "RDMA: cannot disable RAM discard");
|
||||
return;
|
||||
}
|
||||
|
||||
rdma = qemu_rdma_data_init(host_port, &local_err);
|
||||
if (rdma == NULL) {
|
||||
goto err;
|
||||
}
|
||||
|
|
@ -4066,10 +4073,17 @@ void rdma_start_outgoing_migration(void *opaque,
|
|||
const char *host_port, Error **errp)
|
||||
{
|
||||
MigrationState *s = opaque;
|
||||
RDMAContext *rdma = qemu_rdma_data_init(host_port, errp);
|
||||
RDMAContext *rdma_return_path = NULL;
|
||||
RDMAContext *rdma;
|
||||
int ret = 0;
|
||||
|
||||
/* Avoid ram_block_discard_disable(), cannot change during migration. */
|
||||
if (ram_block_discard_is_required()) {
|
||||
error_setg(errp, "RDMA: cannot disable RAM discard");
|
||||
return;
|
||||
}
|
||||
|
||||
rdma = qemu_rdma_data_init(host_port, errp);
|
||||
if (rdma == NULL) {
|
||||
goto err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2111,8 +2111,15 @@ static int loadvm_handle_recv_bitmap(MigrationIncomingState *mis,
|
|||
|
||||
static int loadvm_process_enable_colo(MigrationIncomingState *mis)
|
||||
{
|
||||
migration_incoming_enable_colo();
|
||||
return colo_init_ram_cache();
|
||||
int ret = migration_incoming_enable_colo();
|
||||
|
||||
if (!ret) {
|
||||
ret = colo_init_ram_cache();
|
||||
if (ret) {
|
||||
migration_incoming_disable_colo();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue