Skip to content

KVM: riscv: selftests: Backport upstream SBI header refactoring fixes#291

Open
zhuzhenxxx-collab wants to merge 4 commits into
RVCK-Project:rvck-6.6from
zhuzhenxxx-collab:feat/sstc
Open

KVM: riscv: selftests: Backport upstream SBI header refactoring fixes#291
zhuzhenxxx-collab wants to merge 4 commits into
RVCK-Project:rvck-6.6from
zhuzhenxxx-collab:feat/sstc

Conversation

@zhuzhenxxx-collab
Copy link
Copy Markdown

Backport upstream SBI header refactoring and related fixes to resolve KVM RISC-V selftests build failures.

Patch List

  1. d2e155a | Revert the incomplete local backport to prepare for a complete cherry-pick
  2. c89e708 | Backport upstream 9408a23: move SBI definitions to a dedicated header file
  3. 71a7cbe | Backport upstream fix 0fc670d: add explicit ucall_common.h includes
  4. a73d012 | Backport upstream fix b4b1246: add CONFIG_64BIT build definition

Conflict Resolution (Patch 2)
Conflicts arose because local PMU selftests backports were already in place:

include/riscv/processor.h — Keep local SATP_MODE_* macros; remove SBI definitions already migrated to sbi.h
include/riscv/sbi.h — Keep locally backported PMU/snapshot definitions; merge in the upstream base migration framework

Issue:#290

ZhenXing Zhu and others added 4 commits May 29, 2026 06:47
… file"

dist inclusion
category: cleanup
bugzilla: RVCK-Project#290

--------------------------------

This reverts commit 7ecf0f6.

The original backport only modified steal_time.c but missed the key
changes to processor.h, sbi.h, and ucall.h. Upstream has a complete
version of this commit which will be cherry-picked next.

Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
mainline inclusion
from Linux 6.10-rc1
commit 9408a23
category: feature
bugzilla: RVCK-Project#290

--------------------------------

The SBI definitions will continue to grow. Move the sbi related
definitions to its own header file from processor.h

Suggested-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20240420151741.962500-18-atishp@rivosinc.com
Signed-off-by: Anup Patel <anup@brainfault.org>
[Resolve conflicts with existing backported SBI PMU definitions and keep local SATP mode macros. - ZhenXing Zhu]
Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com>
Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
mainline inclusion
from Linux 6.10-rc1
commit 0fc670d
category: bugfix
bugzilla: RVCK-Project#290

--------------------------------

Due to commit 2b7deea ("Revert "kvm: selftests: move base
kvm_util.h declarations to kvm_util_base.h"") kvm selftests now
requires explicitly including ucall_common.h when needed. The commit
added the directives everywhere they were needed at the time, but, by
merge time, new places had been merged for RISC-V. Add those now to
fix RISC-V compilation.

Fixes: dee7ea4 ("Merge tag kvm-x86-selftests_utils-6.10 of https://github.com/kvm-x86/linux into HEAD")
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20240603122045.323064-2-ajones@ventanamicro.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com>
Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
mainline inclusion
from Linux 6.9-rc1
commit b4b1246
category: bugfix
bugzilla: RVCK-Project#290

--------------------------------

Since only 64bit KVM selftests were supported on all architectures,
add the CONFIG_64BIT definition in kvm/Makefile to ensure only 64bit
definitions were available in the corresponding included files.

Suggested-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Haibo Xu <haibo1.xu@intel.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com>
Signed-off-by: ZhenXing Zhu <zhenxing.zhu@linux.alibaba.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026


开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/26623410235

参数解析结果
args value
repository RVCK-Project/rvck
head ref pull/291/head
base ref rvck-6.6
LAVA repo RVCK-Project/lavaci
LAVA hardware ['qemu']
LAVA Testcase path lava-testcases/common-test/ltp/ltp.yaml
need run job kunit-test,kernel-build,check-patch,lava-trigger

测试完成

详细结果:
check result
kunit-test success
kernel-build success
check-patch success
lava-trigger-qemu success
lava-trigger-sg2042 skipped
lava-trigger-k1 skipped
lava-trigger-lpi4a skipped

Kunit Test Result

[07:11:48] Testing complete. Ran 457 tests: passed: 445, skipped: 12

Kernel Build Result

Check Patch Result

Total Errors 0
Total Warnings 4

LAVA Check (qemu)

args value
testcase_repo RVCK-Project/lavaci
lava_template lava-job-template/qemu/qemu-ltp.yaml
testcase_path lava-testcases/common-test/ltp/ltp.yaml
kernel_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck/291_26623410235_1/Image
initramfs_download_url http://10.30.190.110/openEuler-RISC-V/RVCK/OERV-RVCI/RVCK-Project/rvck/291_26623410235_1/initramfs.img
rootfs_download_url https://fast-mirror.isrc.ac.cn/openeuler-sig-riscv/openEuler-RISC-V/RVCK/openEuler24.03-LTS-SP1/openeuler-rootfs.img.zst
testcase_ref main
testitem_name RVCK-Project_rvck_pull_request_target_291__common-test_qemu

result: Lava check done!

@zhuzhenxxx-collab
Copy link
Copy Markdown
Author

@sterling-teng 帮忙review下这笔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants