[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 7/8] dm_op: convert HVMOP_inject_trap and HVMOP_inject_msi



On 17/01/17 17:29, Paul Durrant wrote:
> diff --git a/xen/include/public/hvm/dm_op.h b/xen/include/public/hvm/dm_op.h
> index 8e9bef1..abe8bbe 100644
> --- a/xen/include/public/hvm/dm_op.h
> +++ b/xen/include/public/hvm/dm_op.h
> @@ -273,6 +273,52 @@ struct xen_dm_op_set_mem_type {
>      uint64_aligned_t first_pfn;
>  };
>  
> +/*
> + * XEN_DMOP_inject_trap: Inject a trap into a VCPU, which will get taken up
> + *                       when it is next scheduled.
> + *
> + * Note that the caller should know enough of the state of the CPU before
> + * injecting, to know what the effect of injecting the trap will be.
> + */
> +#define XEN_DMOP_inject_trap 13
> +
> +struct xen_dm_op_inject_trap {

Along with internal fixing of the (mis)use of the term trap inside the
hypervisor, please s/trap/event/ in this new API.

> +    /* IN - index of vCPU */
> +    uint32_t vcpuid;
> +    /* IN - interrupt vector */
> +    uint8_t vector;
> +    /* IN - trap type (DMOP_TRAP_* ) */
> +    uint8_t type;
> +/* NB. This enumeration precisely matches hvm.h:X86_EVENTTYPE_* */
> +# define XEN_DMOP_TRAP_ext_int    0 /* external interrupt */
> +# define XEN_DMOP_TRAP_nmi        2 /* nmi */
> +# define XEN_DMOP_TRAP_hw_exc     3 /* hardware exception */
> +# define XEN_DMOP_TRAP_sw_int     4 /* software interrupt (CD nn) */
> +# define XEN_DMOP_TRAP_pri_sw_exc 5 /* ICEBP (F1) */
> +# define XEN_DMOP_TRAP_sw_exc     6 /* INT3 (CC), INTO (CE) */
> +    /* IN - enstruction length */

What is an enstruction? :)

Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.