fix: allow using recoverable pagefaults on xekmd

Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
This commit is contained in:
Naklicki, Mateusz
2024-08-19 12:03:29 +00:00
committed by Compute-Runtime-Automation
parent b41f825155
commit 4404d0c6b8
2 changed files with 14 additions and 2 deletions

View File

@@ -2314,6 +2314,18 @@ TEST(IoctlHelperXeVmBindTest, givenDeviceInFaultModeWhenInitializeIoctlHelperThe
}
}
TEST(IoctlHelperXeVmBindTest, givenPageFaultSupportIsSetWhenCallingIsPageFaultSupportedThenProperValueIsReturned) {
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
auto drm = DrmMockXeVmBind::create(*executionEnvironment->rootDeviceEnvironments[0]);
for (const auto &recoverablePageFault : ::testing::Bool()) {
drm->supportsRecoverablePageFault = recoverablePageFault;
auto xeIoctlHelper = std::make_unique<MockIoctlHelperXe>(*drm);
xeIoctlHelper->initialize();
EXPECT_EQ(xeIoctlHelper->isPageFaultSupported(), recoverablePageFault);
}
}
struct HwIpVersionFixture {
HwIpVersionFixture() : hwInfo{*executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo()},