From 2fbd7e609e1803ac5e5c26e22aa8e4b5a6cddbb1 Mon Sep 17 00:00:00 2001 From: Oleksandr Tyshchenko Date: Fri, 29 Jan 2021 03:48:51 +0200 Subject: [PATCH] xen/ioreq: Do not let bufioreq to be used on other than x86 arches 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 Acked-by: Jan Beulich Acked-by: Julien Grall Acked-by: Paul Durrant --- xen/common/ioreq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/common/ioreq.c b/xen/common/ioreq.c index 67ef1f706e..a36137d41d 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.30.2