From patchwork Thu Jul 6 17:38:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1804450 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org 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=5BbCRPmu; 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=TEWDlG4o; 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 4QxkKm6KFnz20ZQ for ; Fri, 7 Jul 2023 03:39:08 +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=2yaRZ12q5O6XTqIYsX4LoaAupCafzp/Fw8LayoWM0l0=; b=5BbCRPmuz7YPwc HClGdn4xJLJ3Pboe5Gn7bIRpaD7RIehjnZ5YPyYpe7q+1nCjuCyez2dbkjvwGvABMjvSzsI6BJyNv 7EXMaP7fJ7RRM+Abkj9MStPHdOqzqy/KUiM+ymVhfRTEKsrUGzolGvHP2bBqlTYLzDV7GR3B9sg1f xXu/y5i4ZtVTLnbiTL5RTYGCzEhtc7AdhKHPhd6XdosllozAde91xsHLl9+nq51mNT+lYh+t3w8sh T0BbYqkDT68vD2E+Zy0yZc3uInRWo8St/3Tb784XPpxMNUB5Q3XSvvA8mF9FidLFeiPtJEgnM6t0D GGg/g4+LZ/nmGsPRXv+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHSwb-002Iys-1P; Thu, 06 Jul 2023 17:39:05 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHSwY-002Ixk-21 for kvm-riscv@lists.infradead.org; Thu, 06 Jul 2023 17:39:03 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-783544a1c90so37699039f.1 for ; Thu, 06 Jul 2023 10:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1688665142; x=1691257142; 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=vLxp3S0f1awUfUEHEN2CCeWxyqxQ+kK0R236OPFTD+Q=; b=TEWDlG4oUegNL2J0vzFjS+W9KildvxTVcRfhBu7LbYWaIns006vSrEuXG1HdDMRWa8 Rpz6hRxot/rbtP56LfycyOJuoS/WyjoAY4Fu4Oq4gywwbgpm3M2FxKH3cIP5YtHE+qM1 +gmZVNWbqWXCQdnC6IvkjPZUc8FN3ce4GZ7z0/u9ZhhdlDejGfOuXCap/NH5Fr+ZuxLV f6LZV0l1wc1huObk84uXk/Hh+x2YnVGaM/vBpCtCMqsUURaL9rA7Ehp8VHodHIDN4z22 FDkdlYPG6NANdIuxQfWKTBduVE2Y5FHb+xIugoZocwJZ639HjMQq9QmBojXdf1VR8d+g 4dHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688665142; x=1691257142; 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=vLxp3S0f1awUfUEHEN2CCeWxyqxQ+kK0R236OPFTD+Q=; b=jL92gIp2sCnoLsg4vaFp5/fIKd/DbFtmUaszrPuyXpZKUTLdUqPkj8JZ4zxfimNuhj b7JtfN5R15GQZpsvoiCjHNScjUqzZ6DHnaGqKq0Z+z25xqQDlSYI29DNt5LtCfmNRZxN AYp9es0QZDW82l07ZuePOWG/rTTuoI2nh4HoqtQLFFCRFLnYze/k1RJQMQtlJEMQgpcj 9/ik1FHm0OQfIiwGe3iGo8vMdizVaHBzftsdn44dTFFlruZViTLiorPJnfIBNUHX9Qcu fb/z2Tet3LBvfZjs5F4fXhMxmkPS8TrZHzotxEvgaGY8V2LhNAlPm0qXLBrVJYp/ECQB PaMA== X-Gm-Message-State: ABy/qLbaLJDpdYiswdoq/HYwgUwOKpBqBvSWSodJ69ekWYvFws5Myrp3 cinssEAbKXwjHRZfcWnC63eLrg== X-Google-Smtp-Source: APBJJlFtADMUQS1jcq2ft4S/AVTrWLbxD9UF9L5+As8nlmdRCGnOWyRxrQJYo70BO2clMqPfsmpFqw== X-Received: by 2002:a5e:891a:0:b0:785:ff35:f340 with SMTP id k26-20020a5e891a000000b00785ff35f340mr4337782ioj.14.1688665141990; Thu, 06 Jul 2023 10:39:01 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id q8-20020a0566380ec800b0042b70c5d242sm633528jas.116.2023.07.06.10.38.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 10:39:01 -0700 (PDT) From: Anup Patel To: Will Deacon , julien.thierry.kdev@gmail.com, maz@kernel.org Cc: Paolo Bonzini , Atish Patra , Andrew Jones , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Anup Patel Subject: [kvmtool PATCH v3 7/8] riscv: Add Ssaia extension support Date: Thu, 6 Jul 2023 23:08:03 +0530 Message-Id: <20230706173804.1237348-8-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230706173804.1237348-1-apatel@ventanamicro.com> References: <20230706173804.1237348-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_103902_666069_6D64315D X-CRM114-Status: GOOD ( 10.35 ) 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: When the Ssaia extension is available expose it to the guest. Signed-off-by: Anup Patel --- riscv/fdt.c | 1 + riscv/include/kvm/kvm-config-arch.h | 3 +++ 2 files changed, 4 insertions(+) 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:d32 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 When the Ssaia extension is available expose it to the guest. Signed-off-by: Anup Patel --- riscv/fdt.c | 1 + riscv/include/kvm/kvm-config-arch.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/riscv/fdt.c b/riscv/fdt.c index a76dc37..df71ed4 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -16,6 +16,7 @@ struct isa_ext_info { struct isa_ext_info isa_info_arr[] = { /* sorted alphabetically */ + {"ssaia", KVM_RISCV_ISA_EXT_SSAIA}, {"sstc", KVM_RISCV_ISA_EXT_SSTC}, {"svinval", KVM_RISCV_ISA_EXT_SVINVAL}, {"svpbmt", KVM_RISCV_ISA_EXT_SVPBMT}, diff --git a/riscv/include/kvm/kvm-config-arch.h b/riscv/include/kvm/kvm-config-arch.h index b12605d..b0a7e25 100644 --- a/riscv/include/kvm/kvm-config-arch.h +++ b/riscv/include/kvm/kvm-config-arch.h @@ -25,6 +25,9 @@ struct kvm_config_arch { OPT_U64('\0', "custom-mimpid", \ &(cfg)->custom_mimpid, \ "Show custom mimpid to Guest VCPU"), \ + OPT_BOOLEAN('\0', "disable-ssaia", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SSAIA], \ + "Disable Ssaia Extension"), \ OPT_BOOLEAN('\0', "disable-sstc", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SSTC], \ "Disable Sstc Extension"), \