From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=julien.grall@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 02F012117D75A for ; Wed, 23 Jan 2019 04:15:55 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id l9so2131739wrt.13 for ; Wed, 23 Jan 2019 04:15:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kD5UnwcNThi7moCbdIe5w7Q+vnO653oNNkZpdzBVE3k=; b=I3cD7npJV5suz4gaNskuTsZEQraa9LceBVvYgGFZJHGJqntb4O508a0sPyIx32G52x o35zCsRmOQQY+S+wVEsnda3C6+RgIzkYzM2OR0sYehibHV0IV9ftSiMprjHi1ucsez8A brwzf/5N+EVAy499Dd4z7ydINb07t7A4+RV7Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kD5UnwcNThi7moCbdIe5w7Q+vnO653oNNkZpdzBVE3k=; b=oj8Pl9KcrNnV6kAAAgRijLxibQWDjHEoK3uPXKVyj1XK0kk/hEHS7MrN7Gu0Hm2/xj sLeAHv7y+ZmB5OwuPx6wMr7haDaP4HUjFcqrtX3dknPd+rrELTTKp/wSuFNp5ccjXHV0 Z/IB9l2iqQH8FG6bPqrsuydRmtdTxjLMUwHT2k04QKDb4F/IJ3Re1HvPHMw3qqgABSEF AUFHI1DfLnJCkZWbm/yofXLJwX6LsKWv8JaN0bTxNwsNIC/a47bcjG+2eqi52aJc243y XTkkSZ3mhh/anAmefNGUolTwmqbUs+u2UYZ/R+yuYElu+7dd3qW9corpFqvrDN9QI3d5 0vOg== X-Gm-Message-State: AJcUukfox1B3O+QmEotbPDZZ7hRubOrL1vP5Je3qImr1T3accBHwQ1UX Zs6sJKqZyAGtl+/d1Uv/ReU0pwPy81Q= X-Google-Smtp-Source: ALg8bN72fx7+TanV4RejYpgCopWoQtynkB+2PBbVJIjiH02UhpW3qdLTKPoCpWSuSCiQG+Q/ybublQ== X-Received: by 2002:a5d:6b09:: with SMTP id v9mr2616164wrw.304.1548245754056; Wed, 23 Jan 2019 04:15:54 -0800 (PST) Received: from ?IPv6:::1? ([206.189.23.0]) by smtp.gmail.com with ESMTPSA id z9sm100678125wrs.63.2019.01.23.04.15.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 04:15:53 -0800 (PST) To: "Zeng, Star" , Ard Biesheuvel Cc: "edk2-devel@lists.01.org" , Laszlo Ersek 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> From: Julien Grall Message-ID: <0706b59a-cf39-04ea-ff78-e4b6b0275d57@linaro.org> Date: Wed, 23 Jan 2019 12:15:51 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <308fdc60-d9ba-4852-31da-c18cbcd22ebf@intel.com> 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 12:15:56 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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 Many thanks to you, Ard and Laszlo for the feedback. Best regards, -- Julien Grall