Skip to content

KVM: add vmdos_buslock_de case#573

Merged
xhao22 merged 1 commit intointel:mainfrom
fanchen2:vmdos-01
Apr 29, 2026
Merged

KVM: add vmdos_buslock_de case#573
xhao22 merged 1 commit intointel:mainfrom
fanchen2:vmdos-01

Conversation

@fanchen2
Copy link
Copy Markdown
Contributor

Add vmdos_buslock_de test case with its QEMU cfg and dependencies.

Case names:

  • VMDOS_buslock_de_01
  • VMDOS_buslock_de_02
  • VMDOS_buslock_de_03
  • VMDOS_buslock_de_04

Case coverage includes:

  • split_lock_detect mode validation in guest
  • bus lock trigger execution and bus_error behavior checks
  • repeated 64-bit bus lock triggering for ratelimit coverage
  • guest dmesg trap checks with timestamp-format compatibility
  • ratelimit verification using per-second guest dmesg trap counting for both TDX and non-TDX paths
  • host-side EXCEPTION_NMI trace verification for non-TDX paths only

@fanchen2 fanchen2 force-pushed the vmdos-01 branch 3 times, most recently from f54624c to fc32587 Compare April 22, 2026 10:09
Comment thread KVM/qemu/deps/bus_lock/bus_lock.c Outdated
: "memory");
}

static inline int get_cache_line_size(void)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 3 functions above are same as bus_lock_10.c, how about merge them?

Comment thread KVM/qemu/vmdos_buslock_de.cfg Outdated
bus_lock_source_file = bus_lock.c
bus_lock_exec_file = bus_lock.out
variants:
- VMDOS_buslock_de_01:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the *_01 to a valuable name.

Comment thread KVM/qemu/tests/vmdos_buslock_de.py Outdated
def _check_host_split_lock_cmdline():
"""Ensure host kernel cmdline contains split_lock_detect=off."""
try:
result = process.run("cat /proc/cmdline", shell=True)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_ker_cmd()

Comment thread KVM/qemu/tests/vmdos_buslock_de.py Outdated

def _check_guest_bus_lock_capability(test, params, vm, session):
"""Ensure guest supports bus lock detection feature."""
if session.cmd_status("grep -qw bus_lock_detect /proc/cpuinfo"):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_cpu_flags()

@fanchen2 fanchen2 force-pushed the vmdos-01 branch 2 times, most recently from d65d110 to fe79626 Compare April 29, 2026 06:01
Add buslock_de test case with its QEMU cfg and dependencies.

Case names:
- buslock_de_warn
- buslock_de_off
- buslock_de_fatal
- buslock_de_ratelimit

Case coverage includes:
- split_lock_detect mode validation in guest
- bus lock trigger execution and bus_error behavior checks
- repeated 64-bit bus lock triggering for ratelimit coverage
- guest dmesg trap checks with timestamp-format compatibility
- ratelimit verification using per-second guest dmesg trap counting for both TDX and non-TDX paths
- host-side EXCEPTION_NMI trace verification for non-TDX paths only

Signed-off-by: Farrah Chen <farrah.chen@intel.com>
@fanchen2
Copy link
Copy Markdown
Contributor Author

@xhao22 All comments have been addressed, could you help to review again?

@xhao22 xhao22 merged commit 388e0c1 into intel:main Apr 29, 2026
4 of 5 checks passed
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