> From: Dexuan Cui > Sent: Wednesday, October 2, 2019 10:35 PM > > ... > > > > ¯\_(ツ)_/¯ If you do not want to implement hibernation properly in vmbus > > code that is totally up to you (have you read in pm.h how freeze() is > > different from suspend()?). > > Dmitry > > I understand freeze() is different from suspend(). Here I treat suspend() as a > heavyweight freeze() for simplicity and IMHO the extra cost of time is > neglectable considering the long hibernation process, which can take > 5~10+ seconds. > > Even if I implement all the pm ops, IMO the issue we're talking about > (i.e. the hibernation process can be aborted by user's keyboard/mouse > activities) still exists. Actually I think a physical Linux machine should have > the same issue. > > In practice, IMO the issue is not a big concern, as the VM usually runs in > a remote data center, and the user has no access to the VM's > keyboard/mouse. :-) > > I hope I understood your comments. I'll post a v2 without the notifier. > Please Ack the v2 if it looks good to you. > > -- Dexuan I think I understood now: it looks the vmbus driver should implement a prepare() or freeze(), which calls the hyperv_keyboard driver's prepare() or freeze(), which can set the flag or disable the keyboard event handling. This way we don't need the notifier. Please let me know if I still don't get it right. Thanks, -- Dexuan