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

virttest: Always disable io-reserve on root-port #1462

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions virttest/qemu_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,10 @@ def sort_key(dev):
for pcic in params.objects("pci_controllers"):
dev = devices.pcic_by_params(pcic, params.object_params(pcic))
pcics.append(dev)
# To avoid SeaBIOS out of IO issues always disable
# "io-reserve" on "pcie-root-port"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does OVMF need same configuration too? @jingzhao84 Could you help confirm? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

@vivianQizhu yes, the same configuration with OVMF
@ldoktor did you consider a device actually need to reserve IO when pass a device to the root port ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now I did not. How about setting it only when io-reserve is not defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(I mean I considered adding it as a configuration, but this seemed more-like default than configuration so I think it should be in code. But I can add a configuration param to be able to enable it. Would that work for you?)

Copy link
Contributor

Choose a reason for hiding this comment

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

it's ok, thanks

if params.object_params(pcic).get("type") == "pcie-root-port":
pcics[-1].set_param("io-reserve", "0")
if params.get("pci_controllers_autosort", "yes") == "yes":
pcics.sort(key=sort_key, reverse=False)
map(devices.insert, pcics)
Expand Down