Hi Reiji, On Sun, Apr 03, 2022 at 08:57:47PM -0700, Reiji Watanabe wrote: > > +int kvm_handle_cp10_id(struct kvm_vcpu *vcpu) > > +{ > > + int Rt = kvm_vcpu_sys_get_rt(vcpu); > > + u32 esr = kvm_vcpu_get_esr(vcpu); > > + struct sys_reg_params params; > > + int ret; > > + > > + /* UNDEF on any unhandled register or an attempted write */ > > + if (!kvm_esr_cp10_id_to_sys64(esr, ¶ms) || params.is_write) { > > + kvm_inject_undefined(vcpu); > > Nit: For debugging, it might be more useful to use unhandled_cp_access() > (, which needs to be changed to support ESR_ELx_EC_CP10_ID though) > rather than directly calling kvm_inject_undefined(). A very worthy nit, you spotted my laziness in shunting straight to kvm_inject_undefined() :) Thinking about this a bit more deeply, this code should be dead. The only time either of these conditions would happen is on a broken implementation. Probably should still handle it gracefully in case the CP10 handling in KVM becomes (or is in my own patch!) busted. > Reviewed-by: Reiji Watanabe <reijiw@xxxxxxxxxx> Appreciated! -- Thanks, Oliver _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm