From nobody Tue Mar 3 05:11:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1771624059; cv=none; d=zohomail.com; s=zohoarc; b=fydgjiYXueeS/cWteG4VNeLYYxkk6M6uSfGgNcJDG0ZahdHdHCROuYLpmeE1X8fuQ3wg7NJOCD0lH118k/+5aYXQ/9nvxi/7FKTYI7Fj8nnmN8jyRtFaoMBydx2/JFfnwjQJf/j0kUVinWUnBaKajvu/0ORSA3DdCGeR9zWuJIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771624059; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=38Q6mGCwbKjhhK8kwdPI5HfU9QB1AsZ0yVRPxRPU2XA=; b=DgiSmGWPZW0qEQqNyMa16LE6TilLPeseLW+4OuueFu0+jnUO7Gc1DhJgzTNT8F9HnYrj1lNn+MjEEvllJ5gyfDLEgZ1uthBscqiCJvjTy9opzwYXFmke48/8c6wpNWQFCk0DUOU5LbtV/GGMgiIS/PlC20wcWZg2KdxzajfWnpc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 177162405902525.407097365584036; Fri, 20 Feb 2026 13:47:39 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1237614.1539889 (Exim 4.92) (envelope-from ) id 1vtYL9-0000nM-Ac; Fri, 20 Feb 2026 21:47:11 +0000 Received: by outflank-mailman (output) from mailman id 1237614.1539889; Fri, 20 Feb 2026 21:47:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vtYL8-0000mO-Sm; Fri, 20 Feb 2026 21:47:10 +0000 Received: by outflank-mailman (input) for mailman id 1237614; Fri, 20 Feb 2026 21:47:10 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vtYL8-0008IG-4a for xen-devel@lists.xenproject.org; Fri, 20 Feb 2026 21:47:10 +0000 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [2a00:1450:4864:20::32a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b433f758-0ea5-11f1-9ccf-f158ae23cfc8; Fri, 20 Feb 2026 22:47:08 +0100 (CET) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-482f454be5bso33419435e9.0 for ; Fri, 20 Feb 2026 13:47:08 -0800 (PST) Received: from localhost.localdomain (host-92-22-18-152.as13285.net. [92.22.18.152]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483a8df83bcsm28940205e9.13.2026.02.20.13.47.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Feb 2026 13:47:06 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b433f758-0ea5-11f1-9ccf-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1771624027; x=1772228827; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=38Q6mGCwbKjhhK8kwdPI5HfU9QB1AsZ0yVRPxRPU2XA=; b=I5uwAh+6sicY4jOD/nMZRlwFvDLFYB3wwyJodfcP4iGUWiFCQODI1Z/6jNVjS7Cp6a TfoSIIcNQgn8tVWRU4b2Ov+UaiulA2J5DLjiZbE6u2cs0IBkgG/2q9L+u97FZ9BVXgjR +GtSz+hLhE6DbJqIyqcmYp8TtG02CsJmrp93M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771624027; x=1772228827; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=38Q6mGCwbKjhhK8kwdPI5HfU9QB1AsZ0yVRPxRPU2XA=; b=Oh8QheO174nVZ3g+Z54X0Pw+SMbejOe6xQTSkr7jgHFlE3IpDul+ifZH3LPHUlrDMY i3judnK3yepxQEe1AFpRFchgpNOKMGY59DLjR/y5mxyQ7OBt/1MlP3iSpI3NQJ1G0vbb QfixbGP/CnQUF8cZiyEcrFvFbMd288IS7IzNl2ptW581OTT0sGYOLa0yhpVSID9Djl9F Tv1KKqG7lYu1R9wNYABZMYMQm3aQQL2m8n65jOiphlaYJM0FaEAFVeGGWhiLMgnx6tsg qbUoCucersE+3cTjM0ziEhQefO5GrCZjgt4AIAj1Luq7zh8QkVrLCuP3YIydlZxtl833 KMbw== X-Gm-Message-State: AOJu0YzEn8xWv7hH0yytfIEtLOEub0id7PQgkQ5MFuNDhjqVwyxDDj0h un9O2XWlQVpNbgLxSNMcpgJAdtUX3uBThOv0iXCsFYBBLprpu2jX4h1JAk/e5e24PfZac2QSU62 O9d7gQNI3hA== X-Gm-Gg: AZuq6aK/PcnT4dHqJKcMop8WMVR9YekwNIpMYuu7wrFtuv6LD9/IeIWQnJD7U94z2+G hfHZbeCWMKQqdtCoIDjMgnBU+XMC+I0i6GmpP+lW2vfBSMDTPSZ29GFRewtapEQchCxBqiNUKRa 9rqNRStA4rBmafCOdloFpOXVjaoY9H4caWr4Ft3Rek/VR+/cJznSOPNSIBi/mcB2RXydfk0rsFo SqCb7ynYCkGHNqs9Lk4s7aivVEu0FAXO1OQqTqcSwGIhO6rnbpZtxmnGiyGTT8XuZ4AJcDyS25z DDewoHqFW86qGua9sEzzyyRSHqy0m1zNA3tMIWViX2xIhzBBUWKTOxyQr/ZJz1Ey9iwzzzzMRut 02j/KGriRB7A4dzXKcS6nEDQoZL3Mq2QDV5k+84GhhO9ynz/LEZUVRjAKD5nakkHUhKB8A3mnWB 8WcYJf93C9PYtx+h0+Pmj4ngso+FnHJFjED4vdSdtRxj+qxA75wT+IQzVibW+TaOCzkLAhbBc= X-Received: by 2002:a05:600c:1989:b0:479:1348:c63e with SMTP id 5b1f17b1804b1-483a94c99admr21112605e9.9.1771624027207; Fri, 20 Feb 2026 13:47:07 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel , "consulting @ bugseng . com" , Nicola Vetrini Subject: [PATCH 06/12] xen: Include suitable headers to make declarations visible Date: Fri, 20 Feb 2026 21:46:47 +0000 Message-Id: <20260220214653.3497384-7-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260220214653.3497384-1-andrew.cooper3@citrix.com> References: <20260220214653.3497384-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1771624061116158500 A range of functions can't see their declarations, requiring the inclusion = of appropriate headers. For pv/mm.h and pv/traps.h, this requires adjustements to become standalone. In pv/mm.h, swap xen/lib.h for xen/bug.h now that ASSERT_UNREACHABLE() has moved. For pv/traps.h, pv_trap_callback_registered() needs to see a comple= te struct vcpu, and xen/sched.h is not something appropriate to pull in conditionally. stack-protector.c can't see the declaration of __stack_chk_guard, and fixing that reveals that stack-protector.h needs get_cycles() too. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Michal Orzel CC: consulting@bugseng.com CC: Nicola Vetrini --- xen/arch/x86/include/asm/pv/mm.h | 8 +++++++- xen/arch/x86/include/asm/pv/traps.h | 6 ++---- xen/arch/x86/mm/mem_paging.c | 6 ++++-- xen/arch/x86/pv/emul-gate-op.c | 2 ++ xen/arch/x86/pv/emul-inv-op.c | 1 + xen/arch/x86/pv/emul-priv-op.c | 1 + xen/arch/x86/pv/emulate.c | 1 + xen/arch/x86/pv/grant_table.c | 1 + xen/arch/x86/pv/mm.c | 1 + xen/arch/x86/pv/ro-page-fault.c | 1 + xen/arch/x86/pv/traps.c | 1 + xen/arch/x86/x86_64/machine_kexec.c | 3 ++- xen/common/stack-protector.c | 1 + xen/include/xen/stack-protector.h | 2 ++ 14 files changed, 27 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/include/asm/pv/mm.h b/xen/arch/x86/include/asm/pv= /mm.h index a5745908206a..11a43f15e222 100644 --- a/xen/arch/x86/include/asm/pv/mm.h +++ b/xen/arch/x86/include/asm/pv/mm.h @@ -10,6 +10,12 @@ #ifndef __X86_PV_MM_H__ #define __X86_PV_MM_H__ =20 +#include + +struct cpu_user_regs; +struct page_info; +struct vcpu; + #ifdef CONFIG_PV =20 int pv_ro_page_fault(unsigned long addr, struct cpu_user_regs *regs); @@ -26,7 +32,7 @@ int validate_segdesc_page(struct page_info *page); #else =20 #include -#include +#include =20 static inline int pv_ro_page_fault(unsigned long addr, struct cpu_user_regs *regs) diff --git a/xen/arch/x86/include/asm/pv/traps.h b/xen/arch/x86/include/asm= /pv/traps.h index 8c31d5a793c5..8c201190923d 100644 --- a/xen/arch/x86/include/asm/pv/traps.h +++ b/xen/arch/x86/include/asm/pv/traps.h @@ -10,9 +10,9 @@ #ifndef __X86_PV_TRAPS_H__ #define __X86_PV_TRAPS_H__ =20 -#ifdef CONFIG_PV +#include =20 -#include +#ifdef CONFIG_PV =20 int pv_raise_nmi(struct vcpu *v); =20 @@ -28,8 +28,6 @@ static inline bool pv_trap_callback_registered(const stru= ct vcpu *v, =20 #else /* !CONFIG_PV */ =20 -#include - static inline int pv_raise_nmi(struct vcpu *v) { return -EOPNOTSUPP; } =20 static inline int pv_emulate_privileged_op(struct cpu_user_regs *regs) { r= eturn 0; } diff --git a/xen/arch/x86/mm/mem_paging.c b/xen/arch/x86/mm/mem_paging.c index d4b3cb990c54..33929b526ab9 100644 --- a/xen/arch/x86/mm/mem_paging.c +++ b/xen/arch/x86/mm/mem_paging.c @@ -7,10 +7,12 @@ * Copyright (c) 2009 Citrix Systems, Inc. (Patrick Colp) */ =20 - -#include #include #include + +#include +#include + #include =20 #include "mm-locks.h" diff --git a/xen/arch/x86/pv/emul-gate-op.c b/xen/arch/x86/pv/emul-gate-op.c index 1faf13b962b1..c2c699fbff40 100644 --- a/xen/arch/x86/pv/emul-gate-op.c +++ b/xen/arch/x86/pv/emul-gate-op.c @@ -9,6 +9,8 @@ =20 #include =20 +#include + #include "emulate.h" =20 static int read_gate_descriptor(unsigned int gate_sel, diff --git a/xen/arch/x86/pv/emul-inv-op.c b/xen/arch/x86/pv/emul-inv-op.c index 346ac1124d7b..23d2928b00cd 100644 --- a/xen/arch/x86/pv/emul-inv-op.c +++ b/xen/arch/x86/pv/emul-inv-op.c @@ -8,6 +8,7 @@ */ =20 #include +#include =20 #include "emulate.h" =20 diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c index 1d9e57ad2763..a3c1fd12621d 100644 --- a/xen/arch/x86/pv/emul-priv-op.c +++ b/xen/arch/x86/pv/emul-priv-op.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include =20 diff --git a/xen/arch/x86/pv/emulate.c b/xen/arch/x86/pv/emulate.c index 0022e0f55e30..a00d1c6c82eb 100644 --- a/xen/arch/x86/pv/emulate.c +++ b/xen/arch/x86/pv/emulate.c @@ -10,6 +10,7 @@ #include =20 #include +#include =20 #include "emulate.h" =20 diff --git a/xen/arch/x86/pv/grant_table.c b/xen/arch/x86/pv/grant_table.c index 247436a0156a..1df68440a24a 100644 --- a/xen/arch/x86/pv/grant_table.c +++ b/xen/arch/x86/pv/grant_table.c @@ -12,6 +12,7 @@ #include =20 #include +#include #include =20 #include "mm.h" diff --git a/xen/arch/x86/pv/mm.c b/xen/arch/x86/pv/mm.c index 187f5f6a3e8c..3f2e9dedcde3 100644 --- a/xen/arch/x86/pv/mm.c +++ b/xen/arch/x86/pv/mm.c @@ -12,6 +12,7 @@ =20 #include #include +#include =20 #include "mm.h" =20 diff --git a/xen/arch/x86/pv/ro-page-fault.c b/xen/arch/x86/pv/ro-page-faul= t.c index 9c6f66884675..d89306d34fc6 100644 --- a/xen/arch/x86/pv/ro-page-fault.c +++ b/xen/arch/x86/pv/ro-page-fault.c @@ -8,6 +8,7 @@ * Copyright (c) 2004 Christian Limpach */ =20 +#include #include #include =20 diff --git a/xen/arch/x86/pv/traps.c b/xen/arch/x86/pv/traps.c index 26a468108a77..b0395b99145a 100644 --- a/xen/arch/x86/pv/traps.c +++ b/xen/arch/x86/pv/traps.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include =20 diff --git a/xen/arch/x86/x86_64/machine_kexec.c b/xen/arch/x86/x86_64/mach= ine_kexec.c index f4a005cd0c2f..f9e54d86fb53 100644 --- a/xen/arch/x86/x86_64/machine_kexec.c +++ b/xen/arch/x86/x86_64/machine_kexec.c @@ -6,8 +6,9 @@ * - Magnus Damm */ =20 -#include #include +#include + #include #include =20 diff --git a/xen/common/stack-protector.c b/xen/common/stack-protector.c index 2115912c3bd0..05e57d4509e2 100644 --- a/xen/common/stack-protector.c +++ b/xen/common/stack-protector.c @@ -2,6 +2,7 @@ #include #include #include +#include #include =20 /* diff --git a/xen/include/xen/stack-protector.h b/xen/include/xen/stack-prot= ector.h index 931affd919be..65488bdabced 100644 --- a/xen/include/xen/stack-protector.h +++ b/xen/include/xen/stack-protector.h @@ -1,6 +1,8 @@ #ifndef __XEN_STACK_PROTECTOR_H__ #define __XEN_STACK_PROTECTOR_H__ =20 +#include + extern unsigned long __stack_chk_guard; =20 /* --=20 2.39.5