Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4782999iob; Mon, 9 May 2022 01:15:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+YnxLjkDm49I8jegYMQKm4Gdo/RVNF8AXNUfQjCtbdAnhKazIpl8ZUX3KAhQu1W4qOV2D X-Received: by 2002:a17:90b:1e0f:b0:1dc:a80b:7fcf with SMTP id pg15-20020a17090b1e0f00b001dca80b7fcfmr16912928pjb.83.1652084119939; Mon, 09 May 2022 01:15:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652084119; cv=none; d=google.com; s=arc-20160816; b=O1pIADaCKuul+ixAH2bRoonHPDG77UAfiV5zHjPWN5vTYQrLlJhkALoutMSPC0x39C vogrAjwmtXLOYfp63DN+JRlL5n7Y75fZff1xu0+6bDv3RsI6a5XQenK8vGoQgKRunpwU MFlszbzEgZ8ErjdKCAQWla1X9F8RD2JpN9A6pNgcWyq0ZR4+aK8ATEU2lSECXFsy0B29 EfHU/YJNQvywb081cIvpFHgY5quH5IxlUdeRLlUl8kYxDfkD0ECgE42QtHhEg3AT1GpB Vpq4EdJWtiVEXuKHbELVHZWpXmVHLd37iHozwcEgYeRM6xWdj7bPRnOkKaKWSJbPjaEw 0gmQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=TPqeZBxZOXxS5Xzqpo7WhGD8Gw184Z1LqxVFH5NAtpo=; b=ZwqmHCgif4toN/x0uJYhNTNPx2u8aw0+ywFw7CGVMOUpG6i7pnD/CGb0W6k+ojZ5lq X4MkRnwrTJY5sMZ09/Q1fpVlNzBkf0inbPhw8GIUI4i3UcN2ej375f+GzIo0hHJ4gGhN 8jLbhkGDMSOf7kpn0wMYjKx9AxqkCnYDA+qRRf0wE369u4YSsrr2Pd/KRhkVjEFAAA7t pMjV46ITQ0OvG0Fw7VQCvun4LRJ3iM83BL4CGmXjNM9TWYV8FFdhKl8+dXmtaztoemXn B1TaJ2yUmVZZlND8JmLB5LbDKS9yGpVFtQg6LWiHDPdw4lOOZXCxoOXWqOC8oTrznFJm JvmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id gt14-20020a17090af2ce00b001cd49fa9153si13916083pjb.18.2022.05.09.01.15.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 01:15:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 74A941D620A; Mon, 9 May 2022 01:04:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377087AbiEENTN (ORCPT + 99 others); Thu, 5 May 2022 09:19:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376729AbiEENS4 (ORCPT ); Thu, 5 May 2022 09:18:56 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 67BF12BED; Thu, 5 May 2022 06:15:16 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 395E1106F; Thu, 5 May 2022 06:15:16 -0700 (PDT) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.29.132]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 89EEA3F885; Thu, 5 May 2022 06:15:14 -0700 (PDT) Date: Thu, 5 May 2022 14:15:11 +0100 From: Mark Rutland To: "Guilherme G. Piccoli" Cc: "Michael Kelley (LINUX)" , Marc Zyngier , Catalin Marinas , will Deacon , Vitaly Kuznetsov , Russell King , Ard Biesheuvel , broonie@kernel.org, "linux-arm-kernel@lists.infradead.org" , linux-kernel , "linux-hyperv@vger.kernel.org" Subject: Re: Should arm64 have a custom crash shutdown handler? Message-ID: References: <427a8277-49f0-4317-d6c3-4a15d7070e55@igalia.com> <874k24igjf.wl-maz@kernel.org> <92645c41-96fd-2755-552f-133675721a24@igalia.com> <3bee47db-f771-b502-82a3-d6fac388aa89@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3bee47db-f771-b502-82a3-d6fac388aa89@igalia.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Thu, May 05, 2022 at 10:05:18AM -0300, Guilherme G. Piccoli wrote: > On 05/05/2022 09:53, Mark Rutland wrote: > > [...] > > Looking at those, the cleanup work is all arch-specific. What exactly would we > > need to do on arm64, and why does it need to happen at that point specifically? > > On arm64 we don't expect as much paravirtualization as on x86, so it's not > > clear to me whether we need anything at all. > > > >> Anyway, the idea here was to gather a feedback on how "receptive" arm64 > >> community would be to allow such customization, appreciated your feedback =) > > > > ... and are you trying to do this for Hyper-V or just using that as an example? > > > > I think we're not going to be very receptive without a more concrete example of > > what you want. > > > > What exactly do *you* need, and *why*? Is that for Hyper-V or another hypervisor? > > > > Thanks > > Mark. > > Hi Mark, my plan would be doing that for Hyper-V - kind of the same > code, almost. For example, in hv_crash_handler() there is a stimer > clean-up and the vmbus unload - my understanding is that this same code > would need to run in arm64. Michael Kelley is CCed, he was discussing > with me in the panic notifiers thread and may elaborate more on the needs. The key problem here is that there's no justification as to why this cannot be done in a panic notifier (or a regular reboot notifer for the plain shutdown or kexec case). I undertstand that x86 does one thing, and what Marc and I have said is that fact alone doesn't justify doing the same. We need to know: a) What specifically you want to do on arm64 b) Why you think this cannot be done using the existing mechanisms (e.g. notifiers). Without a strong justification, we wouldn't add such hooks to arm64. Could you start by trying to use the notifiers, and if you encounter a problem, *then* we consider an alternative? That should mean we have a concrete reason. Thanks, Mark. > But also (not related with my specific plan), I've seen KVM quiesce code > on x86 as well [see kvm_crash_shutdown() on arch/x86] , I'm not sure if > this is necessary for arm64 or if this already executing in some > abstracted form, I didn't dig deep - probably Vitaly is aware of that, > hence I've CCed him here. > > Cheers, > > > Guilherme