diff options
| author | Jan Dakinevich <jan.dakinevich@virtuozzo.com> | 2017-12-27 17:04:26 +0300 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-01-12 13:22:02 +0100 |
| commit | 0b368a10c71af96f6cf93b0ba5c2ee3bdbd50e96 (patch) | |
| tree | 3c855ef8c583e7f31d9cf1ae164b122e9e5c3b74 /chardev/char-socket.c | |
| parent | 829600a519386c7b188d5d813e78ba69bf0bd323 (diff) | |
| download | focaccia-qemu-0b368a10c71af96f6cf93b0ba5c2ee3bdbd50e96.tar.gz focaccia-qemu-0b368a10c71af96f6cf93b0ba5c2ee3bdbd50e96.zip | |
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 'chardev/char-socket.c')
0 files changed, 0 insertions, 0 deletions