Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19900834rwd; Wed, 28 Jun 2023 16:25:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Tx/hMBC/UBeVad0uJ3w2h6rd0Fr7rw221xsBP3hNomXq/xUuYX5LIT4SmVFZb4TkzxS0u X-Received: by 2002:a05:6a20:3956:b0:128:86a3:f7f3 with SMTP id r22-20020a056a20395600b0012886a3f7f3mr9802632pzg.48.1687994728739; Wed, 28 Jun 2023 16:25:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687994728; cv=none; d=google.com; s=arc-20160816; b=dxSYwBpFnkMXSZs8fZNlRMtaqHA6phUNh0290HGmZl3oGG/UwpAi+H+RTKn1W1cBTe 0kxAZpyqpCYb5ctioOLXi048iT/XVrlFV1FQeH/Dp5/0Bove59ggiCkz+tjDOcCfwjXc 4oUzOtBdLMi/JDzJc+jmud810WP4xsPTKjKcEqcvoian0HRRzWbDg8dt4bSOhzf642O9 oWvgmJFz2botmXdMUSiN+zQOc9s+1Fwt0YUCHPihwEovfre2Z/2jpcQvpOwmwSGREr03 lyRlU5kV/aUoLDvVdZPGONs418x6DMI0SXTus5EO+AIAWgwhmGMMsitgzmkyH4Ugyh0a Mdfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ncMoBvd0vJrdkqAOzvlH4Zm0S6kB0o4ayb9DxwR4Pok=; fh=ZjPsl/kNGHIsX37gS8wbGI/1B6WzksF7aVZn9gUT5Tk=; b=jBDZplAAy4g1shosQvSz/3rWL9NrGMS8j1YDfqyifRE4+RoFVDZpvhkpISXca0C5Op hq2DCMOpBp0mC7vh75zhkOzTwHrsdzKa9ZECqbKWZdGHyblz7NFVAMH/PBugwqkSmw4M PlIpi2SpZ13+tpYPTjzeSTjNe0LNTBF30XyjjEUTLX73qME+5m5HdO7KtUZAwagfSlhq wDFl3ejeFDikQ1Z49R92Jxp6d2hHjpwgHIq1sBoIvOQ9bk9UTp3c6OooWu6BnZt5EBNM dEKhwAoQ7JkKQd3F+Ofkis6JZy/sUfyO+ztHyu6DKUNRGPVnInPGcJJ91hIvl6cLBYAw ujug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZMut3JVt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr9-20020a056a000f0900b0067b2f265d2fsi4787305pfb.83.2023.06.28.16.25.17; Wed, 28 Jun 2023 16:25:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZMut3JVt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229639AbjF1XM0 (ORCPT + 99 others); Wed, 28 Jun 2023 19:12:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231509AbjF1XMX (ORCPT ); Wed, 28 Jun 2023 19:12:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 840331FFB; Wed, 28 Jun 2023 16:12:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 12EFA6148B; Wed, 28 Jun 2023 23:12:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71A48C433CB; Wed, 28 Jun 2023 23:12:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687993941; bh=VtoAF6nuCa4Fxj4WgDnwmAot+ZQSC5M1c1smWPa+7s4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZMut3JVteUhuboOHyxQn2/OnmHzUHTDI7P5S69np/0sSNjWKL8xCAKh1QCBWT/H3c AkhD8qwR9f4ceDA4eQFcxfG9R2MzFkkzpmjx+cTJlheZ+gIEW2kZXyMImjX926Df6o Ryd6MguGXwa8irs4lKVuhqyKjQV/skz00UJLeVADdJNEiZm2lDTE+wIrbC9uNkdzQ5 R+vVZlwfGoaLiJN1VsH0kKapglMuQvPMoX3uOOtkvHQ5rZ8QuRZRF52sv5TklWqzBz kbTJlr6uzeM64DUw8XY50SABgKR46yFeqYila9O/AG/FQUtP+SDCkD0kKZqLyt+RuI W5DgXISkURJcg== Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2b69ea3b29fso946411fa.3; Wed, 28 Jun 2023 16:12:21 -0700 (PDT) X-Gm-Message-State: AC+VfDzGMh5ZKE2fPqWCI6o2wX+uDoEcucjgHZU0jEJ2SJp+Of0ctGn6 poStpg4n0WL7eMIIzdxVyv+GN+Jb9Oz3JAY5BQ== X-Received: by 2002:a2e:9107:0:b0:2b5:9b3b:f7ea with SMTP id m7-20020a2e9107000000b002b59b3bf7eamr11189150ljg.41.1687993939392; Wed, 28 Jun 2023 16:12:19 -0700 (PDT) MIME-Version: 1.0 References: <1687955688-20809-1-git-send-email-quic_mojha@quicinc.com> <2023062814-chance-flounder-f002@gregkh> In-Reply-To: <2023062814-chance-flounder-f002@gregkh> From: Rob Herring Date: Wed, 28 Jun 2023 17:12:06 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 00/21] Add Qualcomm Minidump kernel driver related support To: Greg KH , Mukesh Ojha Cc: corbet@lwn.net, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com, mathieu.poirier@linaro.org, catalin.marinas@arm.com, will@kernel.org, linus.walleij@linaro.org, andy.shevchenko@gmail.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-hardening@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Wed, Jun 28, 2023 at 9:45=E2=80=AFAM Greg KH wrote: > > On Wed, Jun 28, 2023 at 06:04:27PM +0530, Mukesh Ojha wrote: > > Minidump is a best effort mechanism to collect useful and predefined da= ta > > for first level of debugging on end user devices running on Qualcomm So= Cs. > > It is built on the premise that System on Chip (SoC) or subsystem part = of > > SoC crashes, due to a range of hardware and software bugs. Hence, the > > ability to collect accurate data is only a best-effort. The data collec= ted > > could be invalid or corrupted, data collection itself could fail, and s= o on. > > > > Qualcomm devices in engineering mode provides a mechanism for generatin= g > > full system ramdumps for post mortem debugging. But in some cases it's > > however not feasible to capture the entire content of RAM. The minidump > > mechanism provides the means for selecting which snippets should be > > included in the ramdump. > > > > Minidump kernel driver implementation is divided into two parts for > > simplicity, one is minidump core which can also be called minidump > > frontend(As API gets exported from this driver for registration with > > backend) and the other part is minidump backend i.e, where the underlyi= ng > > implementation of minidump will be there. There could be different way > > how the backend is implemented like Shared memory, Memory mapped IO > > or Resource manager(gunyah) based where the guest region information is > > passed to hypervisor via hypercalls. > > > > Minidump Client-1 Client-2 Client-5 Client-n > > | | | | > > | | ... | ... | > > | | | | > > | | | | > > | | | | > > | | | | > > | | | | > > | | | | > > | +---+--------------+----+ | > > +-----------+ qcom_minidump(core) +--------+ > > | | > > +------+-----+------+---+ > > | | | > > | | | > > +---------------+ | +--------------------+ > > | | | > > | | | > > | | | > > v v v > > +-------------------+ +-------------------+ +------------= ------+ > > |qcom_minidump_smem | |qcom_minidump_mmio | | qcom_minidu= mp_rm | > > | | | | | = | > > +-------------------+ +-------------------+ +------------= ------+ > > Shared memory Memory mapped IO Resource m= anager > > (backend) (backend) (backen= d) > > > > > > Here, we will be giving all analogy of backend with SMEM as it is the > > only implemented backend at present but general idea remains the same. > > If you only have one "backend" then you don't need the extra compexity > here at all, just remove that whole middle layer please and make this > much simpler and smaller and easier to review and possibly accept. pstore already supports backends. Why aren't the above backends just pstore backends rather than having an intermediate pstore backend in RAM which then somehow gets moved into these minidump backends. > We don't add layers when they are not needed, and never when there is no > actual user. If you need the extra "complexity" later, then add it > later when it is needed as who knows when that will ever be. > > Please redo this series based on that, thanks. My bigger issue with this whole series is what would this all look like if every SoC vendor upstreamed their own custom dumping mechanism. That would be a mess. (I have similar opinions on the $soc-vendor hypervisors.) Rob