Open c4milo opened 8 years ago
@xez this one doesn't have conflicts.
Unlike bhyve, operations on vcpus in xhyve are synchronous with execution. If you are modifying vcpu state it is implied that it is not currently running. Ideally we could get rid of most the associated state tracking and locking. Not sure how applicable this patch would be then. Have to think about this some more.
@xez, agreed. The single thread restriction is forced by Hypervisor.framework, right? I wondered if it would ever be lifted by Apple. Any comments on this @jeremyhu?
KVM has the same 1:1 model of thread:vcpu and task:vm. Modifying vcpu state asynchronously is not necessarily a desirable feature. bhyve has this requirement because they are modifying vcpus out of processes for bootloader and control purposes.
…leeping" state.
This is done by forcing the vcpu to transition to "idle" by returning to userspace with an exit code of VM_EXITCODE_REQIDLE.
Ported from bhyve. Authored by @neelnatu Original changetset can be reviewed at:
https://github.com/freebsd/freebsd/commit/3f2b4fc770fb5b735b286cf251b967cfa4afdf12#diff-33af18ae22bfca3128518e240f06893f
Additionally, I added carriage return to the VMM tracing macros to make it easier to visually follow.