Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-deterministic delays when accessing a vcpu in "running" or "s… #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

c4milo
Copy link
Member

@c4milo c4milo commented Jan 8, 2016

…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:

freebsd/freebsd-src@3f2b4fc#diff-33af18ae22bfca3128518e240f06893f

Additionally, I added carriage return to the VMM tracing macros to make it easier to visually follow.

…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
@c4milo
Copy link
Member Author

c4milo commented Apr 9, 2016

@xez this one doesn't have conflicts.

@xez
Copy link
Contributor

xez commented Apr 9, 2016

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.

@c4milo
Copy link
Member Author

c4milo commented Apr 9, 2016

@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?

@xez
Copy link
Contributor

xez commented Apr 9, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants