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

Re: [Xen-devel] [PATCH v3 05/10] ioreq: allow dispatching ioreqs to internal servers



On 30.09.2019 15:32, Roger Pau Monne wrote:
> --- a/xen/arch/x86/hvm/ioreq.c
> +++ b/xen/arch/x86/hvm/ioreq.c
> @@ -1482,7 +1482,16 @@ int hvm_send_ioreq(ioservid_t id, ioreq_t *proto_p, 
> bool buffered)
>      ASSERT(s);
>  
>      if ( buffered )
> -        return hvm_send_buffered_ioreq(s, proto_p);
> +    {
> +        if ( likely(!hvm_ioreq_is_internal(id)) )
> +            return hvm_send_buffered_ioreq(s, proto_p);
> +
> +        ASSERT_UNREACHABLE();
> +        return X86EMUL_UNHANDLEABLE;
> +    }
> +
> +    if ( hvm_ioreq_is_internal(id) )
> +        return s->handler(proto_p, s->data);
>  
>      if ( unlikely(!vcpu_start_shutdown_deferral(curr)) )
>          return X86EMUL_RETRY;

Wouldn't it be better to handle internal ones first, before even
looking at the "buffered" input? The difference between buffered
and non-buffered for external ones is whether to wait for a reply
iirc; such a difference simply doesn't exist for internal ones.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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