qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] ELF load command alignment not page-aligned
@ 2019-09-16 21:06 Niccolò Belli
  2019-09-17 10:33 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 7+ messages in thread
From: Niccolò Belli @ 2019-09-16 21:06 UTC (permalink / raw)
  To: qemu-devel

Hi,
I'm trying to use qemu-user-static to chroot into a foreign amd64 
environment from my ppc64le host.
The host has a 64k page size, while x86_64 uses 4k.
I get those errors while loading shared libraries: "ELF load command 
alignment not page-aligned"
Is there any way to fix this? I cannot simply switch to 4k page size 
because my btrfs filesystem won't mount anymore (it requires the 
sectorsize to be equal to the page size).

Bests,
Niccolo'


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ELF load command alignment not page-aligned
  2019-09-16 21:06 [Qemu-devel] ELF load command alignment not page-aligned Niccolò Belli
@ 2019-09-17 10:33 ` Philippe Mathieu-Daudé
  2019-09-17 10:40   ` Laurent Vivier
  2019-09-17 11:40   ` Peter Maydell
  0 siblings, 2 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-17 10:33 UTC (permalink / raw)
  To: Niccolò Belli, qemu-devel, open list:sPAPR, Laurent Vivier

Cc'ing PPC folks and Laurent.

On 9/16/19 11:06 PM, Niccolò Belli wrote:
> Hi,
> I'm trying to use qemu-user-static to chroot into a foreign amd64
> environment from my ppc64le host.
> The host has a 64k page size, while x86_64 uses 4k.
> I get those errors while loading shared libraries: "ELF load command
> alignment not page-aligned"
> Is there any way to fix this? I cannot simply switch to 4k page size
> because my btrfs filesystem won't mount anymore (it requires the
> sectorsize to be equal to the page size).
> 
> Bests,
> Niccolo'
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ELF load command alignment not page-aligned
  2019-09-17 10:33 ` Philippe Mathieu-Daudé
@ 2019-09-17 10:40   ` Laurent Vivier
  2019-09-17 11:09     ` Niccolò Belli
  2019-09-17 11:40   ` Peter Maydell
  1 sibling, 1 reply; 7+ messages in thread
From: Laurent Vivier @ 2019-09-17 10:40 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé,
	Niccolò Belli, qemu-devel, open list:sPAPR

On 17/09/2019 12:33, Philippe Mathieu-Daudé wrote:
> Cc'ing PPC folks and Laurent.
> 
> On 9/16/19 11:06 PM, Niccolò Belli wrote:
>> Hi,
>> I'm trying to use qemu-user-static to chroot into a foreign amd64
>> environment from my ppc64le host.
>> The host has a 64k page size, while x86_64 uses 4k.
>> I get those errors while loading shared libraries: "ELF load command
>> alignment not page-aligned"
>> Is there any way to fix this? I cannot simply switch to 4k page size
>> because my btrfs filesystem won't mount anymore (it requires the
>> sectorsize to be equal to the page size).

Which version of qemu do you use?

Last time I tested that on my PoweMac G5 (ppc64, qemu-4.0), it worked.

Thanks,
Laurent


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ELF load command alignment not page-aligned
  2019-09-17 10:40   ` Laurent Vivier
@ 2019-09-17 11:09     ` Niccolò Belli
  2019-09-17 11:35       ` Laurent Vivier
  0 siblings, 1 reply; 7+ messages in thread
From: Niccolò Belli @ 2019-09-17 11:09 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: open list:sPAPR, Philippe Mathieu-Daudé, qemu-devel, Qemu-devel

Il 2019-09-17 12:40 Laurent Vivier ha scritto:
> Which version of qemu do you use?
> 
> Last time I tested that on my PoweMac G5 (ppc64, qemu-4.0), it worked.

I'm using 4.1, but I also tried 3.1.1.

I can get some binaries to work, but lots of them won't.

Even debootstrapping a Debian system proves to be an issue: 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940183

So far I've managed to debootstrap only a "minbase" stretch.
If I chroot and try to install something like qt5-default it won't work 
anymore.

Thanks,
Niccolo'


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ELF load command alignment not page-aligned
  2019-09-17 11:09     ` Niccolò Belli
@ 2019-09-17 11:35       ` Laurent Vivier
  0 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2019-09-17 11:35 UTC (permalink / raw)
  To: Niccolò Belli
  Cc: open list:sPAPR, Philippe Mathieu-Daudé, qemu-devel, Qemu-devel

On 17/09/2019 13:09, Niccolò Belli wrote:
> Il 2019-09-17 12:40 Laurent Vivier ha scritto:
>> Which version of qemu do you use?
>>
>> Last time I tested that on my PoweMac G5 (ppc64, qemu-4.0), it worked.
> 
> I'm using 4.1, but I also tried 3.1.1.
> 
> I can get some binaries to work, but lots of them won't.
> 
> Even debootstrapping a Debian system proves to be an issue:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940183
> 
> So far I've managed to debootstrap only a "minbase" stretch.
> If I chroot and try to install something like qt5-default it won't work
> anymore.

My test is to debootstrap a minbase stretch and then to run LTP inside
the chroot. It's why I didn't see the problem.

I'm going to have a look to the bugreport, but I'm not sure it could be
fixed.

Thanks,
Laurent


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ELF load command alignment not page-aligned
  2019-09-17 10:33 ` Philippe Mathieu-Daudé
  2019-09-17 10:40   ` Laurent Vivier
@ 2019-09-17 11:40   ` Peter Maydell
  2019-09-17 19:12     ` Richard Henderson
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2019-09-17 11:40 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Laurent Vivier, Richard Henderson, Niccolò Belli,
	open list:sPAPR, QEMU Developers

On Tue, 17 Sep 2019 at 11:49, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> Cc'ing PPC folks and Laurent.
>
> On 9/16/19 11:06 PM, Niccolò Belli wrote:
> > Hi,
> > I'm trying to use qemu-user-static to chroot into a foreign amd64
> > environment from my ppc64le host.
> > The host has a 64k page size, while x86_64 uses 4k.
> > I get those errors while loading shared libraries: "ELF load command
> > alignment not page-aligned"
> > Is there any way to fix this? I cannot simply switch to 4k page size
> > because my btrfs filesystem won't mount anymore (it requires the
> > sectorsize to be equal to the page size).

I vaguely recall that the answer is that we don't really
support running a linux-user guest which has a smaller page
size than the host. There are some sort-of-hacks in the code,
so some simple cases might more-or-less work, but I'm not
very surprised that you've run into something that doesn't
work.

Cc:ing Richard who probably has a more accurate answer.

thanks
-- PMM


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ELF load command alignment not page-aligned
  2019-09-17 11:40   ` Peter Maydell
@ 2019-09-17 19:12     ` Richard Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2019-09-17 19:12 UTC (permalink / raw)
  To: Peter Maydell, Philippe Mathieu-Daudé
  Cc: Laurent Vivier, Niccolò Belli, open list:sPAPR, QEMU Developers

On 9/17/19 7:40 AM, Peter Maydell wrote:
> On Tue, 17 Sep 2019 at 11:49, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>
>> Cc'ing PPC folks and Laurent.
>>
>> On 9/16/19 11:06 PM, Niccolò Belli wrote:
>>> Hi,
>>> I'm trying to use qemu-user-static to chroot into a foreign amd64
>>> environment from my ppc64le host.
>>> The host has a 64k page size, while x86_64 uses 4k.
>>> I get those errors while loading shared libraries: "ELF load command
>>> alignment not page-aligned"
>>> Is there any way to fix this? I cannot simply switch to 4k page size
>>> because my btrfs filesystem won't mount anymore (it requires the
>>> sectorsize to be equal to the page size).
> 
> I vaguely recall that the answer is that we don't really
> support running a linux-user guest which has a smaller page
> size than the host. There are some sort-of-hacks in the code,
> so some simple cases might more-or-less work, but I'm not
> very surprised that you've run into something that doesn't
> work.
> 
> Cc:ing Richard who probably has a more accurate answer.

You are correct that this combination will not work.

This combination is exactly why I've proposed enabling softmmu for linux-user.
 With that, arbitrary mappings can be made between host and guest.  But it's a
fair amount of effort, which no one has yet found time for.


r~


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-09-17 19:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16 21:06 [Qemu-devel] ELF load command alignment not page-aligned Niccolò Belli
2019-09-17 10:33 ` Philippe Mathieu-Daudé
2019-09-17 10:40   ` Laurent Vivier
2019-09-17 11:09     ` Niccolò Belli
2019-09-17 11:35       ` Laurent Vivier
2019-09-17 11:40   ` Peter Maydell
2019-09-17 19:12     ` Richard Henderson

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).