/* * Reading HV_X64_MSR_GUEST_IDLE MSR tells the hypervisor that the * vCPU can be put into 'idle' state. This 'idle' state is * terminated by an IPI, usually from hv_qlock_kick(), even if * interrupts are disabled on the vCPU. * * To prevent a race against the unlock path it is required to * disable interrupts before accessing the HV_X64_MSR_GUEST_IDLE * MSR. Otherwise, if the IPI from hv_qlock_kick() arrives between * the lock value check and the rdmsrq() then the vCPU might be put * into 'idle' state by the hypervisor and kept in that state for * an unspecified amount of time.
*/
local_irq_save(flags); /* * Only issue the rdmsrq() when the lock state has not changed.
*/ if (READ_ONCE(*byte) == val) { unsignedlong msr_val;
rdmsrq(HV_X64_MSR_GUEST_IDLE, msr_val);
(void)msr_val;
}
local_irq_restore(flags);
}
/* * Hyper-V does not support this so far.
*/
__visible bool hv_vcpu_is_preempted(int vcpu)
{ returnfalse;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.