[Bug 219112] Machine will not wake from suspend if KVM VM is running

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=219112

--- Comment #7 from Sean Christopherson (seanjc@xxxxxxxxxx) ---
(In reply to Brandon Nielsen from comment #6)
> (In reply to Sean Christopherson from comment #5)
> > Heh, that was quite the rabbit hole.  Poking around reminded me of a bug
> > report from Tejun about KVM worker threads not freezing in certain
> > scenarios[*].
> > 
> > Long explanation very short, can you try setting KVM's "nx_huge_pages"
> > module param to "never"?  E.g. via
> > 
> >   echo "never" | sudo tee /sys/module/kvm/parameters/nx_huge_pages
> > 
> > Note, the module param is writable even while KVM is loaded, but it needs
> to
> > be set to "never' _before_ launching any VMs, in which case KVM won't spawn
> > the associated worker thread.  I.e. the "never" setting only affects worker
> > threads for new VMs.
> > 
> > AFAIK, that's the only problematic flavor of worker thread in KVM.  If that
> > makes the suspend/resume problem go away, then odds are very good the
> > underlying issue is the same one Tejun reported.
> > 
> > [*] https://lore.kernel.org/all/ZyAnSAw34jwWicJl@xxxxxxxxxxxxxxx
> 
> Interesting, so on my Intel laptop that is set to "Y", on my AMD desktop
> that is set to "N", in both cases, setting it to "never" seems to fix
> suspend. I can't find the documentation for that particular tunable, but
> that seems odd.

The behavior is expected and working as intended.  The parameter controls a
mitigation that is enabled by default if and only if the CPU is affected by
L1TF.  But, KVM creates a kthread related to the mitigation even if the
mitigation is disabled, so that KVM doesn't need to try and spawn/destroy the
kthread on-demand if the user/admin toggles the mitigation while the VM is
running.

The "never" setting is a relatively recent addition that allows the admin to
commit to never enabling the mitigation (without reloading KVM), specifically
so that KVM can skip creating the kthread, e.g. to reduce VM creation latency.

As for documentation, I'll add that to the todo list, I simply forgot to add it
when introducing the "never" option.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux