lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 May 2018 13:52:16 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Luwei Kang <luwei.kang@...el.com>
Cc:     kvm@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
        hpa@...or.com, x86@...nel.org, rkrcmar@...hat.com,
        linux-kernel@...r.kernel.org, joro@...tes.org,
        peterz@...radead.org, chao.p.peng@...ux.intel.com
Subject: Re: [PATCH v7 06/13] KVM: x86: Add Intel Processor Trace
 virtualization mode

On 03/05/2018 13:32, Alexander Shishkin wrote:
>> +static inline bool cpu_has_vmx_pt_use_gpa(void)
>> +{
>> +	return vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_PT_USE_GPA;
>> +}
> 
> I can deduce the meaning of the previous one, but not this one, and there's
> no explanation.

Within KVM, GPA always means guest physical address.

>> +	if (pt_mode == PT_MODE_SYSTEM)
>> +		vmexit_control &= ~(VM_EXIT_CLEAR_IA32_RTIT_CTL |
>> +				    VM_EXIT_PT_CONCEAL_PIP);
> 
> Ok, so what we really want to know is: is there an encompassing PT
> event on this cpu when we go into VMLAUNCH/VMRESTORE, right?
> We can find this out from the pt_ctx and avoid the pt_mode entirely.
> IOW, instead of having the 3 modes that you describe at the top, you
> can use something like the following:
> 
> 1. Do we have an event in pt_ctx?
>  * No -> Set up the context for VMX.
>  * Yes -> 2. Is attr.exclude_guest set?
>              * No -> Guest trace goes to the host's buffer, do nothing.
> 	     * Yes -> Set up/switch the context for VMX.

Can you explain this more clearly?

Thanks,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ