Re: [PATCH 2/8] KVM: x86/xen: Introduce kvm_xen_has_64bit_shinfo() macro
From: David Woodhouse
Date: Sat Jun 06 2026 - 05:36:14 EST
On Sat, 2026-06-06 at 10:30 +0100, David Laight wrote:
> On Fri, 5 Jun 2026 15:17:27 +0100
> David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:
>
> > From: David Woodhouse <dwmw@xxxxxxxxxxxx>
> >
> > Add a kvm_xen_has_64bit_shinfo() helper macro to replace the repeated
> > pattern of 'IS_ENABLED(CONFIG_64BIT) && kvm->arch.xen.long_mode'
> > throughout the Xen emulation code. The macro uses READ_ONCE() to
> > ensure a consistent snapshot of the flag, which can be changed by
> > another vCPU at any time.
>
> If another vCPU changes the flag then isn't it all broken?
> The code seems to need the value to be stable.
Do you believe the explanation in patch 4 to be insufficient?
Attachment:
smime.p7s
Description: S/MIME cryptographic signature