From patchwork Fri May 24 02:50:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaoqing Qin X-Patchwork-Id: 13672622 Received: from azure-sdnproxy.icoremail.net (azure-sdnproxy.icoremail.net [20.232.28.96]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5BA223D2 for ; Fri, 24 May 2024 02:50:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=20.232.28.96 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716519060; cv=none; b=Eqd1LMp3mohnGKPxB2cP6aJa8CfuUl3BSfyg/s+cZO4/lTVEYFMfMz2mSkfMM/A7smmkBuJssymtvhmLcM69QKVCi67KpN5WzsRFbbKG3AKMvKX1iZ/OpRTaDy1J1JBUWA88aCIVz056d+Kr9iLcQjbySyKgZNXULmjCwRhNqbU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716519060; c=relaxed/simple; bh=A5iXz2vUWK2W2A33JdvI5h65h1CEhplvkIcLcejjoi0=; h=Date:From:To:Cc:Subject:Content-Type:MIME-Version:Message-ID; b=hzI+nLJIsRF+H9oGnWMpoaev5FhllHL1uq/8lSvbKinS6fKBDn4eDSX9p72C9NJzI+gO4r4+SgvkvAD3VAqKwLgS1RW0YMdJiQAgBmrj8QXNqMLzPyzG+wZRdsAGqzMzZ1zciIZjDbYKkyXbIWW62FvTR2bCbYGUkD9G/rXTfA8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bosc.ac.cn; spf=pass smtp.mailfrom=bosc.ac.cn; arc=none smtp.client-ip=20.232.28.96 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bosc.ac.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bosc.ac.cn Received: from qinshaoqing$bosc.ac.cn ( [123.114.53.210] ) by ajax-webmail-mail (Coremail) ; Fri, 24 May 2024 10:50:42 +0800 (GMT+08:00) Date: Fri, 24 May 2024 10:50:42 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: "Shaoqing Qin" To: Deacon , julien.thierry.kdev@gmail.com, maz@kernel.org Cc: Bonzini , Patra , Jones , Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Patel , =?utf-8?b?546L54S2?= , =?utf-8?b?5byg5YGl?= Subject: [v2][kvmtool PATCH 1/1] riscv: Add zacas extension X-Priority: 3 X-Mailer: Coremail Webmail Server Version 2023.1-cmXT5 build 20230627(00751abc) Copyright (c) 2002-2024 www.mailtech.cn mispb-4edfefde-e422-4ddc-8a36-c3f99eb8cd32-icoremail.net Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <228d4ce6.49.18fa881fced.Coremail.qinshaoqing@bosc.ac.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwC3v9uCAFBmSJ63AA--.2348W X-CM-SenderInfo: ptlq2xpdrtx03j6e02nfoduhdfq/1tbiAQAIAWZPVcAChgAAsw X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= Add parsing for Zacas ISA extension which was ratified recently in the riscv-zacas manual. The tests are based on the 6.9 version of the kernel Signed-off-by: Shaoqing Qin --- Changed from v1: 1. modify ZACAS enum number. 2. modify the code location,just for formatting. --- riscv/fdt.c | 1 + riscv/include/asm/kvm.h | 1 + riscv/include/kvm/kvm-config-arch.h | 3 +++ 3 files changed, 5 insertions(+) diff --git a/riscv/fdt.c b/riscv/fdt.c index cc8070d..6dfc25b 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -22,6 +22,7 @@ struct isa_ext_info isa_info_arr[] = { {"svinval", KVM_RISCV_ISA_EXT_SVINVAL}, {"svnapot", KVM_RISCV_ISA_EXT_SVNAPOT}, {"svpbmt", KVM_RISCV_ISA_EXT_SVPBMT}, + {"zacas", KVM_RISCV_ISA_EXT_ZACAS}, {"zba", KVM_RISCV_ISA_EXT_ZBA}, {"zbb", KVM_RISCV_ISA_EXT_ZBB}, {"zbc", KVM_RISCV_ISA_EXT_ZBC}, diff --git a/riscv/include/asm/kvm.h b/riscv/include/asm/kvm.h index 7499e88..6b2cbe7 100644 --- a/riscv/include/asm/kvm.h +++ b/riscv/include/asm/kvm.h @@ -135,6 +135,7 @@ enum KVM_RISCV_ISA_EXT_ID { KVM_RISCV_ISA_EXT_ZBS, KVM_RISCV_ISA_EXT_ZICNTR, KVM_RISCV_ISA_EXT_ZICSR, + KVM_RISCV_ISA_EXT_ZACAS, KVM_RISCV_ISA_EXT_ZIFENCEI, KVM_RISCV_ISA_EXT_ZIHPM, KVM_RISCV_ISA_EXT_SMSTATEEN, diff --git a/riscv/include/kvm/kvm-config-arch.h b/riscv/include/kvm/kvm-config-arch.h index e562d71..e5343a6 100644 --- a/riscv/include/kvm/kvm-config-arch.h +++ b/riscv/include/kvm/kvm-config-arch.h @@ -43,6 +43,9 @@ struct kvm_config_arch { OPT_BOOLEAN('\0', "disable-svpbmt", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SVPBMT], \ "Disable Svpbmt Extension"), \ + OPT_BOOLEAN('\0', "disable-zacas", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZACAS], \ + "Disable Zacas Extension"), \ OPT_BOOLEAN('\0', "disable-zba", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZBA], \ "Disable Zba Extension"), \