qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Qemu / KVM On Powermac G5 MP970


From: BALATON Zoltan
Subject: Re: Qemu / KVM On Powermac G5 MP970
Date: Sun, 15 Jan 2023 19:17:41 +0100 (CET)

On Sun, 15 Jan 2023, Dan Whitehouse wrote:
Thanks to all of you for replying. I’ll keep an eye on things and keep testing from time to time - I suspect that I very much lack the skills to make much of a contribution in terms of either kernel, kvm or qemu hacking.
I’m also aware that my interest is deprecated hardware.

I'm afraid waiting is not likely to make any progress as there are very few people still interested in this and they are probably in the same situation as you. So if you at least have free time for this then try to improve your skills by reading and researching info on it or try to understand it deeper as the worst thing that could happen is that you don't find out anything but maybe still learn something. Don't just give up without even trying.

I suspect that were I fortunate enough to have Talos hardware kvm would be a very different story as I believe that that architecture has proper hardware support for virtualisation where on G5 its a bit of a “hack”.

It does not really matter unless you want to run POWER8+ guests as I think KVM HV only helps if you want to run guests written for the same or very close CPU as the host. If you want to run old stuff it's still the same hackish KVM PR even on CPUs that have virtualisation as it needs to emulate the differences with the old CPUs. If you read the posts in the link you'll see. If you're running G4 code on G5 you can expect problems, best to first try something with KVM that runs on the same machine as then at least the differences between CPUs is not an issue. So maybe once a ppc64 Linux distro works you can try others.

Regards,
BALATON Zoltan

Having said that, I do have hardware that I would be more than happy to help use for testing, and I possess rudimentary development / systems administration skills so if I can assist in any way, please either let me know via this list, or contact me on Libera IRC (I am “crab” in #debianppc / #debian-ports).

Thanks again, and much respect and appreciation to all of you for your work.

Dan

On 15 Jan 2023, at 14:25, BALATON Zoltan <balaton@eik.bme.hu> wrote:

On Sun, 15 Jan 2023, Daniel Henrique Barboza wrote:
Ccing Mark

On 1/12/23 11:18, Dan Whitehouse wrote:
Hi all,
I have a Powermac G5 running Debian (from Ports) with kernel version:
Linux powermac-g5 6.0.0-6-powerpc64 #1 SMP Debian 6.0.12-1 (2022-12-09) ppc64 
GNU/Linux
My aim is to get Qemu working with KVM acceleration, although I am unsure if 
that is even possible.
Any attempt to do so seems to result in the behaviour described here:
Re: [PATCH 2/9] target/ppc: add errp to kvmppc_read_int_cpu_dt() 
<https://www.mail-archive.com/qemu-devel@nongnu.org/msg898334.html>
mail-archive.com 
<https://www.mail-archive.com/qemu-devel@nongnu.org/msg898334.html>
        apple-touch-icon-114x114.png 
<https://www.mail-archive.com/qemu-devel@nongnu.org/msg898334.html>
<https://www.mail-archive.com/qemu-devel@nongnu.org/msg898334.html>
I have managed (after a fair bit of struggle to get Debian working under qemu 
(without kvm) and I also got MacOS 9 working as well (albeit with horribly 
garbled colours).
Ive seen some posts on the KVM mailing list that may refer to whatever is going 
wrong here:
'Re: [PATCH] kvm-pr: manage illegal instructions' 
<https://marc.info/?l=kvm-ppc&m=146364192030854&w=2>
marc.info <https://marc.info/?l=kvm-ppc&m=146364192030854&w=2>
        <https://marc.info/?l=kvm-ppc&m=146364192030854&w=2>
<https://marc.info/?l=kvm-ppc&m=146364192030854&w=2>
And it may well be the case that this is a KVM issue more than a Qemu wrong and 
I’m therefore posting in the wrong list (in which case apologies). As you can 
see though there has been no activity since 2016.

I took a look at the thread and I'm not entirely convinced that QEMU is 100%
in the clear. The root issue seems to be kvm-pr kernel code though.

Mark managed to run kvm-pr in a G5 in the past so I believe he can help you
with any pointers. What I can say that you'll have a bumpy road ahead -

I think he did that on G4 but maybe also on G5, I don't know. I only know about 
this blog which shows it running on newer CPU (in that case POWER9):

https://www.talospace.com/search/label/KVM

which may have some useful info also for G5 but some of that like KMV-HV and 
newer MMU modes are not applicable to G5.

I’d be grateful if either someone could confirm that this is a non starter or 
give me any pointers.

It's not a non-starter - it's feasible and it was done before. But I'd say 
you're in for some heavy kernel (and probably QEMU) hacking to make it work 
properly.

You'll probably have to dig deeper into KVM to understand what's causing the 
problem. I don't know much about how to debug that but here are some links that 
may help:

https://arkivm.github.io/kernel%20development/2020/11/01/qemu-kvm-1gb-pages/

https://www.linux-kvm.org/page/Perf_events

I don't know how relevant or up to date these are, I've only tried to debug 
this once on G5 emulated by QEMU on X86_64 as I don't have PPC hardware but hit 
a QEMU problem in emiulated KVM that I could not overcome:

https://lists.nongnu.org/archive/html/qemu-ppc/2021-06/msg00146.html

Not sure if that helps but that's all I have. If you find out something it 
might be helpful for others to post it here.

Regards,
BALATON Zoltan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]