xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: Paul Durrant <Paul.Durrant@citrix.com>,
	'Jan Beulich' <JBeulich@suse.com>
Cc: Juergen Gross <jgross@suse.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"Julien Grall (julien.grall@arm.com)" <julien.grall@arm.com>,
	'Boris Ostrovsky' <boris.ostrovsky@oracle.com>,
	"xen-devel(xen-devel@lists.xenproject.org)"
	<xen-devel@lists.xenproject.org>
Subject: Re: debian stretch dom0 + xen 4.9 fails to boot
Date: Mon, 12 Jun 2017 08:14:36 +0000	[thread overview]
Message-ID: <86a3251e9ac44a2bb2df23862e458ee0@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <c394e22eb2d24f379e34b402b69c3bb6@AMSPEX02CL03.citrite.net>

> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of
> Paul Durrant
> Sent: 09 June 2017 16:47
> To: 'Jan Beulich' <JBeulich@suse.com>
> Cc: Juergen Gross <jgross@suse.com>; Andrew Cooper
> <Andrew.Cooper3@citrix.com>; Julien Grall (julien.grall@arm.com)
> <julien.grall@arm.com>; 'Boris Ostrovsky' <boris.ostrovsky@oracle.com>;
> xen-devel(xen-devel@lists.xenproject.org) <xen-
> devel@lists.xenproject.org>
> Subject: Re: [Xen-devel] debian stretch dom0 + xen 4.9 fails to boot
> 
> > -----Original Message-----
> > From: Jan Beulich [mailto:JBeulich@suse.com]
> > Sent: 09 June 2017 16:41
> > To: Paul Durrant <Paul.Durrant@citrix.com>
> > Cc: Julien Grall (julien.grall@arm.com) <julien.grall@arm.com>; Andrew
> > Cooper <Andrew.Cooper3@citrix.com>; xen-devel(xen-
> > devel@lists.xenproject.org) <xen-devel@lists.xenproject.org>; 'Boris
> > Ostrovsky' <boris.ostrovsky@oracle.com>; Juergen Gross
> > <jgross@suse.com>
> > Subject: RE: [Xen-devel] debian stretch dom0 + xen 4.9 fails to boot
> >
> > >>> On 09.06.17 at 17:14, <Paul.Durrant@citrix.com> wrote:
> > > I've characterised the issue some more and it appears to be an overflow
> > > inside the int13 handler if es:bx is less than 512 bytes below a 4k
> boundary.
> > > I modified the code to use a hardcoded segment, which I set at 0x6000,
> and
> > > all values of bx up to 0xe00 resulted in a good MBR signature. Values
> above
> > > 0xe00 but below 0xe20 resulted in the buffer not being identified as a
> valid
> > > MBR (I guess because the 0xAA55 fell off) and values of bx above 0xe20
> > > resulted in either a hang (sometimes with a black screen) or a reboot.
> > > This led me to believe that backing out all my debug code and adding a
> > > '.align 512' just before the definition of boot_edd_info should result in a
> > > successful boot. Alas this appears not to be the case... I seem to need at
> > > least 2k alignment. I wonder whether it may be more robust to go for 4k
> > > alignment though.
> >
> > At least until we've seen (and merged) Jürgen's further trampoline
> > adjustments, we need to be careful with growing its overall size.
> > Memory below 1Mb is known to be scarce specifically on some EFI
> > systems, and we're currently still allocating space for all of the
> > trampoline instead of just its permanent part. Even on non-EFI
> > systems I'd prefer the trampoline to remain as small as possible.
> >
> > With what you say about the requirements this buggy BIOS has
> > I wonder whether we couldn't help ourselves by doing I/O to
> > other than boot_edd_info. Especially if we did the EDD stuff last
> > (rather than before video), a good portion of the boot time only
> > trampoline space will no longer be needed.
> 
> I think that would be sensible, but I was looking for the simplest
> fix/workaround possible for 4.9 and setting the alignment seems to it.
> 
> >
> > Otoh I wonder where a system this buggy shouldn't be declared
> > unusable (until a suitable BIOS update becomes available). Did
> > you check what constraints Linux places on the buffer used for
> > I/O? IOW can you judge whether bare metal Linux just happens
> > to work (just like older Xen did), or has been fixed to cope with
> > such a situation?
> >
> 
> I'll go have a look and the linux edd code. I'm also trying a BIOS update (which
> is proving to be trickier than I thought as it seems to have killed networking in
> some weird way).

Looking at the code in arch/x86/boot/edd.c in Linux, it sector aligns the buffer into which it reads the MBR and the sector size is pulled from the EDD which means, I believe, that the MBR read on the skull canyon would be 4k aligned.

What do you think it best to do for Xen 4.9? Hardcoding a 4k alignment is clearly easy and would work around this BIOS issue but, as you say, it does grow the image. Reverting Juergen's patch also works round the issue, but that is more by luck. Re-working the code is preferable, but I guess it's too late to introduce such code-churn in 4.9.

  Paul

> 
>   Paul
> 
> > Jan
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-06-12  8:14 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06 14:32 debian stretch dom0 + xen 4.9 fails to boot Paul Durrant
2017-06-06 15:11 ` Jan Beulich
2017-06-06 15:51   ` Paul Durrant
2017-06-06 16:28     ` Paul Durrant
2017-06-06 17:00       ` Boris Ostrovsky
2017-06-07  8:07         ` Jan Beulich
2017-06-07  8:09           ` Paul Durrant
2017-06-07  8:19             ` Paul Durrant
2017-06-07 14:05           ` Boris Ostrovsky
2017-06-07  8:07         ` Paul Durrant
2017-06-07  8:27           ` Jan Beulich
     [not found]           ` <5937D4FF02000078001602F6@suse.com>
2017-06-07  9:03             ` Juergen Gross
2017-06-07  9:05               ` Paul Durrant
2017-06-07  9:09                 ` Andrew Cooper
2017-06-07 10:36                   ` Paul Durrant
2017-06-07 11:06                     ` Paul Durrant
2017-06-07 11:57                       ` Juergen Gross
2017-06-07 12:02                         ` Paul Durrant
2017-06-07 12:13                           ` Juergen Gross
2017-06-07 12:19                           ` Jan Beulich
2017-06-07 12:26                             ` Paul Durrant
2017-06-07 12:34                               ` Jan Beulich
2017-06-07 11:50                     ` Jan Beulich
2017-06-07 11:55                       ` Paul Durrant
2017-06-07 12:00                         ` Jan Beulich
2017-06-07 12:46                           ` Paul Durrant
2017-06-07 12:55                             ` Jan Beulich
2017-06-07 15:06                               ` Paul Durrant
2017-06-07 15:33                                 ` Jan Beulich
2017-06-07 15:40                                   ` Paul Durrant
2017-06-07 15:52                                     ` Jan Beulich
2017-06-08 12:42                                       ` Paul Durrant
2017-06-08 12:46                                         ` Juergen Gross
2017-06-08 13:18                                         ` Jan Beulich
2017-06-08 13:24                                           ` Paul Durrant
2017-06-09 12:19                                           ` Paul Durrant
2017-06-09 13:05                                             ` Jan Beulich
2017-06-09 13:52                                               ` Boris Ostrovsky
2017-06-09 15:14                                                 ` Paul Durrant
2017-06-09 15:41                                                   ` Jan Beulich
2017-06-09 15:47                                                     ` Paul Durrant
2017-06-09 15:58                                                       ` Jan Beulich
2017-06-12  8:14                                                       ` Paul Durrant [this message]
2017-06-12 10:40                                                         ` Jan Beulich
2017-06-12 10:44                                                           ` Paul Durrant
2017-06-12 10:53                                                             ` Paul Durrant
2017-06-12 11:12                                                               ` Jan Beulich
2017-06-12 12:05                                                                 ` Paul Durrant
2017-06-12 12:25                                                                   ` Paul Durrant
2017-06-12 13:54                                                                   ` Jan Beulich
2017-06-12 14:28                                                                     ` Paul Durrant
2017-06-12 14:43                                                                       ` Paul Durrant
2017-06-12 15:03                                                                         ` Paul Durrant
2017-06-12 15:07                                                                         ` Jan Beulich
2017-06-12 15:21                                                                           ` Paul Durrant
2017-06-06 17:40     ` Julien Grall
2017-06-07  8:05       ` Paul Durrant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86a3251e9ac44a2bb2df23862e458ee0@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=julien.grall@arm.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).