• Vitaly Kuznetsov's avatar
    KVM: x86: hyper-v: Allocate 'struct kvm_vcpu_hv' dynamically · 4592b7ea
    Vitaly Kuznetsov authored
    
    
    Hyper-V context is only needed for guests which use Hyper-V emulation in
    KVM (e.g. Windows/Hyper-V guests). 'struct kvm_vcpu_hv' is, however, quite
    big, it accounts for more than 1/4 of the total 'struct kvm_vcpu_arch'
    which is also quite big already. This all looks like a waste.
    
    Allocate 'struct kvm_vcpu_hv' dynamically. This patch does not bring any
    (intentional) functional change as we still allocate the context
    unconditionally but it paves the way to doing that only when needed.
    
    Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
    Message-Id: <20210126134816.1880136-13-vkuznets@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    4592b7ea