Re: [Xen-devel] [RFC] x86/boot: Don't use BDA value if it's suspiciously small

2016-08-26 Thread Sylvain Munaut
On Fri, Aug 26, 2016 at 5:10 PM, Jan Beulich wrote: On 26.08.16 at 16:53, wrote: >>> I'm not sure. I'd like to see the current logic altered as little as >>> possible, and what you suggest above is more than that minimum. >> >> Then, that would be more like the very first patch I posted but

Re: [Xen-devel] [RFC] x86/boot: Don't use BDA value if it's suspiciously small

2016-08-26 Thread Jan Beulich
>>> On 26.08.16 at 16:53, wrote: >> I'm not sure. I'd like to see the current logic altered as little as >> possible, and what you suggest above is more than that minimum. > > Then, that would be more like the very first patch I posted but just > change the 0x1000 low limit to 0x4000. I thought

Re: [Xen-devel] [RFC] x86/boot: Don't use BDA value if it's suspiciously small

2016-08-26 Thread Sylvain Munaut
> I'm not sure. I'd like to see the current logic altered as little as > possible, and what you suggest above is more than that minimum. Then, that would be more like the very first patch I posted but just change the 0x1000 low limit to 0x4000. > So another question: Can you > detect whether we

Re: [Xen-devel] [RFC] x86/boot: Don't use BDA value if it's suspiciously small

2016-08-26 Thread Jan Beulich
>>> On 26.08.16 at 16:21, wrote: > Hi, > > >> At the very least we shouldn't overlap with the BDA (starting at >> 0040: and iirc covering up to 256 bytes, which is why DOS >> never used any memory below 0050:). > > Mmm, I misread the assembly the low limit applied to the multi boot > va

Re: [Xen-devel] [RFC] x86/boot: Don't use BDA value if it's suspiciously small

2016-08-26 Thread Sylvain Munaut
Hi, > At the very least we shouldn't overlap with the BDA (starting at > 0040: and iirc covering up to 256 bytes, which is why DOS > never used any memory below 0050:). Mmm, I misread the assembly the low limit applied to the multi boot value was 0x4000 and not 0x1000 ... Would this log

Re: [Xen-devel] [RFC] x86/boot: Don't use BDA value if it's suspiciously small

2016-08-26 Thread Jan Beulich
>>> On 26.08.16 at 15:10, wrote: > Hi, > > On Fri, Aug 26, 2016 at 3:06 PM, Jan Beulich wrote: > On 26.08.16 at 11:09, wrote: >>> --- a/xen/arch/x86/boot/head.S >>> +++ b/xen/arch/x86/boot/head.S >>> @@ -108,6 +108,8 @@ __start: >>> shl $10-4,%edx >>> cmp %eax,%edx

Re: [Xen-devel] [RFC] x86/boot: Don't use BDA value if it's suspiciously small

2016-08-26 Thread Sylvain Munaut
Hi, On Fri, Aug 26, 2016 at 3:06 PM, Jan Beulich wrote: On 26.08.16 at 11:09, wrote: >> --- a/xen/arch/x86/boot/head.S >> +++ b/xen/arch/x86/boot/head.S >> @@ -108,6 +108,8 @@ __start: >> shl $10-4,%edx >> cmp %eax,%edx /* compare with BDA value */ >>

Re: [Xen-devel] [RFC] x86/boot: Don't use BDA value if it's suspiciously small

2016-08-26 Thread Jan Beulich
>>> On 26.08.16 at 11:09, wrote: > --- a/xen/arch/x86/boot/head.S > +++ b/xen/arch/x86/boot/head.S > @@ -108,6 +108,8 @@ __start: > shl $10-4,%edx > cmp %eax,%edx /* compare with BDA value */ > cmovb %edx,%eax /* and use the smaller */ > +

Re: [Xen-devel] [RFC] x86/boot: Don't use BDA value if it's suspiciously small

2016-08-26 Thread Andrew Cooper
On 26/08/16 10:09, Sylvain Munaut wrote: If we have an multiboot value and the value we got from the BDA seems too small, use the safe one Signed-off-by: Sylvain Munaut --- I need this when using linux-as-a-bootloader (i.e. kexec into Xen) because the BDA is just zero at that point (not entirel

[Xen-devel] [RFC] x86/boot: Don't use BDA value if it's suspiciously small

2016-08-26 Thread Sylvain Munaut
If we have an multiboot value and the value we got from the BDA seems too small, use the safe one Signed-off-by: Sylvain Munaut --- I need this when using linux-as-a-bootloader (i.e. kexec into Xen) because the BDA is just zero at that point (not entirely sure why tbh). This is the simplest patc