Skip to content

KVM: add vmdos_buslock_de case#573

Open
fanchen2 wants to merge 1 commit intointel:mainfrom
fanchen2:vmdos-01
Open

KVM: add vmdos_buslock_de case#573
fanchen2 wants to merge 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 2 times, most recently from 36acd8b to f54624c Compare April 22, 2026 09:38
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

Signed-off-by: Farrah Chen <farrah.chen@intel.com>
: "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?

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.

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()


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()

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