diff --git a/src/workers/MultiWorker.cpp b/src/workers/MultiWorker.cpp index aed38d635..392f71e77 100644 --- a/src/workers/MultiWorker.cpp +++ b/src/workers/MultiWorker.cpp @@ -31,6 +31,7 @@ #include "workers/CpuThread.h" #include "workers/MultiWorker.h" #include "workers/Workers.h" +#include "common/cpu/Cpu.h" template @@ -56,7 +57,10 @@ template void MultiWorker::allocateRandomX_VM() { if (!m_rx_vm) { - const int flags = RANDOMX_FLAG_LARGE_PAGES | RANDOMX_FLAG_HARD_AES | RANDOMX_FLAG_FULL_MEM | RANDOMX_FLAG_JIT; + int flags = RANDOMX_FLAG_LARGE_PAGES | RANDOMX_FLAG_FULL_MEM | RANDOMX_FLAG_JIT; + if (xmrig::Cpu::info()->hasAES()) + flags |= RANDOMX_FLAG_HARD_AES; + m_rx_vm = randomx_create_vm(static_cast(flags), nullptr, Workers::getDataset()); if (!m_rx_vm) { m_rx_vm = randomx_create_vm(static_cast(flags - RANDOMX_FLAG_LARGE_PAGES), nullptr, Workers::getDataset());