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

Function svm_getcap

freebsd/amd64/vmm/amd/svm.c:2335–2361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2333}
2334
2335static int
2336svm_getcap(void *arg, int vcpu, int type, int *retval)
2337{
2338 struct svm_softc *sc;
2339 int error;
2340
2341 sc = arg;
2342 error = 0;
2343
2344 switch (type) {
2345 case VM_CAP_HALT_EXIT:
2346 *retval = svm_get_intercept(sc, vcpu, VMCB_CTRL1_INTCPT,
2347 VMCB_INTCPT_HLT);
2348 break;
2349 case VM_CAP_PAUSE_EXIT:
2350 *retval = svm_get_intercept(sc, vcpu, VMCB_CTRL1_INTCPT,
2351 VMCB_INTCPT_PAUSE);
2352 break;
2353 case VM_CAP_UNRESTRICTED_GUEST:
2354 *retval = 1; /* unrestricted guest is always enabled */
2355 break;
2356 default:
2357 error = ENOENT;
2358 break;
2359 }
2360 return (error);
2361}
2362
2363static struct vmspace *
2364svm_vmspace_alloc(vm_offset_t min, vm_offset_t max)

Callers

nothing calls this directly

Calls 1

svm_get_interceptFunction · 0.85

Tested by

no test coverage detected