[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r2g65osg.fsf@ashishki-desk.ger.corp.intel.com>
Date: Wed, 31 Oct 2018 13:38:39 +0200
From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To: Paolo Bonzini <pbonzini@...hat.com>,
Luwei Kang <luwei.kang@...el.com>, kvm@...r.kernel.org,
x86@...nel.org
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
rkrcmar@...hat.com, joro@...tes.org, songliubraving@...com,
peterz@...radead.org, kstewart@...uxfoundation.org,
gregkh@...uxfoundation.org, thomas.lendacky@....com,
konrad.wilk@...cle.com, mattst88@...il.com,
Janakarajan.Natarajan@....com, dwmw@...zon.co.uk,
jpoimboe@...hat.com, marcorr@...gle.com, ubizjak@...il.com,
sean.j.christopherson@...el.com, jmattson@...gle.com,
linux-kernel@...r.kernel.org,
Chao Peng <chao.p.peng@...ux.intel.com>
Subject: Re: [PATCH v13 08/12] KVM: x86: Add Intel PT context switch for each vcpu
Paolo Bonzini <pbonzini@...hat.com> writes:
> On 30/10/2018 12:26, Alexander Shishkin wrote:
>> There is a control in the perf event attribute that enables tracing the
>> guest. If this control is enabled, the kvm needs to stay away from any
>> PT related MSRs.
>
> This cannot happen once the guest has been told it can trace itself.
So, they need to be made mutually exclusive.
> There is no standard way to tell the guest that the host overrode its
> choice to use PT. However, the host will get a PGD/PGE packet around
> vmentry and vmexit, so there _will_ be an indication that the guest
> owned the MSRs for that period of time.
Not if they are not tracing the kernel.
> If PT context switching is enabled with the module parameter, we could
> also reject creation of events with the attribute set. However that
> won't help if the event is created before KVM is even loaded.
In that case, modprobe kvm should fail.
Regards,
--
Alex
Powered by blists - more mailing lists