Giter VIP home page Giter VIP logo

amd_ibs_toolkit's People

Contributors

congweitao avatar jlgreathouse avatar stefanocarna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

amd_ibs_toolkit's Issues

Zen workaround missing for Zen 2 (which is also affected by SpecLockMap).

While this repository doesn't mention SpecLockMap by name, FAM17H_MSR_WA_1 is MSRC001_1020[54]:

#define FAM17H_MSR_WA_1 0xc0011020
#define FAM17H_MSR_WA_1_BITS 0x40000000000000ULL

We found that MSRC001_1020[54] disables SpecLockMap (some advanced form of lock speculation which may roll back a number of post-lock instructions but doesn't correctly roll back performance counters) in rr-debugger/rr#2034 (comment).

Latest rr (from git) now contains some detection logic for SpecLockMap (execute a single atomic, check if r0825:u aka SpecLockMapCommit counted it), so you could use for testing (sadly I don't think there's a standalone version).


What we also know is that Zen 2 is just as affected by SpecLockMap's missing counter rollback as Zen 1 or Zen 1+, which leads me to believe ce475e6 should've added Zen 2 to this list:

// "Zen" core workaround. Multiple SoCs have "Zen" cores.
// 0x00-0x0f are the Ryzen/Epyc CPU-only SoCs
// 0x10-0x2f are the Raven Ridge APUs
// 0x50-0x5f also exist
if (c->x86 == 0x17 &&
((c->x86_model >= 0x0 && c->x86_model <= 0x2f) ||
(c->x86_model >= 0x50 && c->x86_model < 0x5f)))
{

Furthermore, only on Zen 2 will setting the MSR bit stick, due to the kernel using MSRC001_1020[10] as SSBD on earlier Zen (whereas Zen 2 got an architectural MSR for speculation control, and the kernel toggles that instead).

https://github.com/mozilla/rr/wiki/Zen contains more information on how to check if the workaround sticks on a given machine and what you can do to mitigate that - I suspect the tracepoint-based (kernel module) workaround by @glandium is the only one that would be readily applicable for you, since you're already operating within a kernel module (though currently you don't require tracepoints so that would be a new requirement for using the IBS Toolkit).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.