On 17/10/2023 15:04, Dave Marples wrote:
On 17/10/2023 09:48, Dave Marples wrote:
I'm building jailhouse on a arm64 linux 6.1 Debian bookworm system
(imx8m, if it matters) using gcc 12.2.0...or, more specfically,
failing to build. I get to the module install stage and then get;
ERROR: modpost: "__hyp_stub_vectors"
[/root/jailhouse/driver/jailhouse.ko] undefined!
ERROR: modpost: "ioremap_page_range"
[/root/jailhouse/driver/jailhouse.ko] undefined!
ERROR: modpost: "__get_vm_area_caller"
[/root/jailhouse/driver/jailhouse.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:126:
/root/jailhouse/Module.symvers] Error 1
make[1]: *** [Makefile:1989: modpost] Error 2
make: *** [Makefile:40: modules] Error 2
So far as I can tell I have all of the required KALLSYMS set, so
wondered if anyone else had trouble with recent kernels or if I'm
missing some magic somewhere?
Just to start the follow-up on this in case it's useful to anyone else
in future; I figured out that I'd missed the stage of patching the
kernel ( It might make sense to add a prod for this in the 'Build &
Installation' instructions ... ) using the patch embedded in
gen-kernel-build.sh and adjusting to suit my kernel..is there somewhere
else I'm supposed to get that patch from in a cleaner way?
I'm now at the point where the thing will start, but pretty quickly
falls over in a big heap;
# jailhouse enable imx8mm.cell
[ 62.953888] jailhouse: firmware: direct-loading firmware jailhouse.bin
[ 62.961239] Unable to handle kernel execute from non-executable
memory at virtual address ffff80000a004000
[ 62.961239] Unable to handle kernel execute from non-executable
memory at virtual address ffff80000a004000
[ 62.961239] Unable to handle kernel execute from non-executable
memory at virtual address ffff80000a004000
[ 62.961239] Unable to handle kernel execute from non-executable
memory at virtual address ffff80000a004000
[ 62.961248] Mem abort info:
[ 62.961248] Mem abort info:
[ 62.961248] Mem abort info:
[ 62.961249] ESR = 0x000000008600000e
[ 62.961250] ESR = 0x000000008600000e
Help still appreciated...Can't help getting the feeling I'm missing a
document somewhere whereby all this lot magically becomes easy...
Did you also apply the patch that I attached? I'm pretty sure that it's
missing.
Thanks,
Ralf
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/36d21a58-fb8b-47f3-977f-ab179f0ea8b6%40oth-regensburg.de.
From 54ce8bd0b5cc2b9150025e06ab50ee83bfcb62e4 Mon Sep 17 00:00:00 2001
From: Jan Kiszka <[email protected]>
Date: Sat, 2 Oct 2021 11:24:16 +0200
Subject: [PATCH] Revert "mm: don't allow executable ioremap mappings"
This reverts commit 8491502f787c4a902bd4f223b578ef47d3490264.
Jailhouse needs executable ioremapped RAM to start the hypervisor.
Signed-off-by: Jan Kiszka <[email protected]>
---
mm/vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 52f50fe7db83..7fbfad571968 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -316,7 +316,7 @@ int ioremap_page_range(unsigned long addr, unsigned long end,
{
int err;
- err = vmap_range_noflush(addr, end, phys_addr, pgprot_nx(prot),
+ err = vmap_range_noflush(addr, end, phys_addr, prot,
ioremap_max_page_shift);
flush_cache_vmap(addr, end);
return err;
--
2.42.0