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: ray.ni@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Fri, 14 Jun 2019 01:53:39 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2019 01:53:39 -0700 X-ExtLoop1: 1 Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 14 Jun 2019 01:53:39 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) 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:53:38 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 14 Jun 2019 01:53:38 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.185]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.236]) with mapi id 14.03.0439.000; Fri, 14 Jun 2019 16:53:36 +0800 From: "Ni, Ray" 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 Thread-Topic: [edk2-devel] [PATCH] EmulatorPkg/Win: support running multiple WinHost.exe Thread-Index: AQHVIoqFsZ34vBR/J0a0OxFVnd8nJKaa1TLQgAACdDA= Date: Fri, 14 Jun 2019 08:53:36 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C1C6AF8@SHSMSX104.ccr.corp.intel.com> References: <20190614082327.80128-1-ray.ni@intel.com> <74D8A39837DF1E4DA445A8C0B3885C503F6B3E23@shsmsx102.ccr.corp.intel.com> In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503F6B3E23@shsmsx102.ccr.corp.intel.com> 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 agree this patch only removes the limitation that blocks running 2nd inst= ance of WinHost.exe. I will investigate the impact on variable storage part. > -----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 >=20 > Hi > It is good to support 2nd instance. >=20 > But the risk is that 2 instances may access to the same variable region. >=20 > It might cause unpredictable behavior in the variable driver later. >=20 > Do we have investigate that impact? >=20 > Thank you > Yao Jiewen >=20 >=20 > > -----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