state = V3_Malloc(sizeof(struct mtrr_state));
if (!state) {
- PrintError("Cannot allocate in initializing MTRRs\n");
+ PrintError(vm, VCORE_NONE, "Cannot allocate in initializing MTRRs\n");
return -1;
}
ret |= v3_hook_msr(vm, SMRR_PHYS_MASK, intel_smrr_mask_read, intel_smrr_mask_write, state);
if (ret != 0) {
- PrintError("Failed to hook all MTRR MSRs. Aborting...\n");
+ PrintError(vm, VCORE_NONE,"Failed to hook all MTRR MSRs. Aborting...\n");
deinit_mtrrs(vm, state);
return -1;
}
static struct v3_extension_impl mtrr_impl = {
.name = "MTRRS",
- .init = init_mtrrs,
- .deinit = deinit_mtrrs,
+ .init = NULL,
+ .vm_init = init_mtrrs,
+ .vm_deinit = deinit_mtrrs,
.core_init = NULL,
.core_deinit = NULL,
.on_entry = NULL,