Message ID | 20240416184421.3693802-8-atishp@rivosinc.com |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=SQf/m4Vn; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=w834VAd4; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VJtJR1GS1z1yZC for <incoming@patchwork.ozlabs.org>; Wed, 17 Apr 2024 04:45:11 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6/3FSZNzjJeZeYU4ntoegg59HikNwmOdbbzLZw70YF8=; b=SQf/m4Vnu6ivC2 GjWcqpVi2WBKFvYXUWlIXqqFBXC1uFf1f9pGWUketVFclArKNg2r81tOcZbrqMsLdv7yh9qcnacw8 WqHjgaTSnZ2iKdawSMEp90o9C8PYVv5QKI5PK2dlWF5WEwSWziw3l27/LsOrV7/KEVK2+IC+QOJSc o5CKDTobtvgK3iiQzBLJciKxLnp7VHYza8mtVkg4WQMpiR5sq9WKqE14T2roDuEMSURNJlsYhxryq WSv17ynq/wZ9vCVlAb96vc3EAkDnjfFtSg12AG6Y6xkcreBxYLCi9tI6L1oAgXyyqwRnVDbjZRuIf WPElebgmZzhTilUXzZlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwnnn-0000000DMUQ-3up5; Tue, 16 Apr 2024 18:45:07 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwnnY-0000000DMH3-0pEq for kvm-riscv@lists.infradead.org; Tue, 16 Apr 2024 18:45:00 +0000 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2a484f772e2so2767484a91.3 for <kvm-riscv@lists.infradead.org>; Tue, 16 Apr 2024 11:44:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713293091; x=1713897891; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rU9bTQzimBlb4bBeVGV64JD8vBjMh3ZSXWmumJprSMc=; b=w834VAd4Aiyxikx3rPLwiwZeB8xN4YqsbiMo8q65rZpATigNYGaR4oCF1rsKygcxCm KcA3kG6m5FUt0ema4+qt0pwY9guRtoyWm5DApmUaOQjDxzw7ITfJnPG9/1jka32QO5et tm3KgNayMALBUWLuLtNOV02+rRLiFK91l5uZL9RlTX1RRx8d0mGhoa/xQHS4eDxGzl6h /ciCtn6xXfuUXB5O4NYj3aEu2Gvr7H+dYhSCYXZt2sZUuDHQeUQ3TSkQo6RkzWVXBmu4 8f6EYfGrIxme9wxQ5gVkxIvxmQeK4ZnCfRjmdK4iErBrs4fzgHHCrqMLFUaG2hYkEyT2 GyIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713293091; x=1713897891; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rU9bTQzimBlb4bBeVGV64JD8vBjMh3ZSXWmumJprSMc=; b=AeB+DKEchyjqJy3KaAS5PKdoigvv1xa42tmkaM3I9fnyLkguyQYCC3AN896kC3285d Jy8ZSKNUSuXIGsT4mJ5OANtEk7NOZcushKgek7LBrHqX6NI7Eq3WegGVUMC3Z/PQ3pvP nH+Hfv7Si+yV7eB1Gk5qCuzxBKIlvXkwDmDFdg/dnuDLuya97yLR+v27l7Pv83fJeBW3 1Arzdb7Yoq/xknSYY9lhdDnnJ6s46xWILzrKiVzeF6XmntU21ujuq9HlMpsME2vpiVVM Wx3akxazSJLmcRb7anaRhz8WRXY1zTWkqMEP8mCf4Wr0mTNn22oowXTgGX6LuqNhinPN rAww== X-Forwarded-Encrypted: i=1; AJvYcCVZjRg8j9RCi1aCXyeAfuYY/BmUKDNEAMrhCXZ53QkZ5vF7MfO3Ej65wzBI8DvrMgOtmNWtv6xKu7DsqqDsz+kOnayX97nzyzgVMs8FxQ== X-Gm-Message-State: AOJu0Ywpf6YrKAWO/6Cg+Kcr9G27TMu6JsM3gEnXa8W1R/LrJVIT6bjY PF/Gj6XZzuKJEr5HK+GQRQ4PG2fEOeXSUCqpidIkLkMzXYSuzzJe9pswqXC9DF0= X-Google-Smtp-Source: AGHT+IFO7gBokex9KDHR7FMDDghsIz2thvCcgFt0g1hVdtn3kLkpEMXY9Ea3s80HyJZdLNzoP7x/LQ== X-Received: by 2002:a17:90b:46c8:b0:2a2:50ef:ece2 with SMTP id jx8-20020a17090b46c800b002a250efece2mr12099952pjb.17.1713293091321; Tue, 16 Apr 2024 11:44:51 -0700 (PDT) Received: from atishp.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id o19-20020a17090aac1300b002a269828bb8sm8883645pjq.40.2024.04.16.11.44.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 11:44:50 -0700 (PDT) From: Atish Patra <atishp@rivosinc.com> To: linux-kernel@vger.kernel.org Cc: Atish Patra <atishp@rivosinc.com>, Andrew Jones <ajones@ventanamicro.com>, Ajay Kaher <ajay.kaher@broadcom.com>, Albert Ou <aou@eecs.berkeley.edu>, Alexandre Ghiti <alexghiti@rivosinc.com>, Anup Patel <anup@brainfault.org>, Conor Dooley <conor.dooley@microchip.com>, Juergen Gross <jgross@suse.com>, kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Rutland <mark.rutland@arm.com>, Palmer Dabbelt <palmer@dabbelt.com>, Paolo Bonzini <pbonzini@redhat.com>, Paul Walmsley <paul.walmsley@sifive.com>, Shuah Khan <shuah@kernel.org>, virtualization@lists.linux.dev, Will Deacon <will@kernel.org>, x86@kernel.org Subject: [PATCH v7 07/24] RISC-V: Use the minor version mask while computing sbi version Date: Tue, 16 Apr 2024 11:44:04 -0700 Message-Id: <20240416184421.3693802-8-atishp@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240416184421.3693802-1-atishp@rivosinc.com> References: <20240416184421.3693802-1-atishp@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240416_114452_317809_6CAAB3A4 X-CRM114-Status: GOOD ( 12.92 ) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: As per the SBI specification, minor version is encoded in the lower 24 bits only. Make sure that the SBI version is computed with the appropriate mask. Currently, there is no minor version in use. Thus, it doesn't change anything functionality but it is good to be compliant with the specification. Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:102c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <kvm-riscv.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/kvm-riscv>, <mailto:kvm-riscv-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/kvm-riscv/> List-Post: <mailto:kvm-riscv@lists.infradead.org> List-Help: <mailto:kvm-riscv-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/kvm-riscv>, <mailto:kvm-riscv-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kvm-riscv" <kvm-riscv-bounces@lists.infradead.org> Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
RISC-V SBI v2.0 PMU improvements and Perf sampling in KVM guest
|
expand
|
diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index f31650b10899..112a0a0d9f46 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -367,8 +367,8 @@ static inline unsigned long sbi_minor_version(void) static inline unsigned long sbi_mk_version(unsigned long major, unsigned long minor) { - return ((major & SBI_SPEC_VERSION_MAJOR_MASK) << - SBI_SPEC_VERSION_MAJOR_SHIFT) | minor; + return ((major & SBI_SPEC_VERSION_MAJOR_MASK) << SBI_SPEC_VERSION_MAJOR_SHIFT) + | (minor & SBI_SPEC_VERSION_MINOR_MASK); } int sbi_err_map_linux_errno(int err);