On 06.04.2023 15:27, Andrew Cooper wrote: > Exceptions and NPT intercepts almost have the same layout, but NPT has bits > above 31 in the error code, and the name for exitinfo2 really does want > distinguishing between cr2 and gpa. > > In nsvm_vcpu_vmexit_inject() rearrange VMEXIT_NPF to fall through instead of > repeating the exitinfo1 write. Use the fallthrough pseudo keyword instead of > a comment. > > In VMEXIT_NPF, as we're editing the printk() anyway, switch to using the newer > domain_crash() form. > > No functional change. > > Signed-off-by: Andrew Cooper <[email protected]>
Reviewed-by: Jan Beulich <[email protected]> with one remark / suggestion: > @@ -455,6 +461,10 @@ struct vmcb_struct { > uint64_t :59; > bool mov_insn:1; /* MOV, as opposed to LMSW, CLTS, etc */ > } mov_cr; > + struct { > + uint64_t ec; > + uint64_t gpa; > + } npt; Maybe better "npf" than "npt", as it's describing the exit/fault? Jan
