FEX: Moves HostFeatures querying to the frontend

This moves the CPU feature querying to the frontend. The primary purpose
here is for the wow64 frontend to not require linux-isms for querying
these features. This is required since non-Linux environments don't have
the "CPUID" feature for reading EL1 MSRs in EL0.

Wiring up the remaining wow64 registry querying is left for a future
exercise.

This also technically removes an xbyak requirement from FEXCore for when
building the x86 Test harness runner, but that doesn't really matter for
regular use cases.
This commit is contained in:
Ryan Houdek committed 2024-08-07 05:26:02 -07:00
1 parent 69ed39d49e
commit e84848b16b
16 files changed
+145 -107

No files matched your search

+6
View File
@@ -25,6 +25,7 @@ $end_info$
#include <FEXCore/Utils/TypeDefines.h>
#include "Common/Config.h"
#include "Common/HostFeatures.h"
#include "Common/InvalidationTracker.h"
#include "Common/TSOHandlerConfig.h"
#include "Common/CPUFeatures.h"
@@ -468,6 +469,11 @@ NTSTATUS ProcessInit() {
Exception::HandlerConfig.emplace();
CTX = FEXCore::Context::Context::CreateNewContext();
{
auto HostFeatures = FEX::FetchHostFeatures();
CTX->SetHostFeatures(HostFeatures);
}
CTX->SetSignalDelegator(SignalDelegator.get());
CTX->SetSyscallHandler(SyscallHandler.get());
CTX->InitCore();