mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 18:11:56 +00:00
KVM: X86: Expose PV_SCHED_YIELD CPUID feature bit to guest
Expose PV_SCHED_YIELD feature bit to guest, the guest can check this feature bit before using paravirtualized sched yield. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Liran Alon <liran.alon@oracle.com> Signed-off-by: Wanpeng Li <wanpengli@tencent.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
715062970f
commit
32b72ecc83
@ -66,6 +66,10 @@ KVM_FEATURE_PV_SEND_IPI || 11 || guest checks this feature bit
|
||||
|| || before using paravirtualized
|
||||
|| || send IPIs.
|
||||
------------------------------------------------------------------------------
|
||||
KVM_FEATURE_PV_SCHED_YIELD || 13 || guest checks this feature bit
|
||||
|| || before using paravirtualized
|
||||
|| || sched yield.
|
||||
------------------------------------------------------------------------------
|
||||
KVM_FEATURE_CLOCKSOURCE_STABLE_BIT || 24 || host will warn if no guest-side
|
||||
|| || per-cpu warps are expected in
|
||||
|| || kvmclock.
|
||||
|
@ -659,7 +659,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
|
||||
(1 << KVM_FEATURE_PV_TLB_FLUSH) |
|
||||
(1 << KVM_FEATURE_ASYNC_PF_VMEXIT) |
|
||||
(1 << KVM_FEATURE_PV_SEND_IPI) |
|
||||
(1 << KVM_FEATURE_POLL_CONTROL);
|
||||
(1 << KVM_FEATURE_POLL_CONTROL) |
|
||||
(1 << KVM_FEATURE_PV_SCHED_YIELD);
|
||||
|
||||
if (sched_info_on())
|
||||
entry->eax |= (1 << KVM_FEATURE_STEAL_TIME);
|
||||
|
Loading…
Reference in New Issue
Block a user