Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5889815rwl; Tue, 4 Apr 2023 05:17:45 -0700 (PDT) X-Google-Smtp-Source: AKy350Z8FZ8SmkRYFasjq+55yARc1OxVlwqQ/k71zWo/uI5VSwrnjrwanA6/j2UKFxqREUzRgKaH X-Received: by 2002:a17:906:95ca:b0:947:7b89:6779 with SMTP id n10-20020a17090695ca00b009477b896779mr2343655ejy.46.1680610665584; Tue, 04 Apr 2023 05:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680610665; cv=none; d=google.com; s=arc-20160816; b=aoA6YzqtCrnLZxGfKlvmD29gAYeqijSEwwvfxPwaOEOFGdGENbVIR74GKaJuE2ZaVI 3FH1GkY3vKHtM6qV7+zEWn7jfQUxFeWCUXOHwiigZizQYIVcZnQJb2tA7GyK4A7w+Cfi W6eIboUbdOPDFWElbbF3U71H55nahvR50ypXB6d8bRc7V9TY84adalFItLuZ6urfaTiu 7Gi26txGrd4yfD4IL2De/ypimGoo4h+r8uTQho39K3eop9PW5R2JZX6l9b5wJLt5pUvf mPdHNRsoPH9m6gOIfVW7e0/EliuGQqQOiUIygMIdSxz7ldgRkdtQ92LbGhFIANfaH7vH nAJQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=H2I56WrDZlwIyTwZv99JWrXVc0DEeAqRMvCpScLvpPM=; b=DVfHEFOjfkdudKv50WhIIA8A/3/fVHNjM6/12zRtPv3Q8CoMg6O5G1OnMnMMOiQXVW aAodt+EEPuTdXq3Clnv9CyvBSlrFZjLn9tcGjuRQ/iJrSeWNeFL991Vha4CS3bx4kXOx DXBtoKimZ4mjaxzLzzM1Aau04gkQ/iBuwB+nDsGg/39fMNb+ekNBnaob4zPBWmFuIodx QcJ9skVS4JLLpzdgBMc5YmSz605NhifyWGVwK7YnEC7DVgprMiKWZJX5C02kPz8Jlbf5 BW3ZsEDQPAhF9lKUTprDQMgusKH5S0qfMq8bkTEo+AjqddUGzUFvR9mt3d+f5N2Q4DOd ZMtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=F3sVftBT; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a1709064ccb00b00925a9b6ed47si1074563ejt.755.2023.04.04.05.17.21; Tue, 04 Apr 2023 05:17:45 -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=@ventanamicro.com header.s=google header.b=F3sVftBT; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234657AbjDDMKO (ORCPT + 99 others); Tue, 4 Apr 2023 08:10:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234401AbjDDMJB (ORCPT ); Tue, 4 Apr 2023 08:09:01 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79BDC3C17 for ; Tue, 4 Apr 2023 05:03:58 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id r11so32519533wrr.12 for ; Tue, 04 Apr 2023 05:03:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1680609837; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=H2I56WrDZlwIyTwZv99JWrXVc0DEeAqRMvCpScLvpPM=; b=F3sVftBT1QGr7zDiPp6MLlWECDJLKeCxMjdAHa9LvbwfH23ZJoySJejSFzYUWQSWkM 1KNuZ3Gn38+p9Fn9lpr0ce0HGXzeOLeb63rUS9Ashpg2I0fMLVuC6BMXWSvcuyAlIFzV EvohsGoRHux8Jl5droMXr+TmE+upVwgkZh3o3I4kP8eLsF1Y8kPHjzNvyQf6T+XHi9+x 0dTNfHj/0etbmjOcrU6wbnd3OZiAaQcy6sKnaaHqRK1MC3ISEJ4a28TZCA0puV7Fxwxd twdvHBFDirCURjGXnAKlCqa54/hJA2B94Sy9NhUxN3O36U+R2J+5xjpu4dTtb5hjF2km V8CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680609837; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=H2I56WrDZlwIyTwZv99JWrXVc0DEeAqRMvCpScLvpPM=; b=NNOHv580vlv7d8rIb2seMwIsQYJ7CSVkP3Tu5nYIGB7BcgimECpBkZvO2REOIe63mJ mr058YJHUvr9io4AZD9KLHtEOb7VKiPfGcEDrkEHmXPwmrVb9YiWzuJGTCRaxO2QtN92 X0/OrPAV5dGu2ibSx1u4zN/JXJd8Kyi9IMMbxiB52WAEqbRUCbyuLYo4EiZCXUpmJfW4 hk+gBNwwP412RRxWLyApqYScFeGHUeW6G8hUwQUfF6QJvwCe9p8II7G0DzhQkndHSM0t /8PVAK0YGjGpXdm9MAU1GZxvTEMeob7MqPJ5IWqhWPE1Fs/ZZVVaT6z2jMylbzr/KwHv SnZQ== X-Gm-Message-State: AAQBX9dY5snOg432bauuEDpkfzHqdKhvOTwzia0T3L2cdq6jW5rsHt0G 1Qde6WuHuX/o9bW770G/fb5huw== X-Received: by 2002:a05:6000:51:b0:2dc:2431:67d0 with SMTP id k17-20020a056000005100b002dc243167d0mr1383808wrx.19.1680609836931; Tue, 04 Apr 2023 05:03:56 -0700 (PDT) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id e38-20020a5d5966000000b002d78a96cf5fsm12259781wri.70.2023.04.04.05.03.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 05:03:56 -0700 (PDT) Date: Tue, 4 Apr 2023 14:03:55 +0200 From: Andrew Jones To: Anup Patel Cc: Anup Patel , Paolo Bonzini , Atish Patra , Palmer Dabbelt , Paul Walmsley , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 6/8] RISC-V: KVM: Add ONE_REG interface for AIA CSRs Message-ID: References: <20230403093310.2271142-1-apatel@ventanamicro.com> <20230403093310.2271142-7-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Tue, Apr 04, 2023 at 01:52:43PM +0200, Andrew Jones wrote: > On Mon, Apr 03, 2023 at 02:23:01PM +0200, Andrew Jones wrote: > > On Mon, Apr 03, 2023 at 05:34:57PM +0530, Anup Patel wrote: > > > On Mon, Apr 3, 2023 at 5:01 PM Andrew Jones wrote: > > > > > > > > On Mon, Apr 03, 2023 at 03:03:08PM +0530, Anup Patel wrote: > > > > > We implement ONE_REG interface for AIA CSRs as a separate subtype > > > > > under the CSR ONE_REG interface. > > > > > > > > > > Signed-off-by: Anup Patel > > > > > --- > > > > > arch/riscv/include/uapi/asm/kvm.h | 8 ++++++++ > > > > > arch/riscv/kvm/vcpu.c | 8 ++++++++ > > > > > 2 files changed, 16 insertions(+) > > > > > > > > > > diff --git a/arch/riscv/include/uapi/asm/kvm.h b/arch/riscv/include/uapi/asm/kvm.h > > > > > index 182023dc9a51..cbc3e74fa670 100644 > > > > > --- a/arch/riscv/include/uapi/asm/kvm.h > > > > > +++ b/arch/riscv/include/uapi/asm/kvm.h > > > > > @@ -79,6 +79,10 @@ struct kvm_riscv_csr { > > > > > unsigned long scounteren; > > > > > }; > > > > > > > > > > +/* AIA CSR registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */ > > > > > +struct kvm_riscv_aia_csr { > > > > > +}; > > > > > + > > > > > /* TIMER registers for KVM_GET_ONE_REG and KVM_SET_ONE_REG */ > > > > > struct kvm_riscv_timer { > > > > > __u64 frequency; > > > > > @@ -107,6 +111,7 @@ enum KVM_RISCV_ISA_EXT_ID { > > > > > KVM_RISCV_ISA_EXT_ZIHINTPAUSE, > > > > > KVM_RISCV_ISA_EXT_ZICBOM, > > > > > KVM_RISCV_ISA_EXT_ZBB, > > > > > > > > Looks like this patch is also based on "[PATCH] RISC-V: KVM: Allow Zbb > > > > extension for Guest/VM" > > > > > > Yes, do you want me to change the order of dependency? > > > > It's probably best if neither depend on each other, since they're > > independent, but otherwise the order doesn't matter. It'd be nice to call > > the order out in the cover letter to give patchwork a chance at automatic > > build testing, though. To call it out, I believe adding > > > > Based-on: 20230401112730.2105240-1-apatel@ventanamicro.com > > > > to the cover letter should work. > > I also just noticed that this based on "RISC-V: KVM: Add ONE_REG > interface to enable/disable SBI extensions"[1] and it needs to be > in order to pick up the KVM_REG_RISCV_SUBTYPE_MASK and > KVM_REG_RISCV_SUBTYPE_SHIFT defines. It'd be good to call that > patch out with Based-on. > > [1]: 20230331174542.2067560-2-apatel@ventanamicro.com And "RISC-V IPI Improvements", 20230328035223.1480939-1-apatel@ventanamicro.com, which is required for riscv_get_intc_hwnode() Thanks, drew