From fb067ac4a4a73c7350f455d5def0fe7011519213b2ddf44dea73b09210d134bd Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Mon, 2 Jun 2014 18:08:59 +0000 Subject: [PATCH] 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 --- 60-kvm.x86.rules | 2 +- qemu.changes | 10 +++++++ qemu.spec | 10 ++++--- qemu.spec.in | 10 ++++--- ...e-stdvga_list_modes-doesn-t-overrun-.patch | 29 +++++++++++++++++++ 5 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 vgabios-Make-sure-stdvga_list_modes-doesn-t-overrun-.patch diff --git a/60-kvm.x86.rules b/60-kvm.x86.rules index f7bb40e..14795f7 100644 --- a/60-kvm.x86.rules +++ b/60-kvm.x86.rules @@ -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'" diff --git a/qemu.changes b/qemu.changes index 3f27e37..5bdaf9c 100644 --- a/qemu.changes +++ b/qemu.changes @@ -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 diff --git a/qemu.spec b/qemu.spec index ab2a740..9afc3cc 100644 --- a/qemu.spec +++ b/qemu.spec @@ -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) diff --git a/qemu.spec.in b/qemu.spec.in index 40c5879..bc6c6ce 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -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) diff --git a/vgabios-Make-sure-stdvga_list_modes-doesn-t-overrun-.patch b/vgabios-Make-sure-stdvga_list_modes-doesn-t-overrun-.patch new file mode 100644 index 0000000..b4e36b1 --- /dev/null +++ b/vgabios-Make-sure-stdvga_list_modes-doesn-t-overrun-.patch @@ -0,0 +1,29 @@ +From 2620984b42fd2a374e94c75f04982c60edf179cb Mon Sep 17 00:00:00 2001 +From: Kevin O'Connor +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 +Signed-off-by: Bruce Rogers +--- + 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 +