From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] x86/boot: Fix BIOS memory corruption on certain IBM systems Date: Wed, 04 Dec 2013 18:59:25 +0000 Message-ID: References: <529F16450200007800109EC4@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VoHfe-00054H-Ay for xen-devel@lists.xenproject.org; Wed, 04 Dec 2013 18:59:38 +0000 Received: by mail-we0-f171.google.com with SMTP id q58so15504270wes.16 for ; Wed, 04 Dec 2013 10:59:36 -0800 (PST) In-Reply-To: <529F16450200007800109EC4@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Andrew Cooper , Keir Fraser Cc: George Dunlap , xen-devel List-Id: xen-devel@lists.xenproject.org On 04/12/2013 10:47, "Jan Beulich" wrote: >>>> * Declare that our target operating mode is long mode. >>>> * Initialise 32-bit registers since some buggy BIOSes depend on >>>> it. >>>> */ >>>> + xor %ecx,%ecx >>>> + xor %edx,%edx >>>> + xor %esi,%esi >>>> + xor %edi,%edi >>>> + xor %ebp,%ebp >>>> movl $0xec00,%eax # declare target operating mode >>>> movl $0x0002,%ebx # long mode >>>> int $0x15 >>> ... I can't really see the value of the change here: If we're to >>> work around theoretical BIOS bugs, we'd need to do this prior to >>> each BIOS call. That's surely overkill. Therefore let's focus on >>> what is needed to work around _known_ BIOS bugs. >> >> I admit that I was leaning on the cautious side with these changes. >> >> I can take them out if you think that would be better, but given this >> int was already flagged as buggy in some BIOSes, and we have found >> another case, I think covering all GPRs is the safer option. > > As said - I doubt this would help much. I'd really prefer at least this > part of the patch to be taken out again. Unless Keir is specifically of > the opposite opinion... The change does kind of fit with the comment immediately above though. Overall I don't really care that much either way. -- Keir