Re: [PATCH 3/3] x86/xen: allow nesting of same lazy mode

From: Boris Ostrovsky
Date: Fri Sep 15 2023 - 17:53:19 EST




On 9/13/23 7:38 AM, Juergen Gross wrote:
When running as a paravirtualized guest under Xen, Linux is using
"lazy mode" for issuing hypercalls which don't need to take immediate
effect in order to improve performance (examples are e.g. multiple
PTE changes).

There are two different lazy modes defined: MMU and CPU lazy mode.
Today it is not possible to nest multiple lazy mode sections, even if
they are of the same kind. A recent change in memory management added
nesting of MMU lazy mode sections, resulting in a regression when
running as Xen PV guest.

Technically there is no reason why nesting of multiple sections of the
same kind of lazy mode shouldn't be allowed. So add support for that
for fixing the regression.

Fixes: bcc6cc832573 ("mm: add default definition of set_ptes()")
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

For patches 2 and 3

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>