Hi Philippe, On Tue, Nov 13, 2018 at 11:51:54PM +0100, Philippe Mathieu-Daudé wrote: > On Tue, Nov 13, 2018 at 8:29 PM Philippe Mathieu-Daudé > <phili...@mathieu-daude.net> wrote: > > On Tue, Nov 13, 2018 at 8:08 PM Aleksandar Markovic > > <aleksandar.marko...@rt-rk.com> wrote: > > > > > > From: Aleksandar Markovic <amarko...@wavecomp.com> > > > > > > Disable R5900 support. There are some outstanding issues related > > > to ABI support and emulation accuracy, that were not understood > > > well during review process. Disable to avoid backward compatibility > > > issues. > > If the issues you mentioned are "the R5900 tcg opcodes are not > implemented correctly", then this patch is OK, because no cpu can use > the R5900 opcodes.
The issue is that the Linux kernel emulates certain opcodes (e.g. LL, SC, RDHWR, DMULT, etc.) by psABI requirements. This is a common requirement for many other MIPS implementations, not only the R5900. It is trivial to do this with QEMU user mode, but evidently for whatever reason Aleksandar does not permit this emulation. > At some point while reading your reviews, I understood the R5900 > patches introduced incorrect behaviors for the non-R5900 cpus. In this > case this patch wouldn't suffice. No, that was never the case and I'm not aware of any such problems. However, there is a refactoring series, and we have observed preexisting bugs in the MIPS emulation, unrelated to the R5900. The opcode decoder could also be improved, such as in asserting reserved instructions in more cases where opcodes are invalid, etc. > Hoping I misinterpreted your reviews, then this patch is OK. > With one of the suggested comments: > Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> > > Then we will fix this for the 4.0 release. What exactly needs to be fixed regarding the psABI? The relevant opcodes would need to stay, and not be prohibited and removed as Aleksandar has suggested, since such opcode removal breaks the psABI requirements. Finally, as Maciej explained in some detail, the document that Aleksandar just recently requested is known to not exist, for any MIPS implementation, so we are not going to make any progress on that either. Fredrik