From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: EFI GetNextVariableName crashes when running under Xen, but not under Linux. efi-rs=0 works. No memmap issues Date: Wed, 28 Jan 2015 08:40:44 +0000 Message-ID: <54C8AE9C020000780005A31D@mail.emea.novell.com> References: <20150126162753.GA1812@l.oracle.com> <54C680C90200007800059907@mail.emea.novell.com> <20150127000247.GU3473@olila.local.net-space.pl> <54C6DCB7.3060206@citrix.com> <54C752460200007800059B8B@mail.emea.novell.com> <20150127142605.GA8814@l.oracle.com> <54C7C8110200007800059EE4@mail.emea.novell.com> <20150127182028.GB3678@x230.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YGOB5-0005oA-Pu for xen-devel@lists.xenproject.org; Wed, 28 Jan 2015 08:40:47 +0000 In-Reply-To: <20150127182028.GB3678@x230.dumpdata.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: Andrew Cooper , Daniel Kiper , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 27.01.15 at 19:20, wrote: > On Tue, Jan 27, 2015 at 04:17:05PM +0000, Jan Beulich wrote: >> Again - apart from mapping the range, did you also make sure it >> didn't get passed to the allocator (and hence couldn't have got >> overwritten)? > > Yes, see patch: Oh, sorry, I must have not looked closely enough. > Also see attached of the code with what Linux sees and what Xen sees > (Linux first). Indeed this 8b: 44 38 2d c2 10 00 00 cmp %r13b,0x10c2(%rip) # 0x115 [01 01 00 00 00 00 00 00][00 01 00 00 00 00 00 00 92: 75 12 jne 0xa6 causes the code in question to be skipped under Linux. > I am thinking that the firmware is under the assumption > that if SetVirtualAddressMap is not called then you MUST be still > before ExitBootServices has been called. Going to verify that by > implementing an GetNextVariableName before calling ExitBootServices) Not sure how exactly you envision to do this, but I'm having a hard time seeing how this would prove anything, in particular because calling runtime services functions prior to exiting boot services must be possible anyway. And iirc you had already tried calling the function prior to doing much else (namely, prior to loading Dom0), and it still crashed? Did you investigate when the memory type of that region changes (in an earlier mail you said dmem from the EFI shell reported it as Boot Services, albeit it's not fully clear what that tagging is supposed to be telling us)? Jan