MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vmcs_set_msr_save

Function vmcs_set_msr_save

freebsd/amd64/vmm/intel/vmcs.c:314–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314int
315vmcs_set_msr_save(struct vmcs *vmcs, u_long g_area, u_int g_count)
316{
317 int error;
318
319 VMPTRLD(vmcs);
320
321 /*
322 * Guest MSRs are saved in the VM-exit MSR-store area.
323 * Guest MSRs are loaded from the VM-entry MSR-load area.
324 * Both areas point to the same location in memory.
325 */
326 if ((error = vmwrite(VMCS_EXIT_MSR_STORE, g_area)) != 0)
327 goto done;
328 if ((error = vmwrite(VMCS_EXIT_MSR_STORE_COUNT, g_count)) != 0)
329 goto done;
330
331 if ((error = vmwrite(VMCS_ENTRY_MSR_LOAD, g_area)) != 0)
332 goto done;
333 if ((error = vmwrite(VMCS_ENTRY_MSR_LOAD_COUNT, g_count)) != 0)
334 goto done;
335
336 error = 0;
337done:
338 VMCLEAR(vmcs);
339 return (error);
340}
341
342int
343vmcs_init(struct vmcs *vmcs)

Callers

nothing calls this directly

Calls 3

VMPTRLDFunction · 0.85
vmwriteFunction · 0.85
VMCLEARFunction · 0.85

Tested by

no test coverage detected