<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 1, 2018, at 1:13 AM, Thomas Huth <<a href="mailto:thuth@redhat.com" class="">thuth@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On 31.01.2018 21:59, James Lyons via OpenBIOS wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class=""><br class="">On 01/30/2018 11:14 AM, Jd Lyons wrote:<br class=""><blockquote type="cite" class=""><br class=""><blockquote type="cite" class="">On Jan 30, 2018, at 10:47 AM, Jd Lyons via OpenBIOS<br class=""><<a href="mailto:openbios@openbios.org" class="">openbios@openbios.org</a>> wrote:<br class=""><br class=""><br class=""><br class=""><blockquote type="cite" class="">On Jan 30, 2018, at 9:10 AM, BALATON Zoltan <<a href="mailto:balaton@eik.bme.hu" class="">balaton@eik.bme.hu</a>> wrote:<br class=""><br class="">On Mon, 29 Jan 2018, Jd Lyons via OpenBIOS wrote:<br class=""><blockquote type="cite" class="">Ok, with a little help for Paul at the kvm-ppc mailing list, it<br class="">seems the issue maybe that the BootX or more likely mach_kernel it<br class="">trying to write something to or probe for an L3 cache.<br class=""></blockquote>With kvm could be but on TCG it doesn't seem that way. Enabling some<br class="">SPR debug options in target/ppc/translate_init.c I see this (with<br class="">qemu git HEAD without other patches):<br class=""><br class="">$ ppc-softmmu/qemu-system-ppc -cpu G4 -d int<br class="">Write SPR 272 110 <= 07e00000<br class="">Read SPR 287 11f => 000c0209<br class="">Read SPR 25 019 => 07e00000<br class="">Read SPR 25 019 => 07e00000<br class="">Read SPR 287 11f => 000c0209<br class="">Raise exception at fff08978 => 00000003 (40000000)<br class="">Write SPR 273 111 <= 07df7ff0<br class="">Write SPR 274 112 <= 20000004<br class="">Read SPR 272 110 => 07e00000<br class="">Read SPR 273 111 => 07df7ff0<br class="">Read SPR 274 112 => 20000004<br class="">Read SPR 26 01a => fff08978<br class="">Read SPR 27 01b => 40000030<br class=""><br class="">$ ppc-softmmu/qemu-system-ppc -cpu 7447a -d int<br class="">Write SPR 272 110 <= 07e00000<br class="">Read SPR 287 11f => 80030102<br class="">Read SPR 25 019 => 07e00000<br class="">Read SPR 25 019 => 07e00000<br class="">Read SPR 287 11f => 80030102<br class="">Raise exception at fff08978 => 0000004e (00)<br class=""><br class="">So OpenBIOS gets unexpected exception very early right after reading<br class="">the PVR so maybe it's a problem in OpenBIOS before it gets to what<br class="">you're describing. Is this already fixed?<br class=""><br class="">Regards,<br class="">BALATON Zoltan<br class=""><br class="">-- <br class="">OpenBIOS                 <a href="http://openbios.org/" class="">http://openbios.org/</a><br class="">Mailinglist:  <a href="http://lists.openbios.org/mailman/listinfo" class="">http://lists.openbios.org/mailman/listinfo</a><br class="">Free your System - May the Forth be with you<br class=""></blockquote>It looks like in TCG mode that it tries to read these invalid spr’s<br class=""><br class="">1018<br class="">1011<br class="">1016<br class="">1012<br class=""><br class="">This doesn’t cause a halt, as the kernel boots.<br class=""><br class=""><br class=""></blockquote>What I’m assuming is the kernel is trying to read the state of spr<br class="">1018 (r13), but it can’t read it. It does seem to exist for the 7447a<br class="">it’s value is just zero( 0x00000000 ) and of course you can’t write<br class="">anything there.<br class=""><br class="">I don’t think the kernel is trying to write anything there, I think<br class="">it’s just probing the state of the register to determine if the L3<br class="">cache exists. There are just too many references to the r13 in the xun<br class="">source for me to figure out how to stop the kernel from trying to make<br class="">a read here. Paul seems to suggest it could be fixed in KVM, but it<br class="">seems like I could fix it in Qemu if I knew how to get Qemu to pass<br class="">that spr( 1018 ) to the guest as readable with the value 0x00000000.<br class=""><br class="">Would anyone be able to help me do that?<br class=""><br class=""></blockquote>Ok, I tried like this:<br class=""><br class="">spr_register_kvm(env, SPR_L3CR, "L3CR",<br class="">                    <span class="Apple-converted-space"> </span>SPR_NOACCESS, SPR_NOACCESS,<br class="">                    <span class="Apple-converted-space"> </span>&spr_read_generic, &spr_write_generic,<br class="">                    <span class="Apple-converted-space"> </span>KVM_REG_PPC_L3CR, 0x00000000);<br class=""><br class="">And I defined:<br class=""><br class="">#define KVM_REG_PPC_L3CR    (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x3fa)<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Did you also patch the kernel accordingly? The KVM code in the kernel</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">needs to be aware of this, too. grep for KVM_REG_PPC_ in</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">arch/powerpc/kvm/ to see some examples.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Thomas</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div><div>Ok, thanks Thomas, that makes sense, I’ll see if I can make heads or tails of the code.</div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">--<span class="Apple-converted-space"> </span></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">OpenBIOS                 </span><a href="http://openbios.org/" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://openbios.org/</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Mailinglist:  </span><a href="http://lists.openbios.org/mailman/listinfo" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://lists.openbios.org/mailman/listinfo</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Free your System - May the Forth be with you</span></div></blockquote></div><br class=""></body></html>