diff options
author | Juergen Gross <jgross@suse.com> | 2023-09-13 13:38:28 +0200 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2023-09-19 07:04:49 +0200 |
commit | 49147beb0ccbf4c5bb81a44be93ec3bc5e4a79f1 (patch) | |
tree | 9e152bf82cf2f3aa839865cff0bf589985ac5e4a /arch/x86/xen/enlighten_pv.c | |
parent | x86/xen: move paravirt lazy code (diff) | |
download | linux-49147beb0ccbf4c5bb81a44be93ec3bc5e4a79f1.tar.xz linux-49147beb0ccbf4c5bb81a44be93ec3bc5e4a79f1.zip |
x86/xen: allow nesting of same lazy mode
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@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/20230913113828.18421-4-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to '')
-rw-r--r-- | arch/x86/xen/enlighten_pv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index 54b83825c4b6..bbbfdd495ebd 100644 --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen/enlighten_pv.c @@ -102,6 +102,7 @@ struct tls_descs { }; DEFINE_PER_CPU(enum xen_lazy_mode, xen_lazy_mode) = XEN_LAZY_NONE; +DEFINE_PER_CPU(unsigned int, xen_lazy_nesting); enum xen_lazy_mode xen_get_lazy_mode(void) { |