On 26.04.2021 14:45, Andrew Cooper wrote:
> ... rather than having separate definitions locally.  EXC_HAS_EC in particular
> is missing #CP, #VC and #SX vs X86_EXC_HAVE_EC.
> 
> Also switch a raw 14 for X86_EXC_PF in x86_emul_pagefault().
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <[email protected]>
> ---
> CC: Jan Beulich <[email protected]>
> CC: Roger Pau MonnĂ© <[email protected]>
> CC: Wei Liu <[email protected]>
> ---
>  xen/arch/x86/x86_emulate/x86_emulate.c | 739 
> ++++++++++++++++-----------------
>  xen/arch/x86/x86_emulate/x86_emulate.h |   4 +-
>  2 files changed, 361 insertions(+), 382 deletions(-)

This is a lot of code churn (almost all some slight growth) for this
kind of a change. I'm not opposed, but I'd like to explore alternatives
first. I know you often dislike token concatenation in macros, which
would be my first suggestion to get churn down here. The other option,
not reducing churn but reducing rather than increasing code volume (and
hence imo helping readability), would be to have shorthands for at
least some frequently raised exceptions like #UD and #GP - e.g.
generate_ud_if(). Thougths?

Jan

Reply via email to