From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v7 06/13] KVM: x86: Add Intel Processor Trace virtualization mode Date: Thu, 3 May 2018 14:31:01 +0200 Message-ID: References: <1525349323-9938-1-git-send-email-luwei.kang@intel.com> <1525349323-9938-7-git-send-email-luwei.kang@intel.com> <20180503113223.x2ykby6wglppgdwf@um.fi.intel.com> <20180503120928.gsqwreqnu5sllzw2@um.fi.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Luwei Kang , kvm@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, rkrcmar@redhat.com, linux-kernel@vger.kernel.org, joro@8bytes.org, peterz@infradead.org, chao.p.peng@linux.intel.com To: Alexander Shishkin Return-path: In-Reply-To: <20180503120928.gsqwreqnu5sllzw2@um.fi.intel.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 03/05/2018 14:09, Alexander Shishkin wrote: >>> 1. Do we have an event in pt_ctx? >>> * No -> Set up the context for VMX. >>> * Yes -> 2. Is attr.exclude_guest set? >>> * No -> Guest trace goes to the host's buffer, do nothing. >>> * Yes -> Set up/switch the context for VMX. >> Can you explain this more clearly? > Let's see; in the intel_pt driver we have a per-cpu PT "context", from which > we can tell if there is a host event that wants to trace the guest. This > should provide enough information to make a decision whether we want to > context switch PT MSRs or not on the spot, instead of having a module > parameter. I still don't understand how the host event is useful... Paolo