From 64ef66ba8b4120f4958dc0275911e10eb927d311 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Mon, 1 Jul 2019 11:50:12 +0100 Subject: [PATCH] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children In XenBusDxe, the XenBusAddDevice() opens the gXenIoProtocolGuid on behalf of child controllers. It is never closed and prevents us from uninstalling the protocol. Close it where we stop all the children in XenBusDxe->Stop(). Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek Message-Id: <20190701105012.25758-1-anthony.perard@citrix.com> --- OvmfPkg/XenBusDxe/XenBusDxe.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.c b/OvmfPkg/XenBusDxe/XenBusDxe.c index 0e63707f50..7c07a96650 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.c +++ b/OvmfPkg/XenBusDxe/XenBusDxe.c @@ -453,6 +453,10 @@ XenBusDxeDriverBindingStop ( continue; } + Status = gBS->CloseProtocol (Dev->ControllerHandle, &gXenIoProtocolGuid, + Dev->This->DriverBindingHandle, ChildData->Handle); + ASSERT_EFI_ERROR (Status); + Status = gBS->UninstallMultipleProtocolInterfaces ( ChildData->Handle, &gEfiDevicePathProtocolGuid, ChildData->DevicePath,