Skip to content

Commit 2cdef91

Browse files
paguptabonzini
authored andcommitted
KVM: x86: handle MSR_IA32_DEBUGCTLMSR with report_ignored_msrs
Windows2016 guest tries to enable LBR by setting the corresponding bits in MSR_IA32_DEBUGCTLMSR. KVM does not emulate MSR_IA32_DEBUGCTLMSR and spams the host kernel logs with error messages like: kvm [...]: vcpu1, guest rIP: 0xfffff800a8b687d3 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop" This patch fixes this by enabling error logging only with 'report_ignored_msrs=1'. Signed-off-by: Pankaj Gupta <pankaj.gupta@cloud.ionos.com> Message-Id: <20201105153932.24316-1-pankaj.gupta.linux@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 1e293d1 commit 2cdef91

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎arch/x86/kvm/x86.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3065,9 +3065,9 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
30653065
/* Values other than LBR and BTF are vendor-specific,
30663066
thus reserved and should throw a #GP */
30673067
return 1;
3068-
}
3069-
vcpu_unimpl(vcpu, "%s: MSR_IA32_DEBUGCTLMSR 0x%llx, nop\n",
3070-
__func__, data);
3068+
} else if (report_ignored_msrs)
3069+
vcpu_unimpl(vcpu, "%s: MSR_IA32_DEBUGCTLMSR 0x%llx, nop\n",
3070+
__func__, data);
30713071
break;
30723072
case 0x200 ... 0x2ff:
30733073
return kvm_mtrr_set_msr(vcpu, msr, data);

0 commit comments

Comments
 (0)