On Wed, Jun 3, 2015 at 8:17 PM, Peter Grehan <gre...@freebsd.org> wrote: >> I see that in the main() function of bhyverun.c it adds CPU0 by >> calling fbsdrun_addcpu(ctx, 0, 0, rip). But I can't find where the >> other VCPUs are added. Or if the 'guest_ncpus' variable is ever used >> (except for error checks) > > > Have a look at bhyve/spinup_ap.c:spinup_ap() which is called when a the vmm > kernel module detects a SIPI message being sent to the local APIC and forces > a vm-exit to userspace.
Hi Peter, Thank you, that answered my question. Another thing: Are these threads (the ones that run the VCPUs) ever destroyed and recreated? In the timespan between the moment they are created (when the guest starts) and when the guest is shut down, is there any chance of the threads ending/being killed and others created to take their place? Or do you end up with the same threads? I am trying to add some information to the VCPU thread at the moment it is created by bhyve, and want that information to be available for the entirety of the guest's lifespan. _______________________________________________ email@example.com mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"