Showing with 3,246 additions and 2,386 deletions.
  1. +1 −0 .gitlab-ci.d/container-cross.yml
  2. +3 −1 MAINTAINERS
  3. +21 −14 accel/kvm/kvm-all.c
  4. +7 −2 accel/stubs/kvm-stub.c
  5. +84 −36 block.c
  6. +1 −0 block/backup.c
  7. +8 −1 block/block-backend.c
  8. +2 −0 block/bochs.c
  9. +2 −0 block/cloop.c
  10. +1 −0 block/commit.c
  11. +1 −1 block/copy-before-write.c
  12. +4 −4 block/copy-on-read.c
  13. +1 −3 block/crypto.c
  14. +2 −0 block/curl.c
  15. +2 −0 block/dmg.c
  16. +4 −0 block/export/export.c
  17. +2 −0 block/gluster.c
  18. +2 −1 block/graph-lock.c
  19. +64 −79 block/io.c
  20. +2 −0 block/iscsi.c
  21. +5 −5 block/mirror.c
  22. +5 −0 block/monitor/block-hmp-cmds.c
  23. +2 −1 block/nbd.c
  24. +1 −1 block/nfs.c
  25. +3 −0 block/parallels.c
  26. +9 −2 block/qapi-sysemu.c
  27. +6 −5 block/qapi.c
  28. +3 −0 block/qcow.c
  29. +21 −17 block/qcow2-bitmap.c
  30. +7 −4 block/qcow2-cache.c
  31. +31 −31 block/qcow2-cluster.c
  32. +41 −39 block/qcow2-refcount.c
  33. +46 −31 block/qcow2.c
  34. +110 −77 block/qcow2.h
  35. +2 −2 block/quorum.c
  36. +2 −0 block/raw-format.c
  37. +4 −0 block/rbd.c
  38. +21 −8 block/replication.c
  39. +45 −9 block/snapshot.c
  40. +4 −4 block/stream.c
  41. +3 −0 block/vdi.c
  42. +4 −0 block/vhdx.c
  43. +3 −2 block/vhdx.h
  44. +33 −20 block/vmdk.c
  45. +3 −0 block/vpc.c
  46. +11 −9 block/vvfat.c
  47. +44 −0 blockdev.c
  48. +1 −0 blockjob.c
  49. +3 −2 configure
  50. +3 −3 contrib/vhost-user-gpu/vhost-user-gpu.c
  51. +4 −4 contrib/vhost-user-gpu/vugpu.h
  52. +9 −0 docs/about/deprecated.rst
  53. +5 −5 docs/devel/testing.rst
  54. +188 −8 hw/mem/memory-device.c
  55. +5 −0 hw/misc/Kconfig
  56. +10 −0 hw/misc/i2c-echo.c
  57. +1 −1 hw/misc/meson.build
  58. +17 −1 hw/rdma/vmw/pvrdma_main.c
  59. +7 −9 hw/ufs/lu.c
  60. +5 −5 hw/ufs/ufs.c
  61. +7 −2 hw/virtio/vhost-stub.c
  62. +3 −18 hw/virtio/vhost-user.c
  63. +0 −1 hw/virtio/vhost-vdpa.c
  64. +85 −18 hw/virtio/vhost.c
  65. +21 −0 hw/virtio/virtio-mem-pci.c
  66. +320 −10 hw/virtio/virtio-mem.c
  67. +5 −2 include/block/block-common.h
  68. +20 −14 include/block/block-global-state.h
  69. +49 −22 include/block/block-io.h
  70. +36 −33 include/block/block_int-common.h
  71. +4 −3 include/block/block_int-io.h
  72. +2 −1 include/block/graph-lock.h
  73. +11 −12 include/block/qapi.h
  74. +14 −10 include/block/snapshot.h
  75. +2 −2 include/block/ufs.h
  76. +15 −0 include/exec/cpu-common.h
  77. +25 −2 include/exec/memory.h
  78. +13 −1 include/hw/boards.h
  79. +57 −0 include/hw/mem/memory-device.h
  80. +2 −7 include/hw/virtio/vhost-backend.h
  81. +2 −1 include/hw/virtio/vhost.h
  82. +4 −4 include/hw/virtio/virtio-gpu.h
  83. +31 −1 include/hw/virtio/virtio-mem.h
  84. +2 −2 include/sysemu/block-backend-global-state.h
  85. +2 −2 include/sysemu/kvm.h
  86. +1 −0 include/sysemu/kvm_int.h
  87. +2 −0 migration/block.c
  88. +2 −0 migration/migration-hmp-cmds.c
  89. +21 −8 python/qemu/machine/console_socket.py
  90. +49 −29 python/qemu/machine/machine.py
  91. +41 −13 python/qemu/machine/qtest.py
  92. +3 −7 python/qemu/qmp/legacy.py
  93. +0 −1 python/qemu/qmp/protocol.py
  94. +14 −6 python/qemu/qmp/qmp_shell.py
  95. +1 −1 python/qemu/utils/qemu_ga_client.py
  96. +4 −4 python/qemu/utils/qom.py
  97. +1 −1 python/qemu/utils/qom_common.py
  98. +3 −3 python/qemu/utils/qom_fuse.py
  99. +2 −1 python/setup.cfg
  100. +16 −0 qemu-img.c
  101. +3 −0 qemu-io-cmds.c
  102. +7 −3 scripts/block-coroutine-wrapper.py
  103. +4 −4 scripts/cpu-x86-uarch-abi.py
  104. +4 −4 scripts/device-crash-test
  105. +136 −0 scripts/python_qmp_updater.py
  106. +4 −4 scripts/render_block_graph.py
  107. +10 −0 stubs/{qmp_memory_device.c → memory_device.c}
  108. +1 −1 stubs/meson.build
  109. +1 −1 subprojects/libvduse/libvduse.c
  110. +6 −6 subprojects/libvhost-user/libvhost-user.c
  111. +27 −8 system/memory.c
  112. +0 −17 system/physmem.c
  113. +1 −1 target/i386/tcg/seg_helper.c
  114. +1 −4 tests/avocado/acpi-bits.py
  115. +3 −3 tests/avocado/avocado_qemu/__init__.py
  116. +3 −2 tests/avocado/cpu_queries.py
  117. +5 −5 tests/avocado/hotplug_cpu.py
  118. +2 −2 tests/avocado/info_usernet.py
  119. +3 −3 tests/avocado/machine_arm_integratorcp.py
  120. +10 −7 tests/avocado/machine_aspeed.py
  121. +2 −2 tests/avocado/machine_m68k_nextcube.py
  122. +3 −3 tests/avocado/machine_mips_malta.py
  123. +14 −14 tests/avocado/machine_s390_ccw_virtio.py
  124. +5 −5 tests/avocado/migration.py
  125. +1 −1 tests/avocado/pc_cpu_hotplug_props.py
  126. +2 −2 tests/avocado/version.py
  127. +3 −3 tests/avocado/virtio_check_params.py
  128. +3 −2 tests/avocado/virtio_version.py
  129. +7 −9 tests/avocado/vnc.py
  130. +8 −5 tests/avocado/x86_cpu_model_versions.py
  131. +5 −1 tests/docker/dockerfiles/python.docker
  132. +75 −75 tests/migration/guestperf/engine.py
  133. +62 −106 tests/qemu-iotests/030
  134. +71 −100 tests/qemu-iotests/040
  135. +206 −276 tests/qemu-iotests/041
  136. +5 −10 tests/qemu-iotests/045
  137. +22 −40 tests/qemu-iotests/055
  138. +32 −45 tests/qemu-iotests/056
  139. +15 −27 tests/qemu-iotests/093
  140. +94 −131 tests/qemu-iotests/118
  141. +46 −56 tests/qemu-iotests/124
  142. +5 −9 tests/qemu-iotests/129
  143. +2 −3 tests/qemu-iotests/132
  144. +16 −29 tests/qemu-iotests/139
  145. +11 −19 tests/qemu-iotests/147
  146. +46 −57 tests/qemu-iotests/151
  147. +4 −4 tests/qemu-iotests/152
  148. +23 −32 tests/qemu-iotests/155
  149. +3 −5 tests/qemu-iotests/165
  150. +1 −2 tests/qemu-iotests/196
  151. +2 −4 tests/qemu-iotests/205
  152. +48 −57 tests/qemu-iotests/218
  153. +86 −159 tests/qemu-iotests/245
  154. +17 −17 tests/qemu-iotests/256
  155. +18 −18 tests/qemu-iotests/257
  156. +13 −18 tests/qemu-iotests/264
  157. +7 −14 tests/qemu-iotests/281
  158. +5 −11 tests/qemu-iotests/295
  159. +8 −13 tests/qemu-iotests/296
  160. +5 −8 tests/qemu-iotests/298
  161. +22 −32 tests/qemu-iotests/300
  162. +12 −11 tests/qemu-iotests/iotests.py
  163. +5 −6 tests/qemu-iotests/tests/backing-file-invalidation
  164. +6 −12 tests/qemu-iotests/tests/copy-before-write
  165. +2 −4 tests/qemu-iotests/tests/export-incoming-iothread
  166. +6 −12 tests/qemu-iotests/tests/graph-changes-while-io
  167. +1 −2 tests/qemu-iotests/tests/image-fleecing
  168. +12 −19 tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
  169. +17 −28 tests/qemu-iotests/tests/migrate-bitmaps-test
  170. +17 −24 tests/qemu-iotests/tests/migrate-during-backup
  171. +4 −5 tests/qemu-iotests/tests/migration-permissions
  172. +35 −39 tests/qemu-iotests/tests/mirror-ready-cancel-error
  173. +7 −9 tests/qemu-iotests/tests/mirror-top-perms
  174. +7 −9 tests/qemu-iotests/tests/nbd-multiconn
  175. +1 −2 tests/qemu-iotests/tests/reopen-file
  176. +2 −4 tests/qemu-iotests/tests/stream-error-on-reset
  177. +3 −4 tests/qemu-iotests/tests/stream-under-throttle
  178. +1 −0 tests/qtest/npcm7xx_timer-test.c
  179. +1 −1 tests/qtest/ufs-test.c
  180. +10 −5 tests/unit/test-bdrv-drain.c
  181. +8 −0 tests/unit/test-block-iothread.c
  182. +2 −2 tests/vm/basevm.py
1 change: 1 addition & 0 deletions .gitlab-ci.d/container-cross.yml
Expand Up @@ -95,6 +95,7 @@ riscv64-debian-cross-container:
allow_failure: true
variables:
NAME: debian-riscv64-cross
QEMU_JOB_OPTIONAL: 1

# we can however build TCG tests using a non-sid base
riscv64-debian-test-cross-container:
Expand Down
4 changes: 3 additions & 1 deletion MAINTAINERS
Expand Up @@ -2889,6 +2889,7 @@ F: hw/mem/pc-dimm.c
F: include/hw/mem/memory-device.h
F: include/hw/mem/nvdimm.h
F: include/hw/mem/pc-dimm.h
F: stubs/memory_device.c
F: docs/nvdimm.txt

SPICE
Expand Down Expand Up @@ -3141,6 +3142,7 @@ M: Laurent Vivier <lvivier@redhat.com>
R: Paolo Bonzini <pbonzini@redhat.com>
S: Maintained
F: system/qtest.c
F: include/sysemu/qtest.h
F: accel/qtest/
F: tests/qtest/
F: docs/devel/qgraph.rst
Expand Down Expand Up @@ -3862,7 +3864,7 @@ F: docs/block-replication.txt
PVRDMA
M: Yuval Shaia <yuval.shaia.ml@gmail.com>
M: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
S: Maintained
S: Odd Fixes
F: hw/rdma/*
F: hw/rdma/vmw/*
F: docs/pvrdma.txt
Expand Down
35 changes: 21 additions & 14 deletions accel/kvm/kvm-all.c
Expand Up @@ -174,13 +174,31 @@ void kvm_resample_fd_notify(int gsi)
}
}

int kvm_get_max_memslots(void)
unsigned int kvm_get_max_memslots(void)
{
KVMState *s = KVM_STATE(current_accel());

return s->nr_slots;
}

unsigned int kvm_get_free_memslots(void)
{
unsigned int used_slots = 0;
KVMState *s = kvm_state;
int i;

kvm_slots_lock();
for (i = 0; i < s->nr_as; i++) {
if (!s->as[i].ml) {
continue;
}
used_slots = MAX(used_slots, s->as[i].ml->nr_used_slots);
}
kvm_slots_unlock();

return s->nr_slots - used_slots;
}

/* Called with KVMMemoryListener.slots_lock held */
static KVMSlot *kvm_get_free_slot(KVMMemoryListener *kml)
{
Expand All @@ -196,19 +214,6 @@ static KVMSlot *kvm_get_free_slot(KVMMemoryListener *kml)
return NULL;
}

bool kvm_has_free_slot(MachineState *ms)
{
KVMState *s = KVM_STATE(ms->accelerator);
bool result;
KVMMemoryListener *kml = &s->memory_listener;

kvm_slots_lock();
result = !!kvm_get_free_slot(kml);
kvm_slots_unlock();

return result;
}

/* Called with KVMMemoryListener.slots_lock held */
static KVMSlot *kvm_alloc_slot(KVMMemoryListener *kml)
{
Expand Down Expand Up @@ -1387,6 +1392,7 @@ static void kvm_set_phys_mem(KVMMemoryListener *kml,
}
start_addr += slot_size;
size -= slot_size;
kml->nr_used_slots--;
} while (size);
return;
}
Expand All @@ -1412,6 +1418,7 @@ static void kvm_set_phys_mem(KVMMemoryListener *kml,
ram_start_offset += slot_size;
ram += slot_size;
size -= slot_size;
kml->nr_used_slots++;
} while (size);
}

Expand Down
9 changes: 7 additions & 2 deletions accel/stubs/kvm-stub.c
Expand Up @@ -109,9 +109,14 @@ int kvm_irqchip_remove_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,
return -ENOSYS;
}

bool kvm_has_free_slot(MachineState *ms)
unsigned int kvm_get_max_memslots(void)
{
return false;
return 0;
}

unsigned int kvm_get_free_memslots(void)
{
return 0;
}

void kvm_init_cpu_signals(CPUState *cpu)
Expand Down