|
|
9119d9 |
From 98e3449d18692ac45ddf1637ed3e01363a91c8e4 Mon Sep 17 00:00:00 2001
|
|
|
9119d9 |
Message-Id: <98e3449d18692ac45ddf1637ed3e01363a91c8e4@dist-git>
|
|
|
9119d9 |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
9119d9 |
Date: Wed, 19 Nov 2014 18:59:15 +0100
|
|
|
9119d9 |
Subject: [PATCH] qemu: Drop OVMF whitelist
|
|
|
9119d9 |
|
|
|
9119d9 |
https://bugzilla.redhat.com/show_bug.cgi?id=1165782
|
|
|
9119d9 |
|
|
|
9119d9 |
As discussed on the upstream list, it's better not to make this
|
|
|
9119d9 |
kind of predictions in libvirt. It may happen that qemu learns
|
|
|
9119d9 |
how to enable OVMF on other architectures too and we shouldn't
|
|
|
9119d9 |
try to chase that.
|
|
|
9119d9 |
|
|
|
9119d9 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
9119d9 |
(cherry picked from commit 36148120c1c1e6ad7f4eb6f0995eb7b18ba95922)
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
---
|
|
|
9119d9 |
src/qemu/qemu_capabilities.c | 9 +++------
|
|
|
9119d9 |
src/qemu/qemu_command.c | 10 ----------
|
|
|
9119d9 |
2 files changed, 3 insertions(+), 16 deletions(-)
|
|
|
9119d9 |
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
|
|
9119d9 |
index a10bc8c..e0c1b31 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_capabilities.c
|
|
|
9119d9 |
+++ b/src/qemu/qemu_capabilities.c
|
|
|
9119d9 |
@@ -3616,7 +3616,6 @@ virQEMUCapsGetDefaultMachine(virQEMUCapsPtr qemuCaps)
|
|
|
9119d9 |
static int
|
|
|
9119d9 |
virQEMUCapsFillDomainLoaderCaps(virQEMUCapsPtr qemuCaps,
|
|
|
9119d9 |
virDomainCapsLoaderPtr capsLoader,
|
|
|
9119d9 |
- virArch arch,
|
|
|
9119d9 |
char **loader,
|
|
|
9119d9 |
size_t nloader)
|
|
|
9119d9 |
{
|
|
|
9119d9 |
@@ -3644,8 +3643,7 @@ virQEMUCapsFillDomainLoaderCaps(virQEMUCapsPtr qemuCaps,
|
|
|
9119d9 |
VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->type,
|
|
|
9119d9 |
VIR_DOMAIN_LOADER_TYPE_ROM);
|
|
|
9119d9 |
|
|
|
9119d9 |
- if (arch == VIR_ARCH_X86_64 &&
|
|
|
9119d9 |
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE) &&
|
|
|
9119d9 |
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE) &&
|
|
|
9119d9 |
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_FORMAT))
|
|
|
9119d9 |
VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->type,
|
|
|
9119d9 |
VIR_DOMAIN_LOADER_TYPE_PFLASH);
|
|
|
9119d9 |
@@ -3662,14 +3660,13 @@ virQEMUCapsFillDomainLoaderCaps(virQEMUCapsPtr qemuCaps,
|
|
|
9119d9 |
static int
|
|
|
9119d9 |
virQEMUCapsFillDomainOSCaps(virQEMUCapsPtr qemuCaps,
|
|
|
9119d9 |
virDomainCapsOSPtr os,
|
|
|
9119d9 |
- virArch arch,
|
|
|
9119d9 |
char **loader,
|
|
|
9119d9 |
size_t nloader)
|
|
|
9119d9 |
{
|
|
|
9119d9 |
virDomainCapsLoaderPtr capsLoader = &os->loader;
|
|
|
9119d9 |
|
|
|
9119d9 |
os->device.supported = true;
|
|
|
9119d9 |
- if (virQEMUCapsFillDomainLoaderCaps(qemuCaps, capsLoader, arch,
|
|
|
9119d9 |
+ if (virQEMUCapsFillDomainLoaderCaps(qemuCaps, capsLoader,
|
|
|
9119d9 |
loader, nloader) < 0)
|
|
|
9119d9 |
return -1;
|
|
|
9119d9 |
return 0;
|
|
|
9119d9 |
@@ -3765,7 +3762,7 @@ virQEMUCapsFillDomainCaps(virDomainCapsPtr domCaps,
|
|
|
9119d9 |
|
|
|
9119d9 |
domCaps->maxvcpus = maxvcpus;
|
|
|
9119d9 |
|
|
|
9119d9 |
- if (virQEMUCapsFillDomainOSCaps(qemuCaps, os, domCaps->arch,
|
|
|
9119d9 |
+ if (virQEMUCapsFillDomainOSCaps(qemuCaps, os,
|
|
|
9119d9 |
loader, nloader) < 0 ||
|
|
|
9119d9 |
virQEMUCapsFillDomainDeviceDiskCaps(qemuCaps, disk) < 0 ||
|
|
|
9119d9 |
virQEMUCapsFillDomainDeviceHostdevCaps(qemuCaps, hostdev) < 0)
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
|
|
9119d9 |
index 2b8eae0..c161824 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_command.c
|
|
|
9119d9 |
+++ b/src/qemu/qemu_command.c
|
|
|
9119d9 |
@@ -7642,16 +7642,6 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd,
|
|
|
9119d9 |
break;
|
|
|
9119d9 |
|
|
|
9119d9 |
case VIR_DOMAIN_LOADER_TYPE_PFLASH:
|
|
|
9119d9 |
- /* UEFI is supported only for x86_64 currently */
|
|
|
9119d9 |
- if (def->os.arch != VIR_ARCH_X86_64 &&
|
|
|
9119d9 |
- def->os.arch != VIR_ARCH_ARMV7L &&
|
|
|
9119d9 |
- def->os.arch != VIR_ARCH_AARCH64) {
|
|
|
9119d9 |
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
|
|
9119d9 |
- _("pflash is not supported for %s guest architecture"),
|
|
|
9119d9 |
- virArchToString(def->os.arch));
|
|
|
9119d9 |
- goto cleanup;
|
|
|
9119d9 |
- }
|
|
|
9119d9 |
-
|
|
|
9119d9 |
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE)) {
|
|
|
9119d9 |
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
|
9119d9 |
_("this QEMU binary doesn't support -drive"));
|
|
|
9119d9 |
--
|
|
|
9119d9 |
2.1.3
|
|
|
9119d9 |
|