vmm: Drop 'vfio container' when no active vfio devices - #7364
likebreath merged 1 commit into
Conversation
d0b507b to
5590ebe
Compare
|
Would you please add the tags in commit message? Thanks. Reported-by: Yi Wang [email protected] |
|
I'd like to ask @up2wing to take over. Close it for now. |
The PR look good to me, please continue to work on this. @likebreath Thanks a lot. |
5590ebe to
0fe91bd
Compare
@up2wing Appreciate the patience. I addressed the comment above and the clippy issue. It should be ready for review. I also added the Thank you. |
The PR looks good to me. Thanks a lot. |
This provides clearer life-cycle management of resources around vfio, and aligns better with the kernel behavior as reported below with vfio legacy mode (with vfio container/group). Fixes: cloud-hypervisor#7328 Signed-off-by: Bo Chen <[email protected]> Signed-off-by: Yi Wang <[email protected]>
0fe91bd to
afeffe2
Compare
|
I just did a rebase of this to pick up CI changes. |
The vfio_container can be accessed both in mmio_write() -> cleanup_vfio_container() and add_device(), which are two threads. It's safe to add a lock to ensure consistency. Fixes: cloud-hypervisor#7364 Signed-off-by: Yi Wang <[email protected]>
This provides clearer life-cycle management of resources around vfio, and aligns better with the kernel behavior as reported below with vfio legacy mode (with vfio container/group).
Fixes: #7328