Re: [uml-user] 64-bit UML with 32-bit root

2015-09-12 Thread Richard Weinberger
On Tue, Sep 1, 2015 at 8:32 AM, Antoine Martin  wrote:
> On 27/08/15 20:14, Mark Morgan Lloyd wrote:
>> The (unofficial?) FAQ at http://uml.devloop.org.uk/faq.html implies that
>> it is possible to build UML on a 64-bit system to run a 32-bit guest.
> You can build a 32-bit *kernel* from a 64-bit host.
>> The best that I can manage on e.g. Debian "Jessie" x86-64 is to use
>> make ARCH=um SUBARCH=i386  which results in a 32-bit ELF to presumably
>> run a 32-bit guest. Prerequisites appear to be the multiarch-support
>>   and gcc-multiarch packages.
>>
>> Is it possible to build UML as a 64-bit binary, but to run a 32-bit
>> guest?
> AFAIK, no.
>>  What I'd like to be able to do is to put it on a system which has
>> no multiarch stuff, i.e. to completely sequester the 32-bit libraries
>> etc. within the guest filesystem.
>>
>> [Background: I used UML fairly heavily in the 2.4 era, but I'm a
>> comparative newcomer to x86-64. I'm trying to avoid overuse of
>> multi-arch stuff.]
> AFAIK, there is no multiarch support in in the UML *kernel*.

Yes. 64bit UML has no ia32 emulation like x86_64 has.

-- 
Thanks,
//richard

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] 64-bit UML with 32-bit root

2015-08-31 Thread Antoine Martin
On 27/08/15 20:14, Mark Morgan Lloyd wrote:
> The (unofficial?) FAQ at http://uml.devloop.org.uk/faq.html implies that 
> it is possible to build UML on a 64-bit system to run a 32-bit guest.
You can build a 32-bit *kernel* from a 64-bit host.
> The best that I can manage on e.g. Debian "Jessie" x86-64 is to use 
> make ARCH=um SUBARCH=i386  which results in a 32-bit ELF to presumably 
> run a 32-bit guest. Prerequisites appear to be the multiarch-support 
>   and gcc-multiarch packages.
>
> Is it possible to build UML as a 64-bit binary, but to run a 32-bit 
> guest?
AFAIK, no.
>  What I'd like to be able to do is to put it on a system which has 
> no multiarch stuff, i.e. to completely sequester the 32-bit libraries 
> etc. within the guest filesystem.
>
> [Background: I used UML fairly heavily in the 2.4 era, but I'm a 
> comparative newcomer to x86-64. I'm trying to avoid overuse of 
> multi-arch stuff.]
AFAIK, there is no multiarch support in in the UML *kernel*.

Cheers
Antoine

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] 64-bit UML with 32-bit root

2015-08-27 Thread Mark Morgan Lloyd
Michael Richardson wrote:
> Mark Morgan Lloyd  wrote:
> > The (unofficial?) FAQ at http://uml.devloop.org.uk/faq.html implies that
> > it is possible to build UML on a 64-bit system to run a 32-bit guest.
> 
> > The best that I can manage on e.g. Debian "Jessie" x86-64 is to use
> > make ARCH=um SUBARCH=i386  which results in a 32-bit ELF to presumably
> > run a 32-bit guest. Prerequisites appear to be the multiarch-support
> > and gcc-multiarch packages.
> 
> > Is it possible to build UML as a 64-bit binary, but to run a 32-bit
> > guest? What I'd like to be able to do is to put it on a system which has
> > no multiarch stuff, i.e. to completely sequester the 32-bit libraries
> > etc. within the guest filesystem.
> 
> You could try running that 64-bit kernel with a 32-bit binary.
> Put a statically linked 32-bit busybox in the guest file system, or use a
> 32-bit Debian initrd as a test case..
> 
> I suspect that it won't work because the enclosing ("dom0") kernel will have
> set the process to be a 64-bit process to run your kernel, and thus I think
> the entire address space will be 64-bit.

[Nod] Probably fragile at best.

> > [Background: I used UML fairly heavily in the 2.4 era, but I'm a
> > comparative newcomer to x86-64. I'm trying to avoid overuse of
> > multi-arch stuff.]
> 
> I am not sure why you are trying to avoid this, unless you are trying to run
> the results on a system that doesn't have multi-arch.

Trying to keep systems as clean as possible. I had little option but to 
install user-level multi-arch for Acrobat Reader, and there's always 
going to be oddities like Ken Thompson's APL that will never get ported 
to 64-bit, but knowing how robust UML is /if/ it had handled the 
shimming it would have been a very attractive alternative.

> (I'm fighting/putting-off replacing a Fedora10 build system with a Jessie
> system, in great part because the appliance system needs a 64-bit kernel now,
> but my build environment is 32-bit, and not-multiarch capable. Build-root
> is the proper answer)

Jessie's got the expected number of Debianisms in it, even on something 
as ablutions-standard as i386. We're considering looking at Fedora...

Anyway, thanks everybody for the comments, which if nothing else have 
confirmed that while I'd misinterpreted the original text I'd not 
overlooked anything obvious when building kernels etc.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] 64-bit UML with 32-bit root

2015-08-27 Thread Michael Richardson

Mark Morgan Lloyd  wrote:
> The (unofficial?) FAQ at http://uml.devloop.org.uk/faq.html implies that
> it is possible to build UML on a 64-bit system to run a 32-bit guest.

> The best that I can manage on e.g. Debian "Jessie" x86-64 is to use
> make ARCH=um SUBARCH=i386  which results in a 32-bit ELF to presumably
> run a 32-bit guest. Prerequisites appear to be the multiarch-support
> and gcc-multiarch packages.

> Is it possible to build UML as a 64-bit binary, but to run a 32-bit
> guest? What I'd like to be able to do is to put it on a system which has
> no multiarch stuff, i.e. to completely sequester the 32-bit libraries
> etc. within the guest filesystem.

You could try running that 64-bit kernel with a 32-bit binary.
Put a statically linked 32-bit busybox in the guest file system, or use a
32-bit Debian initrd as a test case..

I suspect that it won't work because the enclosing ("dom0") kernel will have
set the process to be a 64-bit process to run your kernel, and thus I think
the entire address space will be 64-bit.

> [Background: I used UML fairly heavily in the 2.4 era, but I'm a
> comparative newcomer to x86-64. I'm trying to avoid overuse of
> multi-arch stuff.]

I am not sure why you are trying to avoid this, unless you are trying to run
the results on a system that doesn't have multi-arch.

(I'm fighting/putting-off replacing a Fedora10 build system with a Jessie
system, in great part because the appliance system needs a 64-bit kernel now,
but my build environment is 32-bit, and not-multiarch capable. Build-root
is the proper answer)

--
]   Never tell me the odds! | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works| network architect  [
] m...@sandelman.ca  http://www.sandelman.ca/|   ruby on rails[


--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


Re: [uml-user] 64-bit UML with 32-bit root

2015-08-27 Thread Julien Iguchi-Cartigny
On 08/27/2015 03:14 PM, Mark Morgan Lloyd wrote:
> The (unofficial?) FAQ at http://uml.devloop.org.uk/faq.html implies that 
> it is possible to build UML on a 64-bit system to run a 32-bit guest.
> 
> The best that I can manage on e.g. Debian "Jessie" x86-64 is to use 
> make ARCH=um SUBARCH=i386  which results in a 32-bit ELF to presumably 
> run a 32-bit guest. Prerequisites appear to be the multiarch-support 
>   and gcc-multiarch packages.
> 
> Is it possible to build UML as a 64-bit binary, but to run a 32-bit 
> guest? What I'd like to be able to do is to put it on a system which has 
> no multiarch stuff, i.e. to completely sequester the 32-bit libraries 
> etc. within the guest filesystem.
> 
> [Background: I used UML fairly heavily in the 2.4 era, but I'm a 
> comparative newcomer to x86-64. I'm trying to avoid overuse of 
> multi-arch stuff.]
> 

UML 32 bits works on 64 bits because the 32 bits ISA is available. I
don't think it is possible on the other way (albeit pure emulation).

J.

--
___
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user