Bug 11964 - [Anolis23.2][6.6.25-2.2_rc1][aarch64] kernel-selftests测试kvm.page_fault_test项fail
Summary: [Anolis23.2][6.6.25-2.2_rc1][aarch64] kernel-selftests测试kvm.page_fault_test项fail
Status: CONFIRMED
Alias: None
Product: ANCK 6.6 Dev
Classification: ANCK
Component: virt (show other bugs) virt
Version: 6.6.25-2.2
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: banye97
QA Contact:
URL:
Whiteboard:
Keywords: Function
Depends on:
Blocks:
 
Reported: 2024-11-20 16:29 UTC by Banana
Modified: 2024-11-21 16:06 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Banana alibaba_cloud_group 2024-11-20 16:29:18 UTC
[问题描述]
Anolis23.2 6.6.25-2.2_rc1.an23.aarch64环境kernel-selftests测试kvm.page_fault_test项fail

[root@4f7Lab15 aarch64]# ./page_fault_test
==== Test Assertion Failure ====
  aarch64/page_fault_test.c:142: par & 1 == 0
  pid=1532710 tid=1532710 errno=4 - Interrupted system call
     1  0x00000000004028cb: vcpu_run_loop 于 page_fault_test.c:681
     2  0x0000000000402d43: run_test 于 page_fault_test.c:730
     3  0x00000000004038e7: for_each_guest_mode 于 guest_modes.c:100
     4  0x0000000000401a33: for_each_test_and_guest_mode 于 page_fault_test.c:1105
     5  (已内连入)main 于 page_fault_test.c:1131
     6  0x0000ffff8cc07707: ?? ??:0
     7  0x0000ffff8cc077df: ?? ??:0
     8  0x0000000000401aef: _start 于 ??:?
  0x1 != 0x0 (par & 1 != 0)

[复现步骤]
1. wget https://build.openanolis.cn/kojifiles/output/nightly/anolis-23-20241101.5/compose/os/source/tree/Packages/kernel-6.6.25-2.2_rc1.an23.src.rpm
2. rpm -i kernel-6.6.25-2.2_rc1.an23.src.rpm
   yum-builddep -y /root/rpmbuild/SPECS/kernel.spec 
   rpmbuild -bp /root/rpmbuild/SPECS/kernel.spec 
   cd /root/rpmbuild/BUILD/kernel-6.6.25-2.2_rc1.an23/linux-6.6.25-2.2_rc1.an23.aarch64/tools/testing/selftests/kvm
   make
   cd aarch64 && ./run_hugetlbfs_test.sh

[环境信息]
[root@4f7Lab15 kvm]# uname -r
6.6.25-2.2_rc1.an23.aarch64

[root@4f7Lab15 kvm]# cat /etc/os-release
NAME="Anolis OS"
VERSION="23.1"
ID="anolis"
VERSION_ID="23.1"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23.1"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"
Comment 1 zhangxinyi alibaba_cloud_group 2024-11-20 17:43:58 UTC
报错部分代码
/* Address translation instruction */
static void guest_at(void)
{
	uint64_t par;

	asm volatile("at s1e1r, %0" :: "r" (guest_test_memory));
	isb();
	par = read_sysreg(par_el1);

	/* Bit 1 indicates whether the AT was successful */
	GUEST_ASSERT_EQ(par & 1, 0);
}
看起来是刷新guest_test_memory对应的的TLB缓存时出现异常
Comment 2 banye97 alibaba_cloud_group 2024-11-21 09:41:00 UTC
请优先确认 6.6.25-2.1 版本是否存在相同问题
Comment 3 Banana alibaba_cloud_group 2024-11-21 11:15:34 UTC
(In reply to banye97 from comment #2)
> 请优先确认 6.6.25-2.1 版本是否存在相同问题

6.6.25-2.1 arm环境存在相同问题

[root@4f7Lab15 aarch64]# ./page_fault_test
==== Test Assertion Failure ====
  aarch64/page_fault_test.c:142: par & 1 == 0
  pid=23548 tid=23548 errno=4 - Interrupted system call
     1  0x00000000004028cb: vcpu_run_loop 于 page_fault_test.c:681
     2  0x0000000000402d43: run_test 于 page_fault_test.c:730
     3  0x00000000004038e7: for_each_guest_mode 于 guest_modes.c:100
     4  0x0000000000401a33: for_each_test_and_guest_mode 于 page_fault_test.c:1105
     5  (已内连入)main 于 page_fault_test.c:1131
     6  0x0000ffffa95f7707: ?? ??:0
     7  0x0000ffffa95f77df: ?? ??:0
     8  0x0000000000401aef: _start 于 ??:?
  0x1 != 0x0 (par & 1 != 0)

[root@4f7Lab15 aarch64]# uname -r
6.6.25-2.1.an23.aarch64

[root@4f7Lab15 aarch64]# cat /etc/os-release
NAME="Anolis OS"
VERSION="23.1"
ID="anolis"
VERSION_ID="23.1"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23.1"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"
Comment 4 banye97 alibaba_cloud_group 2024-11-21 12:32:36 UTC
非 6.6.25-002.2 新增问题,暂不修复