[Qemu-devel] [PATCH 0/2] configure: Fix make check-tcg for ppc64le

Richard Henderson posted 2 patches 6 years, 6 months ago
Test asan failed
Test docker-clang@ubuntu failed
Test docker-mingw@fedora failed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190501223819.8584-1-richard.henderson@linaro.org
configure | 54 ++++++++++++++++++++++++++++++++++--------------------
1 file changed, 34 insertions(+), 20 deletions(-)
[Qemu-devel] [PATCH 0/2] configure: Fix make check-tcg for ppc64le
Posted by Richard Henderson 6 years, 6 months ago
At present make check-tcg will produce errors like

  RUN     tests for ppc64
  TEST    test-mmap (default) on ppc64
test-mmap: Invalid ELF image for this architecture
make[2]: *** [run-test-mmap] Error 255
make[1]: *** [run-guest-tests] Error 2
make: *** [run-tcg-tests-ppc64-linux-user] Error 2

which is caused by the use of the host ppc64le compiler
in building guest ppc64(be) executables.


r~


Richard Henderson (2):
  configure: Distinguish ppc64 and ppc64le hosts
  configure: Use quotes around uses of $CPU_CFLAGS

 configure | 54 ++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 34 insertions(+), 20 deletions(-)

-- 
2.17.1


Re: [Qemu-devel] [PATCH 0/2] configure: Fix make check-tcg for ppc64le
Posted by David Gibson 6 years, 6 months ago
On Wed, May 01, 2019 at 03:38:17PM -0700, Richard Henderson wrote:
> At present make check-tcg will produce errors like
> 
>   RUN     tests for ppc64
>   TEST    test-mmap (default) on ppc64
> test-mmap: Invalid ELF image for this architecture
> make[2]: *** [run-test-mmap] Error 255
> make[1]: *** [run-guest-tests] Error 2
> make: *** [run-tcg-tests-ppc64-linux-user] Error 2
> 
> which is caused by the use of the host ppc64le compiler
> in building guest ppc64(be) executables.

Thanks for looking at this.

I've staged this tentatively in ppc-for-4.1.  However while it removes
the "Invalid ELF image" message I still get:

  TEST    test-mmap (4096 byte pages) on ppc64le
test-mmap: Invalid argument
make[2]: *** [/home/dwg/qemu/tests/tcg/multiarch/Makefile.target:35: run-test-mmap-4096] Error 255
make[2]: Target 'run' not remade because of errors.
make[1]: *** [/home/dwg/qemu/tests/tcg/Makefile.include:71: run-guest-tests] Error 2
make: *** [/home/dwg/qemu/tests/Makefile.include:1079: run-tcg-tests-ppc64le-linux-user] Error 2

Running on a POWER9 host.  Do you see that as well?

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [PATCH 0/2] configure: Fix make check-tcg for ppc64le
Posted by Richard Henderson 6 years, 6 months ago
On 5/1/19 9:04 PM, David Gibson wrote:
> I've staged this tentatively in ppc-for-4.1.  However while it removes
> the "Invalid ELF image" message I still get:
> 
>   TEST    test-mmap (4096 byte pages) on ppc64le
> test-mmap: Invalid argument
> make[2]: *** [/home/dwg/qemu/tests/tcg/multiarch/Makefile.target:35: run-test-mmap-4096] Error 255
> make[2]: Target 'run' not remade because of errors.
> make[1]: *** [/home/dwg/qemu/tests/tcg/Makefile.include:71: run-guest-tests] Error 2
> make: *** [/home/dwg/qemu/tests/Makefile.include:1079: run-tcg-tests-ppc64le-linux-user] Error 2
> 
> Running on a POWER9 host.  Do you see that as well?

Yes.

It's a semi-bogus test, really.  We can't run test-mmap
with a page size smaller than that of the host, and of
course ppc64le uses 64k pages.

This needs a different set of cleanups.  ;-)


r~


Re: [Qemu-devel] [PATCH 0/2] configure: Fix make check-tcg for ppc64le
Posted by Alex Bennée 6 years, 6 months ago
Richard Henderson <richard.henderson@linaro.org> writes:

> On 5/1/19 9:04 PM, David Gibson wrote:
>> I've staged this tentatively in ppc-for-4.1.  However while it removes
>> the "Invalid ELF image" message I still get:
>>
>>   TEST    test-mmap (4096 byte pages) on ppc64le
>> test-mmap: Invalid argument
>> make[2]: *** [/home/dwg/qemu/tests/tcg/multiarch/Makefile.target:35: run-test-mmap-4096] Error 255
>> make[2]: Target 'run' not remade because of errors.
>> make[1]: *** [/home/dwg/qemu/tests/tcg/Makefile.include:71: run-guest-tests] Error 2
>> make: *** [/home/dwg/qemu/tests/Makefile.include:1079: run-tcg-tests-ppc64le-linux-user] Error 2
>>
>> Running on a POWER9 host.  Do you see that as well?
>
> Yes.
>
> It's a semi-bogus test, really.  We can't run test-mmap
> with a page size smaller than that of the host, and of
> course ppc64le uses 64k pages.

The default run-test-mmap should just run against the host page size
(which may be bogus for the emulated architecture). The additional runs
are all added with EXTRA_RUNS:

  EXTRA_RUNS+=run-test-mmap-4096 #run-test-mmap-65536

Currently the 64k pages are disabled because it crashes so somebody
should probably look into that.

Looking at -p setting the confusing named qemu_host_page_size doesn't
seem to reflect this in:

  #ifdef TARGET_NR_getpagesize
      case TARGET_NR_getpagesize:
          return TARGET_PAGE_SIZE;
  #endif

> This needs a different set of cleanups.  ;-)

I guess this is another use case for softmmu support in linux-user where
HOST_PAGE != TARGET_PAGE?

--
Alex Bennée

Re: [Qemu-devel] [PATCH 0/2] configure: Fix make check-tcg for ppc64le
Posted by Richard Henderson 6 years, 6 months ago
On 5/2/19 3:47 AM, Alex Bennée wrote:
>> This needs a different set of cleanups.  ;-)
> 
> I guess this is another use case for softmmu support in linux-user where
> HOST_PAGE != TARGET_PAGE?

Well, yes, but I was thinking more short-term, wherein we do not test things
that we know will not work.  E.g. testing 4k pages on a 64k page host.


r~

Re: [Qemu-devel] [PATCH 0/2] configure: Fix make check-tcg for ppc64le
Posted by Alex Bennée 6 years, 6 months ago
Richard Henderson <richard.henderson@linaro.org> writes:

> On 5/2/19 3:47 AM, Alex Bennée wrote:
>>> This needs a different set of cleanups.  ;-)
>>
>> I guess this is another use case for softmmu support in linux-user where
>> HOST_PAGE != TARGET_PAGE?
>
> Well, yes, but I was thinking more short-term, wherein we do not test things
> that we know will not work.  E.g. testing 4k pages on a 64k page host.

I guess we could add something to configure to emit the host page size
so we can conditionalise the tests. Or just fix mmap to take advantage
of the fact that getpagesize() reports the host page size and nope out
when that is greater than test-mmap -p....

>
>
> r~


--
Alex Bennée