aboutsummaryrefslogtreecommitdiff
path: root/qemu-options.h
diff options
context:
space:
mode:
authorJan Dakinevich <jan.dakinevich@virtuozzo.com>2017-12-27 17:04:26 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-01-12 13:22:02 +0100
commit0b368a10c71af96f6cf93b0ba5c2ee3bdbd50e96 (patch)
tree3c855ef8c583e7f31d9cf1ae164b122e9e5c3b74 /qemu-options.h
parent829600a519386c7b188d5d813e78ba69bf0bd323 (diff)
i386/cpu/kvm: look at PMU's CPUID before setting MSRs
Certain PMU-related MSRs are not supported for CPUs with PMU architecture below version 2. KVM rejects any access to them (see intel_is_valid_msr_idx routine in KVM), and QEMU fails on the following assertion: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed. QEMU also could fail if KVM exposes less fixed counters then 3. It could happen if host system run inside another hypervisor, which is tweaking PMU-related CPUID. To prevent possible fail, number of fixed counters now is obtained in the same way as number of GP counters. Reviewed-by: Roman Kagan <rkagan@virtuozzo.com> Signed-off-by: Jan Dakinevich <jan.dakinevich@virtuozzo.com> Message-Id: <1514383466-7257-1-git-send-email-jan.dakinevich@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-options.h')
0 files changed, 0 insertions, 0 deletions