[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-10-04 Thread Heinrich Schuchardt
Merge request https://github.com/tianocore/edk2/pull/6210 has been accepted into the EDK II upstream. We should add it to the Ubuntu EDK II. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-meta-riscv in Ubuntu. https://bugs.launchpad

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-25 Thread Heinrich Schuchardt
Version 2 of the QEMU patch is available at: https://lore.kernel.org/qemu-riscv/20240925061704.12440-1-heinrich.schucha...@canonical.com/T/#u -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-meta-riscv in Ubuntu. https://bugs.launchpa

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-20 Thread Sergio Durigan Junior
Thanks, Heinrich. I'm following the upstream discussion; I can backport the patch to Oracular/Noble once things are settled. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-meta-riscv in Ubuntu. https://bugs.launchpad.net/bugs/20777

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-17 Thread Heinrich Schuchardt
Merge request for EDK II created: https://github.com/tianocore/edk2/pull/6210 ** Changed in: linux-meta-riscv (Ubuntu Noble) Status: New => Invalid ** Changed in: linux-meta-riscv (Ubuntu Oracular) Status: New => Invalid -- You received this bug notification because you are a memb

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-16 Thread Heinrich Schuchardt
The following patch in QEMU resolves the issue: https://lore.kernel.org/qemu-riscv/20240916181633.366449-1-heinrich.schucha...@canonical.com/T/#u EDK II should additionally be changed to make no assumptions about the state of the floating point unit. -- You received this bug notification because

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-16 Thread Heinrich Schuchardt
The problem seems to be that the FS field which controls availability of floating point operations in the vsstatus register is not set by KVM while OpenSBI enables the field in the mstatus register. -- You received this bug notification because you are a member of Kernel Packages, which is subscr

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-15 Thread Heinrich Schuchardt
QEMU upstream bug created: https://gitlab.com/qemu- project/qemu/-/issues/2573 ** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #2573 https://gitlab.com/qemu-project/qemu/-/issues/2573 -- You received this bug notification because you are a member of Kernel Packages, which is subscri

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-15 Thread Heinrich Schuchardt
** Also affects: qemu (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-meta-riscv in Ubuntu. https://bugs.launchpad.net/bugs/2077731 Title: riscv64 EDK 2 crashes in KVM based emu

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-15 Thread Heinrich Schuchardt
Here is a simpler test case for KVM: https://github.com/xypron/riscv_test_payload/tree/bug_2077731 -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-meta-riscv in Ubuntu. https://bugs.launchpad.net/bugs/2077731 Title: riscv64 EDK 2

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-15 Thread Heinrich Schuchardt
The problem can be reproduced with Linux next-20240913 and 6.11.0-rc7. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-meta-riscv in Ubuntu. https://bugs.launchpad.net/bugs/2077731 Title: riscv64 EDK 2 crashes in KVM based emulati

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-15 Thread Heinrich Schuchardt
The faulting instruction seems to be a floating point instruction: fcvt.d.w fa5,a5 TlsInitialize () calls return RandomSeed (NULL, 0) which calls OpenSSL. openssl/crypto/rand/rand_meth.obj contains the problematic instruction. When I comment out the RandomSeed() call, the crash vanishes. Acco

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-15 Thread Heinrich Schuchardt
When adding build flag -DNETWORK_TLS_ENABLE I can reproduce the issue with upstream source. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-meta-riscv in Ubuntu. https://bugs.launchpad.net/bugs/2077731 Title: riscv64 EDK 2 crashes

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-15 Thread Heinrich Schuchardt
When building with BUILD_TYPE=DEBUG we get bit more output for the crash: ProtectUefiImageCommon - 0x7F02C7C0 - 0x00017E08E000 - 0x001813C0 Image - Build/RiscVVirtQemu/DEBUG_GCC5/RISCV64/NetworkPkg/TlsDxe/TlsDxe/DEBUG/TlsDxe.dll Image Section Alignment(0x40) does not matc

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-09-15 Thread Heinrich Schuchardt
The problem is not reproducible with EDK II built from upstream source using the Dockerfile in https://github.com/xypron/sct_release_test/tree/3f095ab1cb905f14d2d608a4a47b554779b00244/build_sct_riscv64 -- You received this bug notification because you are a member of Kernel Packages, which is su

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-08-29 Thread Heinrich Schuchardt
Debugging the EDK II payload in QEMU under KVM fails with: qemu-system-riscv64: -gdb tcp::1234: gdbstub: current accelerator doesn't support guest debugging -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-meta-riscv in Ubuntu. https

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-08-26 Thread Heinrich Schuchardt
** Changed in: linux-meta-riscv (Ubuntu Noble) Importance: Undecided => Low ** Changed in: linux-meta-riscv (Ubuntu Oracular) Importance: Undecided => Low -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-meta-riscv in Ubuntu. h

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-08-26 Thread Philip Cox
** Changed in: linux-meta-riscv (Ubuntu Noble) Assignee: (unassigned) => Emil Renner Berthing (esmil) ** Changed in: linux-meta-riscv (Ubuntu Oracular) Assignee: (unassigned) => Emil Renner Berthing (esmil) -- You received this bug notification because you are a member of Kernel Packag

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-08-23 Thread Heinrich Schuchardt
The problem is reproducible with Ubuntu 24.10 running kernel 6.8.0-31-generic riscv64. ** Also affects: edk2 (Ubuntu Oracular) Importance: Undecided Status: New ** Also affects: linux-meta-riscv (Ubuntu Oracular) Importance: Undecided Status: New -- You received this bug not

[Kernel-packages] [Bug 2077731] Re: riscv64 EDK 2 crashes in KVM based emulation

2024-08-23 Thread Heinrich Schuchardt
The crash output is generated in EDK II, UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/CpuExceptionHandlerLib.c Here we could add code showing the failing instruction. Only showing the registers is not helpful. U-Boot creates output like: Unhandled exception: Illegal instruction EPC: