qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Kang, Luwei" <luwei.kang@intel.com>,
	Eduardo Habkost <ehabkost@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Strong, Beeman" <beeman.strong@intel.com>,
	"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT
Date: Mon, 28 Sep 2020 09:35:41 +0200	[thread overview]
Message-ID: <d85a3245-c774-5098-5d14-2e3b3a2eda18@redhat.com> (raw)
In-Reply-To: <CY4PR11MB1447C4CA6B6D455EE33F724D80350@CY4PR11MB1447.namprd11.prod.outlook.com>

On 28/09/20 07:19, Kang, Luwei wrote:
>>>> No, it's not possible.  KVM doesn't have a say on what the processor
>>>> writes in the tracing packets.
>>> Can KVM refuse to enable packet generation if CSbase is not zero and
>>> CPUID.(EAX=14H,ECX=0)[bit 31] seen by guest is different from host?
>>
>> Yes, but the processor could change operating mode (and hence CSbase) while
>> tracing is active.  This is very unlikely, since it would require nonzero CS-base
>> and a 32-bit host, but in principle not impossible (could be a firmware call, for
>> example).
>>
>> The only solution is for KVM to accept both, and for QEMU to refuse a setting
>> that does not match the host.
>>
> 
> So I need to add a patch in KVM to disabled the Intel PT when the
> CSbase is not zero and the guest LIP different from the host. And this
> limitation in qemu (disabled the PT when LIP is enabled in the host) can
> be remove. Is that right?

No, if a feature cannot be emulated, that means it cannot be enabled
unless it matches the host.  That's generally not a problem since Intel
PT is usually used only with "-cpu host".

Paolo



  reply	other threads:[~2020-09-28  7:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 21:38 [PATCH v1 0/3] Remove the limitation of Intel PT CPUID info Luwei Kang
2020-02-24 21:38 ` [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT Luwei Kang
2020-09-25 16:15   ` Eduardo Habkost
2020-09-25 16:42     ` Strong, Beeman
2020-09-25 16:54       ` Eduardo Habkost
2020-09-25 20:23         ` Paolo Bonzini
2020-09-25 20:29           ` Eduardo Habkost
2020-09-25 20:40             ` Paolo Bonzini
2020-09-28  5:19               ` Kang, Luwei
2020-09-28  7:35                 ` Paolo Bonzini [this message]
2020-09-28 12:42                   ` Kang, Luwei
2020-09-28 14:12                     ` Eduardo Habkost
2020-09-29  2:28                       ` Kang, Luwei
2020-09-29  3:44                         ` Eduardo Habkost
2020-09-28 16:46                     ` Paolo Bonzini
2020-09-29  2:28                       ` Kang, Luwei
2020-02-24 21:38 ` [PATCH v1 2/3] i386: Remove the CPUID limitation of " Luwei Kang
2020-02-24 21:38 ` [PATCH v1 3/3] i386: Mark the 'INTEL_PT' CPUID bit as unmigratable Luwei Kang
2020-03-30  9:56 ` [PATCH v1 0/3] Remove the limitation of Intel PT CPUID info Kang, Luwei
2020-09-18 22:02   ` Eduardo Habkost
2020-09-21  7:49     ` Kang, Luwei
2020-09-21 16:50       ` Eduardo Habkost
2020-09-23  2:52         ` Kang, Luwei
2020-09-23 14:15           ` Eduardo Habkost
2020-09-24 12:47             ` Kang, Luwei
2020-09-24 13:34               ` Eduardo Habkost
2020-09-25  8:20                 ` 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=d85a3245-c774-5098-5d14-2e3b3a2eda18@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=beeman.strong@intel.com \
    --cc=ehabkost@redhat.com \
    --cc=luwei.kang@intel.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).