Thread (11 messages) 11 messages, 5 authors, 2021-06-05

Re: [RFC][PATCH] kvm: add suspend pm-notifier

From: Sergey Senozhatsky <senozhatsky@chromium.org>
Date: 2021-06-05 00:59:30
Also in: kvm, kvmarm, linux-mips, linux-s390, lkml

On (21/06/04 11:03), Marc Zyngier wrote:
[..]
quoted
Well on the other hand PM-callbacks are harmless on those archs, they
won't overload the __weak function.
I don't care much for the callbacks. But struct kvm is bloated enough,
and I'd be happy not to have this structure embedded in it if I can
avoid it.
Got it.
quoted
quoted
How about passing the state to the notifier callback? I'd expect it to
be useful to do something on resume too.
For different states we can have different kvm_arch functions instead.
kvm_arch_pm_notifier() can be renamed to kvm_arch_suspend_notifier(),
so that we don't need to have `switch (state)` in every arch-code. Then
for resume/post resume states we can have kvm_arch_resume_notifier()
arch functions.
I'd rather we keep an arch API that is similar to the one the rest of
the kernel has, instead of a flurry of small helpers that need to grow
each time someone adds a new PM state. A switch() in the arch-specific
implementation is absolutely fine.
OK.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help