Re: [BISECTED] KVM error with 5.0-rc
From: Sean Christopherson
Date: Mon Jan 14 2019 - 13:33:25 EST
On Mon, Jan 14, 2019 at 06:04:27PM +0100, Harald Arnesen wrote:
> Qemu with KVM acceleration fails with kernel 5.0-rc1 and 5.0-rc2.
> It works fine with 4.20.
...
> Bisecting gives:
>
> c73da3fcab43357feb68cac227194b13e998a8db is the first bad commit
> commit c73da3fcab43357feb68cac227194b13e998a8db
> Author: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
> Date: Mon Dec 3 13:53:00 2018 -0800
>
> KVM: VMX: Properly handle dynamic VM Entry/Exit controls
>
> EFER and PERF_GLOBAL_CTRL MSRs have dedicated VM Entry/Exit controls
> that KVM dynamically toggles based on whether or not the guest's value
> for each MSRs differs from the host. Handle the dynamic behavior by
> adding a helper that clears the dynamic bits so the bits aren't set
> when initializing the VMCS field outside of the dynamic toggling flow.
> This makes the handling consistent with similar behavior for other
> controls, e.g. pin, exec and sec_exec. More importantly, it eliminates
> two global bools that are stealthily modified by setup_vmcs_config.
>
> Opportunistically clean up a comment and print related to errata for
> IA32_PERF_GLOBAL_CTRL.
>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Can you test the attached patch? Found a bug when re-inspecting the
guilty commit, the wrong VMCS field is being modifying when applying an
errata to disable VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL. Your CPU is
listed as one of the models affected by the errata. Compile tested only.