diff --git a/README.md b/README.md index 58c76659b..9ded89f8f 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,8 @@ CPU backend: --randomx-no-numa disable NUMA support for RandomX --randomx-mode=MODE RandomX mode: auto, fast, light --randomx-1gb-pages use 1GB hugepages for dataset (Linux only) - --randomx-wrmsr=N write value (0-15) to Intel MSR register 0x1a4 or do nothing (-1) (Linux only) + --randomx-wrmsr=N write custom value (0-15) to Intel MSR register 0x1a4 or disable MSR mod (-1) + --randomx-no-rdmsr disable reverting initial MSR values on exit API: --api-worker-id=ID custom worker-id for API diff --git a/src/base/kernel/interfaces/IConfig.h b/src/base/kernel/interfaces/IConfig.h index fe1a24b53..f483f044e 100644 --- a/src/base/kernel/interfaces/IConfig.h +++ b/src/base/kernel/interfaces/IConfig.h @@ -92,6 +92,7 @@ public: RandomXModeKey = 1029, RandomX1GbPagesKey = 1031, RandomXWrmsrKey = 1032, + RandomXRdmsrKey = 1033, CPUMaxThreadsKey = 1026, MemoryPoolKey = 1027, YieldKey = 1030, diff --git a/src/core/config/ConfigTransform.cpp b/src/core/config/ConfigTransform.cpp index 0309fc59f..eb58cdaa2 100644 --- a/src/core/config/ConfigTransform.cpp +++ b/src/core/config/ConfigTransform.cpp @@ -175,6 +175,9 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const } return set(doc, kRandomX, "wrmsr", static_cast(strtol(arg, nullptr, 10))); + + case IConfig::RandomXRdmsrKey: /* --randomx-no-rdmsr */ + return set(doc, kRandomX, "rdmsr", false); # endif # ifdef XMRIG_FEATURE_OPENCL diff --git a/src/core/config/Config_platform.h b/src/core/config/Config_platform.h index 2a1725e3d..1cf12337f 100644 --- a/src/core/config/Config_platform.h +++ b/src/core/config/Config_platform.h @@ -102,6 +102,9 @@ static const option options[] = { { "randomx-1gb-pages", 0, nullptr, IConfig::RandomX1GbPagesKey }, { "1gb-pages", 0, nullptr, IConfig::RandomX1GbPagesKey }, { "randomx-wrmsr", 2, nullptr, IConfig::RandomXWrmsrKey }, + { "wrmsr", 2, nullptr, IConfig::RandomXWrmsrKey }, + { "randomx-no-rdmsr", 0, nullptr, IConfig::RandomXRdmsrKey }, + { "no-rdmsr", 0, nullptr, IConfig::RandomXRdmsrKey }, # endif # ifdef XMRIG_FEATURE_OPENCL { "opencl", 0, nullptr, IConfig::OclKey }, diff --git a/src/core/config/usage.h b/src/core/config/usage.h index 4fb62a48c..cfda7ff42 100644 --- a/src/core/config/usage.h +++ b/src/core/config/usage.h @@ -89,7 +89,8 @@ static inline const std::string &usage() u += " --randomx-no-numa disable NUMA support for RandomX\n"; u += " --randomx-mode=MODE RandomX mode: auto, fast, light\n"; u += " --randomx-1gb-pages use 1GB hugepages for dataset (Linux only)\n"; - u += " --randomx-wrmsr=N write value (0-15) to Intel MSR register 0x1a4 or do nothing (-1) (Linux only)\n"; + u += " --randomx-wrmsr=N write custom value (0-15) to Intel MSR register 0x1a4 or disable MSR mod (-1)\n"; + u += " --randomx-no-rdmsr disable reverting initial MSR values on exit\n"; # endif # ifdef XMRIG_FEATURE_HTTP