[edk2-devel] [PATCH] EmulatorPkg/Win: support running multiple WinHost.exe

Yao, Jiewen jiewen.yao at intel.com
Fri Jun 14 08:44:26 UTC 2019


Hi
It is good to support 2nd instance.

But the risk is that 2 instances may access to the same variable region.

It might cause unpredictable behavior in the variable driver later.

Do we have investigate that impact?

Thank you
Yao Jiewen


> -----Original Message-----
> From: devel at edk2.groups.io [mailto:devel at edk2.groups.io] On Behalf Of Ni,
> Ray
> Sent: Friday, June 14, 2019 4:23 PM
> To: devel at edk2.groups.io
> Cc: Justen, Jordan L <jordan.l.justen at intel.com>; Andrew Fish
> <afish at apple.com>; Liu, Zhiguang <zhiguang.liu at intel.com>; Wu, Hao A
> <hao.a.wu at intel.com>
> Subject: [edk2-devel] [PATCH] EmulatorPkg/Win: support running multiple
> WinHost.exe
> 
> When running 2nd instance of WinHost.exe, below error is printed:
> ERROR : Can not open Firmware Device File ../FV/FV_RECOVERY.fd...
> 
> The root cause is "RECOVERY.FD" is exclusively opened by the first
> instance of WinHost.exe.
> 
> The patch changes to open "RECOVERY.FD" in shared way so that
> 2nd+ instance of WinHost.exe can still run successfully.
> 
> Signed-off-by: Ray Ni <ray.ni at intel.com>
> 
> Signed-off-by: Ray Ni <ray.ni at intel.com>
> Cc: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Andrew Fish <afish at apple.com>
> Cc: Zhiguang Liu <zhiguang.liu at intel.com>
> Cc: Hao A Wu <hao.a.wu at intel.com>
> ---
>  EmulatorPkg/Win/Host/WinHost.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/EmulatorPkg/Win/Host/WinHost.c
> b/EmulatorPkg/Win/Host/WinHost.c
> index bd7662683a..5a354d084e 100644
> --- a/EmulatorPkg/Win/Host/WinHost.c
> +++ b/EmulatorPkg/Win/Host/WinHost.c
> @@ -269,7 +269,7 @@ Returns:
>      NtFileHandle = CreateFile (
>                       FileName,
>                       GENERIC_READ | GENERIC_WRITE |
> GENERIC_EXECUTE,
> -                     FILE_SHARE_READ,
> +                     FILE_SHARE_READ | FILE_SHARE_WRITE,
>                       NULL,
>                       CreationDisposition,
>                       FILE_ATTRIBUTE_NORMAL,
> --
> 2.21.0.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42428): https://edk2.groups.io/g/devel/message/42428
Mute This Topic: https://groups.io/mt/32061781/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list