aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/trace.h
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2020-03-21 13:25:59 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2020-03-31 10:48:07 -0400
commit69c6f69aa3064ab6cc8426661f125ea75ffe899c (patch)
tree29b190d8499c3272ac940f7282fc49d8557cc5af /arch/x86/kvm/trace.h
parentKVM: VMX: Configure runtime hooks using vmx_x86_ops (diff)
downloadlinux-dev-69c6f69aa3064ab6cc8426661f125ea75ffe899c.tar.xz
linux-dev-69c6f69aa3064ab6cc8426661f125ea75ffe899c.zip
KVM: x86: Set kvm_x86_ops only after ->hardware_setup() completes
Set kvm_x86_ops with the vendor's ops only after ->hardware_setup() completes to "prevent" using kvm_x86_ops before they are ready, i.e. to generate a null pointer fault instead of silently consuming unconfigured state. An alternative implementation would be to have ->hardware_setup() return the vendor's ops, but that would require non-trivial refactoring, and would arguably result in less readable code, e.g. ->hardware_setup() would need to use ERR_PTR() in multiple locations, and each vendor's declaration of the runtime ops would be less obvious. No functional change intended. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Message-Id: <20200321202603.19355-6-sean.j.christopherson@intel.com> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/trace.h')
0 files changed, 0 insertions, 0 deletions