The host kernel sees a hypercall vmexit. How does it know if it's aHere is how this can work - it is similar to MSI if you like:
nested-guest-to-guest hypercall or a nested-guest-to-host hypercall?
The two are equally valid at the same time.
- by default, the device uses pio kicks
- nested guest driver can enable hypercall capability in the device,
probably with pci config cycle
- guest userspace (hypervisor running in guest) will see this request
and perform pci config cycle on the "real" device, telling it to which
nested guest this device is assigned
- host userspace (hypervisor running in host) will see this.
it now knows both which guest the hypercalls will be for,
and that the device in question is an emulated one,
and can set up kvm appropriately
The host knows whether the guest or nested guest are running. If theNot necessarily. What I am saying is we could make this protocol part of
guest is running, it's a guest-to-host hypercall. If the nested guest
is running, it's a nested-guest-to-guest hypercall. We don't have
nested-guest-to-host hypercalls (and couldn't unless we get agreement on
a protocol from all hypervisor vendors).
guest paravirt driver. the guest that loads the driver and enables the
capability, has to agree to the protocol. If it doesn't want to, it does
not have to use that driver.