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-next>] [day] [month] [year] [list]
Date:   Wed,  1 Nov 2017 11:19:26 -0500
From:   Janakarajan Natarajan <Janakarajan.Natarajan@....com>
To:     kvm@...r.kernel.org, x86@...nel.org, linux-kernel@...r.kernel.org
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krcmar <rkrcmar@...hat.com>,
        Len Brown <len.brown@...el.com>, Kyle Huey <me@...ehuey.com>,
        Borislav Petkov <bp@...e.de>, Kan Liang <Kan.liang@...el.com>,
        Grzegorz Andrejczuk <grzegorz.andrejczuk@...el.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        Tony Luck <tony.luck@...el.com>,
        Janakarajan Natarajan <Janakarajan.Natarajan@....com>
Subject: [PATCH 0/4] Support Perf Extension on AMD KVM guests

This patchset adds support for Perf Extension on AMD KVM guests.

When perf runs on a guest with family = 15h || 17h, the MSRs that are
accessed, when the Perf Extension flag is made available, differ from
the existing K7 MSRs. The accesses are to the AMD Core Performance
Extension counters which provide 2 extra counters and new MSRs for both
the event select and counter registers.

Routines are introduced to choose the proper MSR based on the guest
family. Since the new event select and counter MSRs are interleaved
and K7 MSRs are contiguous, the logic to map them to the gp_counters[]
is changed.

Additionally, a fix is provided for CPUID_8000_0001_ECX in reverse_cpuid[]
to change the CPUID function from 0xc0000001 to 0x80000001.

This patchset has been tested with Family 17h and Opteron G1 guests.

Janakarajan Natarajan (4):
  x86/kvm/cpuid: Fix CPUID function for word 6 (80000001_ECX)
  Add AMD Core Perf Extension MSRs
  Add support for AMD Core Perf Extension in guest
  Expose AMD Core Perf Extension flag to guests

 arch/x86/include/asm/msr-index.h |  12 ++++
 arch/x86/kvm/cpuid.c             |   8 ++-
 arch/x86/kvm/cpuid.h             |   2 +-
 arch/x86/kvm/pmu_amd.c           | 133 ++++++++++++++++++++++++++++++++++-----
 arch/x86/kvm/x86.c               |   1 +
 5 files changed, 140 insertions(+), 16 deletions(-)

-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ