Thread (8 messages) 8 messages, 3 authors, 11d ago

Re: Does kvm_pr work on G5 mac with host kernel 6.12.xx ?

From: Andrew Randrianasulu <hidden>
Date: 2026-06-15 15:38:30

пн, 15 июн. 2026 г., 16:33 BALATON Zoltan [off-list ref]:
On Mon, 15 Jun 2026, Andrew Randrianasulu wrote:
quoted
I also tried to see "info registers" as you showed in another email from
2021 where you tried to use kvm-pr on qemu-emulated G5 and it showed

info registers
               NIP 0000000000000700   LR 0000000000000000 CTR
0000000000000000 XER 0000000000000000 CPU#0
MSR 8000000000000000 HID0 0000000060000000  HF 8000000000000000 iidx 3
didx
quoted
3                      TB 00000000 00000000 DECR 0
                                             GPR00 0000000000000000
0000000000000000 0000000000000000 0000000000000000
GPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
                       GPR08 0000000000000000 0000000000000000
0000000000000000 0000000000000000                          GPR12
0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
                       GPR20 0000000000000000 0000000000000000
0000000000000000 0000000000000000                          GPR24
0000000000000000 0000000000000000 0000000000000000 0000000000000000
                 GPR28 0000000000000000 0000000000000000 0000000000000000
0000000000000000
CR 00000000  [ -  -  -  -  -  -  -  -  ]             RES ffffffffffffffff
                       FPR00 0000000000000000 0000000000000000
0000000000000000 0000000000000000                          FPR04
0000000000000000 0000000000000000 0000000000000000 0000000000000000
                 FPR08 0000000000000000 0000000000000000 0000000000000000
0000000000000000
FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
                       FPR16 0000000000000000 0000000000000000
0000000000000000 0000000000000000                          FPR20
0000000000000000 0000000000000000 0000000000000000 0000000000000000
                 FPR24 0000000000000000 0000000000000000 0000000000000000
0000000000000000                          FPR28 0000000000000000
0000000000000000 0000000000000000 0000000000000000
FPSCR 0000000000000000
                       SRR0 0000000000000100  SRR1 8000000000080000
PVR
quoted
00000000003c0301 VRSAVE 0000000000000000      SPRG0 0000000000000000
SPRG1
quoted
0000000000000000  SPRG2 0000000000000000  SPRG3 0000000000000000
SPRG4
quoted
0000000000000000 SPRG5 0000000000000000  SPRG6 0000000000000000  SPRG7
0000000000000000
SDR1 0000000000000000   DAR 0000000000000000  DSISR 0000000000000000

(qemu) q

not sure if instruction pointer moved or not ...

looking at some scroll buffer in Termux (I ssh into powermac ) it was at
700 all 3 times I typed "info registers" into qemu monitor.

but this debug msg

[154992.595845] Couldn't emulate instruction 0x00000000 (op 0 xop 0)
[154992.595859] kvmppc_exit_pr_progint: emulation at 100 failed
(00000000)
quoted

fills logs FAST!
NIP=0x700 is illegal instruction exception due to trying to execute 0
opcode at 0x100 which is the reset vector but shouldn't it try to start at
0xfff00100? Maybe there's some issue with setting up KVM correctly? You
can trace what is executed in TCG with -d in_asm but that does not work
for KVM as it's a TCG debug option. I don't know how to trace execution
with KVM but probably there are some trace points for that. Maybe you get
some info with -trace enable="kvm*" but I don't know how to understand
that output.
-trace *kvm* (on qemu 6.1.1) ends with

kvm_vcpu_ioctl cpu_index 0, type 0x8010aeac, arg 0xe81a8080

kvm_vcpu_ioctl cpu_index 0, type 0x8010aeac, arg 0xe81a8080

kvm_vcpu_ioctl cpu_index 0, type 0x8010aeac, arg 0xe81a8080

kvm_vcpu_ioctl cpu_index 0, type 0x8010aeac, arg 0xe81a8080
kvm_vcpu_ioctl cpu_index 0, type 0x84d0ae84, arg 0xe81a7b78

kvm_vcpu_ioctl cpu_index 0, type 0x8010aeac, arg 0xe81a8018

kvm_vcpu_ioctl cpu_index 0, type 0x8010aeac, arg 0xe81a8018
kvm_vcpu_ioctl cpu_index 0, type 0x8010aeac, arg 0xe81a8018

kvm_vcpu_ioctl cpu_index 0, type 0x8010aeac, arg 0xe81a8018
kvm_failed_spr_set Warning: Unable to set SPR 1013 to KVM: Invalid
argument
kvm_vcpu_ioctl cpu_index 0, type 0x2000ae80, arg (nil)

kvm_vcpu_ioctl cpu_index 0, type 0x2000ae80, arg (nil)

My hack idea  about adding || defined CONFIG_PPC_BOOK3S_64 to two statement
in

arch/powerpc/kvm/emulate.c

also did not improve situation :(

but at least I know I am running with patched kvm_pr module because I
commented this kernel printk about "failed to emulate instruction" and this
line disappeared from dmesg.



Regards,
BALATON Zoltan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help