From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Mauricio Faria de Oliveira <mfo@igalia.com>,
Paul Durrant <paul@xen.org>,
Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Clark Williams <clrkwllms@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
kernel-dev@igalia.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev,
syzbot+208f7f3e5f59c11aeb90@syzkaller.appspotmail.com
Subject: Re: [PATCH] KVM: x86/xen: bail in IRQ context on PREEMPT_RT in kvm_xen_set_evtchn_fast()
Date: Thu, 7 May 2026 09:12:35 +0200 [thread overview]
Message-ID: <20260507071235.rdb4aGeE@linutronix.de> (raw)
In-Reply-To: <8e7bc66a7994ca06f164a5d5f7ceb3f07d3a1357.camel@infradead.org>
On 2026-05-07 07:58:00 [+0100], David Woodhouse wrote:
> >> I am not comfortable applying this patch. As shown by the need for the next patch
> >> to optimize unrelated invalidations, switching to read_trylock() is more subtle
> >> than it seems at first glance. Specifically, there are no fairness guarantees.
>
> I'm OK with that in this case. Because kvm_xen_set_evtchn_fast(), as
> with *everything* called from kvm_arch_set_irq_inatomic(), is
> explicitly designed to be a 'best effort' and allowed to return
> -EWOULDBLOCK when it's too hard.
>
> And the write lock being held here should a *rare* case, as the GPC for
> the shared_info and vcpu_info pages should basically *never* get
> invalidated while the guest is running.
>
> I've taken the same read_trylock() approach in
> https://lore.kernel.org/all/1d6712ed413ea66ef376d1410811997c3b416e99.camel@infradead.org/
So the cited patch does not look bad. That read-trylock should be fine
on RT (as in I don't see anything wrong with it). What did happen to it?
Sebastian
next prev parent reply other threads:[~2026-05-07 7:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 2:36 [PATCH] KVM: x86/xen: bail in IRQ context on PREEMPT_RT in kvm_xen_set_evtchn_fast() Mauricio Faria de Oliveira
2026-05-07 6:58 ` David Woodhouse
2026-05-07 7:12 ` Sebastian Andrzej Siewior [this message]
2026-05-07 7:30 ` David Woodhouse
2026-05-07 13:00 ` David Woodhouse
2026-05-07 13:21 ` Sebastian Andrzej Siewior
2026-05-07 13:43 ` David Woodhouse
2026-05-07 14:54 ` Sebastian Andrzej Siewior
2026-05-07 14:56 ` Mauricio Faria de Oliveira
2026-05-07 15:22 ` David Woodhouse
2026-05-07 16:02 ` Mauricio Faria de Oliveira
2026-05-07 16:15 ` David Woodhouse
2026-05-07 16:34 ` Mauricio Faria de Oliveira
2026-05-07 17:45 ` David Woodhouse
2026-05-08 17:48 ` David Woodhouse
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=20260507071235.rdb4aGeE@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=clrkwllms@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=hpa@zytor.com \
--cc=kernel-dev@igalia.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=mfo@igalia.com \
--cc=mingo@redhat.com \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=rostedt@goodmis.org \
--cc=seanjc@google.com \
--cc=syzbot+208f7f3e5f59c11aeb90@syzkaller.appspotmail.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.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