Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4794340iob; Mon, 9 May 2022 01:38:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVK1drXSNqOPXf8m7UiPiE0C67aPViADikzHzr0XhrXCGGBoWCMPR8w+TYDGvA+TT8HQaQ X-Received: by 2002:a05:6a00:1941:b0:50d:807d:530b with SMTP id s1-20020a056a00194100b0050d807d530bmr14889223pfk.17.1652085496195; Mon, 09 May 2022 01:38:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652085496; cv=none; d=google.com; s=arc-20160816; b=rkdDgjhiyfwEHCNo8iBT9fkfcpGAEMThMyDfWXePk0wJRPzwY1tIbZLNK9yD4/pJvQ 42VcB4kgYws7APDLzPFM4z0ptvSuQITWFbCVPiQ1vvGQoYmT293n2qSexATgyrd31lQ/ o9VJvldf7EJ9umVbEjcTpdeYmgkznKGp+4+6mF5fubLkG2h0gMCY7cEKj+EezEws5R9B dQxzlQHXon4xR5E7Jd9xtmm9pgFjnL26T0/PwQs6dStEBdPyxgMSB5xr86wphZgBbk0c 47hx28+7guA+K2NpjwseYZhLHPobpu3zHb3GZX4DUSRIUzFkS8aienhRNeM6HP711+CX pIDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=u3aGIMaSKSuXe0aOwXTF+DSUOA0MrbhCM2LmuOADZeQ=; b=b/Sx59Z5GUJ8AdJ40pvc6xhtQWAI0/UqBMVTWJLGbrLaxZAyf/jv1o+HroMYYAUG97 aOwx7pqR5elw5awW+Yzq6CLJVa6GDHtWsxjRQO8heeoXL82YnGmxRz1Yt3mHxdXlL9sH 8kv7erLjDOWBJGIakWReX+hoQ9Azb1TXiVlnGD3KEodCKsmWdwm+ywbPI/gQCd1ygJ2r 9VsEhhquF9PZ9fVTLCJ1OcuTmrJsw6jRYscBCOzA8M0Ui8TWJLi0GO3e/ThA2GauJJjr V6Bo9groLSCWgGXXp6zuelKInMyKlW7Wzh/Wo0b18InKHjr233PVxSdYJ7k/pSmNqdmf wCKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=JlBfZ7HA; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j31-20020a63551f000000b003821c6a6897si13562984pgb.758.2022.05.09.01.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 01:38:16 -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; dkim=fail header.i=@igalia.com header.s=20170329 header.b=JlBfZ7HA; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9D89A12FEE6; Mon, 9 May 2022 01:21:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377623AbiEEMsu (ORCPT + 99 others); Thu, 5 May 2022 08:48:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241946AbiEEMsr (ORCPT ); Thu, 5 May 2022 08:48:47 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBB495535D; Thu, 5 May 2022 05:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=u3aGIMaSKSuXe0aOwXTF+DSUOA0MrbhCM2LmuOADZeQ=; b=JlBfZ7HAD+GX8IyDFPeDjKpa7U thWd55Q2hoN9Dylk9JbG2sonLgz2vPTLyafarA9yaQ2+bRtEdIuXAu6s+IS+eKcwGhgkHs1YboGg1 kIF8UmjfEkGaQM4HFJzQfUlYB6jUDcfOGncazwv+9yiUFbIJ+2c0FgrURCMJZgSCffX9RRezrkphr JP1/NAwGnhbG8ZHeKzyc04ogsHi4OOph7P3hQfPirKsJ+e0PL04kijgaNntmGyf0GyLiGi3bKWcX/ LIrIOW9KKvPCAYi8LfaTML0RpI7uF8NhdkSm6MISGSsUTiWI3Y7++P7XJfU1vMAsQ0rhGOYaCsp6v 6y6eIGxg==; Received: from [179.113.53.197] (helo=[192.168.1.60]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1nmaqX-000C4H-C3; Thu, 05 May 2022 14:44:41 +0200 Message-ID: <92645c41-96fd-2755-552f-133675721a24@igalia.com> Date: Thu, 5 May 2022 09:44:25 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: Should arm64 have a custom crash shutdown handler? Content-Language: en-US To: Marc Zyngier , mark.rutland@arm.com Cc: Catalin Marinas , will Deacon , "Michael Kelley (LINUX)" , Vitaly Kuznetsov , Russell King , Ard Biesheuvel , broonie@kernel.org, "linux-arm-kernel@lists.infradead.org" , linux-kernel , "linux-hyperv@vger.kernel.org" References: <427a8277-49f0-4317-d6c3-4a15d7070e55@igalia.com> <874k24igjf.wl-maz@kernel.org> From: "Guilherme G. Piccoli" In-Reply-To: <874k24igjf.wl-maz@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 05/05/2022 04:29, Marc Zyngier wrote: > [...] > Not having any 'machine_ops' indirection was a conscious decision on > arm64, if only to avoid the nightmare that 32bit was at a time with > every single platform doing their own stuff. Introducing them would > not be an improvement, but simply the admission that hypervisors are > simply too broken for words. And I don't buy the "but x86 has it!" > argument. x86 is a nightmare of PV mess that we can happily ignore, > because we don't do PV for core operations at all. > > If something has to be done to quiesce the system, it probably is > related to the system topology, and must be linked to it. We already > have these requirements in order to correctly stop ongoing DMA, shut > down IOMMUs, and other similar stuff. What other requirements does > your favourite hypervisor have? > Thanks Marc and Mark for the details. I agree with most part of it, and in fact panic notifiers was the trigger for this discussion (and they are in fact used for this purpose to some extent in Hyper-V). The idea of having this custom handler from kexec comes from Hyper-V discussion - I feel it's better to show the code, so please take a look at functions: hv_machine_crash_shutdown() [arch/x86/kernel/cpu/mshyperv.c] and the one called from there, hv_crash_handler() [drivers/hv/vmbus_drv.c]. These routines perform last minute clean-ups, right before kdump/kexec happens, but *after* the panic notifiers. It seems there is no way to accomplish that without architecture involvement or core kexec code pollution heh Anyway, the idea here was to gather a feedback on how "receptive" arm64 community would be to allow such customization, appreciated your feedback =) Cheers, Guilherme