Skip to content

Commit 0f8da2d

Browse files
authored
Merge pull request #663 from NotRequiem/main
changed 0xD for 0x0 leaf in timer
2 parents 3ea8cfc + 3a63364 commit 0f8da2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vmaware.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5377,7 +5377,7 @@ struct VM {
53775377
debug("TIMER: Running inside a binary translation layer");
53785378
return false;
53795379
}
5380-
if (util::hyper_x() != HYPERV_UNKNOWN) threshold = 20.0;
5380+
if (util::hyper_x() != HYPERV_UNKNOWN) threshold = 25.0;
53815381

53825382
// prevent false sharing when triggering hypervisor exits with the intentional data race condition
53835383
struct alignas(64) cache_state {
@@ -5647,7 +5647,7 @@ struct VM {
56475647
v_pre = state.counter;
56485648
std::atomic_signal_fence(std::memory_order_seq_cst); // _ReadWriteBarrier() aka dont emit runtime fences
56495649
// force cpuid collection here so that the hypervisor is either forced to disable interception and try to bypass latency, or intercept cpuid and try to bypass XSAVE states
5650-
trigger_vmexit(dummy_res, 0xD, 0);
5650+
trigger_vmexit(dummy_res, 0x0, 0); // fastest cpuid path, on purpose for stability in the measurement
56515651
std::atomic_signal_fence(std::memory_order_seq_cst);
56525652
v_post = state.counter;
56535653

@@ -12010,7 +12010,7 @@ struct VM {
1201012010
// veh will already detect if Dr0 fired successfully
1201112011
}
1201212012

12013-
// Cleanup
12013+
// cleanup
1201412014
rtl_remove_vectored_exception_handler(veh_handle);
1201512015

1201612016
ctx.Dr0 = 0;

0 commit comments

Comments
 (0)