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: Mon, 7 May 2018 12:47:41 +0200 Message-ID: <6b6a82f9-4bb5-b072-b829-a0903d9366fa@redhat.com> References: <1525349323-9938-7-git-send-email-luwei.kang@intel.com> <20180503113223.x2ykby6wglppgdwf@um.fi.intel.com> <47494e95-edcb-e8b5-0a32-004e9470dbdf@redhat.com> <20180503120215.dev7ti43zk7yoovn@um.fi.intel.com> <221c297b-1270-371b-70a3-4cff4bed7a7e@redhat.com> <20180503124847.tcrizs2sxy3j6mu2@um.fi.intel.com> <26505f7a-9e6b-efb9-e5f9-8aae3756be49@redhat.com> <20180503133823.tqbraql3b7ltuo6a@um.fi.intel.com> <20180504104539.GM12217@hirez.programming.kicks-ass.net> <10307518-a095-1a9d-d488-58db88fe16bd@redhat.com> <20180504221556.GX12217@hirez.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Alexander Shishkin , 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, chao.p.peng@linux.intel.com To: Peter Zijlstra Return-path: In-Reply-To: <20180504221556.GX12217@hirez.programming.kicks-ass.net> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 05/05/2018 00:15, Peter Zijlstra wrote: > On Fri, May 04, 2018 at 11:44:09PM +0200, Paolo Bonzini wrote: >> On 04/05/2018 12:45, Peter Zijlstra wrote: >>> On Thu, May 03, 2018 at 04:38:23PM +0300, Alexander Shishkin wrote: >>>> On Thu, May 03, 2018 at 02:50:12PM +0200, Paolo Bonzini wrote: >>> >>>>> And you still need the module parameter to decide >>>>> whether the host is _allowed_ to cause incomplete traces in the guest. >>>> >>>> Or rather a parameter to decide who wins in case both host and guest want >>>> to trace the guest. That's arguably better than having different versions of >>>> PT in the guest depending on a module parameter setting. >>> >>> Yes, that sounds like a much better approach. >> >> I don't think so. The possibility that the host would lose tracing data >> just because the guest starts using PT seems hideous to me... > > Well, either way around is a fairly crap situation, the modparam at > least lets the admin pick which it goes. But if you want to always let > the host win, that's fine with me too, less knobs is better. I expect that the default "system-wide" host wins will be used almost always, with "host-guest" being used in case someone actually wants to use PT in guests. I agree that "Host-only, drop guest events" should be removed, since it can be emulated by perf code. Luwei, can you change that? Paolo