Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp933360rdb; Tue, 19 Sep 2023 15:03:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8C2C6HSl2uowfmPPdy5pN2/Sc++8qn87GHhWlNGbgaTm2W8Q7QYpznecV8gdmlygFuyZ1 X-Received: by 2002:a17:902:a407:b0:1c4:4dbc:92bc with SMTP id p7-20020a170902a40700b001c44dbc92bcmr663230plq.16.1695160996862; Tue, 19 Sep 2023 15:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695160996; cv=none; d=google.com; s=arc-20160816; b=R58/IMEsaXYQbvE/RIi1x7MfyiW/6fV8iLmJUxruM1WSQlxuHksCCHKdOhHF9Y28bZ opCyO8wFo/MTiB3C2wJlzT3mtJ6J99Pi/GzFwibhohOAR10E/KA8xEaJVkoVHQoO06Qb l3uQTQiXDD1b3faXGGLgnC0dOnYq2zYiWGPTkGwHuyAFCFfg7M51RPS+6Juk23wzdnA4 N3phaF2xmnz5jlBTXb3x3KsUyNE3qMPdVj/WIKCMX6Enzade62scKGQmBtM4DDNU1V0t Sq2kW3LOT4cY8cDTqU6N2EWTxiwoUVve5db9osuAycizkIwDX6WR9l71eNGARetr6zeF ULzw== 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=vhVTmCY18AAwuZtx0mwKmmrwAcWS17iU82Rcu9KB1Uo=; fh=Q5KFsCqdtJ06CcCAgyB8mcohzWvqjFprTxYkwhTQtOU=; b=Ui5Jx7Z78/vkKVjQ1UoCyBnbV6JWgThHdHIThKuxEBWbfqEMdnjFNkIGnB0P10b3sa BjzIt6pYQ+dPj//Ep47FVa9Tsp9eGjCWQ/Wlcem1UoxpgjYAtFK511eBz0FoHtnWx5Pd TH7YACU5Qv5BZ4wh2pVjJH6qBCKoql0Bp5cSJhPxRZtpXcnzYtXS/Vek8E/KDKVGo+32 T//BnJnoxXHnvKUSciyfA3wk/cjxnwft46wYBVvY4fK4Gs7Qh93pifh822M9GvwjH84W Gq+zgM+CAQhh25EbUblsxMRL5MZWo6SpWSC+AK8K6kEePR5GraT6hMwF5CoQ1xlwlKsn 8s2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=PjeRXiIg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id d9-20020a170902cec900b001c1f373ea12si6011307plg.337.2023.09.19.15.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 15:03:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=PjeRXiIg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9CB5E801C08F; Tue, 19 Sep 2023 11:58:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232524AbjISS57 (ORCPT + 99 others); Tue, 19 Sep 2023 14:57:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232362AbjISS56 (ORCPT ); Tue, 19 Sep 2023 14:57:58 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC4D4C4 for ; Tue, 19 Sep 2023 11:57:52 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-502153ae36cso9779930e87.3 for ; Tue, 19 Sep 2023 11:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; t=1695149871; x=1695754671; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vhVTmCY18AAwuZtx0mwKmmrwAcWS17iU82Rcu9KB1Uo=; b=PjeRXiIgIo5irZi0xds6a4vSeJX8/FWPN5gEBvv9ZakAtHMfjqpt51cEBmz3AXzv/7 NyLXsQQO8GN2ySiFoUGN3b1E/hLoUQOSHuXirYCWRsAW7s0IEDFQPk7dt3dXenKtNvTe kgIeF1l+PlrxG16BJv31Aba7GDUwEPUldUghU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695149871; x=1695754671; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vhVTmCY18AAwuZtx0mwKmmrwAcWS17iU82Rcu9KB1Uo=; b=i/N1iupsTh2MMFWG1+HWaIlR8IHf/eapKaOabZmODJ0vq5097DrnPALh91hFKxcyHX IxYrylOU98HYxHL33kdN+ZdDOp7Eath/2kICAZLAK0ZFc1tbyGNeT+ossYdFDOG1DTso 4jy7Ym36dQ5hXmmK4w94Vbh1lDi5rzRxmKTRrP/qMR80nWS7GehIRTK7DpISUtzBlO49 xF5B5xsO6VQCQrmw+bfEMnjo7H6plczb2f09tfGd2jpVY+P8ZWnVNfeSFnQwlfk4B89p sEKHTTrfS5Se5iVU4GtTgrD1ab30SDWOk5Rv1l+Kwxf3RfngQqvSRsjeoNb43v0iTIeA FNDA== X-Gm-Message-State: AOJu0YyHZYzWK1sSQL+UC5rEiM8iRKYQgRrt7iNxQlvfqh/fpQmEzVJy k1TJidn7Ygjuk/jjEmCoMLVMeHCQPa6W0MtZiy3V X-Received: by 2002:ac2:5b1c:0:b0:503:314f:affe with SMTP id v28-20020ac25b1c000000b00503314faffemr498289lfn.17.1695149870227; Tue, 19 Sep 2023 11:57:50 -0700 (PDT) MIME-Version: 1.0 References: <20230918180646.1398384-1-apatel@ventanamicro.com> <20230918180646.1398384-2-apatel@ventanamicro.com> In-Reply-To: <20230918180646.1398384-2-apatel@ventanamicro.com> From: Atish Patra Date: Tue, 19 Sep 2023 11:57:38 -0700 Message-ID: Subject: Re: [PATCH 1/4] RISC-V: KVM: Fix KVM_GET_REG_LIST API for ISA_EXT registers To: Anup Patel Cc: Paolo Bonzini , Shuah Khan , Palmer Dabbelt , Paul Walmsley , Andrew Jones , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 19 Sep 2023 11:58:01 -0700 (PDT) On Mon, Sep 18, 2023 at 11:07=E2=80=AFAM Anup Patel wrote: > > The ISA_EXT registers to enabled/disable ISA extensions for VCPU > are always available when underlying host has the corresponding > ISA extension. The copy_isa_ext_reg_indices() called by the > KVM_GET_REG_LIST API does not align with this expectation so > let's fix it. > > Fixes: 031f9efafc08 ("KVM: riscv: Add KVM_GET_REG_LIST API support") > Signed-off-by: Anup Patel > --- > arch/riscv/kvm/vcpu_onereg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/kvm/vcpu_onereg.c b/arch/riscv/kvm/vcpu_onereg.c > index 1b7e9fa265cb..e7e833ced91b 100644 > --- a/arch/riscv/kvm/vcpu_onereg.c > +++ b/arch/riscv/kvm/vcpu_onereg.c > @@ -842,7 +842,7 @@ static int copy_isa_ext_reg_indices(const struct kvm_= vcpu *vcpu, > u64 reg =3D KVM_REG_RISCV | size | KVM_REG_RISCV_ISA_EXT = | i; > > isa_ext =3D kvm_isa_ext_arr[i]; > - if (!__riscv_isa_extension_available(vcpu->arch.isa, isa_= ext)) > + if (!__riscv_isa_extension_available(NULL, isa_ext)) > continue; > > if (uindices) { > -- > 2.34.1 > Reviewed-by: Atish Patra --=20 Regards, Atish