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]
Message-ID: <3cfad210-6633-66cf-0276-95d4ca1af273@redhat.com>
Date:   Thu, 30 Nov 2017 13:20:27 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Luwei Kang <luwei.kang@...el.com>, kvm@...r.kernel.org
Cc:     tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
        x86@...nel.org, rkrcmar@...hat.com, linux-kernel@...r.kernel.org,
        joro@...tes.org, Chao Peng <chao.p.peng@...ux.intel.com>
Subject: Re: [PATCH v3 7/9] KVM: x86: Implement Intel Processor Trace MSRs
 read/write

On 27/11/2017 21:24, Luwei Kang wrote:
> +		case MSR_IA32_RTIT_ADDR0_A ... MSR_IA32_RTIT_ADDR3_B: {
> +			u32 eax, ebx, ecx, edx;
> +
> +			cpuid_count(0x14, 1, &eax, &ebx, &ecx, &edx);

Please cache the cpuid_count result, or do the cpuid_count after testing
vmx_pt_supported() (which you can use instead of going through kvm_x86_ops).

Thanks,

Paolo

> +			if (!kvm_x86_ops->pt_supported() || msrs_to_save[i] -
> +					MSR_IA32_RTIT_ADDR0_A >= (eax & 0x7))
> +				continue;
> +			break;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ