* [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
* Re: [STABLE] 6.12.23: vfio error (was: arch/x86/coco/tdx/tdx.c build error)
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 ` Cal Peake
2025-04-14 23:55 ` Cal Peake
0 siblings, 1 reply; 5+ messages in thread
From: Cal Peake @ 2025-04-13 23:55 UTC (permalink / raw)
To: Kernel Mailing List
Cc: Vishal Annapurve, Kirill A. Shutemov, Greg Kroah-Hartman
Well, this isn't good...
After booting the new kernel, I get errors trying to do vfio passthrough:
qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.3, no available reset mechanism.
qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.2, no available reset mechanism.
qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.1, no available reset mechanism.
qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.0, no available reset mechanism.
Anyone have any ideas?
--
Cal Peake
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [STABLE] 6.12.23: vfio error (was: arch/x86/coco/tdx/tdx.c build error)
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
0 siblings, 1 reply; 5+ messages in thread
From: Cal Peake @ 2025-04-14 23:55 UTC (permalink / raw)
To: Kernel Mailing List
Cc: Vishal Annapurve, Kirill A. Shutemov, Greg Kroah-Hartman,
Alex Williamson
On Sun, 13 Apr 2025, Cal Peake wrote:
> After booting the new kernel, I get errors trying to do vfio passthrough:
>
> qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.3, no available reset mechanism.
> qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.2, no available reset mechanism.
> qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.1, no available reset mechanism.
> qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.0, no available reset mechanism.
This was resolved by Alex Williamson, with his patch:
https://lore.kernel.org/lkml/20250414211828.3530741-1-alex.williamson@redhat.com/
Thank you, Alex!
--
Cal Peake
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [STABLE] 6.12.23: vfio error (was: arch/x86/coco/tdx/tdx.c build error)
2025-04-14 23:55 ` Cal Peake
@ 2025-04-17 14:37 ` Greg Kroah-Hartman
2025-04-17 19:00 ` Cal Peake
0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2025-04-17 14:37 UTC (permalink / raw)
To: Cal Peake
Cc: Kernel Mailing List, Vishal Annapurve, Kirill A. Shutemov,
Alex Williamson
On Mon, Apr 14, 2025 at 07:55:06PM -0400, Cal Peake wrote:
> On Sun, 13 Apr 2025, Cal Peake wrote:
>
> > After booting the new kernel, I get errors trying to do vfio passthrough:
> >
> > qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.3, no available reset mechanism.
> > qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.2, no available reset mechanism.
> > qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.1, no available reset mechanism.
> > qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.0, no available reset mechanism.
>
> This was resolved by Alex Williamson, with his patch:
>
> https://lore.kernel.org/lkml/20250414211828.3530741-1-alex.williamson@redhat.com/
Is this in Linus's tree yet?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [STABLE] 6.12.23: vfio error (was: arch/x86/coco/tdx/tdx.c build error)
2025-04-17 14:37 ` Greg Kroah-Hartman
@ 2025-04-17 19:00 ` Cal Peake
0 siblings, 0 replies; 5+ messages in thread
From: Cal Peake @ 2025-04-17 19:00 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Kernel Mailing List, Vishal Annapurve, Kirill A. Shutemov,
Alex Williamson, Bjorn Helgaas
On Thu, 17 Apr 2025, Greg Kroah-Hartman wrote:
> On Mon, Apr 14, 2025 at 07:55:06PM -0400, Cal Peake wrote:
> > On Sun, 13 Apr 2025, Cal Peake wrote:
> >
> > > After booting the new kernel, I get errors trying to do vfio passthrough:
> > >
> > > qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.3, no available reset mechanism.
> > > qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.2, no available reset mechanism.
> > > qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.1, no available reset mechanism.
> > > qemu-8.2-system-x86_64: vfio: Cannot reset device 0000:14:00.0, no available reset mechanism.
> >
> > This was resolved by Alex Williamson, with his patch:
> >
> > https://lore.kernel.org/lkml/20250414211828.3530741-1-alex.williamson@redhat.com/
>
> Is this in Linus's tree yet?
Adding Bjorn Helgaas and quoting from their message[1]:
> Applied with Kevin's reviewed-by to pci/for-linus for v6.15, thanks,
> and sorry for the breakage.
--
Cal Peake
[1] https://lore.kernel.org/lkml/20250415203929.GA34692@bhelgaas/
^ 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