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

Function vmx_getreg

freebsd/amd64/vmm/intel/vmx.c:3338–3355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3336}
3337
3338static int
3339vmx_getreg(void *arg, int vcpu, int reg, uint64_t *retval)
3340{
3341 int running, hostcpu;
3342 struct vmx *vmx = arg;
3343
3344 running = vcpu_is_running(vmx->vm, vcpu, &hostcpu);
3345 if (running && hostcpu != curcpu)
3346 panic("vmx_getreg: %s%d is running", vm_name(vmx->vm), vcpu);
3347
3348 if (reg == VM_REG_GUEST_INTR_SHADOW)
3349 return (vmx_get_intr_shadow(vmx, vcpu, running, retval));
3350
3351 if (vmxctx_getreg(&vmx->ctx[vcpu], reg, retval) == 0)
3352 return (0);
3353
3354 return (vmcs_getreg(&vmx->vmcs[vcpu], running, reg, retval));
3355}
3356
3357static int
3358vmx_setreg(void *arg, int vcpu, int reg, uint64_t val)

Callers 2

inout_str_indexFunction · 0.85
inout_str_countFunction · 0.85

Calls 6

vcpu_is_runningFunction · 0.85
vm_nameFunction · 0.85
vmx_get_intr_shadowFunction · 0.85
vmxctx_getregFunction · 0.85
vmcs_getregFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected