VMCALL is also probably ok
in most scenarios, but patching L2's code from L0 KVM is sketchy.
The same is true for the VMware #GP interception case.
I highly doubt that will ever work out as intended for the modified IO #GP
behavior. The only way emulating #GP in L2 is correct if L1 wants to pass
through the capabilities to L2, i.e. the I/O access isn't intercepted by L1.
That seems unlikely.
If the I/O is is intercepted by L1, bypassing the IOPL and
TSS-bitmap checks is wrong and will cause L1 to emulate I/O for L2 userspace
that should never be allowed. Odds are there isn't a corresponding emulated
port in L1, i.e. there's no major security flaw, but it's far from good
behavior.