The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] [STABLE] 6.12.23: arch/x86/coco/tdx/tdx.c build error
@ 2025-04-12 20:48 Cal Peake
  2025-04-13 23:55 ` [STABLE] 6.12.23: vfio error (was: arch/x86/coco/tdx/tdx.c build error) Cal Peake
  0 siblings, 1 reply; 5+ messages in thread
From: Cal Peake @ 2025-04-12 20:48 UTC (permalink / raw)
  To: Kernel Mailing List
  Cc: Vishal Annapurve, Kirill A. Shutemov, Greg Kroah-Hartman

[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]

Hi,

6.12.23 fails to build for me with the error:

  CC      arch/x86/coco/tdx/tdx.o
arch/x86/coco/tdx/tdx.c: In function ‘tdx_early_init’:
arch/x86/coco/tdx/tdx.c:1080:19: error: ‘struct pv_irq_ops’ has no member named ‘safe_halt’
 1080 |         pv_ops.irq.safe_halt = tdx_safe_halt;
      |                   ^
arch/x86/coco/tdx/tdx.c:1081:19: error: ‘struct pv_irq_ops’ has no member named ‘halt’
 1081 |         pv_ops.irq.halt = tdx_halt;
      |                   ^
make[5]: *** [scripts/Makefile.build:229: arch/x86/coco/tdx/tdx.o] Error 1
make[4]: *** [scripts/Makefile.build:478: arch/x86/coco/tdx] Error 2
make[3]: *** [scripts/Makefile.build:478: arch/x86/coco] Error 2
make[2]: *** [scripts/Makefile.build:478: arch/x86] Error 2
make[1]: *** [/home/cal/tmp/volatile/linux-6.12.23/Makefile:1944: .] Error 2
make: *** [Makefile:224: __sub-make] Error 2

Those struct members are only available when CONFIG_PARAVIRT_XXL is 
defined.

The below patch adds a check for that macro and gets the build to 
completion.

My config is attached for reference.

-- 
Cal Peake

Signed-off-by: Cal Peake <cp@absolutedigital.net>

--- ./arch/x86/coco/tdx/tdx.c	2025-04-10 08:39:41.000000000 -0400
+++ ./arch/x86/coco/tdx/tdx.c	2025-04-12 15:42:35.275284746 -0400
@@ -1066,7 +1066,7 @@
 
 	x86_platform.guest.enc_kexec_begin	     = tdx_kexec_begin;
 	x86_platform.guest.enc_kexec_finish	     = tdx_kexec_finish;
-
+#ifdef CONFIG_PARAVIRT_XXL
 	/*
 	 * Avoid "sti;hlt" execution in TDX guests as HLT induces a #VE that
 	 * will enable interrupts before HLT TDCALL invocation if executed
@@ -1079,7 +1079,7 @@
 	 */
 	pv_ops.irq.safe_halt = tdx_safe_halt;
 	pv_ops.irq.halt = tdx_halt;
-
+#endif
 	/*
 	 * TDX intercepts the RDMSR to read the X2APIC ID in the parallel
 	 * bringup low level code. That raises #VE which cannot be handled

[-- Attachment #2: config-6.12.23.gz --]
[-- Type: application/octet-stream, Size: 64546 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-04-17 19:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-12 20:48 [PATCH] [STABLE] 6.12.23: arch/x86/coco/tdx/tdx.c build error Cal Peake
2025-04-13 23:55 ` [STABLE] 6.12.23: vfio error (was: arch/x86/coco/tdx/tdx.c build error) Cal Peake
2025-04-14 23:55   ` Cal Peake
2025-04-17 14:37     ` Greg Kroah-Hartman
2025-04-17 19:00       ` Cal Peake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox