public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children
@ 2019-07-01 10:50 Anthony PERARD
  2019-07-01 14:55 ` Laszlo Ersek
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony PERARD @ 2019-07-01 10:50 UTC (permalink / raw)
  To: devel
  Cc: Jordan Justen, Laszlo Ersek, Ard Biesheuvel, Julien Grall,
	Anthony PERARD

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 <anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.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,
-- 
Anthony PERARD


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children
  2019-07-01 10:50 [PATCH v2] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children Anthony PERARD
@ 2019-07-01 14:55 ` Laszlo Ersek
  0 siblings, 0 replies; 2+ messages in thread
From: Laszlo Ersek @ 2019-07-01 14:55 UTC (permalink / raw)
  To: Anthony PERARD, devel; +Cc: Jordan Justen, Ard Biesheuvel, Julien Grall

On 07/01/19 12:50, Anthony PERARD wrote:
> 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 <anthony.perard@citrix.com>
> Reviewed-by: Laszlo Ersek <lersek@redhat.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,
> 

Commit 64ef66ba8b41.

Thanks
Laszlo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-01 14:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-01 10:50 [PATCH v2] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children Anthony PERARD
2019-07-01 14:55 ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox