Le 15/06/2026 à 11:26, Andrew Randrianasulu a écrit :


вс, 14 июн. 2026 г., 23:35 BALATON Zoltan <[email protected] <mailto:[email protected]>>:

[...]


    But that's BookE e500 not the BookS POWER4 variant G5 you have so
    KVM may
    work differently on that and maybe it even has HV which probably works
better than PR.

oh yes, I noticed another "hidden" option in Kconfig about kvm pr on E5500/E6500

It was hidden because I did not select such machine in config, I guess.


    I think KVM was used on G4, e500 and newer POWER mostly
    with HV but I'm not sure if KVM PR on G5 was ever well supported.
    Did you
    try running the same Linux version that you have on your host under
    KVM PR
    first to verify that at least that works? I think that's where
    everybody
    should start with KVM before trying to boot other guest OSes.

     >> So considering the above, what may work is if you run a 32 bit
    ppc kernel
     >> (G4 version) on your G5 for the host not using it as 64 bit
    instead of
     >> ppc64 kernel and try a guest kernel that detects G5 CPU and
    knows how to
     >> handle the different cache line size.
     >
     >
     > Are you saying 32bit *Linux* ppc kvm as host can handle 64bit
    guest kernel ?

    No I meant trying a 32 bit host with 32 bit guest but the cache line
    size
    issue may still get in the way so maybe this does not help but for
    debugging may worth a try.

     > I am not ever sure firmware here can load 32bit ppc Linux .. I'll
    try of
     > course.

    Since G5 is backwards compatible with PPC32 maybe it should work but I
    know nothing about real PowerPC machines.

     > Or find and fix the emulation of
     >> different instructions on ppc64 in Linux KVM when running 32 bit
    ppc code
     >> on 64 but host. There supposed to be some support for that but
    maybe it's
     >> broken or never finished.


I found this email msg today:


https://lkml.iu.edu/1605.1/03841.html <https:// eur01.safelinks.protection.outlook.com/? url=https%3A%2F%2Flkml.iu.edu%2F1605.1%2F03841.html&data=05%7C02%7Cchristophe.leroy2%40cs-soprasteria.com%7C5e49653ba80147cc12e808decac03273%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639171124039051598%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=7gxjETKFSAMFjcnBQUuYcFHR2OE7b3W%2FGMRdHWF9X0Q%3D&reserved=0>

checked

linux-6.12.92/arch/powerpc/kvm/emulate.c and there seems to be ifdef only for

#ifdef CONFIG_PPC_BOOK3S                            kvmppc_core_queue_program(vcpu, SRR1_PROGTRAP); #else                           kvmppc_core_queue_program(vcpu,                               arch.shared->esr | ESR_PTR);
#endif


may be this ifdef should include CONFIG_PPC_BOOK3S_64 as well ?

I don't understand what you mean.

CONFIG_PPC_BOOK3S is defined as:

config PPC_BOOK3S
        def_bool y
        depends on PPC_BOOK3S_32 || PPC_BOOK3S_64

Christophe

Reply via email to