• Wanpeng Li's avatar
    x86/kvm: Preserve BSP MSR_KVM_POLL_CONTROL across suspend/resume · 0361bdfd
    Wanpeng Li authored
    
    
    MSR_KVM_POLL_CONTROL is cleared on reset, thus reverting guests to
    host-side polling after suspend/resume.  Non-bootstrap CPUs are
    restored correctly by the haltpoll driver because they are hot-unplugged
    during suspend and hot-plugged during resume; however, the BSP
    is not hotpluggable and remains in host-sde polling mode after
    the guest resume.  The makes the guest pay for the cost of vmexits
    every time the guest enters idle.
    
    Fix it by recording BSP's haltpoll state and resuming it during guest
    resume.
    
    Cc: Marcelo Tosatti <mtosatti@redhat.com>
    Signed-off-by: default avatarWanpeng Li <wanpengli@tencent.com>
    Message-Id: <1650267752-46796-1-git-send-email-wanpengli@tencent.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    0361bdfd
kvm.c 27.4 KB