Repository navigation
Commit 3422265
vmm: Deassign ioeventfds on PCI device hot-unplug
Closing the eventfds registered with KVM_IOEVENTFD is not sufficient,
KVM holds its own references. We need to explicitly assign them by
calling KVM_IOEVENTFD again with the KVM_IOEVENTFD_FLAG_DEASSIGN flag.
Do that in hot_unplug_device().
Add VirtioPciDevice::unregister_notification_ioevents() as the
counterpart to register_notification_ioevent() and move the common logic
into a private helper. Since we are here rename
register_notification_ioevent() to register_notification_ioevents()
since it's used to register multiple events.
Signed-off-by: Ilias Stamatis <ilstam@amazon.com>1 parent 6dba32d commit 3422265
3 files changed
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
602 | 606 | | |
603 | 607 | | |
604 | 608 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
623 | | - | |
624 | | - | |
| 623 | + | |
625 | 624 | | |
626 | 625 | | |
627 | 626 | | |
| |||
634 | 633 | | |
635 | 634 | | |
636 | 635 | | |
637 | | - | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
638 | 642 | | |
639 | 643 | | |
640 | 644 | | |
641 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
642 | 656 | | |
643 | 657 | | |
644 | 658 | | |
| |||
0 commit comments