On Tue, Aug 31, 2021 at 11:40:59AM -0600, Dave Voutila wrote: > CVSROOT: /cvs > Module name: src > Changes by: d...@cvs.openbsd.org 2021/08/31 11:40:59 > > Modified files: > sys/arch/amd64/amd64: cpu.c ipifuncs.c vmm.c > sys/arch/amd64/include: cpu.h intrdefs.h vmmvar.h > > Log message: > vmm(4): add ipi for vmclear, unlock kernel > > On Intel VMX hosts, when a guest migrates cpus, VMCS state needs > to be flushed to physical memory before being reloaded on the new > cpu. This diff adds a new ipi to allow a guest resuming on a new > cpu to signal to the old that it needs to vmclear. > > To better surface the potential race conditions, unlock the kernel > after handling the ioctl to vmm and simplify the run loops for both > vmx and svm. This requires a new vcpu lock. > > Tested by some on tech@. "go for it" @mlarkin
The interaction with the kernel lock and vcpulock is not correct here as syzkaller found 5 panics over night. https://syzkaller.appspot.com/bug?id=dab82fdb3b82fb9483b17f40bf1ad237478fdd29 https://syzkaller.appspot.com/bug?id=9d3bc62ae7a42a632adcdfde978734aa3d30a2ff https://syzkaller.appspot.com/bug?id=9448c6dbe1abb804c6162b86fc0e4c256bb8563b https://syzkaller.appspot.com/bug?id=5ba2de27cb01f578272c552e79998ccd006857c3 https://syzkaller.appspot.com/bug?id=963bb2c17667da1bf53cb808d4eeadd2b01a464f