On 1/13/26 03:14, Borislav Petkov wrote:
On Mon, Oct 06, 2025 at 03:42:07PM -0700, Mukesh Rathor wrote:
Introduce a new file to implement collection of hypervisor RAM into the
vmcore collected by linux. By default, the hypervisor RAM is locked, ie,
protected via hw page table. Hyper-V implements a disable hypercall which
essentially devirtualizes the system on the fly. This mechanism makes the
hypervisor RAM accessible to linux. Because the hypervisor RAM is already
mapped into linux address space (as reserved RAM), it is automatically
collected into the vmcore without extra work. More details of the
implementation are available in the file prologue.
Signed-off-by: Mukesh Rathor <[email protected]>
---
arch/x86/hyperv/hv_crash.c | 642 +++++++++++++++++++++++++++++++++++++
1 file changed, 642 insertions(+)
create mode 100644 arch/x86/hyperv/hv_crash.c
This breaks randconfig builds here:
arch/x86/hyperv/hv_crash.c:631:2: error: must use 'struct' tag to refer to type
'smp_ops'
631 | smp_ops.crash_stop_other_cpus = hv_crash_stop_other_cpus;
| ^
| struct
arch/x86/hyperv/hv_crash.c:631:9: error: expected identifier or '('
631 | smp_ops.crash_stop_other_cpus = hv_crash_stop_other_cpus;
| ^
2 errors generated.
make[4]: *** [scripts/Makefile.build:287: arch/x86/hyperv/hv_crash.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:544: arch/x86/hyperv] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:544: arch/x86] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/amd/kernel/linux/Makefile:2054: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
config 01-18-21-randconfig-x86_64-13708.cfg attached. Note that this is
a clang build:
Ubuntu clang version 18.1.3 (1ubuntu1)
It fails with gcc too tho:
arch/x86/hyperv/hv_crash.c: In function ?hv_root_crash_init?:
arch/x86/hyperv/hv_crash.c:631:9: error: ?smp_ops? undeclared (first use in
this function)
631 | smp_ops.crash_stop_other_cpus = hv_crash_stop_other_cpus;
| ^~~~~~~
arch/x86/hyperv/hv_crash.c:631:9: note: each undeclared identifier is reported
only once for each function it appears in
make[4]: *** [scripts/Makefile.build:287: arch/x86/hyperv/hv_crash.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:544: arch/x86/hyperv] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:544: arch/x86] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/amd/kernel/linux/Makefile:2054: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
Looks like needs some config option around it, probably SMP. Will take
a look in a day or two. Thanks for letting us know.
-Mukesh