-
Notifications
You must be signed in to change notification settings - Fork 102
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
Move usermode halt logic into backing-specific logic #114
Conversation
a217241
to
49925de
Compare
aa1d38e
to
d4ff8e9
Compare
if T::halt_in_usermode(self, GuestVtl::Vtl0) { | ||
break Poll::Pending; | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So for x64 the halt gets handled here, but in e.g. snp it gets handled in run_vp_snp? Do you know what the reasoning is for the difference in location? Wondering if we should try to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For x64 with apic emulation it gets handled here, which is only the case in test scenarios (WHP). For all other scenarios we call set_halted on the runner and let the kernel manage it for us, as that's more efficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely familiar with why we can't do that for WHP, I just tried to preserve existing behavior here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supersedes #111. Since WHP is the only case in which we can hit this path, make it a bit clearer with a new per-backing method. Open for bikeshedding of course