all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Anton Iacobaeus <anton.iacobaeus@canarybit.eu>
To: pve-devel@lists.proxmox.com
Cc: Anton Iacobaeus <anton.iacobaeus@canarybit.eu>,
	Philipp Giersfeld <philipp.giersfeld@canarybit.eu>
Subject: [pve-devel] [PATCH edk2-firmware 4/4] Adapt APIC frequency for TD guest
Date: Tue, 16 Sep 2025 09:52:49 +0200	[thread overview]
Message-ID: <20250916075406.33084-7-anton.iacobaeus@canarybit.eu> (raw)
In-Reply-To: <20250916075406.33084-2-anton.iacobaeus@canarybit.eu>

From: Philipp Giersfeld <philipp.giersfeld@canarybit.eu>

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 <philipp.giersfeld@canarybit.eu>
Signed-off-by: Anton Iacobaeus <anton.iacobaeus@canarybit.eu>
---
 ...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 <philipp.giersfeld@canarybit.eu>
+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 <philipp.giersfeld@canarybit.eu>
+---
+ 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
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2025-09-16  9:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16  7:52 [pve-devel] [PATCH edk2-firmware/manager/qemu-server 0/8] Add support for Intel TDX Anton Iacobaeus
2025-09-16  7:52 ` [pve-devel] [PATCH edk2-firmware 1/4] Change name of SEV-related OVMF files Anton Iacobaeus
2025-09-16  9:48   ` Thomas Lamprecht
2025-09-16  7:52 ` [pve-devel] [PATCH edk2-firmware 2/4] Add firmware target for TDFV Anton Iacobaeus
2025-09-16  7:52 ` [pve-devel] [PATCH edk2-firmware 3/4] Add SCSI in NCCFV for TD guest Anton Iacobaeus
2025-09-16  7:52 ` Anton Iacobaeus [this message]
2025-09-16  9:51   ` [pve-devel] [PATCH edk2-firmware 4/4] Adapt APIC frequency " Thomas Lamprecht
2025-09-16  7:52 ` [pve-devel] [PATCH manager 1/1] Add support for Intel TDX Anton Iacobaeus
2025-09-16  7:52 ` [pve-devel] [PATCH qemu-server 1/3] Adapt AMD SEV code for compatibility with other platforms Anton Iacobaeus
2025-09-16  7:52 ` [pve-devel] [PATCH qemu-server 2/3] Add check for TDX support Anton Iacobaeus
2025-09-16 10:22   ` Thomas Lamprecht
2025-09-16  7:52 ` [pve-devel] [PATCH qemu-server 3/3] Add support for Intel TDX Anton Iacobaeus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250916075406.33084-7-anton.iacobaeus@canarybit.eu \
    --to=anton.iacobaeus@canarybit.eu \
    --cc=philipp.giersfeld@canarybit.eu \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal