Re: PVH boot with qemu
Emile `iMil' Heitor <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Manuel,
On Mon, 11 Dec 2023, Manuel Bouyer wrote:
> #ifndef GENPVH
> /* get a page for HYPERVISOR_shared_info */
> addl $PAGE_SIZE, %ebx
> addl $PGOFSET,%ebx
> andl $~PGOFSET,%ebx
> movl $RELOC(HYPERVISOR_shared_info_pa),%ebp
> movl %ebx,(%ebp)
> movl $0,4(%ebp)
> #endif
>
> How can this work on Xen when GENPVH is defined ?
> Shouldn't this be made conditional on vm_guest == VM_GUEST_XENPVH ?
Well the point is that you don't define GENPVH when using Xen, PVH using
qemu and friends don't need HYPERVISOR_shared_info neither any of the
hypercall portion of the code. A big chunk of Xen related code is
ifndef'ed to GENPVH in hypervisor.c; And I was planning on isolating GENPVH
so there's as little ifdef's as possible.
Or would you prefer the same kernel to be able to boot in both XENPVH and
GENPVH modes? I am focusing on making the resulting kernel smaller but this
could be done also.
------------------------------------------------------------------------
Emile `iMil' Heitor <imil@{home.imil.net,NetBSD.org}> | https://imil.net