qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>,
	"Kang, Luwei" <luwei.kang@intel.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"rth@twiddle.net" <rth@twiddle.net>,
	"mtosatti@redhat.com" <mtosatti@redhat.com>,
	Chao Peng <chao.p.peng@linux.intel.com>,
	"libvir-list@redhat.com" <libvir-list@redhat.com>
Subject: Re: [Qemu-devel] [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support
Date: Thu, 18 Jan 2018 14:39:57 +0100	[thread overview]
Message-ID: <c67f0021-0ca0-413b-bb84-3ff54dd791de@redhat.com> (raw)
In-Reply-To: <20180118132415.GU627@localhost.localdomain>

On 18/01/2018 14:24, Eduardo Habkost wrote:
> However, if there's a simple way to make it possible to migrate
> between hosts with different CPUID[14h] data, it would be even
> better.  With the current KVM intel-pt implementation, what
> happens if the CPUID[14h] data seen by the guest doesn't match
> exactly the CPUID[14h] leaves from the host?

Some bits in there can be treated as CPU features (e.g. EBX bit 0 "CR3
filtering support").  Probably we should handle these in KVM right now.
KVM needs to compute a mask of valid 1 bits for IA32_RTIT_CTL based on
CPUID, and apply it when the MSR is written.  It also needs to whitelist
bits like we do for other feature words.  These include:

- CPUID[EAX=14h,ECX=0].EBX

- CPUID[EAX=14h,ECX=0].ECX except bit 31

- CPUID[EAX=14h,ECX=1].EAX bits 16:31 (if CPUID[EAX=14h,ECX=0].EBX[3]=1)

- CPUID[EAX=14h,ECX=1].EBX (if CPUID[EAX=14h,ECX=0].EBX[1]=1)

Others, currently only CPUID[EAX=14h,ECX=0].ECX[31] must match, there is
no way to emulate the "wrong" value.

Others, currently only CPUID[EAX=14h,ECX=1].EAX[2:0] are numeric values,
and it's possible to emulate a lower value than the one in the processor.

CPUID[EAX=14h,ECX=0].EAX is the maximum subleaf.  It should be (barring
guest bugs) okay to always present leaf 1.

Paolo

  reply	other threads:[~2018-01-18 13:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-08 20:36 [Qemu-devel] [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support Luwei Kang
2018-01-08 20:36 ` [Qemu-devel] [PATCH RESEND v1 2/2] i386: Add support to get/set/migrate Intel Processor Trace feature Luwei Kang
2018-01-12 14:22 ` [Qemu-devel] [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support Eduardo Habkost
2018-01-15  7:19   ` Kang, Luwei
2018-01-15  9:33     ` Paolo Bonzini
2018-01-15 14:04       ` Eduardo Habkost
2018-01-15 14:25         ` Jiri Denemark
2018-01-15 14:31           ` Eduardo Habkost
2018-01-16  6:10             ` Kang, Luwei
2018-01-16 11:51               ` Eduardo Habkost
2018-01-17 10:32                 ` Kang, Luwei
2018-01-18  2:42                   ` Eduardo Habkost
2018-01-18  5:33                     ` Kang, Luwei
2018-01-18 13:24                       ` Eduardo Habkost
2018-01-18 13:39                         ` Paolo Bonzini [this message]
2018-01-18 14:37                           ` Eduardo Habkost
2018-01-18 14:44                             ` Paolo Bonzini
2018-01-18 16:52                               ` Eduardo Habkost
2018-01-18 16:53                                 ` Paolo Bonzini
2018-01-22 10:36                                   ` Kang, Luwei
2018-01-26  9:19                                     ` Paolo Bonzini
2018-01-22 10:45                             ` Kang, Luwei

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=c67f0021-0ca0-413b-bb84-3ff54dd791de@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=ehabkost@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=libvir-list@redhat.com \
    --cc=luwei.kang@intel.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --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).