| 2136 | static VMM_STAT(VCPU_NMI_COUNT, "number of NMIs delivered to vcpu"); |
| 2137 | |
| 2138 | int |
| 2139 | vm_inject_nmi(struct vm *vm, int vcpuid) |
| 2140 | { |
| 2141 | struct vcpu *vcpu; |
| 2142 | |
| 2143 | if (vcpuid < 0 || vcpuid >= vm->maxcpus) |
| 2144 | return (EINVAL); |
| 2145 | |
| 2146 | vcpu = &vm->vcpu[vcpuid]; |
| 2147 | |
| 2148 | vcpu->nmi_pending = 1; |
| 2149 | vcpu_notify_event(vm, vcpuid, false); |
| 2150 | return (0); |
| 2151 | } |
| 2152 | |
| 2153 | int |
| 2154 | vm_nmi_pending(struct vm *vm, int vcpuid) |
no test coverage detected