Kernel 5.8

AmigaOne X1000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 6081
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.8

Post by xeno74 »

sailorMH wrote:
Tue Jun 09, 2020 6:46 pm
Works!!
Thanks for testing! :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6081
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.8

Post by xeno74 »

Hi All,

Here is the third alpha of kernel 5.8 for testing.

New:
Download: linux-image-5.8-alpha3-X1000_X5000.tar.gz

I tested QEMU 2.5.0 and QEMU 5.0.0 with KVM and KVM-PR today. KVM works without any problems. I was able to boot a Fienix guest with the alpha3 in a virtual e5500 QEMU machine with KVM on a Fienix X5000 host with the alpha3. (see screenshot)

Image

Unfortunately KVM-PR doesn't work anymore on the X1000. I figured out that the kernels 5.7 and 5.8 are affected. I can boot virtual QEMU PowerPC machines with KVM-PR with the kernel 5.6 without any problems on my X1000.

Error message:

Code: Select all

Fienix kernel: kvmppc_exit_pr_progint: emulation at 700 failed (00000000)
Please test the kernels.

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

sailorMH
Posts: 121
Joined: Wed Aug 28, 2013 6:01 pm
Location: Czech republic

Re: Kernel 5.8

Post by sailorMH »

xeno74 wrote:
Tue Jun 09, 2020 9:56 pm
We don't need an additional patch anymore. The Linux kernel supports the X5000 and X1000 completely now.
That is very nice, thanks.
xeno74 wrote: I tested QEMU 2.5.0 and QEMU 5.0.0 with KVM and KVM-PR today. KVM works without any problems. I was able to boot a Fienix guest with the alpha3 in a virtual e5500 QEMU machine with KVM on a Fienix X5000 host with the alpha3. (see screenshot)
according to wiki: https://wiki.qemu.org/Documentation/Platforms/POWER
KVM-PR is the only mode possible on G5 ( and probably alternatives like PaSemi)
KVM-HV is possible with IBM POWER7 and newer
is it right?
xeno74 wrote: Unfortunately KVM-PR doesn't work anymore on the X1000. I figured out that the kernels 5.7 and 5.8 are affected. I can boot virtual QEMU PowerPC machines with KVM-PR with the kernel 5.6 without any problems on my X1000.
OK, i.e. no VM's with new kernel? I will test it also.
Pegasos 2, AmigaOne X1000, Powebook G4, iMac G5, Powermac G5 Quad
MorphOS, AmigaOS, linux: MintPPC 11, Debian, Ubuntu ..., MacOS X

User avatar
xeno74
Posts: 6081
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.8

Post by xeno74 »

sailorMH wrote:
Wed Jun 10, 2020 8:01 am
KVM-PR is the only mode possible on G5 ( and probably alternatives like PaSemi)
KVM-HV is possible with IBM POWER7 and newer
is it right?
Yes, that's right. We can use KVM-PR with the AmigaOne X1000. The X5000 uses KVM-HV.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6081
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.8

Post by xeno74 »

Hi All,

Here is the alpha4 for testing.

New:
Issue: KVM-PR doesn't work anymore on the X1000 since the PowerPC updates 5.7-1 (Kernel 5.7-alpha7). KVM-HV works without any problems on the X5000.
I have reported this issue to the Linuxppc-dev mailing list. Link: PowerPC KVM-PR issue

Download: linux-image-5.8-alpha4-X1000_X5000.tar.gz

Image

Please test the kernels.

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6081
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.8

Post by xeno74 »

I bisected today because of the KVM-PR issue.

Result:

Code: Select all

9600f261acaaabd476d7833cec2dd20f2919f1a0 is the first bad commit
commit 9600f261acaaabd476d7833cec2dd20f2919f1a0
Author: Nicholas Piggin <npiggin@gmail.com>
Date:   Wed Feb 26 03:35:21 2020 +1000

    powerpc/64s/exception: Move KVM test to common code
    
    This allows more code to be moved out of unrelocated regions. The
    system call KVMTEST is changed to be open-coded and remain in the
    tramp area to avoid having to move it to entry_64.S. The custom nature
    of the system call entry code means the hcall case can be made more
    streamlined than regular interrupt handlers.
    
    mpe: Incorporate fix from Nick:
    
    Moving KVM test to the common entry code missed the case of HMI and
    MCE, which do not do __GEN_COMMON_ENTRY (because they don't want to
    switch to virt mode).
    
    This means a MCE or HMI exception that is taken while KVM is running a
    guest context will not be switched out of that context, and KVM won't
    be notified. Found by running sigfuz in guest with patched host on
    POWER9 DD2.3, which causes some TM related HMI interrupts (which are
    expected and supposed to be handled by KVM).
    
    This fix adds a __GEN_REALMODE_COMMON_ENTRY for those handlers to add
    the KVM test. This makes them look a little more like other handlers
    that all use __GEN_COMMON_ENTRY.
    
    Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20200225173541.1549955-13-npiggin@gmail.com

:040000 040000 ec21cec22d165f8696d69532734cb2985d532cb0 87dd49a9cd7202ec79350e8ca26cea01f1dbd93d M	arch
The following commit is the problem: powerpc/64s/exception: Move KVM test to common code

These changes were included in the PowerPC updates 5.7-1.

Code: Select all

git checkout d38c07afc356ddebaa3ed8ecb3f553340e05c969
(PowerPC updates 5.7-1) -> KVM-PR doesn't work.

After that:

Code: Select all

git revert d38c07afc356ddebaa3ed8ecb3f553340e05c969 -m 1
Result: KVM-PR works.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6081
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.8

Post by xeno74 »

Hi All,

I tried to revert the __GEN_REALMODE_COMMON_ENTRY fix for the latest Git kernel and for the stable kernel 5.7.2 but without any success. There was a lot of restructuring work during the kernel 5.7 development time in the PowerPC area so it isn't possible reactivate the old code. That means we have lost the whole KVM-PR support. I also reported this issue to Alexander Graf two days ago. He wrote: "Howdy :). It looks pretty broken. Have you ever made a bisect to see where the problem comes from?"

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

sailorMH
Posts: 121
Joined: Wed Aug 28, 2013 6:01 pm
Location: Czech republic

Re: Kernel 5.8

Post by sailorMH »

Pegasos 2, AmigaOne X1000, Powebook G4, iMac G5, Powermac G5 Quad
MorphOS, AmigaOS, linux: MintPPC 11, Debian, Ubuntu ..., MacOS X

User avatar
xeno74
Posts: 6081
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.8

Post by xeno74 »

sailorMH wrote:
Sun Jun 14, 2020 10:50 am
Alpha 4 works with DebianSid:
Many thanks for testing the alpha4! :-)

FYI because of the KVM-PR issue:
Nicholas Piggin wrote: Hey, thanks for debugging it and reporting. I'm looking into it, will
try to get a fix soon.

Thanks,
Nick
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6081
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.8

Post by xeno74 »

Nicholas Piggin has released a patch:
Nicholas Piggin wrote: Does this patch fix it for you?

The CTR register reload in the KVM interrupt path used the wrong save
area for SLB (and NMI) interrupts.

Code: Select all

Fixes: 9600f261acaaa ("powerpc/64s/exception: Move KVM test to common code")
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/kernel/exceptions-64s.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index e70ebb5c318c..fa080694e581 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -270,7 +270,7 @@ BEGIN_FTR_SECTION
 END_FTR_SECTION_IFSET(CPU_FTR_CFAR)
 	.endif
 
-	ld	r10,PACA_EXGEN+EX_CTR(r13)
+	ld	r10,IAREA+EX_CTR(r13)
 	mtctr	r10
 BEGIN_FTR_SECTION
 	ld	r10,IAREA+EX_PPR(r13)
@@ -298,7 +298,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
 
 	.if IKVM_SKIP
 89:	mtocrf	0x80,r9
-	ld	r10,PACA_EXGEN+EX_CTR(r13)
+	ld	r10,IAREA+EX_CTR(r13)
 	mtctr	r10
 	ld	r9,IAREA+EX_R9(r13)
 	ld	r10,IAREA+EX_R10(r13)
-- 
2.23.0
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

Post Reply