Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2192013pxb; Fri, 25 Mar 2022 12:44:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQ+MokdheBhnYk8JeTfuspawmeHWzFxh4pvv7wArcCXsVbhmZ8a7bq8d//nK8HiSmbg96Z X-Received: by 2002:a63:44f:0:b0:385:fa8a:1889 with SMTP id 76-20020a63044f000000b00385fa8a1889mr903466pge.160.1648237497703; Fri, 25 Mar 2022 12:44:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648237497; cv=none; d=google.com; s=arc-20160816; b=NOXKKneqmzwPqUBs5qFTPnf5xLHjRi/kkq2x33b3gwJq3EC0WmBg+IQA9S9iRfMEtB wjz88PkILkCfpgHeo4TaugqvQqhPLBgVnc30yCZZn0/78Qn+vFHoFko8uSC35jvSQroY krzFg9BEFSQso+ytlLXwchINPpY2x/+O8kfQsOPASTsC7fPqVFy07+TzlxoBDzdEZBYy B5JfJtwCnW4EgnSFXKZik9axlsyu0it8CKrb/Gzmk3BEH2UEw1nBBO1YZC1gPYhug9Ax 7kVEP/AX3IxdIsUq0zSFG07tz2RWu7rMMdSLqjZQDsj5bcfsx8oAXScmj7Az74B9wVcy 3Fsg== 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:dkim-signature; bh=F0MrQ+7f7irVz92hhE31+GxoOTRqqf7nkLXgWrnk+AY=; b=vplL7oiPOKLDT+GZku1j9dFldkAw6/3hurjp9mEGaUepGTpfi/HpkTVEn8Fn+x618n Fg6KdWUlZ8i9FqLe1SXd3fVZW+7vNTgHRX6hQ4dYxazKxwdYjsM5b6URo3m1f1bDZFdk jTXlkSNkQdN2xRvY8Q8/oofT2qBxNEdGPu/AipvZB7LSnawzHfm4dQTr0lWePh/fTTvE O8rX9kTihxOqZacHE/uZ9ZUHnLmt/N2duXnM+h73NpQM8lw/Ygg4y6uDfa92fRMSQRNn QQJfMxsODlrHkGFbLwzqTcNlv2TNFkk7NV7ASCUoOK89/wY0km3SDrFGSLxmOfUqzH1I CjEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=QlXrQfFE; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l76-20020a633e4f000000b003816043eeffsi3106484pga.244.2022.03.25.12.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:44:57 -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=pass header.i=@google.com header.s=20210112 header.b=QlXrQfFE; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1BBAA2A85DF; Fri, 25 Mar 2022 11:35:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353679AbiCYHgv (ORCPT + 99 others); Fri, 25 Mar 2022 03:36:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347483AbiCYHgu (ORCPT ); Fri, 25 Mar 2022 03:36:50 -0400 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A44553B5D for ; Fri, 25 Mar 2022 00:35:17 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id 9so4849719iou.5 for ; Fri, 25 Mar 2022 00:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=F0MrQ+7f7irVz92hhE31+GxoOTRqqf7nkLXgWrnk+AY=; b=QlXrQfFErm9nmqJuIwFNttHecBo8vtSI0dcbdc68Zk3dtp2UPzmZsdQftZMwROOvoW kkx0SI0ZXdfz4nc11dMhHmK58CPlgtXAc5a13ZRfsAyVQ6KxUbdb8lmOgNR1KY0RZS/a fqpSa1ocM2fByvmUMXbZLUHc/SBLhwS4/hp6Y7RtwV5/rRz7EyhoFRtwxUgJWR/Yu65e cuEErTtkYIA4MEyhefLzSYJ9AElQaxu/UcBUJVneMkKIQpiQ6EtY57qFecDN8TVAwzDV vnScHzjxBxlNFWsF4T0kJ8ivkVwvoLT/+CJqMHxpFr7RWmTxo+qQmVHflho1tlk0Uo0o gPlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F0MrQ+7f7irVz92hhE31+GxoOTRqqf7nkLXgWrnk+AY=; b=Qdgd3WT8Av/XMVenwMIAF+CLTLba9g18pxX6FZ0SVa808wF34tPNm9PZXl3osG3wmy r11oA9UOHWvoq+5upiiwXkhnsZEwFfPcEVQoAugGdzrNYTRoBXERApd82RZNaae7sy1y FpH30M3tULS3otk63wACzfUkTVj6CV2fQaIoufGQ108aDShPkqPyTYOcWO94GGiU2QSV 5wfAbCWz0I2Ol2Za62cwWU7kxm68DLQp/Yq2Xok/z+Ru/VP1UuWACvIzePe+DMLTttA1 GtyKrhcMcZWtKQhVEFQ0O1eMnhymMr2yjJJZqYK1nsaAmIL0AlfQbXB/+DY/FaxcQ7VF htEA== X-Gm-Message-State: AOAM5311wUzz4HdCmgTfbMuMN789Vaiy9sjX/CLEW25yM9/8G9/iVj5G rN7M4PygmDGP6xwqRQcSV/7sVQ== X-Received: by 2002:a05:6638:1649:b0:31f:61f6:35f4 with SMTP id a9-20020a056638164900b0031f61f635f4mr5072950jat.205.1648193716120; Fri, 25 Mar 2022 00:35:16 -0700 (PDT) Received: from google.com (194.225.68.34.bc.googleusercontent.com. [34.68.225.194]) by smtp.gmail.com with ESMTPSA id p22-20020a5d8d16000000b006115627b87csm2600602ioj.55.2022.03.25.00.35.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 00:35:15 -0700 (PDT) Date: Fri, 25 Mar 2022 07:35:12 +0000 From: Oliver Upton To: Gavin Shan Cc: kvmarm@lists.cs.columbia.edu, maz@kernel.org, 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 Subject: Re: [PATCH v5 18/22] KVM: arm64: Support SDEI ioctl commands on VM Message-ID: References: <20220322080710.51727-1-gshan@redhat.com> <20220322080710.51727-19-gshan@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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 Fri, Mar 25, 2022 at 02:59:52PM +0800, Gavin Shan wrote: > > The PSCI implementation is a great example of how KVM has grown its > > implementation in line with a specification, all the while preserving > > backwards compatibility. > > > > The only information feed by VMM is the exposed events. The events > can't be registered from guest kernel, and raised from host to guest > kernel until it's exposed by VMM. I would suggest assuming that all SDEI events are exposed by default in KVM. We will not require a VMM change to enable events individually. > Besides, the exposed events will > be defined staticly in host/KVM as we discussed on PATCH[02/22]. We > also discussed to eliminate those ioctl commands. So I think we needn't > to add KVM_SDEI_CMD_SET_VERSION. Further more, the version is only a > concern to host itself if the migration can be done through the > firmware pseudo system registers since the migration compatibility > is the only concern to VMM (QEMU). This all needs to work just like the KVM_REG_ARM_PSCI_VERSION version, I'd recommend taking a look at how we handle that register in KVM. > Yes, Currently, 0.1/0.2/1.0 versions are supported by PSCI. 0.1 is > picked until VMM asks for 0.2 and 1.0 explicitly. However, it seems > QEMU isn't using 1.0 PSCI yet and maybe more patch is needed to enable > it. As far as how it interacts with KVM, QEMU looks fine. The name of the KVM_ARM_VCPU_PSCI_0_2 bit is quite frustrating. It actually implies that KVM will enable it highest supported PSCI version. If the feature bit is cleared then you only get PSCIv0.1 However, the DT node that QEMU sets up looks a bit crusty. The properties for conveying PSCI function IDs were only ever necessary for PSCIv0.1. The only property of interest any more is 'method', to convey the SMCCC conduit instruction. -- Thanks, Oliver