]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commit
x86/PoD: tie together P2M update and increment of entry count
authorJan Beulich <jbeulich@suse.com>
Wed, 27 Mar 2024 11:29:33 +0000 (12:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 27 Mar 2024 11:29:33 +0000 (12:29 +0100)
commitbfb69205376d94ff91b09a337c47fb665ee12da3
treec8baa8e103cdcbdad7fc9e84e224097b1abd8022
parent471b53c6a092940f3629990d9ca946aa22bd8535
x86/PoD: tie together P2M update and increment of entry count

When not holding the PoD lock across the entire region covering P2M
update and stats update, the entry count - if to be incorrect at all -
should indicate too large a value in preference to a too small one, to
avoid functions bailing early when they find the count is zero. However,
instead of moving the increment ahead (and adjust back upon failure),
extend the PoD-locked region.

Fixes: 99af3cd40b6e ("x86/mm: Rework locking in the PoD layer")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: George Dunlap <george.dunlap@cloud.com>
master commit: cc950c49ae6a6690f7fc3041a1f43122c250d250
master date: 2024-03-21 09:48:10 +0100
xen/arch/x86/mm/p2m-pod.c