libxl: On ARM, reject future new passthrough modes too

This is most pleasantly done by also changing the if to a switch.

Suggested-by: Julien Grall <julien@xen.org>
CC: Julien Grall <julien@xen.org>
CC: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
Ian Jackson committed 2019-10-24 16:08:41 +01:00
1 parent ad011ad088
commit 333d741279
1 file changed
+8 -2
+8 -2
View File
@@ -1203,9 +1203,15 @@ int libxl__arch_passthrough_mode_setdefault(libxl__gc *gc,
c_info->passthrough = LIBXL_PASSTHROUGH_SHARE_PT;
}
if (c_info->passthrough == LIBXL_PASSTHROUGH_SYNC_PT) {
switch (c_info->passthrough) {
case LIBXL_PASSTHROUGH_DISABLED:
case LIBXL_PASSTHROUGH_SHARE_PT:
break;
default:
LOGD(ERROR, domid,
"passthrough=\"sync_pt\" not supported on ARM\n");
"passthrough=\"%s\" not supported on ARM\n",
libxl_passthrough_to_string(c_info->passthrough));
rc = ERROR_INVAL;
goto out;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.