Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp966389ybb; Wed, 8 Apr 2020 13:31:52 -0700 (PDT) X-Google-Smtp-Source: APiQypKdj+PP8GIvKEzacjl+oO0vUFpvEERbZsuQpGlw1M41XD7dWeeL3gCuM2Iguz2Rwnuh/su3 X-Received: by 2002:a05:6830:1bc9:: with SMTP id v9mr6838492ota.169.1586377912121; Wed, 08 Apr 2020 13:31:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586377912; cv=none; d=google.com; s=arc-20160816; b=KzRvyeHGn2ZgFaJbeVPeOc5vuysO2MT867oipfBffgh7ssDpTDx+o1JUHjaQbTr4JW ciUlLnEvwmBG9ZieXiB52KXIbBhChlQjLBBsHYLKzURykGKr6lwzKymGomQInOUMyNrx s+BnDKLihV7tNoXX353qs2rWl8116UBUVDFW0lexuqz70Yy+8QP5vfz5QWSQreiygcUt 0uKyQy6yOdKbc99pVreAZr/YuGUHFt+HAaSwruGTFeOVdnoZY+nwevv0gLErMyxVAd7d 7RqcHjAZD4fbk2IrPGpbhgcga5DBw/jyuxfCvwTRqYYOvFuHCvxsHl0QKvOa1UyAevcT Empg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=rM2AllpyXY7ShvICsraKiOxw2/YebeJ26YLqQzcyXQw=; b=ZbdCGcZA9A6NdZJh1ZdlL7ie7z0+P1/GW3prnFju58HXO7nY692Rq0ZsiKiOi0ERFB mGHXChgr+iRCpwL4goJ5eRdLCHiMl+JTD5lNkYKBd0YzzmqB1dxe7b6az5s9IrP9Lb6I vJPC6BvF+HduRcoQ2EhvJ8YiTOez0Dabh8omzmMwJKfsBZazJnG12iW2Vr8h3U1ia5Mz uD+tbQ8Wf0tnuPH/Xfh6ilegqJsrISK9xaTmceeoNOhOMsQUn1T83ofhUK2G+IGWCjTV 8pXTR4krZIs3vAz+CPUyFpTJSxEJVb+XDcqbFe4ECgnIXoFs14LHWkXWYA9E6kfQymsN gf4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="De0P/iPr"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q11si504984ool.8.2020.04.08.13.31.40; Wed, 08 Apr 2020 13:31:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="De0P/iPr"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729400AbgDHTYO (ORCPT + 99 others); Wed, 8 Apr 2020 15:24:14 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:21422 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727717AbgDHTYO (ORCPT ); Wed, 8 Apr 2020 15:24:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586373853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rM2AllpyXY7ShvICsraKiOxw2/YebeJ26YLqQzcyXQw=; b=De0P/iPrsHnLvd+4jcbl4wDgznEbC6YIaxddHhckeIuaVNDNq3P4rLT+TAB2wmbDMmUeQl qUu/6W01ZvTRUPfHVYPWwz3VMkkUI85DE8G/szXaA5uLlTK2WN3KjAK7GVMDACD9miJsRU ScfQV1tzD69zqjTyBywSeRARo4tuZz0= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-200-DpnnIHi5PC6yVCxjqkl9Rw-1; Wed, 08 Apr 2020 15:24:11 -0400 X-MC-Unique: DpnnIHi5PC6yVCxjqkl9Rw-1 Received: by mail-wm1-f69.google.com with SMTP id f81so741361wmf.2 for ; Wed, 08 Apr 2020 12:24:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=rM2AllpyXY7ShvICsraKiOxw2/YebeJ26YLqQzcyXQw=; b=jpOnZZtKga4eOqFz/0vKmN9L0HtG7Ulc+Nz70r4VNHt7fhei1se1g9LGuVQZbK5s0/ 1wfaRRdBeWxJPK1r8o2YH78XOK9fWLnBc3lMg5InZ6zNEPUt+KPyOk+a5dnNL2HlB3X7 5G4dk9LqMedOvP1SfJfzc5QB9n6msLZh0msfMEkuPkkDFGUj1JWOGfkCS/cqic+A66ZW yxfXyevkGVOU1Pvdw9emDKm+qSa2Di9LMWTOoAVl+dU/4/JJlWSxos9lclvVMON/c9C+ GtLq058vwfqPQkvVEko3wq5/6qXMIQ/kDNEvAznLrRbUHYN/mkJfz7kmkglVf7oOAUik EqWg== X-Gm-Message-State: AGi0PuY7dtRhU3Yuw+MU7Cu7Sjw0dOyIRLfVg4m7/8cEEYCnGV01WDAQ Oom5/63OR7/C9nFkSgPCdvB03EGoLdPNNOHM+CJSBAYoWRwfyifueQIGmpyR7dgHGJqGQcf1mVB wEE6g9xcPxmWNshXATvNLbh3y X-Received: by 2002:adf:8364:: with SMTP id 91mr171159wrd.36.1586373850398; Wed, 08 Apr 2020 12:24:10 -0700 (PDT) X-Received: by 2002:adf:8364:: with SMTP id 91mr171130wrd.36.1586373850160; Wed, 08 Apr 2020 12:24:10 -0700 (PDT) Received: from vitty.brq.redhat.com (g-server-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id f4sm19680766wrp.80.2020.04.08.12.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 12:24:09 -0700 (PDT) From: Vitaly Kuznetsov To: Dexuan Cui Cc: KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "wei.liu\@kernel.org" , "linux-hyperv\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" , Michael Kelley Subject: RE: [PATCH] Drivers: hv: vmbus: Disallow the freeze PM operation In-Reply-To: References: <1586296907-53744-1-git-send-email-decui@microsoft.com> <877dyq2d4p.fsf@vitty.brq.redhat.com> Date: Wed, 08 Apr 2020 21:24:08 +0200 Message-ID: <87v9m9233b.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dexuan Cui writes: >> From: Vitaly Kuznetsov >> Sent: Wednesday, April 8, 2020 8:47 AM >> > IMO 'freeze' in a Linux VM on Hyper-V is not really useful in practice, >> > so let's disallow the operation for both Gen-1 and Gen-2 VMs, even if >> > it's not an issue for Gen-1 VMs. >> >> Suspend-to-idle may not be very useful indeed, however, it worked before >> and I think we can just fix it. > > How can we fix Suspend-to-idle for a Gen-2 VM, in which no device can work > as wakeup devices? Note: in the case of Suspend-to-idle, now all the vmbus > devices including the synthetic keyboard/mouse are suspended completely. > > Are you suggesting hv_vmbus should distinguish Suspend-to-idle from > hibernation, and for the former hv_vmbus should not suspend the synthetic > keyboard/mouse? Yes, basically. > This should be doable but IMO this is not a very trivial > effort, and I'm trying to avoid it since IMO Suspend-to-idle is not really > useful in practice for a Linux VM on Hyper-V. :-) Well, to me it's equally (not) useful in all other cases :-) I think we should Cc: linux-pm@vger.kernel.org and someone will describe a real world usecase to educate us, we'll then see if there is any Hyper-V specifics. > >> In particular, why do we need to do >> anything when we are not hibernating? > > Are you suggesting hv_vmbus should not suspend the vmbus devices at all > in the case of Suspend-to-idle? That what we were doing prior to the hibernation series, right? AFAIU suspend-to-idle is basically 'no processes are scheduled' mode but we don't really need to do anything with devices. > >> > +/* >> > + * Note: "freeze/suspend" here means "systemctl suspend". >> > + * "systemctl hibernate" is still supported. >> >> Let's not use systemd terminology in kernel, let's use the ones from >> admin-guide/pm/sleep-states.rst (Suspend-to-Idle/Standby/Suspend-to-RAM/ >> Hibernation). >> -- >> Vitaly > > Thanks! I'll use the accurate terms. > > Thanks, > -- Dexuan > -- Vitaly