[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c3a25e58-cb4e-f3f7-bbd5-559bc763bb26@redhat.com>
Date: Mon, 11 Jun 2018 13:41:53 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: "Kang, Luwei" <luwei.kang@...el.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
"chao.p.peng@...ux.intel.com" <chao.p.peng@...ux.intel.com>,
"thomas.lendacky@....com" <thomas.lendacky@....com>,
"bp@...e.de" <bp@...e.de>, "Liang, Kan" <kan.liang@...el.com>,
"Janakarajan.Natarajan@....com" <Janakarajan.Natarajan@....com>,
"dwmw@...zon.co.uk" <dwmw@...zon.co.uk>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"mathieu.poirier@...aro.org" <mathieu.poirier@...aro.org>,
"kstewart@...uxfoundation.org" <kstewart@...uxfoundation.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"david@...hat.com" <david@...hat.com>,
"bsd@...hat.com" <bsd@...hat.com>,
"yu.c.zhang@...ux.intel.com" <yu.c.zhang@...ux.intel.com>,
"joro@...tes.org" <joro@...tes.org>
Subject: Re: [PATCH v9 09/12] KVM: x86: Introduce a function to initialize the
PT configuration
On 08/06/2018 16:56, Kang, Luwei wrote:
>>> + /* Initialize and clear the no dependency bits */
>>> + vmx->pt_desc.ctl_bitmask = ~0ULL;
>> This looks redundant, doesn't it?
> This is a bit mask for RTIT_CTL MSR and it will make & with the value of RTIT_CLT from guest.
> The reserved bits will be 1 in this bit mask and the setable bits are 0.
>
>>> + vmx->pt_desc.ctl_bitmask = ~(RTIT_CTL_TRACEEN | RTIT_CTL_OS |
>>> + RTIT_CTL_USR | RTIT_CTL_TSC_EN |
>> RTIT_CTL_DISRETC);
But it's set twice, so the first assignment is superfluous.
Paolo
Powered by blists - more mailing lists