Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1096452rdf; Sat, 4 Nov 2023 06:28:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGX38KtvtmifgeU7uYBfyQcAWBkmOnomNU3uDNEoDpBy5m4eZWjNKt/g+HptI2M5bFf09Wv X-Received: by 2002:a05:6a20:8f0f:b0:138:68b9:138e with SMTP id b15-20020a056a208f0f00b0013868b9138emr7845539pzk.8.1699104531138; Sat, 04 Nov 2023 06:28:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699104531; cv=none; d=google.com; s=arc-20160816; b=rbPIGvODzMFNyhYQXRpnwe6eB1L2L90NsWnX6pp6U8hYvf95xAbNnK5QNPHOR0uZUT W4jUgBE8/CjdWnjMn63vG/xypWdED+HdPZ6qazen1FXTC5+7naS+H7GGQUyCB6Vr+K7p 5kr9dXs0VinyfwC1o6oVBj3vSXqMXBnxQNeV4XG4zAPdHJFGavwGYkHxLoi0wtZ7LuBj VQu2la31BdyHRDUKL0JLjRUpIYEIAwjl9Qe8mhruZaFVGwsmXflx9A9HU7mEo4FcLWgQ JMl02TEqOkAB9pRYnV2+Yq4a+UtvdIZF4TbWl8+klFsXrDj0F1N2Xi54WoOjQulx+UiS jG0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=94gVLByNIP3yZ8aIBlRJ0GKCH1Bdalh2pefao3fSink=; fh=2gwpQAc5Iek5AbxmeV4VdfQfZjna0jANfGwquzyqCLY=; b=pEpgcCPNzEXrdJ9oPPNw/BJjLrpTDAQPt/CeekzmIe98gKopFr8x9KFlDKGS+v+hyp tC++vYRg4f2gOpPdTmTxJSEm96Wvn0XS2qhYt0MEt/RLw9x6gSF/s9JeUvzt21gs5T16 RyuLmBj/6RJ/SHWI9orZiuyeVE53b8TIMnLrXkKYNbuY4uGwcvYqKhLcYyvXyMS65aK9 nt3aSVXX8Ko4Fz3UqN6tRAghhLiD6mZFvxEjkn9HpszQfymXvuVqFj6KghHofiBcQU2G CVN8cnK1oVSf/Mp6sUCL57WOB+S3ZrG8YP1f2WPfAzn6Y4t3vcYs00NbN3zMJqBn7TXv BDrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iH+FAJr9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f11-20020a63f10b000000b005b902b61cbcsi3674331pgi.723.2023.11.04.06.28.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 06:28:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iH+FAJr9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 623CB8040E9D; Sat, 4 Nov 2023 06:28:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231473AbjKDN2s (ORCPT + 99 others); Sat, 4 Nov 2023 09:28:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjKDN2r (ORCPT ); Sat, 4 Nov 2023 09:28:47 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DBB1194 for ; Sat, 4 Nov 2023 06:28:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E4ECC433C7; Sat, 4 Nov 2023 13:28:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1699104524; bh=7kiTv8orfQicg6Mv+6HGJziKmy7PZhj8z0zjpoEJlEQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iH+FAJr9h9U+Bu7NYTdquvfW8PUwU2/bkVjgm9jZcOARbGuDVSmk3XPEAQqgEZSeg qv91vzHkY4YpaowrX7mfUrUdrSb9EcJFwgLSZCCC4lfetRu5PcvOxwbfl6Y3v8yreX 0fzJfnytQgvUrgBJMrD4B3myaAs9g0NFUC/EqGTE= Date: Sat, 4 Nov 2023 14:28:37 +0100 From: Greg Kroah-Hartman To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Zhangjin Wu , Willy Tarreau , Yuan Tan Subject: Re: [PATCH RFC] misc/pvpanic: add support for normal shutdowns Message-ID: <2023110431-pacemaker-pruning-0e4c@gregkh> References: <20231104-pvpanic-shutdown-v1-1-5ee7c9b3e301@weissschuh.net> <2023110407-unselect-uptight-b96d@gregkh> <365bbe1f-5ee8-40fe-bec0-53d9e7395c18@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <365bbe1f-5ee8-40fe-bec0-53d9e7395c18@t-8ch.de> X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 04 Nov 2023 06:28:49 -0700 (PDT) On Sat, Nov 04, 2023 at 02:16:53PM +0100, Thomas Wei?schuh wrote: > On 2023-11-04 14:05:02+0100, Greg Kroah-Hartman wrote: > > On Sat, Nov 04, 2023 at 12:29:30PM +0100, Thomas Wei?schuh wrote: > > > Shutdown requests are normally hardware dependent. > > > By extending pvpanic to also handle shutdown requests, guests can > > > submit such requests with an easily implementable and cross-platform > > > mechanism. > > > > > > Signed-off-by: Thomas Wei?schuh > > > --- > > > The corresponding patch to qemu has also been submitted[0]. > > > General discussions about the feature should happen on the other thread. > > > > > > [0] https://lore.kernel.org/qemu-devel/20231104-pvpanic-shutdown-v1-0-02353157891b@t-8ch.de/ > > > --- > > > drivers/misc/pvpanic/pvpanic.c | 19 +++++++++++++++++-- > > > include/uapi/misc/pvpanic.h | 1 + > > > 2 files changed, 18 insertions(+), 2 deletions(-) > > [..] > > > > diff --git a/include/uapi/misc/pvpanic.h b/include/uapi/misc/pvpanic.h > > > index 54b7485390d3..82fc618bfbcf 100644 > > > --- a/include/uapi/misc/pvpanic.h > > > +++ b/include/uapi/misc/pvpanic.h > > > @@ -5,5 +5,6 @@ > > > > > > #define PVPANIC_PANICKED (1 << 0) > > > #define PVPANIC_CRASH_LOADED (1 << 1) > > > +#define PVPANIC_SHUTDOWN (1 << 2) > > > > Why are these in a uapi file? > > They are ABI between qemu and its guest. But there's no interaction between Linux and userspace for these values, so I would just drop them from here. > The specification for these values is part of qemu but for some reason > the header is part of Linux which is then imported back into qemu. > > I guess this has historical reasons, maybe because qemu doesn't really > ship ABI headers and for Linux it's natural. That feels odd, are there other in-kernel examples of the Linux uapi files being abused like this? > The real reason probably doesn't matter today as the header propably > can't be dropped from Linux anyways for compatibility reasons. > > > And if they need to be here, why not use the proper BIT() macro for it? > > This was for uniformity with the existing code. > I can send a (standalone?) patch to fix it up. If we keep it, sure, that would be nice. But let's try to drop it if possible :) thanks, greg k-h