summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/hyperv.h
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2021-01-26 16:48:11 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2021-02-09 16:17:13 +0300
commit9ff5e0304e949a8a4e584c8c2b11fad9b2e0b133 (patch)
tree6acd2b3bc2787148343b4cb22ed41b84ae1b12df /arch/x86/kvm/hyperv.h
parent72167a9d7da2c295caf1d4a2d58128406786505d (diff)
downloadlinux-9ff5e0304e949a8a4e584c8c2b11fad9b2e0b133.tar.xz
KVM: x86: hyper-v: Always use to_hv_vcpu() accessor to get to 'struct kvm_vcpu_hv'
As a preparation to allocating Hyper-V context dynamically, make it clear who's the user of the said context. No functional change intended. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <20210126134816.1880136-11-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/hyperv.h')
-rw-r--r--arch/x86/kvm/hyperv.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/hyperv.h b/arch/x86/kvm/hyperv.h
index fdb321ba9c3f..be1e3f5d1df6 100644
--- a/arch/x86/kvm/hyperv.h
+++ b/arch/x86/kvm/hyperv.h
@@ -119,7 +119,9 @@ static inline struct kvm_vcpu *hv_stimer_to_vcpu(struct kvm_vcpu_hv_stimer *stim
static inline bool kvm_hv_has_stimer_pending(struct kvm_vcpu *vcpu)
{
- return !bitmap_empty(vcpu->arch.hyperv.stimer_pending_bitmap,
+ struct kvm_vcpu_hv *hv_vcpu = to_hv_vcpu(vcpu);
+
+ return !bitmap_empty(hv_vcpu->stimer_pending_bitmap,
HV_SYNIC_STIMER_COUNT);
}