(&mut self)
| 501 | |
| 502 | impl Drop for VfioUserPciDevice { |
| 503 | fn drop(&mut self) { |
| 504 | self.unmap_mmio_regions(); |
| 505 | |
| 506 | if let Some(msix) = &self.common.interrupt.msix |
| 507 | && msix.bar.enabled() |
| 508 | { |
| 509 | self.common.disable_msix(); |
| 510 | } |
| 511 | |
| 512 | if let Some(msi) = &self.common.interrupt.msi |
| 513 | && msi.cfg.enabled() |
| 514 | { |
| 515 | self.common.disable_msi(); |
| 516 | } |
| 517 | |
| 518 | if self.common.interrupt.intx_in_use() { |
| 519 | self.common.disable_intx(); |
| 520 | } |
| 521 | |
| 522 | if let Err(e) = self.client.lock().unwrap().shutdown() { |
| 523 | error!("Failed shutting down vfio-user client: {e}"); |
| 524 | } |
| 525 | } |
| 526 | } |
| 527 | |
| 528 | impl Pausable for VfioUserPciDevice {} |
nothing calls this directly
no test coverage detected