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

[PATCH v6 4/5] xen/acpi: Import PPTT definitions from Linux


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
  • Date: Tue, 14 Jul 2026 19:44:44 +0900
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=valinux.co.jp; dmarc=pass action=none header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y1Oex6Jp2bEa6wsCxPupOWjWoJICYxBHDdDfwmwaE6g=; b=yTC2uQPs94XWNoLaIC44xaB66FGvU1hQcbe+OPiDOClzcpzSHAx3LKT7MhuGe0SYdgA5MnWq9Ofet0VtWMnHicR7f6mPUAAMb13z+43knT+C9hkymn7rOpCx9rRyw3iPqyGZdEIrKFAk5FEAZgAwESe5nbqwqWjCqrPvMQmA7Xgn73IkBovdZ2br2SHLX6avC/rAB31qTXam/V4bwyRvp99vYgSZF4yPEZ7bbFkhefPnjKLisajZhcsj0UohVoWpXmpvBo85YjX3aS7n3A/p5Lp/EXMFUxF35Bd6iprqln1FWb/yUpW6hnH4FIKVXYNuwYv+Zczwbl6DtFDq3oVN5Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=t8Ef3FD9pWRN0ERT84tbwVLPGPcp+pu0fDfFIJUl8Pvt4xiX5/P+R0p7ysV4yDoSvaC+eFSaKog3bQzXaHqaxuZ/kRJzm3NAGYPSzW7kL5u3TiWWBV3tdo/eby5XVaYZ+e7mkQP77+Jh3eo8Lqf+aJn6IsRD28w18Uq5nCmhnRsru46N9RW92b7HpNAmss79QY5WJe7xZp/NBdB5CLDn0Ud908BaOV8z3J3lTnG0pkEkE0AXsPJQSP9ApndmpNnqm/cO6VUj+OiLN7DWa5kCNyoRx8KDpXuy2q4lL+uyqf6Fx1JcTotePfxrQfTo7klUKwuRmzVGcC/7E2yEWmPPug==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=valinux.co.jp header.i="@valinux.co.jp" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=valinux.co.jp;
  • Cc: Mykyta_Poturai@xxxxxxxx, Hirokazu Takahashi <taka@xxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Tue, 14 Jul 2026 10:46:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Import the Processor Properties Topology Table (PPTT) definitions
from the Linux kernel header (include/acpi/actbl2.h) into Xen.

Origin: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git 
091c4af3562d
Signed-off-by: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
---
Changes in v6:
   * Split out the import of ACPI PPTT definitions from the Linux kernel
     (including unused definitions) into a separate standalone patch.

 xen/include/acpi/actbl2.h | 113 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 113 insertions(+)

diff --git a/xen/include/acpi/actbl2.h b/xen/include/acpi/actbl2.h
index ee96e990d6..4398d98e00 100644
--- a/xen/include/acpi/actbl2.h
+++ b/xen/include/acpi/actbl2.h
@@ -72,6 +72,7 @@
 #define ACPI_SIG_IVRS           "IVRS" /* I/O Virtualization Reporting 
Structure */
 #define ACPI_SIG_MCFG           "MCFG" /* PCI Memory Mapped Configuration 
table */
 #define ACPI_SIG_MCHI           "MCHI" /* Management Controller Host Interface 
table */
+#define ACPI_SIG_PPTT           "PPTT" /* Processor Properties Topology Table 
*/
 #define ACPI_SIG_SLIC           "SLIC" /* Software Licensing Description Table 
*/
 #define ACPI_SIG_SPCR           "SPCR" /* Serial Port Console Redirection 
table */
 #define ACPI_SIG_SPMI           "SPMI" /* Server Platform Management Interface 
table */
@@ -937,6 +938,118 @@ struct acpi_table_mchi {
        u8 pci_function;
 };
 
+/*******************************************************************************
+ *
+ * PPTT - Processor Properties Topology Table (ACPI 6.2)
+ *        Version 1
+ *
+ 
******************************************************************************/
+
+struct acpi_table_pptt {
+       struct acpi_table_header header;        /* Common ACPI table header */
+};
+
+/* Values for Type field above */
+
+enum acpi_pptt_type {
+       ACPI_PPTT_TYPE_PROCESSOR = 0,
+       ACPI_PPTT_TYPE_CACHE = 1,
+       ACPI_PPTT_TYPE_ID = 2,
+       ACPI_PPTT_TYPE_RESERVED = 3
+};
+
+/* 0: Processor Hierarchy Node Structure */
+
+struct acpi_pptt_processor {
+       struct acpi_subtable_header header;
+       u16 reserved;
+       u32 flags;
+       u32 parent;
+       u32 acpi_processor_id;
+       u32 number_of_priv_resources;
+};
+
+/* Flags */
+
+#define ACPI_PPTT_PHYSICAL_PACKAGE          (1)
+#define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID   (1<<1)
+#define ACPI_PPTT_ACPI_PROCESSOR_IS_THREAD  (1<<2)     /* ACPI 6.3 */
+#define ACPI_PPTT_ACPI_LEAF_NODE            (1<<3)     /* ACPI 6.3 */
+#define ACPI_PPTT_ACPI_IDENTICAL            (1<<4)     /* ACPI 6.3 */
+
+/* 1: Cache Type Structure */
+
+struct acpi_pptt_cache {
+       struct acpi_subtable_header header;
+       u16 reserved;
+       u32 flags;
+       u32 next_level_of_cache;
+       u32 size;
+       u32 number_of_sets;
+       u8 associativity;
+       u8 attributes;
+       u16 line_size;
+};
+
+/* 1: Cache Type Structure for PPTT version 3 */
+
+struct acpi_pptt_cache_v1 {
+       struct acpi_subtable_header header;
+       u16 reserved;
+       u32 flags;
+       u32 next_level_of_cache;
+       u32 size;
+       u32 number_of_sets;
+       u8 associativity;
+       u8 attributes;
+       u16 line_size;
+       u32 cache_id;
+};
+
+/* Flags */
+
+#define ACPI_PPTT_SIZE_PROPERTY_VALID       (1)        /* Physical property 
valid */
+#define ACPI_PPTT_NUMBER_OF_SETS_VALID      (1<<1)     /* Number of sets valid 
*/
+#define ACPI_PPTT_ASSOCIATIVITY_VALID       (1<<2)     /* Associativity valid 
*/
+#define ACPI_PPTT_ALLOCATION_TYPE_VALID     (1<<3)     /* Allocation type 
valid */
+#define ACPI_PPTT_CACHE_TYPE_VALID          (1<<4)     /* Cache type valid */
+#define ACPI_PPTT_WRITE_POLICY_VALID        (1<<5)     /* Write policy valid */
+#define ACPI_PPTT_LINE_SIZE_VALID           (1<<6)     /* Line size valid */
+#define ACPI_PPTT_CACHE_ID_VALID            (1<<7)     /* Cache ID valid */
+
+/* Masks for Attributes */
+
+#define ACPI_PPTT_MASK_ALLOCATION_TYPE      (0x03)     /* Allocation type */
+#define ACPI_PPTT_MASK_CACHE_TYPE           (0x0C)     /* Cache type */
+#define ACPI_PPTT_MASK_WRITE_POLICY         (0x10)     /* Write policy */
+
+/* Attributes describing cache */
+#define ACPI_PPTT_CACHE_READ_ALLOCATE       (0x0)      /* Cache line is 
allocated on read */
+#define ACPI_PPTT_CACHE_WRITE_ALLOCATE      (0x01)     /* Cache line is 
allocated on write */
+#define ACPI_PPTT_CACHE_RW_ALLOCATE         (0x02)     /* Cache line is 
allocated on read and write */
+#define ACPI_PPTT_CACHE_RW_ALLOCATE_ALT     (0x03)     /* Alternate 
representation of above */
+
+#define ACPI_PPTT_CACHE_TYPE_DATA           (0x0)      /* Data cache */
+#define ACPI_PPTT_CACHE_TYPE_INSTR          (1<<2)     /* Instruction cache */
+#define ACPI_PPTT_CACHE_TYPE_UNIFIED        (2<<2)     /* Unified I & D cache 
*/
+#define ACPI_PPTT_CACHE_TYPE_UNIFIED_ALT    (3<<2)     /* Alternate 
representation of above */
+
+#define ACPI_PPTT_CACHE_POLICY_WB           (0x0)      /* Cache is write back 
*/
+#define ACPI_PPTT_CACHE_POLICY_WT           (1<<4)     /* Cache is write 
through */
+
+/* 2: ID Structure */
+
+struct acpi_pptt_id {
+       struct acpi_subtable_header header;
+       u16 reserved;
+       u32 vendor_id;
+       u64 level1_id;
+       u64 level2_id;
+       u16 major_rev;
+       u16 minor_rev;
+       u16 spin_rev;
+};
+
 
/*******************************************************************************
  *
  * SLIC - Software Licensing Description Table
-- 
2.43.0




 


Rackspace

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