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

Function vm_inject_pf

freebsd/amd64/vmm/vmm.c:2120–2134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2118}
2119
2120void
2121vm_inject_pf(void *vmarg, int vcpuid, int error_code, uint64_t cr2)
2122{
2123 struct vm *vm;
2124 int error;
2125
2126 vm = vmarg;
2127 VCPU_CTR2(vm, vcpuid, "Injecting page fault: error_code %#x, cr2 %#lx",
2128 error_code, cr2);
2129
2130 error = vm_set_register(vm, vcpuid, VM_REG_GUEST_CR2, cr2);
2131 KASSERT(error == 0, ("vm_set_register(cr2) error %d", error));
2132
2133 vm_inject_fault(vm, vcpuid, IDT_PF, 1, error_code);
2134}
2135
2136static VMM_STAT(VCPU_NMI_COUNT, "number of NMIs delivered to vcpu");
2137

Callers 1

_vm_gla2gpaFunction · 0.85

Calls 2

vm_set_registerFunction · 0.85
vm_inject_faultFunction · 0.85

Tested by

no test coverage detected