Re: [Qemu-devel] [PATCH] i386/cpu/kvm: look at PMU's CPUID before setting MSRs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 27, 2017 at 05:04:26PM +0300, Jan Dakinevich wrote:
> 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@xxxxxxxxxxxxx>
> Signed-off-by: Jan Dakinevich <jan.dakinevich@xxxxxxxxxxxxx>

Reviewed-by: Eduardo Habkost <ehabkost@xxxxxxxxxx>

-- 
Eduardo



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux