From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: jiewen.yao@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Fri, 14 Jun 2019 01:44:31 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2019 01:44:30 -0700 X-ExtLoop1: 1 Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 14 Jun 2019 01:44:28 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 14 Jun 2019 01:44:28 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 14 Jun 2019 01:44:27 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.33]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.225]) with mapi id 14.03.0439.000; Fri, 14 Jun 2019 16:44:26 +0800 From: "Yao, Jiewen" To: "devel@edk2.groups.io" , "Ni, Ray" CC: "Justen, Jordan L" , Andrew Fish , "Liu, Zhiguang" , "Wu, Hao A" Subject: Re: [edk2-devel] [PATCH] EmulatorPkg/Win: support running multiple WinHost.exe Thread-Topic: [edk2-devel] [PATCH] EmulatorPkg/Win: support running multiple WinHost.exe Thread-Index: AQHVIoqFkunGDMypG02GT2Pjz8jJm6aa1TLQ Date: Fri, 14 Jun 2019 08:44:26 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503F6B3E23@shsmsx102.ccr.corp.intel.com> References: <20190614082327.80128-1-ray.ni@intel.com> In-Reply-To: <20190614082327.80128-1-ray.ni@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGUyZjVmZGQtMzM2MS00ODE0LTgxMjItNDc4NzllN2ZkNTVjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidXMzTTRGbU9PVWVEK1d2MENGbXRHME1cLzlEdjZpazZUZTFtZE5JUnZkTFZiWXRheDRpQ251OHcxMEEwZEZxZnoifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: jiewen.yao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Ni= , > Ray > Sent: Friday, June 14, 2019 4:23 PM > To: devel@edk2.groups.io > Cc: Justen, Jordan L ; Andrew Fish > ; Liu, Zhiguang ; Wu, Hao A > > Subject: [edk2-devel] [PATCH] EmulatorPkg/Win: support running multiple > WinHost.exe >=20 > When running 2nd instance of WinHost.exe, below error is printed: > ERROR : Can not open Firmware Device File ../FV/FV_RECOVERY.fd... >=20 > The root cause is "RECOVERY.FD" is exclusively opened by the first > instance of WinHost.exe. >=20 > The patch changes to open "RECOVERY.FD" in shared way so that > 2nd+ instance of WinHost.exe can still run successfully. >=20 > Signed-off-by: Ray Ni >=20 > Signed-off-by: Ray Ni > Cc: Jordan Justen > Cc: Andrew Fish > Cc: Zhiguang Liu > Cc: Hao A Wu > --- > EmulatorPkg/Win/Host/WinHost.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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 =3D 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 >=20 >=20 >=20