>>> On 18.11.16 at 18:14, <paul.durr...@citrix.com> wrote: > +static int dm_op_inject_trap(struct domain *d, unsigned int vcpuid, > + uint16_t vector, uint8_t type, > + uint8_t insn_len, uint32_t error_code, > + unsigned long cr2) > +{ > + struct vcpu *v; > + > + if ( vector > INT16_MAX ) > + return -EINVAL;
Please limit vector to uint8_t and delete this strange (architecturally wrong) check. > + if ( vcpuid >= d->max_vcpus || (v = d->vcpu[vcpuid]) == NULL ) > + return -EINVAL; ENOENT (to make error reasons distinguishable for the caller)? > + case DMOP_inject_msi: > + { > + struct xen_dm_op_inject_msi *data = > + &op.u.inject_msi; > + > + rc = hvm_inject_msi(d, data->addr, data->data); Line length clearly is not an issue here, but if you want to keep the helper variable, then please constify it (which I guess would apply to some of the earlier patches too). Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel