diff options
author | Wanpeng Li <wanpeng.li@hotmail.com> | 2017-12-12 17:33:01 -0800 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2018-01-16 16:34:13 +0100 |
commit | fa55eedd6328d3072e82218a2346b8752253af2d (patch) | |
tree | aa115853b700b21c553d44ba52c9f9757e1fd4fa /arch/x86/kernel/kvm.c | |
parent | 5cb0944c0c66004c0d9006a7f0fba5782ae38f69 (diff) |
KVM: X86: Add KVM_VCPU_PREEMPTED
The next patch will add another bit to the preempted field in
kvm_steal_time. Define a constant for bit 0 (the only one that is
currently used).
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/kernel/kvm.c')
-rw-r--r-- | arch/x86/kernel/kvm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index b40ffbf156c1..6610b92fc6a5 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -643,7 +643,7 @@ __visible bool __kvm_vcpu_is_preempted(long cpu) { struct kvm_steal_time *src = &per_cpu(steal_time, cpu); - return !!src->preempted; + return !!(src->preempted & KVM_VCPU_PREEMPTED); } PV_CALLEE_SAVE_REGS_THUNK(__kvm_vcpu_is_preempted); |