Skip to content

Commit

Permalink
DEBUG - trigger vcpu fault on hw in vmm_x86
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ab committed Feb 7, 2025
1 parent f023c95 commit cbdf3d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions repos/os/src/test/vmm_x86/component.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,12 @@ class Vmm::Vm
bool const _vmx;
Entrypoint &_ep_first; /* running on first CPU */
Entrypoint _ep_second; /* running on second CPU */
Entrypoint _ep_third; /* running on third CPU */
Vcpu _vcpu0;
Vcpu _vcpu1;
Vcpu _vcpu2;
Vcpu _vcpu3;
Vcpu _vcpu4;
Dataspace_capability _memory; /* guest memory */

/* just to trigger some events after some time */
Expand Down Expand Up @@ -240,10 +242,13 @@ class Vmm::Vm
_ep_first(env.ep()),
_ep_second(env, STACK_SIZE, "second ep",
env.cpu().affinity_space().location_of_index(1)),
_ep_third (env, STACK_SIZE, "third ep",
env.cpu().affinity_space().location_of_index(2)),
_vcpu0(0, _ep_first, _vm_con, _heap, *this, _svm, _vmx),
_vcpu1(1, _ep_first, _vm_con, _heap, *this, _svm, _vmx),
_vcpu2(2, _ep_second, _vm_con, _heap, *this, _svm, _vmx),
_vcpu3(3, _ep_second, _vm_con, _heap, *this, _svm, _vmx),
_vcpu4(4, _ep_third , _vm_con, _heap, *this, _svm, _vmx),
_memory(env.ram().alloc(4096)),
_timer(env),
_timer_handler(_ep_first, *this, &Vm::_handle_timer),
Expand Down

0 comments on commit cbdf3d4

Please sign in to comment.