Re: [PATCH v3 01/13] KVM: x86/xen: Rename 'longmode' to 'is_64bit' in hypercall handling

From: David Woodhouse

Date: Wed Sep 02 2026 - 14:37:32 EST


On Wed, 2026-09-02 at 13:18 +0100, Paul Durrant wrote:
> On 31/08/2026 22:26, David Woodhouse wrote:
> > From: David Woodhouse <dwmw@xxxxxxxxxxxx>
> >
> > Rename the local 'longmode' variable and function parameter to
> > 'is_64bit' throughout the Xen hypercall handling code. This
> > distinguishes it from the VM-wide kvm->arch.xen.long_mode which
> > represents the Xen shared_info layout mode.
> >
> > The 'is_64bit' parameter indicates whether the vCPU was in 64-bit
> > mode when it made the hypercall, which determines how to parse the
> > hypercall arguments. The UAPI field name (vcpu->run->xen.u.hcall.longmode)
> > is unchanged.
> >
>
> Given that 'longmode' is the term used in the UAPI I'm not sure I really
> see the point in this change (particularly since there is not even a
> name clash with 'long_mode').

The difference between 'longmode' and 'long_mode' is subtle, and *has*
caused confusion which IIRC is what led to part of this series.

Having to keep 'longmode' in the UAPI for KVM_EXIT_XEN_HCALL is sad,
but at least the context is very clear there (xen.u.hcall.longmode).
The code itself avoids the confusion.

Attachment: smime.p7s
Description: S/MIME cryptographic signature