Re: [PATCH v3 09/13] KVM: x86/xen: Use atomic*() APIs instead of open coded equivalents

From: Sean Christopherson

Date: Wed Sep 02 2026 - 15:18:10 EST


On Wed, Sep 02, 2026, David Woodhouse wrote:
> On Wed, 2026-09-02 at 13:41 +0100, Paul Durrant wrote:
> > On 31/08/2026 22:26, David Woodhouse wrote:
> > > From: Sean Christopherson <seanjc@xxxxxxxxxx>
> > >
> > > Replace the open coded atomic asm blobs in the Xen event injection code
> > > with equivalent atomic{,64}_xxx() operations.  Casting the event channel
> > > to atomic types is ugly, but not as ugly as asm blobs.
> > >
> > > No functional change intended.
> > >
> > > Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> > > Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
> > > ---
> > >    arch/x86/kvm/xen.c | 35 ++++++++++++-----------------------
> > >    1 file changed, 12 insertions(+), 23 deletions(-)
> > >
> > Not entirely clear why going to the trouble of replacing the asm blobs
> > in patch 8 was necessary only to remove them here but, if that's
> > preferable to squashing this into patch 8...
>
> I think Sean's logic in doing it that way is that *this* patch can be
> marked 'No functional change intended' as it's merely changing *how*
> the atomic access is done, while the previous patch actually changes
> the pattern of *which* atomic accesses are done.

Yep, exactly.