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

Re: [PATCH V6 23/24] xen/ioreq: Do not let bufioreq to be used on other than x86 arches

Hi Oleksandr,

On 29/01/2021 01:48, Oleksandr Tyshchenko wrote:
From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>

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@xxxxxxxx>

Acked-by: Julien Grall <jgrall@xxxxxxxxxx>


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 
      unsigned int i;
      int rc;
+ if ( !IS_ENABLED(CONFIG_X86) && bufioreq_handling )
+        return -EINVAL;
      if ( bufioreq_handling > HVM_IOREQSRV_BUFIOREQ_ATOMIC )
          return -EINVAL;

Julien Grall



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