From: "Jürgen Groß" <jgross@suse.com>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
kevin.brodsky@arm.com,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH] x86/xen: Tolerate nested XEN_LAZY_MMU entering/leaving
Date: Tue, 12 May 2026 18:10:10 +0200 [thread overview]
Message-ID: <35936020-53e2-463f-846f-f222d75e768c@suse.com> (raw)
In-Reply-To: <agNPrRfBnRdMCGrE@mail-itl>
[-- Attachment #1.1.1: Type: text/plain, Size: 1439 bytes --]
On 12.05.26 18:05, Marek Marczykowski-Górecki wrote:
> On Fri, May 08, 2026 at 04:39:33PM +0200, Juergen Gross wrote:
>> With the support of nested lazy mmu sections it can happen that
>> arch_enter_lazy_mmu_mode() is being called twice without a call of
>> arch_leave_lazy_mmu_mode() in between, as the lazy_mmu_*() helpers
>> are not disabling preemption when checking for nested lazy mmu
>> sections.
>>
>> This is a problem when running as a Xen PV guest, as
>> xen_enter_lazy_mmu() and xen_leave_lazy_mmu() don't tolerate this
>> case.
>>
>> Fix that in xen_enter_lazy_mmu() and xen_leave_lazy_mmu() in order
>> not to hurt all other lazy mmu mode users.
>>
>> Fixes: 291b3abed657 ("x86/xen: use lazy_mmu_state when context-switching")
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>
> I have ran several test iterations with this patch (on top of 7.0.4) and
> it seems to fix the issue. So,
>
> Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Thanks for testing.
>
> I did run some tests also with 291b3abed657 reverted (instead of this
> patch), and that seems to work too, but I didn't run enough of
> iterations to be 100% sure. Would it be helpful to that that further
> too?
I do prefer my variant, as it is on my preferred path to get rid of the
Xen-private lazy mode tracking.
So in my personal opinion you don't need to continue this test.
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
prev parent reply other threads:[~2026-05-12 16:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 14:39 Juergen Gross
2026-05-08 20:54 ` Kevin Brodsky
2026-05-09 6:32 ` Jürgen Groß
2026-05-18 14:34 ` Kevin Brodsky
2026-05-12 16:05 ` Marek Marczykowski-Górecki
2026-05-12 16:10 ` Jürgen Groß [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35936020-53e2-463f-846f-f222d75e768c@suse.com \
--to=jgross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kevin.brodsky@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marmarek@invisiblethingslab.com \
--cc=mingo@redhat.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®