]> xenbits.xensource.com Git - xen.git/commitdiff
xen/ioreq: Do not let bufioreq to be used on other than x86 arches
authorOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Fri, 29 Jan 2021 01:48:51 +0000 (03:48 +0200)
committerJulien Grall <jgrall@amazon.com>
Fri, 29 Jan 2021 16:56:09 +0000 (16:56 +0000)
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_tyshchenko@epam.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
Acked-by: Paul Durrant <paul@xen.org>
xen/common/ioreq.c

index 67ef1f706e2ae7f21494540a08de37e2155d589a..a36137d41d1381dd0852aa759ceafc2789fa9483 100644 (file)
@@ -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;