From patchwork Tue Jan 23 02:57:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaoqing Qin X-Patchwork-Id: 13526802 Received: from zg8tndyumtaxlji0oc4xnzya.icoremail.net (zg8tndyumtaxlji0oc4xnzya.icoremail.net [46.101.248.176]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5DEEFA40 for ; Tue, 23 Jan 2024 02:58:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.101.248.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705978699; cv=none; b=qTFBjeIIBnC1hvbJjFU6zkHKHZLd/LktnDVMk65i8a3tdL129A88YXGRp3UMsQxKGRTt0Mclyr8Y17EnrOGPfTXgLKALPJQ+HScRYBL8Vx/+YebNdSLxrMMsurfGO2v4m7TW1N+Fn1/8T8l+2zQYIU9BKWagaTc7xhFWVzAFSVo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705978699; c=relaxed/simple; bh=UbKo0RDP0BdW+kVCExz0Qyy+Nk8Cdu5yi9Sw3PTpp3k=; h=Date:From:To:Cc:Subject:Content-Type:MIME-Version:Message-ID; b=CnjgijkIZfdGqMQfJPEBdqbrPs4Q+C8D/1g60Mah1i6sGoTvY3TYso8ZlA1rtbnDDUx4hJPXEBGFqqdUYdnnSayeSk0PHQFV3oAsEx9Wh1rXifUc/qM0KHyRgIAF823N+tjCHDQn0F9jPk+BqR14erJhrL3kpZ1Gun3BKpfXJsk= 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=46.101.248.176 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) ; Tue, 23 Jan 2024 10:57:59 +0800 (GMT+08:00) Date: Tue, 23 Jan 2024 10:57:59 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: =?utf-8?b?56em5bCR6Z2S?= 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: [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-76b96e3b-3ecc-44d5-9200-de81e6d4c242- Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <3095a39b.95.18d3440cf62.Coremail.qinshaoqing@bosc.ac.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwBH4EY3K69l5G+sAA--.1001W X-CM-SenderInfo: ptlq2xpdrtx03j6e02nfoduhdfq/1tbiAQAGAWWukV4CHgABsf X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VW7Jw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= Add parsing for Zacas ISA extension which was ratified recently in the riscv-zacas manual. Signed-off-by: Shaoqing Qin --- 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 9af71b5..1b4f701 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -22,6 +22,7 @@ struct isa_ext_info isa_info_arr[] = { {"svnapot", KVM_RISCV_ISA_EXT_SVNAPOT}, {"svpbmt", KVM_RISCV_ISA_EXT_SVPBMT}, {"zbb", KVM_RISCV_ISA_EXT_ZBB}, + {"zacas", KVM_RISCV_ISA_EXT_ZACAS}, {"zicbom", KVM_RISCV_ISA_EXT_ZICBOM}, {"zicboz", KVM_RISCV_ISA_EXT_ZICBOZ}, {"zihintpause", KVM_RISCV_ISA_EXT_ZIHINTPAUSE}, diff --git a/riscv/include/asm/kvm.h b/riscv/include/asm/kvm.h index 992c5e4..0c65ff0 100644 --- a/riscv/include/asm/kvm.h +++ b/riscv/include/asm/kvm.h @@ -122,6 +122,7 @@ enum KVM_RISCV_ISA_EXT_ID { KVM_RISCV_ISA_EXT_ZICBOM, KVM_RISCV_ISA_EXT_ZICBOZ, KVM_RISCV_ISA_EXT_ZBB, + KVM_RISCV_ISA_EXT_ZACAS, KVM_RISCV_ISA_EXT_SSAIA, KVM_RISCV_ISA_EXT_V, KVM_RISCV_ISA_EXT_SVNAPOT, diff --git a/riscv/include/kvm/kvm-config-arch.h b/riscv/include/kvm/kvm-config-arch.h index 863baea..7840f91 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-zbb", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZBB], \ "Disable Zbb Extension"), \ + OPT_BOOLEAN('\0', "disable-zacas", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZACAS], \ + "Disable Zacas Extension"), \ OPT_BOOLEAN('\0', "disable-zicbom", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZICBOM], \ "Disable Zicbom Extension"), \