> -----Original Message-----
> From: Oleksandr Tyshchenko <olekst...@gmail.com>
> Sent: 29 January 2021 01:49
> To: xen-devel@lists.xenproject.org
> Cc: Oleksandr Tyshchenko <oleksandr_tyshche...@epam.com>; Paul Durrant 
> <p...@xen.org>; Julien Grall
> <jul...@xen.org>; Stefano Stabellini <sstabell...@kernel.org>; Andrew Cooper
> <andrew.coop...@citrix.com>
> Subject: [PATCH V6 23/24] xen/ioreq: Do not let bufioreq to be used on other 
> than x86 arches
> 
> From: Oleksandr Tyshchenko <oleksandr_tyshche...@epam.com>
> 
> This patch prevents the device model running on other than x86
> systems to use buffered I/O feature for now.
> 
> Please note, there is no caller which requires to send buffered
> I/O request on Arm currently and the purpose of this check is
> to catch any future user of bufioreq.
> 
> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshche...@epam.com>
> 

Acked-by: Paul Durrant <p...@xen.org>

> ---
> Please note, this is a split/cleanup/hardening of Julien's PoC:
> "Add support for Guest IO forwarding to a device emulator"
> 
> Changes V5 -> V6:
>    - new patch
> ---
> ---
>  xen/common/ioreq.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/xen/common/ioreq.c b/xen/common/ioreq.c
> index 67ef1f7..a36137d 100644
> --- a/xen/common/ioreq.c
> +++ b/xen/common/ioreq.c
> @@ -629,6 +629,9 @@ static int ioreq_server_create(struct domain *d, int 
> bufioreq_handling,
>      unsigned int i;
>      int rc;
> 
> +    if ( !IS_ENABLED(CONFIG_X86) && bufioreq_handling )
> +        return -EINVAL;
> +
>      if ( bufioreq_handling > HVM_IOREQSRV_BUFIOREQ_ATOMIC )
>          return -EINVAL;
> 
> --
> 2.7.4



Reply via email to