Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block_with_iommu: expands the test case functionality #4187

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions qemu/tests/block_with_iommu.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ def run(test, params, env):
1. Add "intel_iommu=on" to kernel line of q35 guest.
2. Boot a guest with virtio-scsi with iommu_platform=on.
3. Verify IOMMU enabled in the guest.
4. Reload kernel then reboot guest.
4. Execute a simple I/O in the disk
5. Reload kernel then reboot guest.

:param test: QEMU test object.
:param params: Dictionary with the test parameters.
Expand Down Expand Up @@ -60,6 +61,10 @@ def verify_iommu_enabled():
session = vm.wait_for_login(timeout=360)
verify_iommu_enabled()

session.cmd(params.get("dd_cmd"))

if params.get("reload_kernel_cmd"):
reload_kernel(session)
vm.reboot(session)

session = vm.reboot(session, timeout=360)
session.cmd(params.get("dd_cmd"))
1 change: 1 addition & 0 deletions qemu/tests/cfg/block_with_iommu.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
virtio_dev_disable_modern = off
check_key_words = "DMAR: IOMMU enabled;"
check_key_words += "DMAR: Intel(R) Virtualization Technology for Directed I/O"
dd_cmd = "dd if=/dev/urandom of=/home/dd_test oflag=direct bs=1M count=10"
zhencliu marked this conversation as resolved.
Show resolved Hide resolved
variants:
- @default:
- reload_kernel:
Expand Down
Loading