Allow arm/aarch64 with UEFI
This commit is contained in:
parent
e73cc6a9d8
commit
dadb59c95f
30
0007-qemu-Support-OVMF-on-armv7l-aarch64-guests.patch
Normal file
30
0007-qemu-Support-OVMF-on-armv7l-aarch64-guests.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Wed, 19 Nov 2014 16:25:56 +0100
|
||||||
|
Subject: [PATCH] qemu: Support OVMF on armv7l aarch64 guests
|
||||||
|
|
||||||
|
Currently, we are whitelisting architectures, that we know how to run
|
||||||
|
OVMF on. So far, only x86_64 was enabled. However, looking at qemu
|
||||||
|
code, the same commandline can be used to enable OVMF for armv7l and
|
||||||
|
aarch64.
|
||||||
|
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit 6d8054b68407a3385b33c867a425ad8278b0b8f0)
|
||||||
|
---
|
||||||
|
src/qemu/qemu_command.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
||||||
|
index 34f6535..163f80a 100644
|
||||||
|
--- a/src/qemu/qemu_command.c
|
||||||
|
+++ b/src/qemu/qemu_command.c
|
||||||
|
@@ -7681,7 +7681,9 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd,
|
||||||
|
|
||||||
|
case VIR_DOMAIN_LOADER_TYPE_PFLASH:
|
||||||
|
/* UEFI is supported only for x86_64 currently */
|
||||||
|
- if (def->os.arch != VIR_ARCH_X86_64) {
|
||||||
|
+ if (def->os.arch != VIR_ARCH_X86_64 &&
|
||||||
|
+ def->os.arch != VIR_ARCH_ARMV7L &&
|
||||||
|
+ def->os.arch != VIR_ARCH_AARCH64) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
_("pflash is not supported for %s guest architecture"),
|
||||||
|
virArchToString(def->os.arch));
|
84
0008-qemu-Drop-OVMF-whitelist.patch
Normal file
84
0008-qemu-Drop-OVMF-whitelist.patch
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Wed, 19 Nov 2014 18:16:12 +0100
|
||||||
|
Subject: [PATCH] qemu: Drop OVMF whitelist
|
||||||
|
|
||||||
|
As discussed on the upstream list, it's better not to make this
|
||||||
|
kind of predictions in libvirt. It may happen that qemu learns
|
||||||
|
how to enable OVMF on other architectures too and we shouldn't
|
||||||
|
try to chase that.
|
||||||
|
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit 36148120c1c1e6ad7f4eb6f0995eb7b18ba95922)
|
||||||
|
---
|
||||||
|
src/qemu/qemu_capabilities.c | 9 +++------
|
||||||
|
src/qemu/qemu_command.c | 10 ----------
|
||||||
|
2 files changed, 3 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
||||||
|
index a48f668..3f69886 100644
|
||||||
|
--- a/src/qemu/qemu_capabilities.c
|
||||||
|
+++ b/src/qemu/qemu_capabilities.c
|
||||||
|
@@ -3627,7 +3627,6 @@ virQEMUCapsGetDefaultMachine(virQEMUCapsPtr qemuCaps)
|
||||||
|
static int
|
||||||
|
virQEMUCapsFillDomainLoaderCaps(virQEMUCapsPtr qemuCaps,
|
||||||
|
virDomainCapsLoaderPtr capsLoader,
|
||||||
|
- virArch arch,
|
||||||
|
char **loader,
|
||||||
|
size_t nloader)
|
||||||
|
{
|
||||||
|
@@ -3655,8 +3654,7 @@ virQEMUCapsFillDomainLoaderCaps(virQEMUCapsPtr qemuCaps,
|
||||||
|
VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->type,
|
||||||
|
VIR_DOMAIN_LOADER_TYPE_ROM);
|
||||||
|
|
||||||
|
- if (arch == VIR_ARCH_X86_64 &&
|
||||||
|
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE) &&
|
||||||
|
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE) &&
|
||||||
|
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_FORMAT))
|
||||||
|
VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->type,
|
||||||
|
VIR_DOMAIN_LOADER_TYPE_PFLASH);
|
||||||
|
@@ -3673,14 +3671,13 @@ virQEMUCapsFillDomainLoaderCaps(virQEMUCapsPtr qemuCaps,
|
||||||
|
static int
|
||||||
|
virQEMUCapsFillDomainOSCaps(virQEMUCapsPtr qemuCaps,
|
||||||
|
virDomainCapsOSPtr os,
|
||||||
|
- virArch arch,
|
||||||
|
char **loader,
|
||||||
|
size_t nloader)
|
||||||
|
{
|
||||||
|
virDomainCapsLoaderPtr capsLoader = &os->loader;
|
||||||
|
|
||||||
|
os->device.supported = true;
|
||||||
|
- if (virQEMUCapsFillDomainLoaderCaps(qemuCaps, capsLoader, arch,
|
||||||
|
+ if (virQEMUCapsFillDomainLoaderCaps(qemuCaps, capsLoader,
|
||||||
|
loader, nloader) < 0)
|
||||||
|
return -1;
|
||||||
|
return 0;
|
||||||
|
@@ -3776,7 +3773,7 @@ virQEMUCapsFillDomainCaps(virDomainCapsPtr domCaps,
|
||||||
|
|
||||||
|
domCaps->maxvcpus = maxvcpus;
|
||||||
|
|
||||||
|
- if (virQEMUCapsFillDomainOSCaps(qemuCaps, os, domCaps->arch,
|
||||||
|
+ if (virQEMUCapsFillDomainOSCaps(qemuCaps, os,
|
||||||
|
loader, nloader) < 0 ||
|
||||||
|
virQEMUCapsFillDomainDeviceDiskCaps(qemuCaps, disk) < 0 ||
|
||||||
|
virQEMUCapsFillDomainDeviceHostdevCaps(qemuCaps, hostdev) < 0)
|
||||||
|
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
||||||
|
index 163f80a..af95466 100644
|
||||||
|
--- a/src/qemu/qemu_command.c
|
||||||
|
+++ b/src/qemu/qemu_command.c
|
||||||
|
@@ -7680,16 +7680,6 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd,
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_LOADER_TYPE_PFLASH:
|
||||||
|
- /* UEFI is supported only for x86_64 currently */
|
||||||
|
- if (def->os.arch != VIR_ARCH_X86_64 &&
|
||||||
|
- def->os.arch != VIR_ARCH_ARMV7L &&
|
||||||
|
- def->os.arch != VIR_ARCH_AARCH64) {
|
||||||
|
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
- _("pflash is not supported for %s guest architecture"),
|
||||||
|
- virArchToString(def->os.arch));
|
||||||
|
- goto cleanup;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE)) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("this QEMU binary doesn't support -drive"));
|
11
libvirt.spec
11
libvirt.spec
@ -363,7 +363,7 @@
|
|||||||
Summary: Library providing a simple virtualization API
|
Summary: Library providing a simple virtualization API
|
||||||
Name: libvirt
|
Name: libvirt
|
||||||
Version: 1.2.10
|
Version: 1.2.10
|
||||||
Release: 2%{?dist}%{?extra_release}
|
Release: 3%{?dist}%{?extra_release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
@ -382,6 +382,9 @@ Patch0003: 0003-PowerPC-Add-support-for-launching-VM-in-compat-mode.patch
|
|||||||
Patch0004: 0004-PowerPC-Improve-PVR-handling-to-fall-back-to-cpu-gen.patch
|
Patch0004: 0004-PowerPC-Improve-PVR-handling-to-fall-back-to-cpu-gen.patch
|
||||||
Patch0005: 0005-docs-Add-documentation-for-compat-mode.patch
|
Patch0005: 0005-docs-Add-documentation-for-compat-mode.patch
|
||||||
Patch0006: 0006-Test-Add-a-testcase-for-PowerPC-compat-mode-cpu-spec.patch
|
Patch0006: 0006-Test-Add-a-testcase-for-PowerPC-compat-mode-cpu-spec.patch
|
||||||
|
# Allow arm/aarch64 with UEFI
|
||||||
|
Patch0007: 0007-qemu-Support-OVMF-on-armv7l-aarch64-guests.patch
|
||||||
|
Patch0008: 0008-qemu-Drop-OVMF-whitelist.patch
|
||||||
|
|
||||||
%if %{with_libvirtd}
|
%if %{with_libvirtd}
|
||||||
Requires: libvirt-daemon = %{version}-%{release}
|
Requires: libvirt-daemon = %{version}-%{release}
|
||||||
@ -1215,6 +1218,9 @@ driver
|
|||||||
%patch0004 -p1
|
%patch0004 -p1
|
||||||
%patch0005 -p1
|
%patch0005 -p1
|
||||||
%patch0006 -p1
|
%patch0006 -p1
|
||||||
|
# Allow arm/aarch64 with UEFI
|
||||||
|
%patch0007 -p1
|
||||||
|
%patch0008 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if ! %{with_xen}
|
%if ! %{with_xen}
|
||||||
@ -2303,6 +2309,9 @@ exit 0
|
|||||||
%doc examples/systemtap
|
%doc examples/systemtap
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 21 2014 Cole Robinson <crobinso@redhat.com> - 1.2.10-3
|
||||||
|
- Allow arm/aarch64 with UEFI
|
||||||
|
|
||||||
* Sat Nov 15 2014 Cole Robinson <crobinso@redhat.com> - 1.2.10-2
|
* Sat Nov 15 2014 Cole Robinson <crobinso@redhat.com> - 1.2.10-2
|
||||||
- Fix caps probing when KVM is disabled (bz #1160318)
|
- Fix caps probing when KVM is disabled (bz #1160318)
|
||||||
- ppc64le fixes (bz #1163439)
|
- ppc64le fixes (bz #1163439)
|
||||||
|
Loading…
Reference in New Issue
Block a user