On Thursday 06 November 2014 03:59 PM, Alexander Graf wrote: > > > >> Am 06.11.2014 um 11:00 schrieb Aravinda Prasad <aravi...@linux.vnet.ibm.com>: >> >> >>
[...] >>> >>> And, perhaps this was discussed in an earlier patch, but couldn't you just >>> do: >>> >>> li 3,KVMPPC_H_REPORT_MC_ERR >>> >>> here and avoid the patching altogether? >> >> KVMPPC_H_REPORT_MC_ERR def in not visible in spapr-rtas.S, either I can >> define it in spapr-rtas.S as already done for KVMPPC_H_RTAS or patch it >> in ibm,nmi-register call. > > Could you include the header? hmm. ok. > >> >> It is very unlikely that the KVMPPC_H_REPORT_MC_ERR will be changed, but >> I prefer to patch it to avoid maintaining it in both places. What do you >> think? > > Hypercall numbers need to be stable anyway in case we migrate from an older > qemu version, so it must not change. ok > > > Alex > >> >>> >>> >>> >>>>> + sc 1 /* Issue H_CALL */ >>>>> + cmpdi cr0,3,0 >>>>> + beq cr0,1b /* retry KVMPPC_H_REPORT_MC_ERR */ >>>>> + mtsprg 2,4 >>>>> + ld 4,0(3) >>>>> + mtsrr0 4 /* Restore srr0 */ >>>>> + ld 4,8(3) >>>>> + mtsrr1 4 /* Restore srr1 */ >>>>> + ld 4,16(3) >>>>> + mtcrf 0,4 /* Restore cr */ >>>>> + addi 3,3,24 >>>>> + mfsprg 4,2 >>>>> + /* >>>>> + * Branch to address registered by OS. The branch address is >>>>> + * patched in the ibm,nmi-register rtas call. >>>>> + */ >>>>> + ba 0x0 >>>>> + b . >> >> -- >> Regards, >> Aravinda >> > -- Regards, Aravinda