Hi Richard,
On Sat, 2026-10-10 at 09:30 +0200, Richard Henderson wrote:
>
> When I implemented the VIS{3,4} stuff a couple of years ago, I tried
> to add a newer cpu (though I forget which model). I couldn't get a
> kernel to boot with that and sun4u, so in the end I left the cpu out
> and left the extensions as plain cpu features.
>
> The biggest problem with sun4v is that it's incomplete. It has the
> most promise as an emulation platform because it is explicitly a
> hyper<v<isor platform. In the ideal case, QEMU would not faithfully
> model the hardware, but would instead model the hypervisor
> interface. Which would make lots of stuff far easier and quicker to
> emulate -- most notably the TLB.I agree. I looked into the sun4v hypervisor first, as that sounded like the ideal approach. I did however come to realize, as you say, that it would be a lot of work. Also there is the requirement for bundling the OpenSPARC firmware and building a boot image (no -kernel), which is a bit overkill for kernel testing. Based on that reasoning I've already done some experimenting, by writing the crypto code for sun4u. Much of the code would be shared either way, so if the sun4u approach was rejected, I would still be able to use much of it. I've managed to get it working well enough to exercise the crypto tests. It's not in a upstreamable state yet, still work in progress. I took some shortcuts just to get to a proof of concept, and I wasn't sure it would every be finished with this approach. > > But it's a big packet of work and no one has done it. > Indeed, and much more than what is needed to achieve the goal of getting the crypto tests running, so would be out of scope for me, at least. If you would be willing to accept a contribution based on my described sun4u approach, I could spend some time cleaning it up and run more thorough tests to iron out any remaining issues (which I'm sure there are). Mark, for this to work Linux needs a hwcap-list property on the cpu node before it uses the instructions. What are your thougts about QEMU passing the list in a fw_cfg file, with OpenBIOS adding the property in cpu_generic_init()? /Stian
signature.asc
Description: This is a digitally signed message part
