mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 19:45:21 +00:00
qemu: remove all support for kQEMU
The kQEMU accelerator was deleted in QEMU 0.12, so we no longer need to support it in the QEMU driver. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
fc604c12d5
commit
8e91a400cf
@ -865,7 +865,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
|
|||||||
{
|
{
|
||||||
virCapsGuestPtr guest;
|
virCapsGuestPtr guest;
|
||||||
bool haskvm = false;
|
bool haskvm = false;
|
||||||
bool haskqemu = false;
|
|
||||||
virCapsGuestMachinePtr *machines = NULL;
|
virCapsGuestMachinePtr *machines = NULL;
|
||||||
size_t nmachines = 0;
|
size_t nmachines = 0;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -880,10 +879,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
|
|||||||
kvmbin))
|
kvmbin))
|
||||||
haskvm = true;
|
haskvm = true;
|
||||||
|
|
||||||
if (virFileExists("/dev/kqemu") &&
|
|
||||||
virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KQEMU))
|
|
||||||
haskqemu = true;
|
|
||||||
|
|
||||||
if (virQEMUCapsGetMachineTypesCaps(qemubinCaps, &nmachines, &machines) < 0)
|
if (virQEMUCapsGetMachineTypesCaps(qemubinCaps, &nmachines, &machines) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -926,15 +921,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
|
|||||||
NULL) == NULL)
|
NULL) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (haskqemu &&
|
|
||||||
virCapabilitiesAddGuestDomain(guest,
|
|
||||||
VIR_DOMAIN_VIRT_KQEMU,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
NULL) == NULL)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (haskvm) {
|
if (haskvm) {
|
||||||
virCapsGuestDomainPtr dom;
|
virCapsGuestDomainPtr dom;
|
||||||
|
|
||||||
@ -1103,10 +1089,6 @@ virQEMUCapsComputeCmdFlags(const char *help,
|
|||||||
const char *p;
|
const char *p;
|
||||||
const char *fsdev, *netdev;
|
const char *fsdev, *netdev;
|
||||||
|
|
||||||
if (strstr(help, "-no-kqemu"))
|
|
||||||
virQEMUCapsSet(qemuCaps, QEMU_CAPS_KQEMU);
|
|
||||||
if (strstr(help, "-enable-kqemu"))
|
|
||||||
virQEMUCapsSet(qemuCaps, QEMU_CAPS_ENABLE_KQEMU);
|
|
||||||
if (strstr(help, "-no-kvm"))
|
if (strstr(help, "-no-kvm"))
|
||||||
virQEMUCapsSet(qemuCaps, QEMU_CAPS_KVM);
|
virQEMUCapsSet(qemuCaps, QEMU_CAPS_KVM);
|
||||||
if (strstr(help, "-enable-kvm"))
|
if (strstr(help, "-enable-kvm"))
|
||||||
|
@ -30,10 +30,23 @@
|
|||||||
# include "qemu_monitor.h"
|
# include "qemu_monitor.h"
|
||||||
# include "domain_capabilities.h"
|
# include "domain_capabilities.h"
|
||||||
|
|
||||||
/* Internal flags to keep track of qemu command line capabilities */
|
/*
|
||||||
|
* Internal flags to keep track of qemu command line capabilities
|
||||||
|
*
|
||||||
|
* As a general rule these flags must not be deleted / renamed, as
|
||||||
|
* they are serialized in string format into the runtime XML file
|
||||||
|
* for guests, and new libvirt needs to cope with reading flags
|
||||||
|
* defined by old libvirt.
|
||||||
|
*
|
||||||
|
* The exception to this rule is when we drop support for running
|
||||||
|
* with older QEMU versions entirely. When a flag is no longer needed
|
||||||
|
* we temporarily give it an X_ prefix to indicate it should no
|
||||||
|
* longer be used in code. Periodically we can then purge all the
|
||||||
|
* X_ flags and re-group what's left.
|
||||||
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/* 0 */
|
/* 0 */
|
||||||
QEMU_CAPS_KQEMU, /* Whether KQEMU is compiled in */
|
X_QEMU_CAPS_KQEMU, /* Whether KQEMU is compiled in */
|
||||||
QEMU_CAPS_VNC_COLON, /* VNC takes or address + display */
|
QEMU_CAPS_VNC_COLON, /* VNC takes or address + display */
|
||||||
QEMU_CAPS_NO_REBOOT, /* Is the -no-reboot flag available */
|
QEMU_CAPS_NO_REBOOT, /* Is the -no-reboot flag available */
|
||||||
QEMU_CAPS_DRIVE, /* Is the new -drive arg available */
|
QEMU_CAPS_DRIVE, /* Is the new -drive arg available */
|
||||||
@ -86,7 +99,7 @@ typedef enum {
|
|||||||
QEMU_CAPS_PCI_CONFIGFD, /* pci-assign.configfd */
|
QEMU_CAPS_PCI_CONFIGFD, /* pci-assign.configfd */
|
||||||
QEMU_CAPS_NODEFCONFIG, /* -nodefconfig */
|
QEMU_CAPS_NODEFCONFIG, /* -nodefconfig */
|
||||||
QEMU_CAPS_BOOT_MENU, /* -boot menu=on support */
|
QEMU_CAPS_BOOT_MENU, /* -boot menu=on support */
|
||||||
QEMU_CAPS_ENABLE_KQEMU, /* -enable-kqemu flag */
|
X_QEMU_CAPS_ENABLE_KQEMU, /* -enable-kqemu flag */
|
||||||
|
|
||||||
/* 40 */
|
/* 40 */
|
||||||
QEMU_CAPS_FSDEV, /* -fstype filesystem passthrough */
|
QEMU_CAPS_FSDEV, /* -fstype filesystem passthrough */
|
||||||
|
@ -7707,36 +7707,21 @@ qemuBuildObsoleteAccelArg(virCommandPtr cmd,
|
|||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
virQEMUCapsPtr qemuCaps)
|
virQEMUCapsPtr qemuCaps)
|
||||||
{
|
{
|
||||||
bool disableKQEMU = false;
|
|
||||||
bool enableKQEMU = false;
|
|
||||||
bool disableKVM = false;
|
bool disableKVM = false;
|
||||||
bool enableKVM = false;
|
bool enableKVM = false;
|
||||||
|
|
||||||
switch (def->virtType) {
|
switch (def->virtType) {
|
||||||
case VIR_DOMAIN_VIRT_QEMU:
|
case VIR_DOMAIN_VIRT_QEMU:
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KQEMU))
|
|
||||||
disableKQEMU = true;
|
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
|
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
|
||||||
disableKVM = true;
|
disableKVM = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_VIRT_KQEMU:
|
case VIR_DOMAIN_VIRT_KQEMU:
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
disableKVM = true;
|
_("the QEMU binary does not support kqemu"));
|
||||||
|
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_KQEMU)) {
|
|
||||||
enableKQEMU = true;
|
|
||||||
} else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KQEMU)) {
|
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
||||||
_("the QEMU binary does not support kqemu"));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_VIRT_KVM:
|
case VIR_DOMAIN_VIRT_KVM:
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KQEMU))
|
|
||||||
disableKQEMU = true;
|
|
||||||
|
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_KVM)) {
|
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_KVM)) {
|
||||||
enableKVM = true;
|
enableKVM = true;
|
||||||
} else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) {
|
} else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) {
|
||||||
@ -7757,10 +7742,6 @@ qemuBuildObsoleteAccelArg(virCommandPtr cmd,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disableKQEMU)
|
|
||||||
virCommandAddArg(cmd, "-no-kqemu");
|
|
||||||
else if (enableKQEMU)
|
|
||||||
virCommandAddArgList(cmd, "-enable-kqemu", "-kernel-kqemu", NULL);
|
|
||||||
if (disableKVM)
|
if (disableKVM)
|
||||||
virCommandAddArg(cmd, "-no-kvm");
|
virCommandAddArg(cmd, "-no-kvm");
|
||||||
if (enableKVM)
|
if (enableKVM)
|
||||||
|
Loading…
Reference in New Issue
Block a user