diff options
| author | riastradh <riastradh@NetBSD.org> | 2022-09-13 20:10:04 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2022-09-13 20:10:04 +0000 |
| commit | 03750c83f7cdf357eb6b9b4f5a1c673e267f3f5d (patch) | |
| tree | 4b3dd9b01bbc81083614f97e406e9e969e62e6de /sys/dev/microcode/isp | |
| parent | 6878208bd17b81d7d199d1808595e9d2c452b4a4 (diff) | |
nvmm(4): Add suspend/resume support.
New MD nvmm_impl callbacks:
- .suspend_interrupt forces all VMs on all physical CPUs to exit.
- .vcpu_suspend suspends an individual vCPU on a machine.
- .machine_suspend suspends an individual machine.
- .suspend suspends the whole system.
- .resume resumes the whole system.
- .machine_resume resumes an individual machine.
- .vcpu_resume resumes an indidivudal vCPU on a machine.
Suspending nvmm:
1. causes new VM operations (ioctl and close) to block until resumed,
2. uses .suspend_interrupt to interrupt any concurrent and force them
to return early, and then
3. uses the various suspend callbacks to suspend all vCPUs, machines,
and the whole system -- all vCPUs before the machine they're on,
and all machines before the system.
Resuming nvmm does the reverse of (3) -- resume system, resume each
machine and then the vCPUs on that machine -- and then unblocks
operations.
Implemented only for x86-vmx for now:
- suspend_interrupt triggers a TLB IPI to cause VM exits;
- vcpu_suspend issues VMCLEAR to force any in-CPU state to be written
to memory;
- machine_suspend does nothing;
- suspend does VMXOFF on all CPUs;
- resume does VMXON on all CPUs;
- machine_resume does nothing; and
- vcpu_resume just marks each vCPU as valid but inactive so
subsequent use will clear it and load it with vmptrld.
x86-svm left as an exercise for the reader.
Diffstat (limited to 'sys/dev/microcode/isp')
0 files changed, 0 insertions, 0 deletions
