On Fri, 21 Feb 2025 at 14:02, Wei Liu <li...@linux.microsoft.com> wrote: > > Hi, > > Microsoft's Linux Systems Group developed a Linux driver for the Microsoft > Hypervisor (MSHV for short). The driver is being upstreamed. The first > supported VMM is Cloud Hypervisor. QEMU will be the second supported > VMM. > > The plan is to write an mshv accelerator in QEMU. The accelerator is still in > the works. > > MSHV doesn't emulate instructions. VMMs are supposed to bring their own > instruction emulator. The path we've chosen is to reuse what's already in > QEMU. > The instruction emulator in HVF looks good for what we need. > > This patch series attempts to make the instruction emulator in HVF a common > component for the i386 target. It removes HVF specific code by either using a > set of hooks or moving it to better locations. The new incoming MSHV > accelerator will implement the hooks, and where necessary, enhance the > emulator > and / or add new hooks.
If you want to make the hvf decoder more widely used you might want to look at this old patch to it that was never applied (issues in code review not addressed by the submitter): https://lore.kernel.org/qemu-devel/CAFEAcA8yaBOD3KXc-DY94oqzC5wkCENPkePgVCybqR=9nmd...@mail.gmail.com/ which is trying to fix a problem where an overlong string of prefix bytes causes the decoder to misbehave. (PS: if in the future you should ever find yourself wanting to do an equivalent "decode loads/stores the hypervisor doesn't handle" for Arm, use decodetree, not a hand-rolled decoder...) thanks -- PMM