[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9838721f-ed64-cec8-f3dc-895c0bb7a681@redhat.com>
Date: Mon, 13 Nov 2017 17:32:00 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Luwei Kang <luwei.kang@...el.com>, kvm@...r.kernel.org
Cc: rkrcmar@...hat.com, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, x86@...nel.org, linux-kernel@...r.kernel.org,
Chao Peng <chao.p.peng@...ux.intel.com>
Subject: Re: [patch v2 3/8] KVM: x86: add Intel processor trace virtualization
mode
On 30/10/2017 23:05, Luwei Kang wrote:
> + if (!(_cpu_based_2nd_exec_control & SECONDARY_EXEC_PT_USE_GPA) ||
> + !(_vmexit_control & VM_EXIT_CLEAR_IA32_RTIT_CTL) ||
> + !(_vmentry_control & VM_ENTRY_LOAD_IA32_RTIT_CTL)) {
> + _cpu_based_2nd_exec_control &= ~SECONDARY_EXEC_PT_USE_GPA;
Also, you are not checking anywhere if the SUPPRESS_PIP controls are
available. This is probably the best place.
> + _vmexit_control &= ~VM_EXIT_CLEAR_IA32_RTIT_CTL;
> + _vmentry_control &= ~VM_ENTRY_LOAD_IA32_RTIT_CTL;
These two are not needed; disabling SECONDARY_EXEC_PT_USE_GPA is enough.
The tracing mode will revert to PT_SYSTEM, which does not use the
load/clear RTIT_CTL controls.
Paolo
> + }
> +
Powered by blists - more mailing lists