Re: [PATCH v6 2/2] KVM: x86/xen: update Xen CPUID Leaf 4 (tsc info) sub-leaves, if present

From: David Woodhouse
Date: Wed Jan 04 2023 - 16:03:26 EST




On 4 January 2023 20:20:55 GMT, Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>On Wed, Jan 04, 2023, David Woodhouse wrote:
>> On Wed, 2023-01-04 at 19:40 +0000, Sean Christopherson wrote:
>> >
>> > arch/x86/include/asm/xen/hypervisor.h also open codes the signature.  Rather than
>> > add a KVM-specific define, what about putting in xen/cpuid.h?  (I've had a version
>> > of this series sitting in my todo pile for far too long, sorry).
>>
>> xen/cpuid.h is an external header imported from Xen itself so in
>> general I'd prefer to avoid modifying it unless we also send the
>> changes upstream.
>
>*sigh* Fool me once...
>
>Can we shove it into arch/x86/include/asm/xen/hypervisor.h? Or is including
>that in KVM too confusing/ugly?

Maybe, if that's our own header. We do include a bunch of stuff intended for use by Xen guests, in arch/x86/kvm/xen.c to provide Xen support. It's only the 32-bit compat bits we define for ourselves within arch/x86/kvm/xen.h.