mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
virtualbox6: wait at least 1 ms during halt
When the wait value is too small the HALT attempt turnes into busy-polling in the VMM. To prevent that always wait a minimal amount of time. Issue #4990.
This commit is contained in:
parent
2bb901e1e3
commit
ab4c36c834
@ -721,7 +721,10 @@ template <typename VIRT> VBOXSTRICTRC Sup::Vcpu_impl<VIRT>::_switch_to_hw()
|
||||
|
||||
template <typename T> void Sup::Vcpu_impl<T>::halt(Genode::uint64_t const wait_ns)
|
||||
{
|
||||
RTSemEventMultiWait(_halt_semevent, wait_ns/RT_NS_1MS);
|
||||
/* always wait for at least 1 ms */
|
||||
Genode::uint64_t const v = wait_ns / RT_NS_1MS ? : 1;
|
||||
|
||||
RTSemEventMultiWait(_halt_semevent, v);
|
||||
RTSemEventMultiReset(_halt_semevent);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user