From nobody Wed Dec 4 19:43:00 2024 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 header.i=dpsmith@apertussolutions.com; 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; arc=pass (i=1 dmarc=pass fromdomain=apertussolutions.com) ARC-Seal: i=2; a=rsa-sha256; t=1729471734; cv=pass; d=zohomail.com; s=zohoarc; b=B2cBeKHEI/nex5hz2eZAQPJyChCnOsPGYLIJLfGmOu+LgIM+s+a0JsFPDqei0x8AJlre807f4t321oHhzHQtYR9q26m/u4MwJ8wFSP5bTkQgxW8L9kEIBQ10+IFLjnBz+0Vygphgi8NQ+g8EM0IK/mP15+XYKWvrmJyAYPW0Ez8= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729471734; h=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=yhLw3VJzc36B+i3/OvCwWtKAEdp06v39PF++zo/ehfw=; b=RIa0SavmaL8co/ZkQ0Ldh14RuJQ6lnhsETTz4wMV+85vyHNDD6McuxAvhb+zNO+xsnKZsfrVObgWTt1hQNiu/P/EWI4oWCP2pIcVy1bvBigi7A8iIoz1xJrkhfGE8A/zmwTkltYHnq8FkL50F6gB+eoMeeez3soDqkBNUzV91cE= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass header.i=dpsmith@apertussolutions.com; 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; arc=pass (i=1 dmarc=pass fromdomain=apertussolutions.com) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1729471734804953.125844435679; Sun, 20 Oct 2024 17:48:54 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.822908.1236852 (Exim 4.92) (envelope-from ) id 1t2gb8-0002rI-2U; Mon, 21 Oct 2024 00:48:38 +0000 Received: by outflank-mailman (output) from mailman id 822908.1236852; Mon, 21 Oct 2024 00:48:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t2gb7-0002rB-VV; Mon, 21 Oct 2024 00:48:37 +0000 Received: by outflank-mailman (input) for mailman id 822908; Mon, 21 Oct 2024 00:48:36 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t2gb6-0001i1-JM for xen-devel@lists.xenproject.org; Mon, 21 Oct 2024 00:48:36 +0000 Received: from sender4-of-o51.zoho.com (sender4-of-o51.zoho.com [136.143.188.51]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 3353eecb-8f46-11ef-a0be-8be0dac302b0; Mon, 21 Oct 2024 02:48:35 +0200 (CEST) Received: by mx.zohomail.com with SMTPS id 1729471603538750.0207690703996; Sun, 20 Oct 2024 17:46:43 -0700 (PDT) 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: 3353eecb-8f46-11ef-a0be-8be0dac302b0 ARC-Seal: i=1; a=rsa-sha256; t=1729471606; cv=none; d=zohomail.com; s=zohoarc; b=X4s3eIQ14tZWKHqkKLPMrGe3CIVkwuXN4KvYLbrgervkjM3mcQH/HYkgGTnNVovltcXzbN5fZb1yu2knYvzvSEPzc6rEWDz5my1pWEX/n2JdzZrnMqcHWimuaCBCEgBSzIXaN4uwSEjNPXVeaGLp+K+5jPcgeAkZ5Y1czBOnWeA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729471606; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=yhLw3VJzc36B+i3/OvCwWtKAEdp06v39PF++zo/ehfw=; b=Xf46jjNQrPvREwCQYthNg3zmsjbrIFGOko19Y0ng6aUd/Ez9iFvm9VX0C2kiS3dPKagfAvkb0FkLWh62JfOt2ePQY6UZvUnhfqhTKG2Py5r9qbXHFVSeqDHXsh3jcyZlshODibl+IfN88UbAlPjZIl6Dli3vne5+VOvRyZfdolQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@apertussolutions.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1729471606; s=zoho; d=apertussolutions.com; i=dpsmith@apertussolutions.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=yhLw3VJzc36B+i3/OvCwWtKAEdp06v39PF++zo/ehfw=; b=n9QYn8gCMsKqiePXlsaqdnDbpcy+na+8vvwFTe1IrpXYDS63W4CfZuW558Pm2hH9 njZcUjN8/V5+T1fZsFWtm7w2ALp4b9uPdRBY0jg20J99bacE33InNQL/yTKMs5Cqjax N0ZOs4VD7G79iuvqX+siyEoEGAPMvXn3+b4I1kEw= From: "Daniel P. Smith" To: xen-devel@lists.xenproject.org Cc: "Daniel P. Smith" , jason.andryuk@amd.com, christopher.w.clark@gmail.com, stefano.stabellini@amd.com, Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v7 17/38] x86/boot: remove module_map usage from xsm policy loading Date: Sun, 20 Oct 2024 20:45:52 -0400 Message-Id: <20241021004613.18793-18-dpsmith@apertussolutions.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20241021004613.18793-1-dpsmith@apertussolutions.com> References: <20241021004613.18793-1-dpsmith@apertussolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-ZohoMail-DKIM: pass (identity dpsmith@apertussolutions.com) X-ZM-MESSAGEID: 1729471735630116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel P. Smith Reviewed-by: Jason Andryuk --- Changes since v5: - adjust comment to coding style --- xen/arch/x86/setup.c | 2 +- xen/include/xsm/xsm.h | 9 +++------ xen/xsm/xsm_core.c | 6 ++---- xen/xsm/xsm_policy.c | 4 +--- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 7fdbe57ca1c3..84d6981f4e77 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1882,7 +1882,7 @@ void asmlinkage __init noreturn __start_xen(unsigned = long mbi_p) mmio_ro_ranges =3D rangeset_new(NULL, "r/o mmio ranges", RANGESETF_prettyprint_hex); =20 - xsm_multiboot_init(module_map, bi); + xsm_multiboot_init(bi); =20 /* * IOMMU-related ACPI table parsing may require some of the system dom= ains diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h index f155d10e718c..791936e5285b 100644 --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -781,11 +781,9 @@ static inline int xsm_argo_send(const struct domain *d= , const struct domain *t) #endif /* XSM_NO_WRAPPERS */ =20 #ifdef CONFIG_MULTIBOOT -int xsm_multiboot_init( - unsigned long *module_map, struct boot_info *bi); +int xsm_multiboot_init(struct boot_info *bi); int xsm_multiboot_policy_init( - unsigned long *module_map, struct boot_info *bi, - void **policy_buffer, size_t *policy_size); + struct boot_info *bi, void **policy_buffer, size_t *policy_size); #endif =20 #ifdef CONFIG_HAS_DEVICE_TREE @@ -831,8 +829,7 @@ static const inline struct xsm_ops *silo_init(void) #include =20 #ifdef CONFIG_MULTIBOOT -static inline int xsm_multiboot_init ( - unsigned long *module_map, struct boot_info *bi) +static inline int xsm_multiboot_init(struct boot_info *bi) { return 0; } diff --git a/xen/xsm/xsm_core.c b/xen/xsm/xsm_core.c index 234b39de7a1d..d58042a1fa4a 100644 --- a/xen/xsm/xsm_core.c +++ b/xen/xsm/xsm_core.c @@ -140,8 +140,7 @@ static int __init xsm_core_init(const void *policy_buff= er, size_t policy_size) } =20 #ifdef CONFIG_MULTIBOOT -int __init xsm_multiboot_init( - unsigned long *module_map, struct boot_info *bi) +int __init xsm_multiboot_init(struct boot_info *bi) { int ret =3D 0; void *policy_buffer =3D NULL; @@ -151,8 +150,7 @@ int __init xsm_multiboot_init( =20 if ( XSM_MAGIC ) { - ret =3D xsm_multiboot_policy_init(module_map, bi, &policy_buffer, - &policy_size); + ret =3D xsm_multiboot_policy_init(bi, &policy_buffer, &policy_size= ); if ( ret ) { bootstrap_map_bm(NULL); diff --git a/xen/xsm/xsm_policy.c b/xen/xsm/xsm_policy.c index 9fb8563eb571..f1c94702f6e0 100644 --- a/xen/xsm/xsm_policy.c +++ b/xen/xsm/xsm_policy.c @@ -32,8 +32,7 @@ =20 #ifdef CONFIG_MULTIBOOT int __init xsm_multiboot_policy_init( - unsigned long *module_map, struct boot_info *bi, - void **policy_buffer, size_t *policy_size) + struct boot_info *bi, void **policy_buffer, size_t *policy_size) { int rc =3D 0; u32 *_policy_start; @@ -57,7 +56,6 @@ int __init xsm_multiboot_policy_init( printk("Policy len %#lx, start at %p.\n", _policy_len,_policy_start); =20 - __clear_bit(boot_module_index(bi, bm), module_map); bm->type =3D BOOTMOD_XSM_POLICY; break; =20 --=20 2.30.2