Skip to contentSkip to conversation

Add I/O port filtering for AMDs sev module.

PATCH New Joshua Lilly 1 participant 1 message Apr 8, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add I/O port filtering for AMDs sev module.

This adds a port allow list to allow PCIE, ACPI, PCI, DMA, RTC, etc and serial for easy debugging when debugging is enabled. The port allow list (switch statement) is copied directly from the tdx code.

---
 arch/x86/coco/sev/core.c   |  3 +++
 arch/x86/coco/sev/shared.c | 41 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)
arch/x86/coco/sev/core.c +3 -0
index b0c1a7a57497..b8d62394d355 100644
@@ -2638,6 +2638,9 @@ static int __init snp_init_platform_device(void)
 	if (platform_device_register(&sev_guest_device))
 		return -ENODEV;
 
+	if (!sev_cfg.debug)
+		debug_enabled = false;
+
 	pr_info("SNP guest platform device initialized.\n");
 	return 0;
 }
arch/x86/coco/sev/shared.c +41 -0

64 lines not on this page · raw message

Signature · 1 line
2.47.1