vbox5: adjust to run with Fiasco.OC

- use priorities solely with nova
- handle exceptions during vCPU creation
- avoid assertion in vga_vbda
- silence compiler warnings about outdated register keyword

Issue #3111
This commit is contained in:
Alexander Boettcher
2019-05-22 10:41:30 +02:00
committed by Christian Helmuth
parent 64fac6cee7
commit 7ec37b2d8d
11 changed files with 328 additions and 116 deletions

View File

@@ -473,14 +473,14 @@ struct Vcpu {
if (exit_reason != VM_EXIT_RECALL || !previous_blocked)
_read_nova_state(utcb, state, exit_reason);
/* consume potential multiple sem ups */
Nova::sm_ctrl(vcpu->_sm_sel(), Nova::SEMAPHORE_UP);
Nova::sm_ctrl(vcpu->_sm_sel(), Nova::SEMAPHORE_DOWNZERO);
if (exit_reason == VM_EXIT_RECALL) {
if (previous_blocked)
state.exit_reason = exit_reason;
/* consume potential multiple sem ups */
Nova::sm_ctrl(vcpu->_sm_sel(), Nova::SEMAPHORE_UP);
Nova::sm_ctrl(vcpu->_sm_sel(), Nova::SEMAPHORE_DOWNZERO);
if (vcpu->_remote == PAUSE) {
vcpu->_remote = NONE;
} else {
@@ -550,8 +550,13 @@ struct Vcpu {
if (_dispatching == current) {
/* current thread is already dispatching */
_block = true;
return;
if (_block)
/* issue pause exit next time - fall through */
_block = false;
else {
_block = true;
return;
}
}
if ((_ep_handler == current) && _block) {