[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 8d3031: memory: notify hypervisor of all even
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 8d3031: memory: notify hypervisor of all eventfds during l... |
Date: |
Wed, 09 Oct 2024 12:17:48 -0700 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 8d3031fa1bfcdc623934ec7b15889a3f49248552
https://github.com/qemu/qemu/commit/8d3031fa1bfcdc623934ec7b15889a3f49248552
Author: Ani Sinha <anisinha@redhat.com>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M system/memory.c
Log Message:
-----------
memory: notify hypervisor of all eventfds during listener (de)registration
When a new listener for an address space is registered, the hypervisor must be
informed of all existing eventfds for that address space by calling
eventfd_add() for that listener. Similarly, when a listener is de-registered
from an address space, the hypervisor must be informed of all existing eventfds
for that address space with a call to eventfd_del().
Same is also true for coalesced io. Send coalesced io add/del listener
notifications if any flatrage for the address space registered with the
listener intersects with any coalesced io range.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Link: https://lore.kernel.org/r/20240918064853.30678-1-anisinha@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: 68e0fca625912c7c63a8bfbc784f53d4fefa1a13
https://github.com/qemu/qemu/commit/68e0fca625912c7c63a8bfbc784f53d4fefa1a13
Author: Fabiano Rosas <farosas@suse.de>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M migration/multifd-nocomp.c
Log Message:
-----------
migration/multifd: Ensure packet->ramblock is null-terminated
Coverity points out that the current usage of strncpy to write the
ramblock name allows the field to not have an ending '\0' in case
idstr is already not null-terminated (e.g. if it's larger than 256
bytes).
This is currently harmless because the packet->ramblock field is never
touched again on the source side. The destination side reads only up
to the field's size from the stream and forces the last byte to be 0.
We're still open to a programming error in the future in case this
field is ever passed into a function that expects a null-terminated
string.
Change from strncpy to QEMU's pstrcpy, which puts a '\0' at the end of
the string and doesn't fill the extra space with zeros.
(there's no spillage between iterations of fill_packet because after
commit 87bb9e953e ("migration/multifd: Isolate ram pages packet data")
the packet is always zeroed before filling)
Resolves: Coverity CID 1560071
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240919150611.17074-1-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: a5d8d1384224252b122cb23e3bc141dcd29d41c2
https://github.com/qemu/qemu/commit/a5d8d1384224252b122cb23e3bc141dcd29d41c2
Author: Dr. David Alan Gilbert <dave@treblig.org>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M migration/options.c
M migration/options.h
Log Message:
-----------
migration: Remove migrate_cap_set
migrate_cap_set has been unused since
18d154f575 ("migration: Remove 'blk/-b' option from migrate commands")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240919134626.166183-2-dave@treblig.org
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: 21ed5ff6063422c874fbb0e389d5b4cfd18b6fff
https://github.com/qemu/qemu/commit/21ed5ff6063422c874fbb0e389d5b4cfd18b6fff
Author: Dr. David Alan Gilbert <dave@treblig.org>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M migration/options.c
M migration/options.h
Log Message:
-----------
migration: Remove unused migrate_zero_blocks
migrate_zero_blocks is unused since
eef0bae3a7 ("migration: Remove block migration")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240919134626.166183-3-dave@treblig.org
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: 73581a041e683fe7899e6af799c42becf60ee400
https://github.com/qemu/qemu/commit/73581a041e683fe7899e6af799c42becf60ee400
Author: Fabiano Rosas <farosas@suse.de>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M docs/about/deprecated.rst
M migration/options.c
M qapi/migration.json
Log Message:
-----------
migration: Deprecate zero-blocks capability
The zero-blocks capability was meant to be used along with the block
migration, which has been removed already in commit eef0bae3a7
("migration: Remove block migration").
Setting zero-blocks is currently a noop, but the outright removal of
the capability would cause and error in case some users are still
setting it. Put the capability through the deprecation process.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240919134626.166183-4-dave@treblig.org
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: 6242b36102ff7c8279015bb8b41f9d95fbb1f533
https://github.com/qemu/qemu/commit/6242b36102ff7c8279015bb8b41f9d95fbb1f533
Author: Dr. David Alan Gilbert <dave@treblig.org>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M migration/socket.c
M migration/socket.h
Log Message:
-----------
migration: Remove unused socket_send_channel_create_sync
socket_send_channel_create_sync only use was removed by
d0edb8a173 ("migration: Create the postcopy preempt channel asynchronously")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240919134626.166183-5-dave@treblig.org
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: 6f81bd1a3ec3b8c06ec614f09eac688c6053f412
https://github.com/qemu/qemu/commit/6f81bd1a3ec3b8c06ec614f09eac688c6053f412
Author: Dr. David Alan Gilbert <dave@treblig.org>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M util/userfaultfd.c
Log Message:
-----------
util/userfaultfd: Return -errno on error
Convert (the currently unused) uffd_wakeup, uffd_copy_page and
uffd_zero_page to return -errno on error rather than -1.
That will make it easier to reuse in postcopy.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240919134626.166183-6-dave@treblig.org
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: 3ba55a33e82c9902c211d6325bc550afcca7ddf9
https://github.com/qemu/qemu/commit/3ba55a33e82c9902c211d6325bc550afcca7ddf9
Author: Dr. David Alan Gilbert <dave@treblig.org>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M migration/postcopy-ram.c
Log Message:
-----------
migration/postcopy: Use uffd helpers
Use the uffd_copy_page, uffd_zero_page and uffd_wakeup helpers
rather than calling ioctl ourselves.
They return -errno on error, and print an error_report themselves.
I think this actually makes postcopy_place_page actually more
consistent in it's callers.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240919134626.166183-7-dave@treblig.org
[peterx: fix i386 build]
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: ccf6b78275816c9dec84d3a40e9aa3b6ba6ebc06
https://github.com/qemu/qemu/commit/ccf6b78275816c9dec84d3a40e9aa3b6ba6ebc06
Author: Dr. David Alan Gilbert <dave@treblig.org>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M include/qemu/userfaultfd.h
M util/userfaultfd.c
Log Message:
-----------
util/userfaultfd: Remove unused uffd_poll_events
uffd_poll_events has been unused since it was added; it's also
just a wrapper around a plain old poll call, so doesn't add anything.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240919134626.166183-8-dave@treblig.org
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: 9adcdd49e39149b494b7b6174ef0b7f2d906845b
https://github.com/qemu/qemu/commit/9adcdd49e39149b494b7b6174ef0b7f2d906845b
Author: Juraj Marcin <jmarcin@redhat.com>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M tests/qtest/migration-test.c
Log Message:
-----------
tests/migration-test: Wait for cancellation sooner in multifd cancel
The source QEMU might not finish the cancellation of the migration
before we start setting up the next attempt. During the setup, the
test_migrate_start() function and others might need to interact with the
source in a way that is not possible unless the migration is fully
canceled. For example, setting capabilities when the migration is still
running leads to an error.
By moving the wait before the setup, we ensure this does not happen.
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Juraj Marcin <jmarcin@redhat.com>
Link: https://lore.kernel.org/r/20240920161319.2337625-1-jmarcin@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: 255db3ba80a985f11a9d7b2d2c0f014427ba4639
https://github.com/qemu/qemu/commit/255db3ba80a985f11a9d7b2d2c0f014427ba4639
Author: Dr. David Alan Gilbert <dave@treblig.org>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M include/qemu/iova-tree.h
M util/iova-tree.c
Log Message:
-----------
util/iova-tree: Remove deadcode
iova_tree_find_address, and iova_tree_foreach have never been
used since the code was originally added by:
eecf5eedbd ("util: implement simple iova tree")
Remove them.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Link: https://lore.kernel.org/r/20240918142515.153074-1-dave@treblig.org
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: 2e49d6a20b2193378e508b01de82eaffc5adc3bc
https://github.com/qemu/qemu/commit/2e49d6a20b2193378e508b01de82eaffc5adc3bc
Author: Yuan Liu <yuan1.liu@intel.com>
Date: 2024-10-09 (Wed, 09 Oct 2024)
Changed paths:
M migration/multifd-qpl.c
Log Message:
-----------
migration/multifd: fix build error when qpl compression is enabled
The page_size member has been removed from the MultiFDSendParams
and MultiFDRecvParams. The function multifd_ram_page_size is used to
provide the page size in the multifd compressor.
Fixes: 90fa121c6c ("migration/multifd: Inline page_size and page_count")
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Link: https://lore.kernel.org/r/20241008104527.3516755-1-yuan1.liu@intel.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Commit: 05adb38839ba656c7383a548b460d95c91e2febe
https://github.com/qemu/qemu/commit/05adb38839ba656c7383a548b460d95c91e2febe
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2024-10-09 (Wed, 09 Oct 2024)
Changed paths:
M docs/about/deprecated.rst
M include/qemu/iova-tree.h
M include/qemu/userfaultfd.h
M migration/multifd-nocomp.c
M migration/multifd-qpl.c
M migration/options.c
M migration/options.h
M migration/postcopy-ram.c
M migration/socket.c
M migration/socket.h
M qapi/migration.json
M system/memory.c
M tests/qtest/migration-test.c
M util/iova-tree.c
M util/userfaultfd.c
Log Message:
-----------
Merge tag 'migration-20241009-pull-request' of https://gitlab.com/peterx/qemu
into staging
Migration pull request
- Ani's patch to complete the memory API on coalesced IO / eventfd notifies
- Fabiano's Coverity fix on using pstrcpy() over strncpy()
- Dave's series on removing/deprecating zero-blocks and uffd cleanups
- Juraj's one more fix on multifd/cancel test where it can fail when
cancellation happens too slow on src
- Dave's one more remove deadcode patch in iova-tree.c
- Yuan's build fix for multifd qpl compressor
# -----BEGIN PGP SIGNATURE-----
#
# iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCZwZ6CBIccGV0ZXJ4QHJl
# ZGhhdC5jb20ACgkQO1/MzfOr1wa3ZwD9HiAN9m7WOfZxXKOVIIwhOjUNTw0FiFeO
# HMxp8A2jeYsBAK+d5lYGX1V2FtQ152YiOJQzRW31MkdAOishJzcHCXgO
# =gBW0
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 09 Oct 2024 13:41:44 BST
# gpg: using EDDSA key B9184DC20CC457DACF7DD1A93B5FCCCDF3ABD706
# gpg: issuer "peterx@redhat.com"
# gpg: Good signature from "Peter Xu <xzpeter@gmail.com>" [marginal]
# gpg: aka "Peter Xu <peterx@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: B918 4DC2 0CC4 57DA CF7D D1A9 3B5F CCCD F3AB D706
* tag 'migration-20241009-pull-request' of https://gitlab.com/peterx/qemu:
migration/multifd: fix build error when qpl compression is enabled
util/iova-tree: Remove deadcode
tests/migration-test: Wait for cancellation sooner in multifd cancel
util/userfaultfd: Remove unused uffd_poll_events
migration/postcopy: Use uffd helpers
util/userfaultfd: Return -errno on error
migration: Remove unused socket_send_channel_create_sync
migration: Deprecate zero-blocks capability
migration: Remove unused migrate_zero_blocks
migration: Remove migrate_cap_set
migration/multifd: Ensure packet->ramblock is null-terminated
memory: notify hypervisor of all eventfds during listener (de)registration
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/838fc0a8769d...05adb38839ba
To unsubscribe from these emails, change your notification settings at
https://github.com/qemu/qemu/settings/notifications
- [Qemu-commits] [qemu/qemu] 8d3031: memory: notify hypervisor of all eventfds during l...,
Peter Maydell <=