| 2333 | } |
| 2334 | |
| 2335 | static int |
| 2336 | svm_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 | |
| 2363 | static struct vmspace * |
| 2364 | svm_vmspace_alloc(vm_offset_t min, vm_offset_t max) |
nothing calls this directly
no test coverage detected