On Thu Mar 12, 2026 at 4:24 PM CET, Jan Beulich wrote:
> On 12.03.2026 14:45, Alejandro Vallejo wrote:
>> While the #UD handler is dead code when CONFIG_HVM_FEP is disabled it's
>> helpful to keep the function around. Reinject #UD in the non-FEP case so
>> DCE can remove the rest.
>
> For the code change - I don't think this should be a separate change. I also
> didn't understand Andrew's earlier request to split the original change to
> go this far.

I don't mind either way. Fold it with the prior patch if you think it's better
that way.

>
> As to the "dead code" aspect (using Misra terminology it's really
> "unreachable code" aiui), we may need to deal with that, as we've accepted
> that rule. Yes, Eclair is unlikely to be able to spot this, yet that doesn't
> make the issue go away.

That's also the case for handlers of other VMEXIT error codes under certain
configurations. The original patch I sent fully removed the #UD handler to
restrict the unreachable part to just a BUG_ON(). But even that was incomplete.

The solution is some creative filtering at the switch condition, but that's
something I haven't had time to experiment with yet.

Cheers,
Alejandro

Reply via email to