From c62622b114a3f9f4f36579544532c7581910241c Mon Sep 17 00:00:00 2001 From: SChernykh Date: Sun, 26 Feb 2023 22:31:55 +0100 Subject: [PATCH] Fix: `--randomx-wrmsr=-1` worked only on Intel --- src/crypto/rx/RxConfig.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/crypto/rx/RxConfig.cpp b/src/crypto/rx/RxConfig.cpp index 775c93269..cb50c4d1c 100644 --- a/src/crypto/rx/RxConfig.cpp +++ b/src/crypto/rx/RxConfig.cpp @@ -256,10 +256,12 @@ void xmrig::RxConfig::readMSR(const rapidjson::Value &value) return; } - if (value.IsInt() && Cpu::info()->vendor() == ICpuInfo::VENDOR_INTEL) { + if (value.IsInt()) { const int i = std::min(value.GetInt(), 15); if (i >= 0) { - m_msrPreset.emplace_back(0x1a4, i); + if (Cpu::info()->vendor() == ICpuInfo::VENDOR_INTEL) { + m_msrPreset.emplace_back(0x1a4, i); + } } else { m_wrmsr = false;