mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
softmmu: Use accel_find("xen") instead of xen_available()
The xen_available() function is used only to produce an error for some Xen-specific command line options in QEMU binaries where Xen support was not compiled in: it just returns the value of the CONFIG_XEN define. Now that accelerators are QOM classes, we can check for "does this binary have Xen compiled in" with accel_find("xen"), and drop the xen_available() function. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210730105947.28215-2-peter.maydell@linaro.org
This commit is contained in:
parent
fcc6f73369
commit
6773fbf8c0
3 changed files with 3 additions and 13 deletions
|
@ -3448,21 +3448,21 @@ void qemu_init(int argc, char **argv, char **envp)
|
|||
has_defaults = 0;
|
||||
break;
|
||||
case QEMU_OPTION_xen_domid:
|
||||
if (!(xen_available())) {
|
||||
if (!(accel_find("xen"))) {
|
||||
error_report("Option not supported for this target");
|
||||
exit(1);
|
||||
}
|
||||
xen_domid = atoi(optarg);
|
||||
break;
|
||||
case QEMU_OPTION_xen_attach:
|
||||
if (!(xen_available())) {
|
||||
if (!(accel_find("xen"))) {
|
||||
error_report("Option not supported for this target");
|
||||
exit(1);
|
||||
}
|
||||
xen_mode = XEN_ATTACH;
|
||||
break;
|
||||
case QEMU_OPTION_xen_domid_restrict:
|
||||
if (!(xen_available())) {
|
||||
if (!(accel_find("xen"))) {
|
||||
error_report("Option not supported for this target");
|
||||
exit(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue