lkml.org 
[lkml]   [2020]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 19/61] KVM: VMX: Add helpers to query Intel PT mode
Disclaimer: I'm going off a few lines in the SDM and the original patches,
everything I say could be completely wrong :-)

On Tue, Feb 25, 2020 at 03:54:21PM +0100, Paolo Bonzini wrote:
> On 24/02/20 23:18, Sean Christopherson wrote:
> >>> {
> >>> u32 vmexit_ctrl = vmcs_config.vmexit_ctrl;
> >>> - if (pt_mode == PT_MODE_SYSTEM)
> >>> + if (vmx_pt_mode_is_system())
> >> ... and here? I.e. to cover the currently unsupported 'host-only' mode.
> > Hmm, good question. I don't think so? On VM-Enter, RTIT_CTL would need to
> > be loaded to disable PT. Clearing RTIT_CTL on VM-Exit would be redundant
> > at that point[1]. And AIUI, the PIP for VM-Enter/VM-Exit isn't needed
> > because there is no context switch from the decoder's perspective.
>
> How does host-only mode differ from "host-guest but don't expose PT to
> the guest"? So I would say that host-only mode is a special case of
> host-guest, not of system mode.

AIUI, host-guest needs a special packet for VM-Enter/VM-Exit so that the
trace analyzer understands there was a context switch. With host-only, the
packet isn't needed because tracing stops entirely. So it's not that
host-only is a special case of system mode, but rather it doesn't need the
VM-Exit control enabled to generate the special packet.

\
 
 \ /
  Last update: 2020-03-03 23:42    [W:0.273 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site