All of lore.kernel.org
 help / color / mirror / Atom feed
* s390 - buildroot + qemu
@ 2020-10-16 23:11 Nick Desaulniers
  2020-10-16 23:18 ` Guenter Roeck
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Desaulniers @ 2020-10-16 23:11 UTC (permalink / raw)
  To: egorenar, Vasily Gorbik
  Cc: Joel Stanley, Ulrich Weigand, clang-built-linux, Guenter Roeck,
	Nathan Chancellor, linux-s390

Hello all,
I'm working on integrating the latest release of buildroot (2020.08.1)
into our CI for ClangBuiltLinux.

https://github.com/ClangBuiltLinux/boot-utils/pull/25
https://github.com/ClangBuiltLinux/boot-utils/pull/26
https://github.com/ClangBuiltLinux/continuous-integration/pull/327

I'm seeing the following error from QEMU:
KASLR disabled: CPU has no PRNG
Linux version 5.9.0-00732-g04ed4527465f (ndesaulniers@<myhost>) #30
SMP Fri Oct 16 15:49:05 PDT 2020Kernel fault: interruption code 0005
ilc:2
PSW : 0000200180000000 000000000001779e
      R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:2 PM:0 RI:0 EA:3
GPRS: 0000000000000001 0000000c00000000 00000003fffffff4 00000000fffffff0
      0000000000000000 00000000fffffff4 000000000000000c 00000000fffffff0
      00000000fffffffc 0000000000000000 00000000fffffff8 00000000008a75a8
      0000000000000009 0000000000000002 0000000000000008 000000000000bce0

This is via a kernel built by:
$ ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- make CC=clang -j71 defconfig
$ ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- make CC=clang -j71

The booting qemu:
$ qemu-system-s390x -M s390-ccw-virtio -append 'rdinit=/bin/sh '
-display none -initrd /android1/boot-utils/images/s390/rootfs.cpio
-kernel /android0/kernel-all/arch/s390/boot/bzImage -m 512m
-nodefaults -serial mon:stdio

Is there a preferred kernel config or additional flags to QEMU I
should be using to avoid this error?  It's also possible that there's
a bug in the kernel image, but given that it fails very early with no
other output, I am slightly suspicious of that.
-- 
Thanks,
~Nick Desaulniers

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

* Re: s390 - buildroot + qemu
  2020-10-16 23:11 s390 - buildroot + qemu Nick Desaulniers
@ 2020-10-16 23:18 ` Guenter Roeck
  2020-10-16 23:40   ` Nick Desaulniers
  0 siblings, 1 reply; 10+ messages in thread
From: Guenter Roeck @ 2020-10-16 23:18 UTC (permalink / raw)
  To: Nick Desaulniers, egorenar, Vasily Gorbik
  Cc: Joel Stanley, Ulrich Weigand, clang-built-linux,
	Nathan Chancellor, linux-s390

On 10/16/20 4:11 PM, Nick Desaulniers wrote:
> Hello all,
> I'm working on integrating the latest release of buildroot (2020.08.1)
> into our CI for ClangBuiltLinux.
> 
> https://github.com/ClangBuiltLinux/boot-utils/pull/25
> https://github.com/ClangBuiltLinux/boot-utils/pull/26
> https://github.com/ClangBuiltLinux/continuous-integration/pull/327
> 
> I'm seeing the following error from QEMU:
> KASLR disabled: CPU has no PRNG
> Linux version 5.9.0-00732-g04ed4527465f (ndesaulniers@<myhost>) #30
> SMP Fri Oct 16 15:49:05 PDT 2020Kernel fault: interruption code 0005
> ilc:2
> PSW : 0000200180000000 000000000001779e
>       R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:2 PM:0 RI:0 EA:3
> GPRS: 0000000000000001 0000000c00000000 00000003fffffff4 00000000fffffff0
>       0000000000000000 00000000fffffff4 000000000000000c 00000000fffffff0
>       00000000fffffffc 0000000000000000 00000000fffffff8 00000000008a75a8
>       0000000000000009 0000000000000002 0000000000000008 000000000000bce0
> 
> This is via a kernel built by:
> $ ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- make CC=clang -j71 defconfig
> $ ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- make CC=clang -j71
> 
> The booting qemu:
> $ qemu-system-s390x -M s390-ccw-virtio -append 'rdinit=/bin/sh '
> -display none -initrd /android1/boot-utils/images/s390/rootfs.cpio
> -kernel /android0/kernel-all/arch/s390/boot/bzImage -m 512m
> -nodefaults -serial mon:stdio
> 
> Is there a preferred kernel config or additional flags to QEMU I
> should be using to avoid this error?  It's also possible that there's
> a bug in the kernel image, but given that it fails very early with no
> other output, I am slightly suspicious of that.
> 

Maybe that helps ? From my builders:

    # qemu only supports MARCH_Z900. Older kernels select it as default,
    # but newer kernels may select MARCH_Z196.
    sed -i -e '/CONFIG_MARCH_Z/d' ${defconfig}
    sed -i -e '/HAVE_MARCH_Z/d' ${defconfig}
    echo "CONFIG_MARCH_Z900=y" >> ${defconfig}
    echo "CONFIG_PCI=y" >> ${defconfig}

Guenter

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

* Re: s390 - buildroot + qemu
  2020-10-16 23:18 ` Guenter Roeck
@ 2020-10-16 23:40   ` Nick Desaulniers
  2020-10-17  0:15     ` Guenter Roeck
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nick Desaulniers @ 2020-10-16 23:40 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: egorenar, Vasily Gorbik, Joel Stanley, Ulrich Weigand,
	clang-built-linux, Nathan Chancellor, linux-s390

On Fri, Oct 16, 2020 at 4:18 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On 10/16/20 4:11 PM, Nick Desaulniers wrote:
> > Hello all,
> > I'm working on integrating the latest release of buildroot (2020.08.1)
> > into our CI for ClangBuiltLinux.
> >
> > https://github.com/ClangBuiltLinux/boot-utils/pull/25
> > https://github.com/ClangBuiltLinux/boot-utils/pull/26
> > https://github.com/ClangBuiltLinux/continuous-integration/pull/327
> >
> > I'm seeing the following error from QEMU:
> > KASLR disabled: CPU has no PRNG
> > Linux version 5.9.0-00732-g04ed4527465f (ndesaulniers@<myhost>) #30
> > SMP Fri Oct 16 15:49:05 PDT 2020Kernel fault: interruption code 0005
> > ilc:2
> > PSW : 0000200180000000 000000000001779e
> >       R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:2 PM:0 RI:0 EA:3
> > GPRS: 0000000000000001 0000000c00000000 00000003fffffff4 00000000fffffff0
> >       0000000000000000 00000000fffffff4 000000000000000c 00000000fffffff0
> >       00000000fffffffc 0000000000000000 00000000fffffff8 00000000008a75a8
> >       0000000000000009 0000000000000002 0000000000000008 000000000000bce0
> >
> > This is via a kernel built by:
> > $ ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- make CC=clang -j71 defconfig
> > $ ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- make CC=clang -j71
> >
> > The booting qemu:
> > $ qemu-system-s390x -M s390-ccw-virtio -append 'rdinit=/bin/sh '
> > -display none -initrd /android1/boot-utils/images/s390/rootfs.cpio
> > -kernel /android0/kernel-all/arch/s390/boot/bzImage -m 512m
> > -nodefaults -serial mon:stdio
> >
> > Is there a preferred kernel config or additional flags to QEMU I
> > should be using to avoid this error?  It's also possible that there's
> > a bug in the kernel image, but given that it fails very early with no
> > other output, I am slightly suspicious of that.
> >
>
> Maybe that helps ? From my builders:
>
>     # qemu only supports MARCH_Z900. Older kernels select it as default,
>     # but newer kernels may select MARCH_Z196.
>     sed -i -e '/CONFIG_MARCH_Z/d' ${defconfig}
>     sed -i -e '/HAVE_MARCH_Z/d' ${defconfig}
>     echo "CONFIG_MARCH_Z900=y" >> ${defconfig}
>     echo "CONFIG_PCI=y" >> ${defconfig}

$ clang -march=z900 --target=s390x-linux-gnu -c -x c /dev/null -o -
error: unknown target CPU 'z900'
note: valid target CPU values are: arch8, z10, arch9, z196, arch10,
zEC12, arch11, z13, arch12, z14, arch13, z15

Hopefully qemu supports something newer than Z900?  Or can we change
arch/s390/Kconfig:255 to use a different arch? Is arch9 == z900???:

252 config MARCH_Z900
253   bool "IBM zSeries model z800 and z900"
254   select HAVE_MARCH_Z900_FEATURES
255   depends on $(cc-option,-march=z900)
256   help
257     Select this to enable optimizations for model z800/z900 (2064
and
258     2066 series). This will enable some optimizations that are not
259     available on older ESA/390 (31 Bit) only CPUs.
-- 
Thanks,
~Nick Desaulniers

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

* Re: s390 - buildroot + qemu
  2020-10-16 23:40   ` Nick Desaulniers
@ 2020-10-17  0:15     ` Guenter Roeck
  2020-10-19 10:54     ` Christian Borntraeger
  2020-10-19 11:44     ` Cornelia Huck
  2 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2020-10-17  0:15 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: egorenar, Vasily Gorbik, Joel Stanley, Ulrich Weigand,
	clang-built-linux, Nathan Chancellor, linux-s390

On 10/16/20 4:40 PM, Nick Desaulniers wrote:
> On Fri, Oct 16, 2020 at 4:18 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>
>> On 10/16/20 4:11 PM, Nick Desaulniers wrote:
>>> Hello all,
>>> I'm working on integrating the latest release of buildroot (2020.08.1)
>>> into our CI for ClangBuiltLinux.
>>>
>>> https://github.com/ClangBuiltLinux/boot-utils/pull/25
>>> https://github.com/ClangBuiltLinux/boot-utils/pull/26
>>> https://github.com/ClangBuiltLinux/continuous-integration/pull/327
>>>
>>> I'm seeing the following error from QEMU:
>>> KASLR disabled: CPU has no PRNG
>>> Linux version 5.9.0-00732-g04ed4527465f (ndesaulniers@<myhost>) #30
>>> SMP Fri Oct 16 15:49:05 PDT 2020Kernel fault: interruption code 0005
>>> ilc:2
>>> PSW : 0000200180000000 000000000001779e
>>>       R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:2 PM:0 RI:0 EA:3
>>> GPRS: 0000000000000001 0000000c00000000 00000003fffffff4 00000000fffffff0
>>>       0000000000000000 00000000fffffff4 000000000000000c 00000000fffffff0
>>>       00000000fffffffc 0000000000000000 00000000fffffff8 00000000008a75a8
>>>       0000000000000009 0000000000000002 0000000000000008 000000000000bce0
>>>
>>> This is via a kernel built by:
>>> $ ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- make CC=clang -j71 defconfig
>>> $ ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- make CC=clang -j71
>>>
>>> The booting qemu:
>>> $ qemu-system-s390x -M s390-ccw-virtio -append 'rdinit=/bin/sh '
>>> -display none -initrd /android1/boot-utils/images/s390/rootfs.cpio
>>> -kernel /android0/kernel-all/arch/s390/boot/bzImage -m 512m
>>> -nodefaults -serial mon:stdio
>>>
>>> Is there a preferred kernel config or additional flags to QEMU I
>>> should be using to avoid this error?  It's also possible that there's
>>> a bug in the kernel image, but given that it fails very early with no
>>> other output, I am slightly suspicious of that.
>>>
>>
>> Maybe that helps ? From my builders:
>>
>>     # qemu only supports MARCH_Z900. Older kernels select it as default,
>>     # but newer kernels may select MARCH_Z196.
>>     sed -i -e '/CONFIG_MARCH_Z/d' ${defconfig}
>>     sed -i -e '/HAVE_MARCH_Z/d' ${defconfig}
>>     echo "CONFIG_MARCH_Z900=y" >> ${defconfig}
>>     echo "CONFIG_PCI=y" >> ${defconfig}
> 
> $ clang -march=z900 --target=s390x-linux-gnu -c -x c /dev/null -o -
> error: unknown target CPU 'z900'
> note: valid target CPU values are: arch8, z10, arch9, z196, arch10,
> zEC12, arch11, z13, arch12, z14, arch13, z15
> 
> Hopefully qemu supports something newer than Z900?  Or can we change

I don't think it does. I tried several others, and it always says "Some
features requested in the CPU model are not available in the configuration"
If I recall correctly, the s390 qemu is primarily supposed to be used on
real s390 systems, and  the simulator port is not officially supported
by IBM. My memory may defeat me, though.

> arch/s390/Kconfig:255 to use a different arch? Is arch9 == z900???:

You could give it a try ...

Guenter

> > 252 config MARCH_Z900
> 253   bool "IBM zSeries model z800 and z900"
> 254   select HAVE_MARCH_Z900_FEATURES
> 255   depends on $(cc-option,-march=z900)
> 256   help
> 257     Select this to enable optimizations for model z800/z900 (2064
> and
> 258     2066 series). This will enable some optimizations that are not
> 259     available on older ESA/390 (31 Bit) only CPUs.
> 

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

* Re: s390 - buildroot + qemu
  2020-10-16 23:40   ` Nick Desaulniers
  2020-10-17  0:15     ` Guenter Roeck
@ 2020-10-19 10:54     ` Christian Borntraeger
  2020-10-19 14:51       ` Guenter Roeck
  2020-10-19 21:36       ` Nick Desaulniers
  2020-10-19 11:44     ` Cornelia Huck
  2 siblings, 2 replies; 10+ messages in thread
From: Christian Borntraeger @ 2020-10-19 10:54 UTC (permalink / raw)
  To: Nick Desaulniers, Guenter Roeck
  Cc: egorenar, Vasily Gorbik, Joel Stanley, Ulrich Weigand,
	clang-built-linux, Nathan Chancellor, linux-s390



On 17.10.20 01:40, Nick Desaulniers wrote:
> On Fri, Oct 16, 2020 at 4:18 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>
>> On 10/16/20 4:11 PM, Nick Desaulniers wrote:
>>> Hello all,
>>> I'm working on integrating the latest release of buildroot (2020.08.1)
>>> into our CI for ClangBuiltLinux.
>>>
>>> https://github.com/ClangBuiltLinux/boot-utils/pull/25
>>> https://github.com/ClangBuiltLinux/boot-utils/pull/26
>>> https://github.com/ClangBuiltLinux/continuous-integration/pull/327
>>>
>>> I'm seeing the following error from QEMU:
>>> KASLR disabled: CPU has no PRNG
>>> Linux version 5.9.0-00732-g04ed4527465f (ndesaulniers@<myhost>) #30
>>> SMP Fri Oct 16 15:49:05 PDT 2020Kernel fault: interruption code 0005
>>> ilc:2
>>> PSW : 0000200180000000 000000000001779e
>>>       R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:2 PM:0 RI:0 EA:3
>>> GPRS: 0000000000000001 0000000c00000000 00000003fffffff4 00000000fffffff0
>>>       0000000000000000 00000000fffffff4 000000000000000c 00000000fffffff0
>>>       00000000fffffffc 0000000000000000 00000000fffffff8 00000000008a75a8
>>>       0000000000000009 0000000000000002 0000000000000008 000000000000bce0

Do you have more information? If not, any chance to run objdump on the kernel
and check what instructions do you have aroung address 0x1779e
[...]

> Hopefully qemu supports something newer than Z900?  Or can we change
> arch/s390/Kconfig:255 to use a different arch? Is arch9 == z900???:

Newer QEMUs do support up to z13, so I think this is not an issue as long
as you have an uptodate qemu.

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

* Re: s390 - buildroot + qemu
  2020-10-16 23:40   ` Nick Desaulniers
  2020-10-17  0:15     ` Guenter Roeck
  2020-10-19 10:54     ` Christian Borntraeger
@ 2020-10-19 11:44     ` Cornelia Huck
  2 siblings, 0 replies; 10+ messages in thread
From: Cornelia Huck @ 2020-10-19 11:44 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Guenter Roeck, egorenar, Vasily Gorbik, Joel Stanley,
	Ulrich Weigand, clang-built-linux, Nathan Chancellor, linux-s390

On Fri, 16 Oct 2020 16:40:43 -0700
Nick Desaulniers <ndesaulniers@google.com> wrote:

> On Fri, Oct 16, 2020 at 4:18 PM Guenter Roeck <linux@roeck-us.net> wrote:

> > Maybe that helps ? From my builders:
> >
> >     # qemu only supports MARCH_Z900. Older kernels select it as default,
> >     # but newer kernels may select MARCH_Z196.
> >     sed -i -e '/CONFIG_MARCH_Z/d' ${defconfig}
> >     sed -i -e '/HAVE_MARCH_Z/d' ${defconfig}
> >     echo "CONFIG_MARCH_Z900=y" >> ${defconfig}
> >     echo "CONFIG_PCI=y" >> ${defconfig}  
> 
> $ clang -march=z900 --target=s390x-linux-gnu -c -x c /dev/null -o -
> error: unknown target CPU 'z900'
> note: valid target CPU values are: arch8, z10, arch9, z196, arch10,
> zEC12, arch11, z13, arch12, z14, arch13, z15
> 
> Hopefully qemu supports something newer than Z900? 

Current QEMU/TCG with the 'qemu' cpu model with give you a
stripped-down z13 that should run fine if you compile to z13. (There's
work ongoing to bump this even to a stripped-down z14, but that needs
some more time.) Anything prior to z13 should be fine as well.

> Or can we change
> arch/s390/Kconfig:255 to use a different arch? Is arch9 == z900???:

My understanding is arch8 == z10 and so on.

> 
> 252 config MARCH_Z900
> 253   bool "IBM zSeries model z800 and z900"
> 254   select HAVE_MARCH_Z900_FEATURES
> 255   depends on $(cc-option,-march=z900)
> 256   help
> 257     Select this to enable optimizations for model z800/z900 (2064
> and
> 258     2066 series). This will enable some optimizations that are not
> 259     available on older ESA/390 (31 Bit) only CPUs.

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

* Re: s390 - buildroot + qemu
  2020-10-19 10:54     ` Christian Borntraeger
@ 2020-10-19 14:51       ` Guenter Roeck
  2020-10-19 21:36       ` Nick Desaulniers
  1 sibling, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2020-10-19 14:51 UTC (permalink / raw)
  To: Christian Borntraeger, Nick Desaulniers
  Cc: egorenar, Vasily Gorbik, Joel Stanley, Ulrich Weigand,
	clang-built-linux, Nathan Chancellor, linux-s390

On 10/19/20 3:54 AM, Christian Borntraeger wrote:
> 
> 
> On 17.10.20 01:40, Nick Desaulniers wrote:
>> On Fri, Oct 16, 2020 at 4:18 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>>
>>> On 10/16/20 4:11 PM, Nick Desaulniers wrote:
>>>> Hello all,
>>>> I'm working on integrating the latest release of buildroot (2020.08.1)
>>>> into our CI for ClangBuiltLinux.
>>>>
>>>> https://github.com/ClangBuiltLinux/boot-utils/pull/25
>>>> https://github.com/ClangBuiltLinux/boot-utils/pull/26
>>>> https://github.com/ClangBuiltLinux/continuous-integration/pull/327
>>>>
>>>> I'm seeing the following error from QEMU:
>>>> KASLR disabled: CPU has no PRNG
>>>> Linux version 5.9.0-00732-g04ed4527465f (ndesaulniers@<myhost>) #30
>>>> SMP Fri Oct 16 15:49:05 PDT 2020Kernel fault: interruption code 0005
>>>> ilc:2
>>>> PSW : 0000200180000000 000000000001779e
>>>>       R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:2 PM:0 RI:0 EA:3
>>>> GPRS: 0000000000000001 0000000c00000000 00000003fffffff4 00000000fffffff0
>>>>       0000000000000000 00000000fffffff4 000000000000000c 00000000fffffff0
>>>>       00000000fffffffc 0000000000000000 00000000fffffff8 00000000008a75a8
>>>>       0000000000000009 0000000000000002 0000000000000008 000000000000bce0
> 
> Do you have more information? If not, any chance to run objdump on the kernel
> and check what instructions do you have aroung address 0x1779e
> [...]
> 
>> Hopefully qemu supports something newer than Z900?  Or can we change
>> arch/s390/Kconfig:255 to use a different arch? Is arch9 == z900???:
> 
> Newer QEMUs do support up to z13, so I think this is not an issue as long
> as you have an uptodate qemu.
> 

Thanks a lot for the update. I confirmed that I can indeed boot an upstream
kernel with s390 defconfig. One caveat, though: it requires "-cpu qemu".
"-cpu z13" is still rejected.

Thanks,
Guenter

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

* Re: s390 - buildroot + qemu
  2020-10-19 10:54     ` Christian Borntraeger
  2020-10-19 14:51       ` Guenter Roeck
@ 2020-10-19 21:36       ` Nick Desaulniers
  2020-10-19 22:03         ` Guenter Roeck
  2020-10-20  5:34         ` Christian Borntraeger
  1 sibling, 2 replies; 10+ messages in thread
From: Nick Desaulniers @ 2020-10-19 21:36 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Guenter Roeck, egorenar, Vasily Gorbik, Joel Stanley,
	Ulrich Weigand, clang-built-linux, Nathan Chancellor, linux-s390

On Mon, Oct 19, 2020 at 3:55 AM Christian Borntraeger
<borntraeger@de.ibm.com> wrote:
>
>
>
> On 17.10.20 01:40, Nick Desaulniers wrote:
> > On Fri, Oct 16, 2020 at 4:18 PM Guenter Roeck <linux@roeck-us.net> wrote:
> >>
> >> On 10/16/20 4:11 PM, Nick Desaulniers wrote:
> >>> Hello all,
> >>> I'm working on integrating the latest release of buildroot (2020.08.1)
> >>> into our CI for ClangBuiltLinux.
> >>>
> >>> https://github.com/ClangBuiltLinux/boot-utils/pull/25
> >>> https://github.com/ClangBuiltLinux/boot-utils/pull/26
> >>> https://github.com/ClangBuiltLinux/continuous-integration/pull/327
> >>>
> >>> I'm seeing the following error from QEMU:
> >>> KASLR disabled: CPU has no PRNG
> >>> Linux version 5.9.0-00732-g04ed4527465f (ndesaulniers@<myhost>) #30
> >>> SMP Fri Oct 16 15:49:05 PDT 2020Kernel fault: interruption code 0005
> >>> ilc:2
> >>> PSW : 0000200180000000 000000000001779e
> >>>       R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:2 PM:0 RI:0 EA:3
> >>> GPRS: 0000000000000001 0000000c00000000 00000003fffffff4 00000000fffffff0
> >>>       0000000000000000 00000000fffffff4 000000000000000c 00000000fffffff0
> >>>       00000000fffffffc 0000000000000000 00000000fffffff8 00000000008a75a8
> >>>       0000000000000009 0000000000000002 0000000000000008 000000000000bce0
>
> Do you have more information? If not, any chance to run objdump on the kernel
> and check what instructions do you have aroung address 0x1779e
> [...]

Is PSW the program counter?
/me skims https://www.kernel.org/doc/Documentation/s390/Debugging390.txt *woah*
Is there something more specific I should be running than:
$ s390x-linux-gnu-objdump -Dr vmlinux | grep 179fe
because I get lots of hits for that, but not 0x179fe.

In fact, the first symbol starts at 0x100000. Unless this is a failure
in the image decompressor?

>
> > Hopefully qemu supports something newer than Z900?  Or can we change
> > arch/s390/Kconfig:255 to use a different arch? Is arch9 == z900???:
>
> Newer QEMUs do support up to z13, so I think this is not an issue as long
> as you have an uptodate qemu.

$ qemu-system-s390x --version
QEMU emulator version 5.1.0 (Debian 1:5.1+dfsg-4)

-- 
Thanks,
~Nick Desaulniers

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

* Re: s390 - buildroot + qemu
  2020-10-19 21:36       ` Nick Desaulniers
@ 2020-10-19 22:03         ` Guenter Roeck
  2020-10-20  5:34         ` Christian Borntraeger
  1 sibling, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2020-10-19 22:03 UTC (permalink / raw)
  To: Nick Desaulniers, Christian Borntraeger
  Cc: egorenar, Vasily Gorbik, Joel Stanley, Ulrich Weigand,
	clang-built-linux, Nathan Chancellor, linux-s390

On 10/19/20 2:36 PM, Nick Desaulniers wrote:
> On Mon, Oct 19, 2020 at 3:55 AM Christian Borntraeger
> <borntraeger@de.ibm.com> wrote:
>>
>>
>>
>> On 17.10.20 01:40, Nick Desaulniers wrote:
>>> On Fri, Oct 16, 2020 at 4:18 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>>>
>>>> On 10/16/20 4:11 PM, Nick Desaulniers wrote:
>>>>> Hello all,
>>>>> I'm working on integrating the latest release of buildroot (2020.08.1)
>>>>> into our CI for ClangBuiltLinux.
>>>>>
>>>>> https://github.com/ClangBuiltLinux/boot-utils/pull/25
>>>>> https://github.com/ClangBuiltLinux/boot-utils/pull/26
>>>>> https://github.com/ClangBuiltLinux/continuous-integration/pull/327
>>>>>
>>>>> I'm seeing the following error from QEMU:
>>>>> KASLR disabled: CPU has no PRNG
>>>>> Linux version 5.9.0-00732-g04ed4527465f (ndesaulniers@<myhost>) #30
>>>>> SMP Fri Oct 16 15:49:05 PDT 2020Kernel fault: interruption code 0005
>>>>> ilc:2
>>>>> PSW : 0000200180000000 000000000001779e
>>>>>       R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:2 PM:0 RI:0 EA:3
>>>>> GPRS: 0000000000000001 0000000c00000000 00000003fffffff4 00000000fffffff0
>>>>>       0000000000000000 00000000fffffff4 000000000000000c 00000000fffffff0
>>>>>       00000000fffffffc 0000000000000000 00000000fffffff8 00000000008a75a8
>>>>>       0000000000000009 0000000000000002 0000000000000008 000000000000bce0
>>
>> Do you have more information? If not, any chance to run objdump on the kernel
>> and check what instructions do you have aroung address 0x1779e
>> [...]
> 
> Is PSW the program counter?
> /me skims https://www.kernel.org/doc/Documentation/s390/Debugging390.txt *woah*
> Is there something more specific I should be running than:
> $ s390x-linux-gnu-objdump -Dr vmlinux | grep 179fe
> because I get lots of hits for that, but not 0x179fe.
> 
> In fact, the first symbol starts at 0x100000. Unless this is a failure
> in the image decompressor?
> 
>>
>>> Hopefully qemu supports something newer than Z900?  Or can we change
>>> arch/s390/Kconfig:255 to use a different arch? Is arch9 == z900???:
>>
>> Newer QEMUs do support up to z13, so I think this is not an issue as long
>> as you have an uptodate qemu.
> 
> $ qemu-system-s390x --version
> QEMU emulator version 5.1.0 (Debian 1:5.1+dfsg-4)
> 
I found that you have to run "qemu-system-s390x -cpu qemu ...". I was able
to boot s390 defconfig without changes after doing that.

Guenter

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

* Re: s390 - buildroot + qemu
  2020-10-19 21:36       ` Nick Desaulniers
  2020-10-19 22:03         ` Guenter Roeck
@ 2020-10-20  5:34         ` Christian Borntraeger
  1 sibling, 0 replies; 10+ messages in thread
From: Christian Borntraeger @ 2020-10-20  5:34 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Guenter Roeck, egorenar, Vasily Gorbik, Joel Stanley,
	Ulrich Weigand, clang-built-linux, Nathan Chancellor, linux-s390

On 19.10.20 23:36, Nick Desaulniers wrote:
> On Mon, Oct 19, 2020 at 3:55 AM Christian Borntraeger
> <borntraeger@de.ibm.com> wrote:
>>
>>
>>
>> On 17.10.20 01:40, Nick Desaulniers wrote:
>>> On Fri, Oct 16, 2020 at 4:18 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>>>
>>>> On 10/16/20 4:11 PM, Nick Desaulniers wrote:
>>>>> Hello all,
>>>>> I'm working on integrating the latest release of buildroot (2020.08.1)
>>>>> into our CI for ClangBuiltLinux.
>>>>>
>>>>> https://github.com/ClangBuiltLinux/boot-utils/pull/25
>>>>> https://github.com/ClangBuiltLinux/boot-utils/pull/26
>>>>> https://github.com/ClangBuiltLinux/continuous-integration/pull/327
>>>>>
>>>>> I'm seeing the following error from QEMU:
>>>>> KASLR disabled: CPU has no PRNG
>>>>> Linux version 5.9.0-00732-g04ed4527465f (ndesaulniers@<myhost>) #30
>>>>> SMP Fri Oct 16 15:49:05 PDT 2020Kernel fault: interruption code 0005
>>>>> ilc:2
>>>>> PSW : 0000200180000000 000000000001779e
>>>>>       R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:2 PM:0 RI:0 EA:3
>>>>> GPRS: 0000000000000001 0000000c00000000 00000003fffffff4 00000000fffffff0
>>>>>       0000000000000000 00000000fffffff4 000000000000000c 00000000fffffff0
>>>>>       00000000fffffffc 0000000000000000 00000000fffffff8 00000000008a75a8
>>>>>       0000000000000009 0000000000000002 0000000000000008 000000000000bce0
>>
>> Do you have more information? If not, any chance to run objdump on the kernel
>> and check what instructions do you have aroung address 0x1779e
>> [...]
> 
> Is PSW the program counter?

program counter (the 64bit on the right hand side), flags, interrupt controls
and many other things


> /me skims https://www.kernel.org/doc/Documentation/s390/Debugging390.txt *woah*
> Is there something more specific I should be running than:
> $ s390x-linux-gnu-objdump -Dr vmlinux | grep 179fe
> because I get lots of hits for that, but not 0x179fe.

You probably have to look at the instruction before as many faults on s390 are suppressing
(the instruction effects are suppressed, but the PSW moves forward). 

With ilc=2 (instruction length code)
> 
> In fact, the first symbol starts at 0x100000. Unless this is a failure
> in the image decompressor?

I guess so.
Maybe llvm does something that qemu does not handle in the compressor
can you try with
objdump -d arch/s390/boot/compressed/vmlinux

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

end of thread, other threads:[~2020-10-20  5:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 23:11 s390 - buildroot + qemu Nick Desaulniers
2020-10-16 23:18 ` Guenter Roeck
2020-10-16 23:40   ` Nick Desaulniers
2020-10-17  0:15     ` Guenter Roeck
2020-10-19 10:54     ` Christian Borntraeger
2020-10-19 14:51       ` Guenter Roeck
2020-10-19 21:36       ` Nick Desaulniers
2020-10-19 22:03         ` Guenter Roeck
2020-10-20  5:34         ` Christian Borntraeger
2020-10-19 11:44     ` Cornelia Huck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.