qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 6/6] vfio-ccw: add handling for async channel


From: Halil Pasic
Subject: Re: [Qemu-devel] [PATCH v3 6/6] vfio-ccw: add handling for async channel instructions
Date: Wed, 30 Jan 2019 18:00:45 +0100

On Wed, 30 Jan 2019 14:22:12 +0100
Cornelia Huck <address@hidden> wrote:

> +static void fsm_async_retry(struct vfio_ccw_private *private,
> +                         enum vfio_ccw_event event)
> +{
> +     private->cmd_region->ret_code = -EAGAIN;
> +}
> +

This is essentially dead code at the moment, isn't it? I mean we hold the
io_mutex whenever we are in state VFIO_CCW_STATE_CP_PROCESSING. And we
call vfio_ccw_fsm_event() under the very same mutex.



> @@ -213,26 +323,31 @@ fsm_func_t 
> *vfio_ccw_jumptable[NR_VFIO_CCW_STATES][NR_VFIO_CCW_EVENTS] = {
>       [VFIO_CCW_STATE_NOT_OPER] = {
>               [VFIO_CCW_EVENT_NOT_OPER]       = fsm_nop,
>               [VFIO_CCW_EVENT_IO_REQ]         = fsm_io_error,
> +             [VFIO_CCW_EVENT_ASYNC_REQ]      = fsm_async_error,
>               [VFIO_CCW_EVENT_INTERRUPT]      = fsm_disabled_irq,
>       },
>       [VFIO_CCW_STATE_STANDBY] = {
>               [VFIO_CCW_EVENT_NOT_OPER]       = fsm_notoper,
>               [VFIO_CCW_EVENT_IO_REQ]         = fsm_io_error,
> +             [VFIO_CCW_EVENT_ASYNC_REQ]      = fsm_async_error,
>               [VFIO_CCW_EVENT_INTERRUPT]      = fsm_irq,
>       },
>       [VFIO_CCW_STATE_IDLE] = {
>               [VFIO_CCW_EVENT_NOT_OPER]       = fsm_notoper,
>               [VFIO_CCW_EVENT_IO_REQ]         = fsm_io_request,
> +             [VFIO_CCW_EVENT_ASYNC_REQ]      = fsm_async_request,
>               [VFIO_CCW_EVENT_INTERRUPT]      = fsm_irq,
>       },
>       [VFIO_CCW_STATE_CP_PROCESSING] = {
>               [VFIO_CCW_EVENT_NOT_OPER]       = fsm_notoper,
>               [VFIO_CCW_EVENT_IO_REQ]         = fsm_io_retry,
> +             [VFIO_CCW_EVENT_ASYNC_REQ]      = fsm_async_retry,

Used here.

Regards,
Halil

>               [VFIO_CCW_EVENT_INTERRUPT]      = fsm_irq,
>       },




reply via email to

[Prev in Thread] Current Thread [Next in Thread]