[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 20/44] x86/boot: convert xsm policy loading to struct boot_module
- To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Tue, 8 Oct 2024 12:13:37 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=apertussolutions.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- 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=i/wLgfdjPfry5iwOwVFF2Sb4MZxo8UqwRq36uhx649w=; b=it8AfOuPkMOqIZ7AJba1wxcRVa7mehtCc1kYVG2TDv0Lvn8zp4d5RU8jDfXzBi0wKi367mjQG1bzGfPgL2zTi+G3uld0qR8nrfMQ4PsoczstB/SNjWt0mo2d57zBib+VoBc2nurOZqw1ZpUJzApgeKLfP5m/33otICfnOw9SuEGF9N5Df/Chsb9J05HCo080Px/2dqqUgnKM7hJpIgIj8sXaBrKiTsnWR/9gr9TIQF2UkRJ5fJp9Sdf3HMihtNgnLi467mB/+UAp5CXcpTHyHg3+ZbNNJK8GlZMwiorxL5GbPFfSZTjJ58C39//qIGWR4v22rweW0EaofQXqVNb8mw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Vwuayvcub7BGPPcMZ/xW/yNYRd+gxuqE/HoGp5t3eiEi4rPlROj4y8gTqCqGmHQ8DxGH2T58/Wjhrb9CXZYKGpPFyf2JFqGQk+7r/V/KOW5OlbIz2r99bN8teYOcrpbnbkREGCik9XWwznqwDegCo/o8tYPCYhNemS58W5esfOEfTxLNFhf6bQUV2e1CNCzFN/9QGdrzYcNUmyCzkhSm4UY8uadPz8ZvITNGy5XTY2sScRLUsa3fRnkG3vGHJfCv1KK/0q2uV3wcixqyeyqfNMIQzfKKshpWUha52RLhYQLuGwg+0L2Gy58hgoVFcBHWoXWRyiuwg8FddEa8hsC1HA==
- Cc: <christopher.w.clark@xxxxxxxxx>, <stefano.stabellini@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 08 Oct 2024 16:14:01 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2024-10-06 17:49, Daniel P. Smith wrote:
Iterate through the unclaimed struct boot_module to see if any are an XSM FLASK
policy. If one is located, mark it as an xsm policy.
Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
@@ -161,6 +162,14 @@ int __init xsm_multiboot_init(
}
ret = xsm_core_init(policy_buffer, policy_size);
+ if ( ret == 0 )
+ {
+ int idx = first_boot_module_index(bi, BOOTMOD_XSM_POLICY);
+
+ /* If the policy was loaded from a boot module, mark it consumed */
+ if ( idx >= 0 )
+ bi->mods[idx].flags |= BOOTMOD_FLAG_X86_CONSUMED;
Maybe xsm_multiboot_policy_init() should return the idx used instead of
having a second search? (Also, xsm_multiboot_policy_init() can't fail?)
+ }
bootstrap_map(NULL);
return 0;
The other changes look okay.
Regards,
Jason
|