Re: [Discussion] x86: Guest Support for APX

Chang S. Bae
2025-09-21T22:52:53Z

On 9/19/2025 3:13 PM, Paolo Bonzini wrote:
>
> You're right that gets very complicated quickly, while most cases of
> MMIO emulation are for legacy devices and R16-R31 are unlikely to
> appear in MMIO instructions for these legacy devices.
>
> However, at least MOVs should be extended to support APX registers as
> source or destination operands, and there should also be support for
> base and index in the addresses. This means you have to parse REX2,
> but EVEX shouldn't be needed as these instructions are in "legacy map
> 0" (aka one-byte).
>
> At this point, singling out MOVs is not useful and you might as well
> implement REX2 for all instructions. EVEX adds a lot of extra cases
> including three operand integer instructions and no flag update, but
> REX2 is relatively simple.
...>
> I think pragmatic is fine, but in some cases too restrictive makes it
> harder to track what is implemented and what isn't. Again, see the
> above comment about implementing REX2 fully while limiting EVEX
> support to the minimum (or hopefully leaving it out altogether).

Thanks for the guidance. This makes sense to me.

I think the high-level direction is clear now. I'll prepare and post an
RFC series, once it's ready, to walk through the details.

Thanks,
Chang