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

Increate dma_entry_limit for TDX vfio_net_boot cases without iommufd #429

Merged
merged 1 commit into from
Dec 10, 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
8 changes: 8 additions & 0 deletions KVM/qemu/tests/vfio_net_boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

from virttest import error_context, utils_net

from avocado.utils import process
from avocado.core import exceptions
from provider import hostdev
from provider.hostdev import utils as hostdev_utils
from provider.hostdev.dev_setup import hostdev_setup
Expand All @@ -31,6 +33,12 @@ def run(test, params, env):
:type env: virttest.utils_env.Env
"""
ip_version = params["ip_version"]
vm_type = params.get("vm_secure_guest_type")
if not params.get("vm_hostdev_iommufd") and vm_type == "tdx":
dma_entry_limit_cmd = params.get("dma_cmd")
status = process.system(dma_entry_limit_cmd, shell=True)
if status:
raise exceptions.TestError("Failed to increase dma_entry_limit.")
with hostdev_setup(params) as params:
hostdev_driver = params.get("vm_hostdev_driver", "vfio-pci")
assignment_type = params.get("hostdev_assignment_type")
Expand Down
1 change: 1 addition & 0 deletions KVM/qemu/vfio_net_boot.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- ipv4:
variants:
- @default:
dma_cmd = "echo 0x200000 > /sys/module/vfio_iommu_type1/parameters/dma_entry_limit"
- iommufd:
vm_hostdev_iommufd = iommufd0
variants:
Expand Down
Loading