Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: non-Xen PVH boot



On Wed, Oct 25, 2023 at 05:30:55PM +0200, Emile `iMil' Heitor wrote:
> On Wed, 25 Oct 2023, Manuel Bouyer wrote:
> 
> > But overall I think more changes than this are needed; the PVH code is
> > really Xen-dependant. For example it expects a Xen-stype console not an
> > UART.
> > 
> > I think you may want to define a new VM_GUEST_* type for this
> 
> I am not familiar with this part of the source tree, sorry for the
> possibly dumb questions.
> After looking at the code using VM_GUEST_* am I correct assuming I'd have
> to add conditions for, let's say, a VM_GUEST_MICROVM case that should be
> added to typedef enum vm_guest?

Yes

> How/where is this value discovered when booting?

Well, it depends on how you boot. The value is used, among other things,
for early system setup.

It is set very early in the boot process, usually in locore.S for hypervisors
with a specific entry point, or in identify_hypervisor() a bit later.
(but it can also be refined later, hyperv_init_hypercall() or xen_hvm_init().

VM_GUEST_NO is the default value so if no hypervisor is detected,
vm_guest will stay at this value.

> Any pointers to documentation?

Nothing but source code

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index