diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2021-01-26 14:48:11 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-02-09 08:17:13 -0500 |
commit | 9ff5e0304e949a8a4e584c8c2b11fad9b2e0b133 (patch) | |
tree | 6acd2b3bc2787148343b4cb22ed41b84ae1b12df /arch/x86/kvm/x86.c | |
parent | 72167a9d7da2c295caf1d4a2d58128406786505d (diff) | |
download | lwn-9ff5e0304e949a8a4e584c8c2b11fad9b2e0b133.tar.gz lwn-9ff5e0304e949a8a4e584c8c2b11fad9b2e0b133.zip |
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/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 1f93879c7364..40bd2e3b8f91 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -8955,8 +8955,10 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) goto out; } if (kvm_check_request(KVM_REQ_HV_EXIT, vcpu)) { + struct kvm_vcpu_hv *hv_vcpu = to_hv_vcpu(vcpu); + vcpu->run->exit_reason = KVM_EXIT_HYPERV; - vcpu->run->hyperv = vcpu->arch.hyperv.exit; + vcpu->run->hyperv = hv_vcpu->exit; r = 0; goto out; } |