From patchwork Mon Aug 15 10:13:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1666401 Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=XXZaOD57; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=mQEAZpYQ; dkim-atps=neutral Received: from legolas.ozlabs.org (legolas.ozlabs.org [150.107.73.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M5qy32tg6z9s07 for ; Mon, 15 Aug 2022 20:19:07 +1000 (AEST) Received: by legolas.ozlabs.org (Postfix) id 4M5qy25qDpz1ygN; Mon, 15 Aug 2022 20:19:06 +1000 (AEST) Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) 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=XXZaOD57; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=mQEAZpYQ; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4M5qy25lSFz1yfq for ; Mon, 15 Aug 2022 20:19:06 +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=aQKvQ41Yzr242HLtyiaebeCotHEZy2WKcgEOA36QzB8=; b=XXZaOD57Ex9kxX Pbz7UkjIfiJIx1R1V0iGPZMzIVGPJUYCgnMbTl/o6gn20sgN2DBSW8CC/N7Mtdgt30McxUjRNOyyD usrOl4d1+WmFBJhmO7gqzFjQCUcWO0TGcuK8ZB71ldC26+d7PfCrceQbYe4+aBVSKx0ZhS2WPTocA P5F080UgdJNU5qBAwbZ5/pGCKAMia3lkDG3NfYpKrZaInqnqz7b9SxBX+labCkTpAgTG6sOdGLWUR XRWElxpHwladfvZoMays0BkDj0D3qOeMBjIXzhKhFJVuxa8DmkaPZ1L2BakAQLRKytbQoGBkslUNW MMJlEkOdBhJPntmH8Gdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNXBW-00EdMH-Aw; Mon, 15 Aug 2022 10:19:02 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNX6X-00EYID-Ka for kvm-riscv@lists.infradead.org; Mon, 15 Aug 2022 10:13:55 +0000 Received: by mail-pf1-x429.google.com with SMTP id a22so5710256pfg.3 for ; Mon, 15 Aug 2022 03:13:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=dFKzWK8a4yXz4IM3nrzPfNkwPwctqNlzhtFsMB1wqCk=; b=mQEAZpYQ0EVvDahiUTuG7qmuHXN7H9wD4VlttXtK7HD43Z25oqTz4sFNhcb1MBdQV+ WqEAMvem+Z7ttYaPMozJ2GtZaYTPt79cUZgAmFDdJ03twbf1NPPB/5SWJDxovSpntkZ1 l3RPrkuRWOhTX1ihLufr+OnUrf1+Rm6OxwJPXZdAZIRkm2+bS8of0+bDF1EHp0G2vgz9 kGdL1x489bwuMXunyEUkS5yAftbeCRbiPCAe5Si50XS2eSNeFr+4ghZ2SrTzP7FCNboY bHlBG69v153LAexHsmQ5TZmzYQlT+nAj3u/w9c2dkkCQ6U6tvSOYa2X78Cob/bgAt0k9 GicA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=dFKzWK8a4yXz4IM3nrzPfNkwPwctqNlzhtFsMB1wqCk=; b=Gpaz0ulZj71bGsXjkTpykt55hGVLlRnSMC5XEMzJvTC7jT4fGPM80GOVO5gsWnQ7vO 5utKPoE9i6N92qUntfD7/IXwa3AmIBTfhd1W/GMEtb7kpuzEvoirSKxGlvy+430fZakq HPVYYsYMo+GcZXeTDaUHrMxWIr0J0VJtA8bYeUW3nVvvGlPvdCbnouJDEIfOarLy1C7M HdpmmA/TyXpCHJ3gl8Qu6CygcwHKz/zpJ0uS6INkpfqM5h10rKwTq584utSKwLmNXGbT jKc5R4rKwXObJT/jL7PG3NmAMN/GizClThgbHPQkxwIssuuNUUuNAVGqB6s+/qgoC7wA 9FAA== X-Gm-Message-State: ACgBeo2ITjcKljZWMYDL/VQ2qQvCzNfqpouZiptHpYg5jfaX5RebwEej go4T7UeVKutxTSMHR7Gh5cNjRQ== X-Google-Smtp-Source: AA6agR4YrU02hkB6ryQizenDJpvTjG1tvszIQSB8Cn/CJIYXgttujnGGifI9OkjGT9OMCGuwML5KSw== X-Received: by 2002:a62:e114:0:b0:52d:24b6:a89 with SMTP id q20-20020a62e114000000b0052d24b60a89mr15843272pfh.65.1660558431589; Mon, 15 Aug 2022 03:13:51 -0700 (PDT) Received: from anup-ubuntu64-vm.. ([171.76.84.46]) by smtp.gmail.com with ESMTPSA id i190-20020a6254c7000000b0052d4f2e2f6asm6267437pfb.119.2022.08.15.03.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 03:13:50 -0700 (PDT) From: Anup Patel To: Will Deacon , julien.thierry.kdev@gmail.com, maz@kernel.org Cc: Paolo Bonzini , Atish Patra , Alistair Francis , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Atish Patra , Anup Patel Subject: [PATCH kvmtool 4/5] riscv: Add Sstc extension support Date: Mon, 15 Aug 2022 15:43:24 +0530 Message-Id: <20220815101325.477694-5-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220815101325.477694-1-apatel@ventanamicro.com> References: <20220815101325.477694-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220815_031353_737092_DCD09DB7 X-CRM114-Status: GOOD ( 10.43 ) X-Spam-Score: -0.2 (/) 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: From: Atish Patra Sstc extension allows the guest OS to program the timer directly without relying on the SBI call. The kernel detects the presence of Sstc extnesion from the riscv,isa DT property. Add the Sstc extensi [...] Content analysis details: (-0.2 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:429 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_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Atish Patra Sstc extension allows the guest OS to program the timer directly without relying on the SBI call. The kernel detects the presence of Sstc extnesion from the riscv,isa DT property. Add the Sstc extension to the device tree if it is supported by the host. Signed-off-by: Atish Patra Signed-off-by: Anup Patel --- riscv/fdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/riscv/fdt.c b/riscv/fdt.c index eb7851e..aeba042 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -18,6 +18,7 @@ struct isa_ext_info { struct isa_ext_info isa_info_arr[] = { {"svpbmt", KVM_RISCV_ISA_EXT_SVPBMT}, + {"sstc", KVM_RISCV_ISA_EXT_SSTC}, }; static void dump_fdt(const char *dtb_file, void *fdt)