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.20, mailfrom: ray.ni@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Mon, 17 Jun 2019 00:02:47 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2019 00:02:46 -0700 X-ExtLoop1: 1 Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 17 Jun 2019 00:02:46 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Jun 2019 00:02:46 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Jun 2019 00:02:45 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.185]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.246]) with mapi id 14.03.0439.000; Mon, 17 Jun 2019 15:02:44 +0800 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Ni, Ray" , "Yao, Jiewen" 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: AQHVIoqFsZ34vBR/J0a0OxFVnd8nJKaa1TLQgAACdDCABJgEIA== Date: Mon, 17 Jun 2019 07:02:43 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C1D0765@SHSMSX104.ccr.corp.intel.com> References: <20190614082327.80128-1-ray.ni@intel.com> <74D8A39837DF1E4DA445A8C0B3885C503F6B3E23@shsmsx102.ccr.corp.intel.com> <15A804AED7A7D734.10316@groups.io> In-Reply-To: <15A804AED7A7D734.10316@groups.io> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I withdraw this patch because multiple instances of WinHost.exe may change the same FV_RECOVERY.FD file for NV variable modification. Supporting multiple instances of WinHost.exe is not proper and may introduce potential issues. > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Friday, June 14, 2019 4:54 PM > To: Yao, Jiewen ; devel@edk2.groups.io > Cc: Justen, Jordan L ; Andrew Fish > ; Liu, Zhiguang ; Wu, Hao A > > Subject: Re: [edk2-devel] [PATCH] EmulatorPkg/Win: support running > multiple WinHost.exe >=20 > I agree this patch only removes the limitation that blocks running 2nd > instance of WinHost.exe. > I will investigate the impact on variable storage part. >=20 > > -----Original Message----- > > From: Yao, Jiewen > > Sent: Friday, June 14, 2019 4:44 PM > > 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 > > > > Hi > > It is good to support 2nd instance. > > > > But the risk is that 2 instances may access to the same variable regio= n. > > > > 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 > > > > > > 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 > > > > > > 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(-) > > > > > > 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