[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82D7661F83C1A047AF7DC287873BF1E172BD64B9@SHSMSX101.ccr.corp.intel.com>
Date: Thu, 25 Oct 2018 00:06:25 +0000
From: "Kang, Luwei" <luwei.kang@...el.com>
To: Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>
CC: "tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"joro@...tes.org" <joro@...tes.org>,
"songliubraving@...com" <songliubraving@...com>,
"peterz@...radead.org" <peterz@...radead.org>,
"kstewart@...uxfoundation.org" <kstewart@...uxfoundation.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"thomas.lendacky@....com" <thomas.lendacky@....com>,
"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
"mattst88@...il.com" <mattst88@...il.com>,
"Janakarajan.Natarajan@....com" <Janakarajan.Natarajan@....com>,
"dwmw@...zon.co.uk" <dwmw@...zon.co.uk>,
"jpoimboe@...hat.com" <jpoimboe@...hat.com>,
"marcorr@...gle.com" <marcorr@...gle.com>,
"ubizjak@...il.com" <ubizjak@...il.com>,
"Christopherson, Sean J" <sean.j.christopherson@...el.com>,
"jmattson@...gle.com" <jmattson@...gle.com>,
"linux-kernel@...r.kernel.org" <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
> > +static void pt_guest_enter(struct vcpu_vmx *vmx) {
> > + if (pt_mode == PT_MODE_SYSTEM)
> > + return;
> > +
> > + /* Save host state before VM entry */
> > + rdmsrl(MSR_IA32_RTIT_CTL, vmx->pt_desc.host.ctl);
> > +
> > + /*
> > + * Set guest state of MSR_IA32_RTIT_CTL MSR (PT will be disabled
> > + * on VM entry when it has been disabled in guest before).
> > + */
> > + vmcs_write64(GUEST_IA32_RTIT_CTL, vmx->pt_desc.guest.ctl);
> > +
> > + if (vmx->pt_desc.guest.ctl & RTIT_CTL_TRACEEN) {
> > + wrmsrl(MSR_IA32_RTIT_CTL, 0);
> > + pt_save_msr(&vmx->pt_desc.host, vmx->pt_desc.addr_range);
> > + pt_load_msr(&vmx->pt_desc.guest, vmx->pt_desc.addr_range);
> > + }
> > +}
>
> From my side this is still a NAK, because [1].
>
> [1] https://marc.info/?l=kvm&m=153847567226248&w=2
>
This place is save the host PT status and load the guest PT status before VM-entry when working in Host-Guest mode.
Thanks,
Luwei Kang
Powered by blists - more mailing lists