From: zhouquan@iscas.ac.cn
To: anup@brainfault.org, ajones@ventanamicro.com,
atishp@atishpatra.org, paul.walmsley@sifive.com,
palmer@dabbelt.com
Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
kvm@vger.kernel.org, kvm-riscv@lists.infradead.org,
Quan Zhou <zhouquan@iscas.ac.cn>
Subject: [PATCH v2 3/6] RISC-V: KVM: Allow Zicbop extension for Guest/VM
Date: Fri, 8 Aug 2025 18:18:44 +0800 [thread overview]
Message-ID: <db4a9b679cc653bb6f5f5574e4196de7a980e458.1754646071.git.zhouquan@iscas.ac.cn> (raw)
In-Reply-To: <cover.1754646071.git.zhouquan@iscas.ac.cn>
From: Quan Zhou <zhouquan@iscas.ac.cn>
Extend the KVM ISA extension ONE_REG interface to allow KVM user space
to detect and enable Zicbop extension for Guest/VM.
Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
---
arch/riscv/include/uapi/asm/kvm.h | 1 +
arch/riscv/kvm/vcpu_onereg.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/arch/riscv/include/uapi/asm/kvm.h b/arch/riscv/include/uapi/asm/kvm.h
index bb200f82d08e..ddaa5c1ecb84 100644
--- a/arch/riscv/include/uapi/asm/kvm.h
+++ b/arch/riscv/include/uapi/asm/kvm.h
@@ -186,6 +186,7 @@ enum KVM_RISCV_ISA_EXT_ID {
KVM_RISCV_ISA_EXT_ZICCRSE,
KVM_RISCV_ISA_EXT_ZAAMO,
KVM_RISCV_ISA_EXT_ZALRSC,
+ KVM_RISCV_ISA_EXT_ZICBOP,
KVM_RISCV_ISA_EXT_MAX,
};
diff --git a/arch/riscv/kvm/vcpu_onereg.c b/arch/riscv/kvm/vcpu_onereg.c
index cf5003eb2e41..73ce35c776df 100644
--- a/arch/riscv/kvm/vcpu_onereg.c
+++ b/arch/riscv/kvm/vcpu_onereg.c
@@ -68,6 +68,7 @@ static const unsigned long kvm_isa_ext_arr[] = {
KVM_ISA_EXT_ARR(ZFH),
KVM_ISA_EXT_ARR(ZFHMIN),
KVM_ISA_EXT_ARR(ZICBOM),
+ KVM_ISA_EXT_ARR(ZICBOP),
KVM_ISA_EXT_ARR(ZICBOZ),
KVM_ISA_EXT_ARR(ZICCRSE),
KVM_ISA_EXT_ARR(ZICNTR),
@@ -201,6 +202,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigned long ext)
case KVM_RISCV_ISA_EXT_ZFA:
case KVM_RISCV_ISA_EXT_ZFH:
case KVM_RISCV_ISA_EXT_ZFHMIN:
+ case KVM_RISCV_ISA_EXT_ZICBOP:
case KVM_RISCV_ISA_EXT_ZICCRSE:
case KVM_RISCV_ISA_EXT_ZICNTR:
case KVM_RISCV_ISA_EXT_ZICOND:
--
2.34.1
next prev parent reply other threads:[~2025-08-08 10:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 10:18 [PATCH v2 0/6] RISC-V: KVM: Allow zicbop/bfloat16 exts for guests zhouquan
2025-08-08 10:18 ` [PATCH v2 1/6] RISC-V: KVM: Change zicbom/zicboz block size to depend on the host isa zhouquan
2025-08-18 20:32 ` Andrew Jones
2025-08-19 1:17 ` Troy Mitchell
2025-08-19 3:38 ` Nutty.Liu
2025-08-08 10:18 ` [PATCH v2 2/6] RISC-V: KVM: Provide UAPI for Zicbop block size zhouquan
2025-08-18 20:33 ` Andrew Jones
2025-08-19 3:39 ` Nutty.Liu
2025-08-08 10:18 ` zhouquan [this message]
2025-08-19 3:39 ` [PATCH v2 3/6] RISC-V: KVM: Allow Zicbop extension for Guest/VM Nutty.Liu
2025-08-08 10:18 ` [PATCH v2 4/6] RISC-V: KVM: Allow bfloat16 " zhouquan
2025-08-19 3:41 ` Nutty.Liu
2025-08-08 10:19 ` [PATCH v2 5/6] KVM: riscv: selftests: Add Zicbop extension to get-reg-list test zhouquan
2025-08-19 3:41 ` Nutty.Liu
2025-08-08 10:19 ` [PATCH v2 6/6] KVM: riscv: selftests: Add bfloat16 " zhouquan
2025-08-19 3:42 ` Nutty.Liu
2025-08-22 11:20 ` [PATCH v2 0/6] RISC-V: KVM: Allow zicbop/bfloat16 exts for guests Anup Patel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=db4a9b679cc653bb6f5f5574e4196de7a980e458.1754646071.git.zhouquan@iscas.ac.cn \
--to=zhouquan@iscas.ac.cn \
--cc=ajones@ventanamicro.com \
--cc=anup@brainfault.org \
--cc=atishp@atishpatra.org \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).