From: "Kang, Luwei" <luwei.kang@intel.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"mtosatti@redhat.com" <mtosatti@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
Chao Peng <chao.p.peng@linux.intel.com>,
"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [PATCH v4 1/2] i386: Add Intel Processor Trace feature support
Date: Tue, 13 Mar 2018 11:16:18 +0000 [thread overview]
Message-ID: <82D7661F83C1A047AF7DC287873BF1E167EF731C@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20180312164517.GS3417@localhost.localdomain>
> > > > + if (!eax_0 ||
> > > > + ((ebx_0 & INTEL_PT_MINIMAL_EBX) != INTEL_PT_MINIMAL_EBX) ||
> > > > + ((ecx_0 & INTEL_PT_MINIMAL_ECX) != INTEL_PT_MINIMAL_ECX) ||
> > > > + ((eax_1 & INTEL_PT_MTC_BITMAP) != INTEL_PT_MTC_BITMAP) ||
> > > > + ((eax_1 & INTEL_PT_ADDR_RANGES_NUM_MASK) <
> > > > + INTEL_PT_ADDR_RANGES_NUM) ||
> > > > + ((ebx_1 & (INTEL_PT_PSB_BITMAP | INTEL_PT_CYCLE_BITMAP)) !=
> > > > + (INTEL_PT_PSB_BITMAP | INTEL_PT_CYCLE_BITMAP))) {
> > >
> > > I still don't see a check to ensure the host has bit 31 on ecx_0 set to 0, as I mentioned when reviewing v3.
> >
> > Hi Eduardo,
> > Thanks for the code review. I don't quite understand here why
> > bit31 must same with host (meaning we must reject a host where ecx_0 & (1 << 31) is set).
>
> If the guest sees the bit set to 0, it will expect IP payloads with RIP values, but the host CPU will generate IP payloads with LIP values.
> I assume KVM won't do RIP<->LIP translation on the packets generated by the host before the guest sees them, will it?
Fully understand. Will make a separate patch on this.
Thanks,
Luwei Kang
>
>
> > Do you mean PT must be disabled in guest when host bit31 is set?
> > Bit 31: If 1, generated packets which contain IP payloads have LIP values, which include the CS base component.
> > I can't find any special on this bit. Could you help clarify?
>
> As far as I understand, this bit is special because KVM can't emulate a value that's different from the host.
>
> --
> Eduardo
prev parent reply other threads:[~2018-03-13 11:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-04 16:48 [PATCH v4 1/2] i386: Add Intel Processor Trace feature support Luwei Kang
2018-03-04 16:48 ` [PATCH v4 2/2] i386: Add support to get/set/migrate Intel Processor Trace feature Luwei Kang
2019-10-12 3:14 ` Eduardo Habkost
2019-10-15 12:51 ` Kang, Luwei
2019-10-15 13:29 ` Eduardo Habkost
2019-10-21 6:02 ` Kang, Luwei
2019-10-22 21:44 ` Eduardo Habkost
2019-10-24 11:22 ` Kang, Luwei
2019-10-24 13:24 ` Eduardo Habkost
2019-10-24 13:36 ` Kang, Luwei
2019-10-24 14:15 ` Eduardo Habkost
2018-03-09 19:10 ` [PATCH v4 1/2] i386: Add Intel Processor Trace feature support Eduardo Habkost
2018-03-12 9:07 ` Kang, Luwei
2018-03-12 16:45 ` Eduardo Habkost
2018-03-13 11:16 ` Kang, Luwei [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=82D7661F83C1A047AF7DC287873BF1E167EF731C@SHSMSX101.ccr.corp.intel.com \
--to=luwei.kang@intel.com \
--cc=chao.p.peng@linux.intel.com \
--cc=ehabkost@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@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).