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

Function vmx_modify_intr_shadow

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

Source from the content-addressed store, hash-verified

3287}
3288
3289static int
3290vmx_modify_intr_shadow(struct vmx *vmx, int vcpu, int running, uint64_t val)
3291{
3292 struct vmcs *vmcs;
3293 uint64_t gi;
3294 int error, ident;
3295
3296 /*
3297 * Forcing the vcpu into an interrupt shadow is not supported.
3298 */
3299 if (val) {
3300 error = EINVAL;
3301 goto done;
3302 }
3303
3304 vmcs = &vmx->vmcs[vcpu];
3305 ident = VMCS_IDENT(VMCS_GUEST_INTERRUPTIBILITY);
3306 error = vmcs_getreg(vmcs, running, ident, &gi);
3307 if (error == 0) {
3308 gi &= ~HWINTR_BLOCKING;
3309 error = vmcs_setreg(vmcs, running, ident, gi);
3310 }
3311done:
3312 VCPU_CTR2(vmx->vm, vcpu, "Setting intr_shadow to %#lx %s", val,
3313 error ? "failed" : "succeeded");
3314 return (error);
3315}
3316
3317static int
3318vmx_shadow_reg(int reg)

Callers 1

vmx_setregFunction · 0.85

Calls 2

vmcs_getregFunction · 0.85
vmcs_setregFunction · 0.85

Tested by

no test coverage detected