Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp397540iog; Fri, 24 Jun 2022 06:16:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tdpTD+2H1Q9IXbD2Vu9S4PUWnwADzGcVbhoE/VWxvESceSLNtm3d0oYUQu1xkFbXn3fGZM X-Received: by 2002:a17:90b:1b07:b0:1ec:c617:a314 with SMTP id nu7-20020a17090b1b0700b001ecc617a314mr3891647pjb.214.1656076591440; Fri, 24 Jun 2022 06:16:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656076591; cv=none; d=google.com; s=arc-20160816; b=0v8stTXi3C7mzF+u4bfC4662bQNTkS8lCtzHLYdesluKVwRBDtyoySBGj3K1HgF0NH pmiGdP4u44czJvVJp9BHzaBS1VxdZRowIQlXChQq7wxYeAdcz/T2pDE71fmOeeBPP4wM Sk9/R/LKHy9BJGUayM/fAp7OOCMim8Ju+AHF0Gvq5fcWvpmiDPlBsUiXchPiDq1Aqtla z/5rbR1VHJgZYsdux06vGNpgFqdwLiYj/0zkEOZjlsMxY9qC2p3Poen8sZbGyJ1RwDMw jR3UJIL/cq2aN+ovDWvCmzLemVteDCsZSpF3TRdvj7tPBkR6MBmtsOOVESZpjj4zOs9h y7fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=anhBjUwjXZC9G9tpsQhE+Vs1DNJWVqRObNcuBrCvEMA=; b=kukEp5z8CznypcS6OD/Ij/a2DeloXuc2x8XxUYaGgPfT/9fNpNLyI5lm95iy72ErGE IR/+Qvncl1qRmyhXetClvzHPQO0aWeXR/ljq4iE4COVgUTgWJTyG4Ba02tA+3VuN+9Cg Ch6sI87iI6geM2spWbepDgxSupGnS4inDSGpQ7yojsS5nfVua792Dp+MIcCzdhq6hEV8 VqXglrPlv6Z5wm6zkWQHqHAS8+pi8RfEBal8JMPILCjbYvvfm76mGntFwlL3cDkxKIy8 PjLWBwZ9hyJSIpd+lbPvFX2YB75RHggRF9qTwwSEC818A/5j/dBYKWtT+tl6mW25mktr bugQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r+dzArFl; 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 i190-20020a626dc7000000b0051c758b85f2si2295620pfc.333.2022.06.24.06.16.07; Fri, 24 Jun 2022 06:16:31 -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=r+dzArFl; 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 S231542AbiFXNMI (ORCPT + 99 others); Fri, 24 Jun 2022 09:12:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230264AbiFXNMH (ORCPT ); Fri, 24 Jun 2022 09:12:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE6D63F32D for ; Fri, 24 Jun 2022 06:12:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 650AFB82869 for ; Fri, 24 Jun 2022 13:12:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FC8BC34114; Fri, 24 Jun 2022 13:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656076324; bh=kxyG6jurb+bHBPNYbOsX3XEShKNeeCWKCv2DtjwMjtg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=r+dzArFlimCCkaAzmcKIOHFdKD/63XdZblpC6vSVXtYaNiA/kC7Aj3QXATnyZjlM4 fOXldcswLQ7DS/xHEPOopvpe68YwTX8tZPcVhgcWuzsbTRPIhFlk7Ja65iybUqtc7+ 9GYPEg62JMdgrNJpePMDIOAqI4GsVGg/72wNkxK9bFn67QBzapE+BNu/Cg2zu5k4ZR /G1wOXlPhoRxWO9caMYDkbsmI1yAQDP8ZV24/PG8gImIpUp4JCBer6cKLMrYwiTSFf i+vLPlpssq572Puen4QwPmopdMc7LrKNw4bloz/Ah5QvqFFnkaOY2rMrszfmht/ukA hsP2+VUxLR5uA== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o4j6P-002rUb-Ve; Fri, 24 Jun 2022 14:12:02 +0100 Date: Fri, 24 Jun 2022 14:12:01 +0100 Message-ID: <87iloq2oke.wl-maz@kernel.org> From: Marc Zyngier To: Gavin Shan Cc: kvmarm@lists.cs.columbia.edu, shijie@amperemail.onmicrosoft.com, linux-kernel@vger.kernel.org, eauger@redhat.com, shan.gavin@gmail.com, Jonathan.Cameron@huawei.com, pbonzini@redhat.com, vkuznets@redhat.com, will@kernel.org, oliver.upton@linux.dev, Oliver Upton , James Morse , Mark Rutland , Catalin Marinas Subject: Re: [PATCH v7 00/22] Support SDEI Virtualization In-Reply-To: <6bdb9280-3530-dc1f-d33e-5bc1c5ac927b@redhat.com> References: <20220527080253.1562538-1-gshan@redhat.com> <6bdb9280-3530-dc1f-d33e-5bc1c5ac927b@redhat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: gshan@redhat.com, kvmarm@lists.cs.columbia.edu, shijie@amperemail.onmicrosoft.com, linux-kernel@vger.kernel.org, eauger@redhat.com, shan.gavin@gmail.com, Jonathan.Cameron@huawei.com, pbonzini@redhat.com, vkuznets@redhat.com, will@kernel.org, oliver.upton@linux.dev, oupton@google.com, james.morse@arm.com, mark.rutland@arm.com, catalin.marinas@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.7 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 Hi Gavin, On Thu, 23 Jun 2022 07:11:08 +0100, Gavin Shan wrote: > > Hi Oliver, > > On 5/27/22 6:02 PM, Gavin Shan wrote: > > This series intends to virtualize Software Delegated Exception Interface > > (SDEI), which is defined by DEN0054C (v1.1). It allows the hypervisor to > > deliver NMI-alike SDEI event to guest and it's needed by Async PF to > > deliver page-not-present notification from hypervisor to guest. The code > > and the required qemu changes can be found from: > > > > https://developer.arm.com/documentation/den0054/c > > https://github.com/gwshan/linux ("kvm/arm64_sdei") > > https://github.com/gwshan/qemu ("kvm/arm64_sdei") > > > > The design is quite strightforward by following the specification. The > > (SDEI) events are classified into the shared and private ones according > > to their scope. The shared event is system or VM scoped, but the private > > event is vcpu scoped. This implementation doesn't support the shared > > event because all the needed events are private. Besides, the critial > > events aren't supported by the implementation either. It means all events > > are normal in terms of priority. > > > > There are several objects (data structures) introduced to help on the > > event registration, enablement, disablement, unregistration, reset, > > delivery and handling. > > > > * kvm_sdei_event_handler > > SDEI event handler, which is provided through EVENT_REGISTER > > hypercall, is called when the SDEI event is delivered from > > host to guest. > > * kvm_sdei_event_context > > The saved (preempted) context when SDEI event is delivered > > for handling. > > * kvm_sdei_vcpu > > SDEI events and their states. > > > > The patches are organized as below: > > > > PATCH[01-02] Preparatory work to extend smccc_get_argx() and refactor > > hypercall routing mechanism > > PATCH[03] Adds SDEI virtualization infrastructure > > PATCH[04-16] Supports various SDEI hypercalls and event handling > > PATCH[17] Exposes SDEI capability > > PATCH[18-19] Support SDEI migration > > PATCH[20] Adds document about SDEI > > PATCH[21-22] SDEI related selftest cases > > > > The previous revisions can be found: > > > > v6: https://lore.kernel.org/lkml/20220403153911.12332-4-gshan@redhat.com/T/ > > v5: https://lore.kernel.org/kvmarm/20220322080710.51727-1-gshan@redhat.com/ > > v4: https://lore.kernel.org/kvmarm/20210815001352.81927-1-gshan@redhat.com/ > > v3: https://lore.kernel.org/kvmarm/20210507083124.43347-1-gshan@redhat.com/ > > v2: https://lore.kernel.org/kvmarm/20210209032733.99996-1-gshan@redhat.com/ > > v1: https://lore.kernel.org/kvmarm/20200817100531.83045-1-gshan@redhat.com/ > > > > Copying Oliver's new email address (oliver.upton@linux.dev). > > Please let me know if I need to rebase and repost the series. My main issue with this series is that it is a solution in search of a problem. It is only an enabler for Asynchronous Page Fault support, and: - as far as I know, the core Linux/arm64 maintainers have no plan to support APF. Without it, this is a pointless exercise. And even with it, this introduces a Linux specific behaviour in an otherwise architectural hypervisor (something I'm quite keen on avoiding) - It gives an incentive to other hypervisor vendors to add random crap to the Linux mm subsystem, which is even worse. At this stage, we might as well go back to the Xen PV days altogether. - I haven't seen any of the KVM/arm64 users actually asking for the APF horror, and the cloud vendors I directly asked had no plan to use it, and not using it on their x86 systems either - no performance data nor workloads that could help making an informed decision have been disclosed, and the only argument in its favour seems to be "but x86 has it" (hardly a compelling one) Given the above, I don't see how to justify this series, as it has no purpose on its own, no matter how well written it is. M. -- Without deviation from the norm, progress is not possible.