From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EA05C211B63F7 for ; Wed, 23 Jan 2019 06:31:32 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2019 06:31:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,511,1539673200"; d="scan'208";a="137062509" Received: from shzintpr03.sh.intel.com (HELO [10.253.24.26]) ([10.239.4.100]) by fmsmga002.fm.intel.com with ESMTP; 23 Jan 2019 06:21:27 -0800 To: Julien Grall , Ard Biesheuvel Cc: "edk2-devel@lists.01.org" , Laszlo Ersek , star.zeng@intel.com References: <1547479196-40248-1-git-send-email-star.zeng@intel.com> <1547479196-40248-11-git-send-email-star.zeng@intel.com> <7da72765-785c-2499-eefd-d887a946c946@redhat.com> <6263ebd0-4c6a-97bd-7e04-c4f26ec21aa2@linaro.org> <01237fea-c440-a810-eb51-45646f26238e@intel.com> <1a2a4290-c22c-e42d-cb66-a4ec3e3cf90a@linaro.org> <806a1c89-90cd-84f0-5bd8-26b351f59556@intel.com> <308fdc60-d9ba-4852-31da-c18cbcd22ebf@intel.com> <0706b59a-cf39-04ea-ff78-e4b6b0275d57@linaro.org> From: "Zeng, Star" Message-ID: <573ec8c6-c160-cb26-04ee-4652bbc937e4@intel.com> Date: Wed, 23 Jan 2019 22:20:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <0706b59a-cf39-04ea-ff78-e4b6b0275d57@linaro.org> Subject: Re: [PATCH V2 10/15] ArmVirtXen: Use merged variable driver for emulated NV mode X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2019 14:31:33 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit On 2019/1/23 20:15, Julien Grall wrote: > On 23/01/2019 01:41, Zeng, Star wrote: >> Hi Julien, > > Hi Star, > >> On 2019/1/22 12:30, Zeng, Star wrote: >>> On 2019/1/22 3:40, Ard Biesheuvel wrote: >>>> On Mon, 21 Jan 2019 at 14:36, Julien Grall >>>> wrote: >>>> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c >>>> b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c >>>> index a8bb9cf25ebd..adaf6ccb48b0 100644 >>>> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c >>>> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c >>>> @@ -236,14 +236,16 @@ VariableClassAddressChangeEvent ( >>>>   { >>>>     UINTN          Index; >>>> >>>> -  EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->GetBlockSize); >>>> -  EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->GetPhysicalAddress); >>>> -  EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->GetAttributes); >>>> -  EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->SetAttributes); >>>> -  EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->Read); >>>> -  EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->Write); >>>> -  EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->EraseBlocks); >>>> -  EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance); >>>> +  if (mVariableModuleGlobal->FvbInstance != NULL) { >>>> +    EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->GetBlockSize); >>>> +    EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->GetPhysicalAddress); >>>> +    EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->GetAttributes); >>>> +    EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->SetAttributes); >>>> +    EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->Read); >>>> +    EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->Write); >>>> +    EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance->EraseBlocks); >>>> +    EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->FvbInstance); >>>> +  } >>>>     EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->PlatformLangCodes); >>>>     EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->LangCodes); >>>>     EfiConvertPointer (0x0, (VOID **) >>>> &mVariableModuleGlobal->PlatformLang); >>> >>> Thanks Ard. I integrated it into the patch 10 of V4. >>> Repo: git@github.com:lzeng14/edk2.git >>> Branch: MergedVariableDriver_EmuNvMode_V4 >>> >>> Julien, could you help take a try? >> >> Sorry for a little push. Are you able to have a quick try? :) > > Sorry for the late, I didn't have time yesterday to test at it. > > I tried the new branch and was able to boot a Linux guest using UEFI. > > Feel free to add my tags to the series: > > Tested-by: Julien Grall > Acked-by: Julien Grall It is really very helpful to make the patch higher quality. > > Many thanks to you, Ard and Laszlo for the feedback. Thanks all of you. Star > > Best regards, >