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:
Daniel P. Berrange 2015-11-05 11:49:40 +00:00
parent fc604c12d5
commit 8e91a400cf
3 changed files with 18 additions and 42 deletions

View File

@ -865,7 +865,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
{
virCapsGuestPtr guest;
bool haskvm = false;
bool haskqemu = false;
virCapsGuestMachinePtr *machines = NULL;
size_t nmachines = 0;
int ret = -1;
@ -880,10 +879,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
kvmbin))
haskvm = true;
if (virFileExists("/dev/kqemu") &&
virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KQEMU))
haskqemu = true;
if (virQEMUCapsGetMachineTypesCaps(qemubinCaps, &nmachines, &machines) < 0)
goto cleanup;
@ -926,15 +921,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
NULL) == NULL)
goto cleanup;
if (haskqemu &&
virCapabilitiesAddGuestDomain(guest,
VIR_DOMAIN_VIRT_KQEMU,
NULL,
NULL,
0,
NULL) == NULL)
goto cleanup;
if (haskvm) {
virCapsGuestDomainPtr dom;
@ -1103,10 +1089,6 @@ virQEMUCapsComputeCmdFlags(const char *help,
const char *p;
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"))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_KVM);
if (strstr(help, "-enable-kvm"))

View File

@ -30,10 +30,23 @@
# include "qemu_monitor.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 {
/* 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_NO_REBOOT, /* Is the -no-reboot flag 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_NODEFCONFIG, /* -nodefconfig */
QEMU_CAPS_BOOT_MENU, /* -boot menu=on support */
QEMU_CAPS_ENABLE_KQEMU, /* -enable-kqemu flag */
X_QEMU_CAPS_ENABLE_KQEMU, /* -enable-kqemu flag */
/* 40 */
QEMU_CAPS_FSDEV, /* -fstype filesystem passthrough */

View File

@ -7707,36 +7707,21 @@ qemuBuildObsoleteAccelArg(virCommandPtr cmd,
const virDomainDef *def,
virQEMUCapsPtr qemuCaps)
{
bool disableKQEMU = false;
bool enableKQEMU = false;
bool disableKVM = false;
bool enableKVM = false;
switch (def->virtType) {
case VIR_DOMAIN_VIRT_QEMU:
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KQEMU))
disableKQEMU = true;
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
disableKVM = true;
break;
case VIR_DOMAIN_VIRT_KQEMU:
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
disableKVM = true;
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;
}
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("the QEMU binary does not support kqemu"));
break;
case VIR_DOMAIN_VIRT_KVM:
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KQEMU))
disableKQEMU = true;
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_KVM)) {
enableKVM = true;
} else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) {
@ -7757,10 +7742,6 @@ qemuBuildObsoleteAccelArg(virCommandPtr cmd,
return -1;
}
if (disableKQEMU)
virCommandAddArg(cmd, "-no-kqemu");
else if (enableKQEMU)
virCommandAddArgList(cmd, "-enable-kqemu", "-kernel-kqemu", NULL);
if (disableKVM)
virCommandAddArg(cmd, "-no-kvm");
if (enableKVM)