From patchwork Tue May 31 02:39:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Daniel P. Smith" X-Patchwork-Id: 12864988 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8A7E6C433FE for ; Mon, 30 May 2022 22:40:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.338847.563671 (Exim 4.92) (envelope-from ) id 1nvo3n-0006Ru-45; Mon, 30 May 2022 22:40:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 338847.563671; Mon, 30 May 2022 22:40:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nvo3n-0006Rn-1M; Mon, 30 May 2022 22:40:27 +0000 Received: by outflank-mailman (input) for mailman id 338847; Mon, 30 May 2022 22:40:26 +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 1nvo3m-0006Rh-28 for xen-devel@lists.xenproject.org; Mon, 30 May 2022 22:40:26 +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 7c6bf315-e069-11ec-bd2c-47488cf2e6aa; Tue, 31 May 2022 00:40:22 +0200 (CEST) Received: from sisyou.hme. (static-72-81-132-2.bltmmd.fios.verizon.net [72.81.132.2]) by mx.zohomail.com with SMTPS id 1653950416258935.3632297768722; Mon, 30 May 2022 15:40:16 -0700 (PDT) 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: 7c6bf315-e069-11ec-bd2c-47488cf2e6aa ARC-Seal: i=1; a=rsa-sha256; t=1653950418; cv=none; d=zohomail.com; s=zohoarc; b=L3kGXoJAmUwxK01tMBFkX+e+lKNgWWpTkC9RFoe7df8hhd4P+HN9AQw7deolILP9T1ixuZ+lhe84czRVCfTN+mOrqZaPj9mCXHDTuEORASTOFpjDrhI/K5RwVj/a4CYj1vZMihWuPgATMOu5BFCuFUErOgpYDYcw2Pf7rwQU1MI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653950418; h=Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=qir7TLj3hUjcEYTpsw2J9YevK90J/8tO9fMu2SRDv64=; b=cwikIh2dnyNjahV3EJ2rMMWM9FUe4fTbMXn2dbaCQhxrr0bHprfDFggsQ0k4SBVnKn04+aWsHuD2XD+9vwKPpiG46nnAmy/KDNHDhNb85gYsj+NlIZfSjIYc6OHd54eFYXrMXnVqDJ9zhawKz14BVM369J3KHOIYJOXJmtYLfgo= 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=1653950418; s=zoho; d=apertussolutions.com; i=dpsmith@apertussolutions.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=qir7TLj3hUjcEYTpsw2J9YevK90J/8tO9fMu2SRDv64=; b=NtLwsIpTIHgjBDkOCosST2XSuUAVHBwVhs9LV+ZSaSkyJgqG3KEoEvhVpqLiTB35 lbJuy2gOe30oYT+mqqEZ9bs58debkMs6NdApZCUpSzGbBkS2S0RkrRyAhkmYEtVZzg6 sqjOrNlbQkHwKld6NxYRxEQfzCqIsDautUs0kn1M= From: "Daniel P. Smith" To: xen-devel@lists.xenproject.org Cc: "Daniel P. Smith" , scott.davis@starlab.io, christopher.clark@starlab.io, jandryuk@gmail.com Subject: [v2 0/3] xsm: refactor and optimize policy loading Date: Mon, 30 May 2022 22:39:40 -0400 Message-Id: <20220531023945.22196-1-dpsmith@apertussolutions.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-ZohoMailClient: External This series was born out of some cleanup work done while crafting the hyperlaunch boot modules patch series. The primary purpose of this series was to stop walking all boot modules when it was not necessary, but the scope creeped during review. Changes in v2: * changed init_policy to policy_file_required * split the patch into a series * corrected casting of policy buffer * use IS_ENABLED() instead of #ifdef sequence * moved #ifdef inside of braces for xsm_dt_policy_init() * addressed lack of error handling of xsm{mb,dt}_init() Daniel P. Smith (3): xsm: only search for a policy file when needed xsm: consolidate loading the policy buffer xsm: properly handle error from XSM init xen/arch/arm/setup.c | 10 ++++---- xen/arch/x86/setup.c | 9 +++++-- xen/include/xsm/xsm.h | 2 +- xen/xsm/xsm_core.c | 56 +++++++++++++++++++++---------------------- xen/xsm/xsm_policy.c | 31 ++++++++++++++++++++---- 5 files changed, 68 insertions(+), 40 deletions(-)