qemu-devel
[Top][All Lists]
Advanced

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

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


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH] i386/cpu/kvm: look at PMU's CPUID before setting MSRs
Date: Wed, 27 Dec 2017 15:39:51 -0200
User-agent: Mutt/1.9.1 (2017-09-22)

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 <address@hidden>
> Signed-off-by: Jan Dakinevich <address@hidden>

Reviewed-by: Eduardo Habkost <address@hidden>

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]