From 4b0aeadaefd505d46b1ce4b1ee1c85038a7fa0af Mon Sep 17 00:00:00 2001 From: BillXiang Date: Tue, 30 Sep 2025 17:49:56 +0800 Subject: [PATCH] Enable SBI_V01 for RISCV64 kernel Enable legacy SBI calls and activate vcpu_sbi_ext_v01 for kvm. Signed-off-by: BillXiang --- riscv64/build_kernel.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/riscv64/build_kernel.sh b/riscv64/build_kernel.sh index 412de9d..aee717d 100755 --- a/riscv64/build_kernel.sh +++ b/riscv64/build_kernel.sh @@ -16,6 +16,8 @@ git clone --depth 1 --branch $KERNEL_TAG https://github.com/torvalds/linux.git pushd linux # Enable kvm module instead of inserting manually sed -i "s|^CONFIG_KVM=.*|CONFIG_KVM=y|g" arch/riscv/configs/defconfig +# Enable legacy SBI calls and activate vcpu_sbi_ext_v01 for kvm. +echo "CONFIG_RISCV_SBI_V01=y" >> arch/riscv/configs/defconfig make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- defconfig && \ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- -j$(nproc) mv arch/riscv/boot/Image $OUTPUT