Accepting request 236077 from home:bfrogers:branches:Virtualization

Fix problem discovered with direct kernel boot for SLES 10 and SLES 11 guests (bnc#880625)
Only build x86 firmware on x86, to avoid randomly getting the upstream binary firmware blobs packaged, instead of the ones we try to build.
Add probing of vhost-net for SLE11 host in udev rules file.
Get rid of pmtools Buildrequires for old distros - I checked, we can't build the firmware as is for old distros correctly.

OBS-URL: https://build.opensuse.org/request/show/236077
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=213
This commit is contained in:
Bruce Rogers 2014-06-02 18:08:59 +00:00 committed by Git OBS Bridge
parent 5a0f88db96
commit 5645dec724
5 changed files with 52 additions and 9 deletions

View File

@ -1,2 +1,2 @@
KERNEL=="kvm", MODE="0660", GROUP="kvm"
ACTION=="add|change", SUBSYSTEM=="dmi", KERNEL=="id", RUN+="/bin/sh -c 'grep -q vmx /proc/cpuinfo && /sbin/modprobe kvm-intel; grep -q svm /proc/cpuinfo && /sbin/modprobe kvm-amd'"
ACTION=="add|change", SUBSYSTEM=="dmi", KERNEL=="id", RUN+="/bin/sh -c 'grep -q vmx /proc/cpuinfo && /sbin/modprobe kvm-intel; grep -q svm /proc/cpuinfo && /sbin/modprobe kvm-amd; /sbin/modprobe vhost-net'"

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jun 2 13:26:13 UTC 2014 - brogers@suse.com
- only build the x86 firmware on x86, ensuring consistent binaries
- remove un-needed pmtools BuildRequires
- Fix vga related problem doing direct kernel boot for SLES 10 and
SLES 11 guests (bnc#880625)
vgabios-Make-sure-stdvga_list_modes-doesn-t-overrun-.patch
- Probe vhost-net module on SLE11 (copied from SP3 package)
-------------------------------------------------------------------
Sat May 24 10:01:36 UTC 2014 - afaerber@suse.de

View File

@ -130,6 +130,7 @@ Patch0070: 0070-virtio-allow-mapping-up-to-max-queu.patch
Patch1000: ipxe-build-Work-around-bug-in-gcc-4.8.patch
Patch1001: ipxe-zbin-Fix-size-used-for-memset-in-al.patch
Patch1002: ipxe-build-Avoid-strict-aliasing-warning.patch
Patch1003: vgabios-Make-sure-stdvga_list_modes-doesn-t-overrun-.patch
# end roms/ipxe patches
# this is to make lint happy
@ -146,11 +147,7 @@ BuildRequires: brlapi-devel
BuildRequires: curl-devel
BuildRequires: cyrus-sasl-devel
%if %{build_x86_fw_from_source}
%if 0%{?suse_version} > 1110
BuildRequires: iasl
%else
BuildRequires: pmtools
%endif
%endif
BuildRequires: e2fsprogs-devel
BuildRequires: fdupes
@ -432,6 +429,7 @@ as PC and PowerMac systems.
This sub-package contains the guest agent.
%ifarch %ix86 x86_64
%package seabios
Summary: X86 BIOS for QEMU
Group: System/Emulators/PC
@ -489,6 +487,7 @@ Conflicts: qemu < 1.6.0
%description ipxe
Preboot Execution Environment (PXE) ROM support for various emulated network
adapters available with QEMU.
%endif
%if 0%{?with_systemd}
%package ksm
@ -578,6 +577,7 @@ This package provides a service file for starting and stopping KSM.
%patch1000 -p1
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%if %{build_x86_fw_from_source}
# as a safeguard, delete the firmware files that we intend to build
@ -867,6 +867,7 @@ fi
%files lang -f %name.lang
%defattr(-, root, root)
%ifarch %ix86 x86_64
%files seabios
%defattr(-, root, root)
%_datadir/%name/bios.bin
@ -900,6 +901,7 @@ fi
%_datadir/%name/efi-ne2k_pci.rom
%_datadir/%name/efi-rtl8139.rom
%_datadir/%name/efi-virtio.rom
%endif
%files tools
%defattr(-, root, root)

View File

@ -61,6 +61,7 @@ PATCH_FILES
Patch1000: ipxe-build-Work-around-bug-in-gcc-4.8.patch
Patch1001: ipxe-zbin-Fix-size-used-for-memset-in-al.patch
Patch1002: ipxe-build-Avoid-strict-aliasing-warning.patch
Patch1003: vgabios-Make-sure-stdvga_list_modes-doesn-t-overrun-.patch
# end roms/ipxe patches
# this is to make lint happy
@ -77,11 +78,7 @@ BuildRequires: brlapi-devel
BuildRequires: curl-devel
BuildRequires: cyrus-sasl-devel
%if %{build_x86_fw_from_source}
%if 0%{?suse_version} > 1110
BuildRequires: iasl
%else
BuildRequires: pmtools
%endif
%endif
BuildRequires: e2fsprogs-devel
BuildRequires: fdupes
@ -363,6 +360,7 @@ as PC and PowerMac systems.
This sub-package contains the guest agent.
%ifarch %ix86 x86_64
%package seabios
Summary: X86 BIOS for QEMU
Group: System/Emulators/PC
@ -420,6 +418,7 @@ Conflicts: qemu < 1.6.0
%description ipxe
Preboot Execution Environment (PXE) ROM support for various emulated network
adapters available with QEMU.
%endif
%if 0%{?with_systemd}
%package ksm
@ -440,6 +439,7 @@ PATCH_EXEC
%patch1000 -p1
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%if %{build_x86_fw_from_source}
# as a safeguard, delete the firmware files that we intend to build
@ -729,6 +729,7 @@ fi
%files lang -f %name.lang
%defattr(-, root, root)
%ifarch %ix86 x86_64
%files seabios
%defattr(-, root, root)
%_datadir/%name/bios.bin
@ -762,6 +763,7 @@ fi
%_datadir/%name/efi-ne2k_pci.rom
%_datadir/%name/efi-rtl8139.rom
%_datadir/%name/efi-virtio.rom
%endif
%files tools
%defattr(-, root, root)

View File

@ -0,0 +1,29 @@
From 2620984b42fd2a374e94c75f04982c60edf179cb Mon Sep 17 00:00:00 2001
From: Kevin O'Connor <kevin@koconnor.net>
Date: Tue, 11 Feb 2014 17:36:56 -0500
Subject: [PATCH] vgabios: Make sure stdvga_list_modes() doesn't overrun the
buffer.
References: bnc#880625
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
vgasrc/stdvgamodes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/roms/seabios/vgasrc/stdvgamodes.c b/roms/seabios/vgasrc/stdvgamodes.c
index a97c85f..8436729 100644
--- a/roms/seabios/vgasrc/stdvgamodes.c
+++ b/roms/seabios/vgasrc/stdvgamodes.c
@@ -336,7 +336,7 @@ void
stdvga_list_modes(u16 seg, u16 *dest, u16 *last)
{
int i;
- for (i = 0; i < ARRAY_SIZE(vga_modes); i++) {
+ for (i = 0; i < ARRAY_SIZE(vga_modes) && dest < last; i++) {
struct stdvga_mode_s *stdmode_g = &vga_modes[i];
u16 mode = GET_GLOBAL(stdmode_g->mode);
if (mode == 0xffff)
--
1.9.0