tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PVH boot with qemu
On Mon, Nov 13, 2023 at 06:37:01AM +0100, Emile `iMil' Heitor wrote:
>
> I first asked guidance in port-xen@ but the topic doesn't seem to have much
> success, I'll try my chances here.
>
> I am trying to make NetBSD/amd64 boot in PVH mode with qemu, using qemu's
> -kernel flag. The kernel does start executing thanks to the first step
> explained here https://www.daemonology.net/blog/2022-10-18-FreeBSD-Firecracker.html
> i.e. adding PVH entry point to the kernel ELF notes.
>
> #define ELFNOTE(name, type, desctype, descdata...) \
> -.pushsection .note.name ; \
> +.pushsection .note.name, "a", @note ; \
> .align 4 ; \
> .long 2f - 1f /* namesz */ ; \
> .long 4f - 3f /* descsz */ ; \
> @@ -588,6 +603,8 @@ next: pop %edi
> movl %eax,(%ebp)
>
> The start_xen32 entrypoint is then found, and the kernel start, but falls in
> an infinite loop in locore.S when mapping symbols and preloaded modules,
> more precisely, in the fillkpt_nox macro. I assume %ecx is wrong or the region
> corrupted for some reason. https://github.com/NetBSD/src/blob/trunk/sys/arch/amd64/amd64/locore.S#L738
I don't think you can use start_xen32 as is, as it expects a Xen environnemwnt.
You may need to write a new start routine, or make a difference between Xen
vs non-Xen in the existing one.
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index