From: Eduardo Habkost <ehabkost@redhat.com>
To: Jan Dakinevich <jan.dakinevich@virtuozzo.com>
Cc: qemu-devel@nongnu.org, "Denis V. Lunev" <den@virtuozzo.com>,
Roman Kagan <rkagan@virtuozzo.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Richard Henderson <rth@twiddle.net>,
kvm@vger.kernel.org
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 [thread overview]
Message-ID: <20171227173951.GE24856@localhost.localdomain> (raw)
In-Reply-To: <1514383466-7257-1-git-send-email-jan.dakinevich@virtuozzo.com>
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@virtuozzo.com>
> Signed-off-by: Jan Dakinevich <jan.dakinevich@virtuozzo.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
--
Eduardo
prev parent reply other threads:[~2017-12-27 17:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-27 14:04 [Qemu-devel] [PATCH] i386/cpu/kvm: look at PMU's CPUID before setting MSRs Jan Dakinevich
2017-12-27 17:39 ` Eduardo Habkost [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171227173951.GE24856@localhost.localdomain \
--to=ehabkost@redhat.com \
--cc=den@virtuozzo.com \
--cc=jan.dakinevich@virtuozzo.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkagan@virtuozzo.com \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).