x86/shadow: don't enable shadow mode with too small a shadow allocation (part 2)
authorJan Beulich <jbeulich@suse.com>
Mon, 23 Sep 2019 12:41:00 +0000 (14:41 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 23 Sep 2019 12:41:00 +0000 (14:41 +0200)
commit8bbb3e900bb65dbb6bedb628ffc22af6bd7665e7
tree6f049ff5f8d042f4af12692a37b54c6679e64bc5
parentff5ddf0e425df6cd09c91248297d10bc44c1cc17
x86/shadow: don't enable shadow mode with too small a shadow allocation (part 2)

Commit 2634b997af ("x86/shadow: don't enable shadow mode with too small
a shadow allocation") was incomplete: The adjustment done there to
shadow_enable() is also needed in shadow_one_bit_enable(). The (new)
problem report was (apparently) a failed PV guest migration followed by
another migration attempt for that same guest. Disabling log-dirty mode
after the first one had left a couple of shadow pages allocated (perhaps
something that also wants fixing), and hence the second enabling of
log-dirty mode wouldn't have allocated anything further.

Reported-by: James Wang <jnwang@suse.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
master commit: 8b25551baa3307af0aa1ef8f7f43403f01c2c5d7
master date: 2019-09-05 09:56:42 +0200
xen/arch/x86/mm/shadow/common.c