@@ -62,15 +62,15 @@ bool ept_set_caps(uint64 caps)
62
62
}
63
63
64
64
caps &= ~EPT_UNSUPPORTED_FEATURES ;
65
- ASSERT (!ept_capabilities || caps == ept_capabilities );
65
+ assert (!ept_capabilities || caps == ept_capabilities );
66
66
// FIXME: This assignment is done by all logical processors simultaneously
67
67
ept_capabilities = caps ;
68
68
return 1 ;
69
69
}
70
70
71
71
static bool ept_has_cap (uint64 cap )
72
72
{
73
- ASSERT (ept_capabilities != 0 );
73
+ assert (ept_capabilities != 0 );
74
74
// Avoid implicit conversion from uint64 to bool, because the latter may be
75
75
// typedef'ed as uint8 (see hax_types_windows.h)
76
76
return (ept_capabilities & cap ) != 0 ;
@@ -185,7 +185,7 @@ static bool ept_lookup(struct vcpu_t *vcpu, paddr_t gpa, paddr_t *hpa)
185
185
struct hax_ept * ept = vcpu -> vm -> ept ;
186
186
uint which_g = gpa >> 30 ;
187
187
188
- ASSERT (ept -> ept_root_page );
188
+ assert (ept -> ept_root_page );
189
189
if (which_g >= EPT_MAX_MEM_G ) {
190
190
hax_debug ("ept_lookup error!\n" );
191
191
return 0 ;
@@ -224,7 +224,7 @@ static bool ept_lookup(struct vcpu_t *vcpu, paddr_t gpa, paddr_t *hpa)
224
224
// TODO: Do we need to consider cross-page case ??
225
225
bool ept_translate (struct vcpu_t * vcpu , paddr_t gpa , uint order , paddr_t * hpa )
226
226
{
227
- ASSERT (order == PG_ORDER_4K );
227
+ assert (order == PG_ORDER_4K );
228
228
return ept_lookup (vcpu , gpa , hpa );
229
229
}
230
230
@@ -301,7 +301,7 @@ void ept_free (hax_vm_t *hax_vm)
301
301
struct hax_page * page , * n ;
302
302
struct hax_ept * ept = hax_vm -> ept ;
303
303
304
- ASSERT (ept );
304
+ assert (ept );
305
305
306
306
if (!ept -> ept_root_page )
307
307
return ;
@@ -328,7 +328,7 @@ static void invept_smpfunc(struct invept_bundle *bundle)
328
328
{
329
329
struct per_cpu_data * cpu_data ;
330
330
331
- smp_mb ();
331
+ hax_smp_mb ();
332
332
cpu_data = current_cpu_data ();
333
333
cpu_data -> invept_res = VMX_SUCCEED ;
334
334
@@ -373,7 +373,7 @@ void invept(hax_vm_t *hax_vm, uint type)
373
373
374
374
bundle .type = type ;
375
375
bundle .desc = & desc ;
376
- smp_call_function (& cpu_online_map , (void (* )(void * ))invept_smpfunc ,
376
+ hax_smp_call_function (& cpu_online_map , (void (* )(void * ))invept_smpfunc ,
377
377
& bundle );
378
378
379
379
/*
0 commit comments