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

Function vm_exit_intinfo

freebsd/amd64/vmm/vmm.c:1847–1873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1845}
1846
1847int
1848vm_exit_intinfo(struct vm *vm, int vcpuid, uint64_t info)
1849{
1850 struct vcpu *vcpu;
1851 int type, vector;
1852
1853 if (vcpuid < 0 || vcpuid >= vm->maxcpus)
1854 return (EINVAL);
1855
1856 vcpu = &vm->vcpu[vcpuid];
1857
1858 if (info & VM_INTINFO_VALID) {
1859 type = info & VM_INTINFO_TYPE;
1860 vector = info & 0xff;
1861 if (type == VM_INTINFO_NMI && vector != IDT_NMI)
1862 return (EINVAL);
1863 if (type == VM_INTINFO_HWEXCEPTION && vector >= 32)
1864 return (EINVAL);
1865 if (info & VM_INTINFO_RSVD)
1866 return (EINVAL);
1867 } else {
1868 info = 0;
1869 }
1870 VCPU_CTR2(vm, vcpuid, "%s: info1(%#lx)", __func__, info);
1871 vcpu->exitintinfo = info;
1872 return (0);
1873}
1874
1875enum exc_class {
1876 EXC_BENIGN,

Callers 3

vmmdev_ioctlFunction · 0.85
svm_save_intinfoFunction · 0.85
vmx_exit_processFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected