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

[12.0-stable] Revert "domainmgr: do pci-reserve on start of edge app" #4633

Merged
merged 3 commits into from
Feb 22, 2025

Conversation

rene
Copy link
Contributor

@rene rene commented Feb 20, 2025

On EVE 12.0.6-lts it was observed that USB Controller was not being assigned to vfio-pci driver when debug.enable.usb is set to false, making USB Input devices available to the host, i.e., not disabling USB keyboards. This behavior doesn't happen on > 13.x versions. It turns out the fix was the commit being cherry-picked by this PR.

Solution was tested on real hardware (Karbon-300) + QEMU.

Kudos to @christoph-zededa for helping debugging this issue.

Copy link
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

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

Don't we need the rest of the commits from the original pull request?
https://github.com/lf-edge/eve/pull/4120/commits

@rene
Copy link
Contributor Author

rene commented Feb 20, 2025

Don't we need the rest of the commits from the original pull request? https://github.com/lf-edge/eve/pull/4120/commits

Good point @OhmSpectator , regarding the other 2 commits from the PR:

  1. One is just removing unused variable, not needed, but makes sense to port as well
  2. The other has conflicts and we don't need it on 12.0.6-lts, so I prefer to not backport this one, the issue was caused by the changes of the commit being reverted, I don't want to include more stuff other than the revert...

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
(cherry picked from commit 8444b3f)
@rene
Copy link
Contributor Author

rene commented Feb 20, 2025

Build errors were due to "pull rate limit", triggering workflow again....

@OhmSpectator
Copy link
Member

I want @christoph-zededa to take a look at the PR. Even though he was involved in the investigation, I would like him to approve the final result =)

@christoph-zededa
Copy link
Contributor

I want @christoph-zededa to take a look at the PR. Even though he was involved in the investigation, I would like him to approve the final result =)

I am indecisive; on one hand this PR solves the described issue on the other hand it prevents users from using USB-passthrough in certain (perhaps obscure) cases.

Copy link
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

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

it prevents users from using USB-passthrough in certain (perhaps obscure) cases.

Good to know, thanks! Is it possible to better understand the consequences? What are these specific cases? Can we expect users to encounter them in real life?

One thing is if this only happens in some very specific and obscure cases — in that case, we can simply describe the possible regression in the release notes and inform users. Another thing is if we expect it to affect a widely used scenario. Then, the cost of fixing it may not be justified, I would say...

@christoph-zededa
Copy link
Contributor

What are these specific cases?

It is when they try to combine PCI passthrough of the controller and USB passthrough of devices connected to this controller (i.e. you have two edge apps, one that is using PCI passthrough another one is using USB passthrough; sometimes you run one sometimes the other). As with this PR the PCI controller gets the vfio-pci device driver assigned immediately, it is impossible to see what USB devices are connected to it.

Can we expect users to encounter them in real life?

From my experience users always try to break the system by using obscure options ;-)

@rene
Copy link
Contributor Author

rene commented Feb 21, 2025

@christoph-zededa , is USB per device passthrough available in 12.0.6-lts?

Copy link
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

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

@christoph-zededa , is USB per device passthrough available in 12.0.6-lts?

Yes. The feature that this PR is breaking is also available since 12.0.0: 31b9c8e. The feature was explicitly requested by @eriknordmark.

As far as I undesrand, there is a simple way to fix the original issue and not break the feature. @christoph-zededa said that the current approach will require very little polishing to do so. I hope he can help with it.

@christoph-zededa
Copy link
Contributor

As far as I undesrand, there is a simple way to fix the original issue and not break the feature. @christoph-zededa said that the current approach will require very little polishing to do so. I hope he can help with it.

-> https://github.com/rene/eve/pull/39/files

This reverts commit aad213f.

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
(cherry picked from commit 72c506b)
@rene
Copy link
Contributor Author

rene commented Feb 21, 2025

Thanks a lot @christoph-zededa for providing the updated cherry-pick. I've integrated to this PR. Please, take a look. I will also test this PR on the real device and will update the results here.

@rene
Copy link
Contributor Author

rene commented Feb 21, 2025

@OhmSpectator , @christoph-zededa , I've tested latest changes on the real device, it's working as expected. If there are no more comments, PR is ready for merge.

Copy link
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

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

Great, thanks! Let's run the tests

Copy link
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

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

Ah, sorry! @christoph-zededa pointed to the fact that there are no changes in the PR since the last time we took a look at it.

that might have a USB device passthrough in the future

This is necessary to support PCI passthrough and USB passthrough
at the same time, but still do PCIReserve of other devices on
startup of pillar

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
(cherry picked from commit ef7d469)
@rene
Copy link
Contributor Author

rene commented Feb 21, 2025

Sorry, I messed up my branches, it's updated now.

@rene
Copy link
Contributor Author

rene commented Feb 21, 2025

Pull rate limits.... 😭

@OhmSpectator OhmSpectator merged commit 1d2e6cc into lf-edge:12.0-stable Feb 22, 2025
31 of 32 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.

3 participants