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

Function svm_set_intercept

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

Source from the content-addressed store, hash-verified

393}
394
395static __inline void
396svm_set_intercept(struct svm_softc *sc, int vcpu, int idx, uint32_t bitmask,
397 int enabled)
398{
399 struct vmcb_ctrl *ctrl;
400 uint32_t oldval;
401
402 KASSERT(idx >=0 && idx < 5, ("invalid intercept index %d", idx));
403
404 ctrl = svm_get_vmcb_ctrl(sc, vcpu);
405 oldval = ctrl->intercept[idx];
406
407 if (enabled)
408 ctrl->intercept[idx] |= bitmask;
409 else
410 ctrl->intercept[idx] &= ~bitmask;
411
412 if (ctrl->intercept[idx] != oldval) {
413 svm_set_dirty(sc, vcpu, VMCB_CACHE_I);
414 VCPU_CTR3(sc->vm, vcpu, "intercept[%d] modified "
415 "from %#x to %#x", idx, oldval, ctrl->intercept[idx]);
416 }
417}
418
419static __inline void
420svm_disable_intercept(struct svm_softc *sc, int vcpu, int off, uint32_t bitmask)

Callers 3

svm_disable_interceptFunction · 0.85
svm_enable_interceptFunction · 0.85
svm_setcapFunction · 0.85

Calls 2

svm_get_vmcb_ctrlFunction · 0.85
svm_set_dirtyFunction · 0.85

Tested by

no test coverage detected