In the Linux kernel, the following vulnerability has been resolved: KVM: SVM: Skip fastpath emulation on VM-Exit if next RIP isn't valid Skip the WRMSR and HLT fastpaths in SVM's VM-Exit handler if the next RIP isn't valid, e.g. because KVM is running with nrips=false. SVM must decode and emulate to skip the instruction if the CPU doesn't provide the next RIP, and getting the instruction bytes to decode requires reading guest memory. Reading guest memory through the emulator can fault, i.e. can sleep, which is disallowed since the fastpath handlers run with IRQs disabled. BUG: sleeping function called from invalid context at ./include/linux/uaccess.h:106 inatomic(): 1, irqsdisabled(): 1, nonblock: 0, pid: 32611, name: qemu preemptcount: 1, expected: 0 INFO: lockdep is turned off. irq event stamp: 30580 hardirqs last enabled at (30579): [<ffffffffc08b2527>] vcpurun+0x1787/0x1db0 [kvm] hardirqs last disabled at (30580): [<ffffffffb4f62e32>] _schedule+0x1e2/0xed0 softirqs last enabled at (30570): [<ffffffffb4247a64>] fpuswapkvmfpstate+0x44/0x210 softirqs last disabled at (30568): [<ffffffffb4247a64>] fpuswapkvmfpstate+0x44/0x210 CPU: 298 UID: 0 PID: 32611 Comm: qemu Tainted: G U 6.16.0-smp--e6c618b51cfe-sleep #782 NONE Tainted: [U]=USER Hardware name: Google Astoria-Turin/astoria, BIOS 0.20241223.2-0 01/17/2025 Call Trace: <TASK> dumpstacklvl+0x7d/0xb0 _mightresched+0x271/0x290 _mightfault+0x28/0x80 kvmvcpureadguestpage+0x8d/0xc0 [kvm] kvmfetchguestvirt+0x92/0xc0 [kvm] _doinsnfetchbytes+0xf3/0x1e0 [kvm] x86decodeinsn+0xd1/0x1010 [kvm] x86emulateinstruction+0x105/0x810 [kvm] _svmskipemulatedinstruction+0xc4/0x140 [kvmamd] handlefastpathinvd+0xc4/0x1a0 [kvm] vcpurun+0x11a1/0x1db0 [kvm] kvmarchvcpuioctlrun+0x5cc/0x730 [kvm] kvmvcpuioctl+0x578/0x6a0 [kvm] _sesysioctl+0x6d/0xb0 dosyscall64+0x8a/0x2c0 entrySYSCALL64afterhwframe+0x4b/0x53 RIP: 0033:0x7f479d57a94b </TASK> Note, this is essentially a reapply of commit 5c30e8101e8d ("KVM: SVM: Skip WRMSR fastpath on VM-Exit if next RIP isn't valid"), but with different justification (KVM now grabs SRCU when skipping the instruction for other reasons).