mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
vbox6: tidy up devxhci poweroff
The issue came apparent with Windows Guests and USB passthrough of smart-card readers. If the VM is powered off, PDMR3Term cleans up all devices incl. (first) acpi and (later) devxhci. The latter used a dangling reference to ACPI structs in a indirect call to apicIsLogicalDest() from xhciR3Destruct(). VMMR3_INT_DECL(int) PDMR3Term(PVM pVM) virtualbox6/src/VBox/VMM/VMMR3/PDM.cpp:817 "apic" (pDevIns->pReg->szName) static void apicR3TermState(PVM pVM) virtualbox6/src/VBox/VMM/VMMR3/APIC.cpp:1235 "qemu-xhci" (pDevIns->pReg->szName) static DECLCALLBACK(int) xhciR3Destruct(PPDMDEVINS pDevIns) repos/ports/src/virtualbox6/devxhci.cc:431 void usb_detach(USBPort *port) <qemu-usb>/src/lib/qemu/hw/usb/core.c:70 static void xhci_port_notify(XHCIPort *port, uint32_t bits) <qemu-usb>/src/lib/qemu/hw/usb/hcd-xhci.c:2592 static DECLCALLBACK(void) pciSetIrq(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iIrq, int iLevel, uint32_t uTagSrc) virtualbox6/src/VBox/Devices/Bus/DevPCI.cpp:398 static bool apicIsLogicalDest(PVMCPUCC pVCpu, uint32_t fDest) virtualbox6/src/VBox/VMM/VMMAll/APICAll.cpp:797 The fix removes our Qemu library reset from xhciR3Destruct() and registers xhciR3Reset() as PowerOff hook. Thanks to Raphael for the thorough investigation.
This commit is contained in:
parent
e345b56719
commit
df1767b784
@ -423,12 +423,20 @@ static DECLCALLBACK(void) xhciR3Reset(PPDMDEVINS pDevIns)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @interface_method_impl{PDMDEVREG,pfnPowerOff}
|
||||
*/
|
||||
static DECLCALLBACK(void) xhciR3PowerOff(PPDMDEVINS pDevIns)
|
||||
{
|
||||
Qemu::usb_reset();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @nterface_method_impl{PDMDEVREG,pfnDestruct}
|
||||
*/
|
||||
static DECLCALLBACK(int) xhciR3Destruct(PPDMDEVINS pDevIns)
|
||||
{
|
||||
Qemu::usb_reset();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -554,7 +562,7 @@ const PDMDEVREG g_DeviceXHCI =
|
||||
/* .pfnDetach = */ NULL,
|
||||
/* .pfnQueryInterface = */ NULL,
|
||||
/* .pfnInitComplete = */ NULL,
|
||||
/* .pfnPowerOff = */ NULL,
|
||||
/* .pfnPowerOff = */ xhciR3PowerOff,
|
||||
/* .pfnSoftReset = */ NULL,
|
||||
/* .pfnReserved0 = */ NULL,
|
||||
/* .pfnReserved1 = */ NULL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user