From: Philipp Giersfeld <[email protected]>

The TDX module advertises the APIC frequency with 25Mhz for TD guest in
contrast to the default frequency of 1Ghz. Hardcode frequency to 25Mhz
for demonstration purposes. This should be changed to either check the
frequency with CPUID 0x15 or by simply setting it to the two known
values depending on whether VM is started as a TD.

Signed-off-by: Philipp Giersfeld <[email protected]>
Signed-off-by: Anton Iacobaeus <[email protected]>
---
 ...to-match-the-one-advertised-by-TDX-m.patch | 27 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 
debian/patches/Adapt-Frequency-to-match-the-one-advertised-by-TDX-m.patch

diff --git 
a/debian/patches/Adapt-Frequency-to-match-the-one-advertised-by-TDX-m.patch 
b/debian/patches/Adapt-Frequency-to-match-the-one-advertised-by-TDX-m.patch
new file mode 100644
index 0000000..6de65c7
--- /dev/null
+++ b/debian/patches/Adapt-Frequency-to-match-the-one-advertised-by-TDX-m.patch
@@ -0,0 +1,27 @@
+From bdd27dcd304692f59091078baa01e308281dbb80 Mon Sep 17 00:00:00 2001
+From: Philipp Giersfeld <[email protected]>
+Date: Wed, 18 Jun 2025 16:21:53 +0200
+Subject: [PATCH] Adapt Frequency to match the one advertised by TDX module
+ (25Mhz)
+
+Signed-off-by: Philipp Giersfeld <[email protected]>
+---
+ OvmfPkg/IntelTdx/IntelTdxX64.dsc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/OvmfPkg/IntelTdx/IntelTdxX64.dsc 
b/OvmfPkg/IntelTdx/IntelTdxX64.dsc
+index f1d070ca8c..7fccc876d1 100644
+--- a/OvmfPkg/IntelTdx/IntelTdxX64.dsc
++++ b/OvmfPkg/IntelTdx/IntelTdxX64.dsc
+@@ -531,7 +531,7 @@
+   # Set ConfidentialComputing defaults
+   gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0
+ 
+-  gEfiMdePkgTokenSpaceGuid.PcdFSBClock|1000000000
++  gEfiMdePkgTokenSpaceGuid.PcdFSBClock|25000000
+ 
+ 
################################################################################
+ #
+-- 
+2.39.5
+
diff --git a/debian/patches/series b/debian/patches/series
index c0155a2..049c6b1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ ArmVirtPkg-disable-the-EFI_MEMORY_ATTRIBUTE-protocol.patch
 Revert-UefiCpuPkg-Produce-EFI-memory-attributes-prot.patch
 UefiCpuPkg-MpInitLib-Fix-split-lock-violation-from-M.patch
 Enable_SCSI_IntelTdx_DXEFV.patch
+Adapt-Frequency-to-match-the-one-advertised-by-TDX-m.patch
-- 
2.43.0


_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to