summary refs log tree commit diff stats
path: root/scripts/qapi/parser.py
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2023-01-05 13:45:26 +0100
committerJuan Quintela <quintela@redhat.com>2023-02-06 19:22:56 +0100
commit7cc8e9e0fadc734065d4d5c9cb0bd8997e743146 (patch)
treee4cb2ff38bd2fb7dfd107ced83cc35cc510a60ac /scripts/qapi/parser.py
parent72ef3a370836aa07261ad7aaeea27ed5cbcee342 (diff)
downloadfocaccia-qemu-7cc8e9e0fadc734065d4d5c9cb0bd8997e743146.tar.gz
focaccia-qemu-7cc8e9e0fadc734065d4d5c9cb0bd8997e743146.zip
migration/ram: Don't explicitly unprotect when unregistering uffd-wp
When unregistering uffd-wp, older kernels before commit f369b07c86143
("mm/uffd:reset write protection when unregister with wp-mode") won't
clear the uffd-wp PTE bit. When re-registering uffd-wp, the previous
uffd-wp PTE bits would trigger again. With above commit, the kernel will
clear the uffd-wp PTE bits when unregistering itself.

Consequently, we'll clear the uffd-wp PTE bits now twice -- whereby we
don't care about clearing them at all: a new background snapshot will
re-register uffd-wp and re-protect all memory either way.

So let's skip the manual clearing of uffd-wp. If ever relevant, we
could clear conditionally in uffd_unregister_memory() -- we just need a
way to figure out more recent kernels.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'scripts/qapi/parser.py')
0 files changed, 0 insertions, 0 deletions