[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

file xen/include/xen/lib/x86/cpu-policy.h: Meaning of CPUID constants


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Fonyuy-Asheri Caleb <fonyuy-asheri.caleb@xxxxxxxx>
  • Date: Mon, 6 May 2024 09:46:58 +0200 (CEST)
  • Authentication-results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=fonyuy-asheri.caleb@xxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 06 May 2024 07:47:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: 9o3XUyoiP5VQRv5KMMDzNA7BwO9FFw==
  • Thread-topic: file xen/include/xen/lib/x86/cpu-policy.h: Meaning of CPUID constants

Hi,
I am currently doing a study on the way xen handles CPUID information.

I came across these constants in the code (xen/include/xen/lib/x86/cpu-policy.h file) but no explanation of why they have been set that way.

#define CPUID_GUEST_NR_BASIC      (0xdu + 1)
#define CPUID_GUEST_NR_CACHE      (5u + 1)
#define CPUID_GUEST_NR_FEAT       (2u + 1)
#define CPUID_GUEST_NR_TOPO       (1u + 1)
#define CPUID_GUEST_NR_XSTATE     (62u + 1)
#define CPUID_GUEST_NR_EXTD_INTEL (0x8u + 1)
#define CPUID_GUEST_NR_EXTD_AMD   (0x21u + 1)

Please can someone explain to me why we have these constants or point to a documentation which explains it? 
I am particularly interested in the CPUID_GUEST_NR_BASIC given that for intel processors for example, we have
basic leaves running up to 0x21u already for recent processors. This value sort of forces a particular max leaf value. 


Caleb

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.