mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
ad011ad088
commit
333d741279
1 file changed
+8
-2
@@ -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;
|
||||
}
|
||||
|
||||