- Update to kvm-86 release

- ChangeLog here: http://marc.info/?l=kvm&m=124282885729710
This commit is contained in:
Mark McLoughlin 2009-05-20 15:24:23 +00:00
parent f2160a7c77
commit ccf76b74a6
9 changed files with 83 additions and 198 deletions

View File

@ -18,10 +18,10 @@ Signed-off-by: Glauber Costa <glommer@redhat.com>
target-ppc/helper.c | 2 +-
4 files changed, 4 insertions(+), 1 deletion(-)
Index: qemu-kvm-0.10/qemu/hw/ppc440.c
Index: qemu-kvm-0.10.4/hw/ppc440.c
===================================================================
--- qemu-kvm-0.10.orig/qemu/hw/ppc440.c
+++ qemu-kvm-0.10/qemu/hw/ppc440.c
+++ qemu-kvm-0.10.4/hw/ppc440.c
@@ -18,6 +18,7 @@
#include "ppc440.h"
#include "ppc405.h"
@ -30,10 +30,10 @@ Index: qemu-kvm-0.10/qemu/hw/ppc440.c
#include "kvm.h"
#define PPC440EP_PCI_CONFIG 0xeec00000
Index: qemu-kvm-0.10/qemu/hw/ppc440_bamboo.c
Index: qemu-kvm-0.10.4/hw/ppc440_bamboo.c
===================================================================
--- qemu-kvm-0.10.orig/qemu/hw/ppc440_bamboo.c
+++ qemu-kvm-0.10/qemu/hw/ppc440_bamboo.c
+++ qemu-kvm-0.10.4/hw/ppc440_bamboo.c
@@ -21,6 +21,7 @@
#include "boards.h"
#include "sysemu.h"
@ -42,10 +42,10 @@ Index: qemu-kvm-0.10/qemu/hw/ppc440_bamboo.c
#include "kvm.h"
#include "kvm_ppc.h"
#include "device_tree.h"
Index: qemu-kvm-0.10/qemu/hw/ppce500_mpc8544ds.c
Index: qemu-kvm-0.10.4/hw/ppce500_mpc8544ds.c
===================================================================
--- qemu-kvm-0.10.orig/qemu/hw/ppce500_mpc8544ds.c
+++ qemu-kvm-0.10/qemu/hw/ppce500_mpc8544ds.c
+++ qemu-kvm-0.10.4/hw/ppce500_mpc8544ds.c
@@ -16,6 +16,7 @@
#include <dirent.h>
@ -54,10 +54,10 @@ Index: qemu-kvm-0.10/qemu/hw/ppce500_mpc8544ds.c
#include "config.h"
#include "qemu-common.h"
#include "net.h"
Index: qemu-kvm-0.10/qemu/target-ppc/helper.c
Index: qemu-kvm-0.10.4/target-ppc/helper.c
===================================================================
--- qemu-kvm-0.10.orig/qemu/target-ppc/helper.c
+++ qemu-kvm-0.10/qemu/target-ppc/helper.c
+++ qemu-kvm-0.10.4/target-ppc/helper.c
@@ -29,6 +29,7 @@
#include "exec-all.h"
#include "helper_regs.h"

View File

@ -1,7 +1,7 @@
diff --git a/bios/rombios.c b/bios/rombios.c
diff --git a/kvm/bios/rombios.c b/kvm/bios/rombios.c
index c4f6ccd..c4bfe60 100644
--- a/bios/rombios.c
+++ b/bios/rombios.c
--- a/kvm/bios/rombios.c
+++ b/kvm/bios/rombios.c
@@ -10196,22 +10196,43 @@ no_serial:
ret

View File

@ -1,6 +1,6 @@
diff -up qemu-kvm-devel-85/qemu/configure.disable-preadv qemu-kvm-devel-85/qemu/configure
--- qemu-kvm-devel-85/qemu/configure.disable-preadv 2009-04-27 16:09:05.000000000 +0100
+++ qemu-kvm-devel-85/qemu/configure 2009-04-27 16:09:36.000000000 +0100
diff -up qemu-kvm-devel-86/configure.disable-preadv qemu-kvm-devel-86/configure
--- qemu-kvm-devel-86/configure.disable-preadv 2009-04-27 16:09:05.000000000 +0100
+++ qemu-kvm-devel-86/configure 2009-04-27 16:09:36.000000000 +0100
@@ -1189,9 +1189,9 @@ cat > $TMPC <<EOF
int main(void) { preadv; }
EOF

View File

@ -7,19 +7,19 @@ kvm code with USE_KVM guards.
Fixes target-arm:
qemu/hw/framebuffer.c: In function 'framebuffer_update_display':
qemu/hw/framebuffer.c:53: warning: implicit declaration of function 'kvm_enabled'
qemu/hw/framebuffer.c:54: warning: implicit declaration of function 'kvm_physical_sync_dirty_bitmap'
hw/framebuffer.c: In function 'framebuffer_update_display':
hw/framebuffer.c:53: warning: implicit declaration of function 'kvm_enabled'
hw/framebuffer.c:54: warning: implicit declaration of function 'kvm_physical_sync_dirty_bitmap'
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
qemu/hw/framebuffer.c | 3 +++
hw/framebuffer.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/qemu/hw/framebuffer.c b/qemu/hw/framebuffer.c
diff --git a/hw/framebuffer.c b/hw/framebuffer.c
index 1086ba9..e2d7604 100644
--- a/qemu/hw/framebuffer.c
+++ b/qemu/hw/framebuffer.c
--- a/hw/framebuffer.c
+++ b/hw/framebuffer.c
@@ -18,6 +18,7 @@
#include "console.h"
#include "framebuffer.h"

View File

@ -1,32 +0,0 @@
From: Kevin Wolf <kwolf@redhat.com>
Subject: [PATCH] qcow2 corruption: Fix alloc_cluster_link_l2
This patch fixes a qcow2 corruption bug introduced in SVN Rev 5861. L2 tables
are big endian, so entries must be converted before being passed to functions.
This bug is easy to trigger. The following script will create and destroy a
qcow2 image (the header is gone after three loop iterations):
#!/bin/bash
qemu-img create -f qcow2 test.qcow 1M
for i in $(seq 1 10); do
qemu-system-x86_64 -hda test.qcow -monitor stdio > /dev/null 2>&1 <<EOF
savevm test-$i
quit
EOF
done
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
diff -up qemu-kvm-devel-85/qemu/block-qcow2.c.qcow2-corruption qemu-kvm-devel-85/qemu/block-qcow2.c
--- qemu-kvm-devel-85/qemu/block-qcow2.c.qcow2-corruption 2009-04-21 10:57:31.000000000 +0100
+++ qemu-kvm-devel-85/qemu/block-qcow2.c 2009-04-24 19:29:44.000000000 +0100
@@ -1007,7 +1007,7 @@ static int alloc_cluster_link_l2(BlockDr
goto err;
for (i = 0; i < j; i++)
- free_any_clusters(bs, old_cluster[i], 1);
+ free_any_clusters(bs, be64_to_cpu(old_cluster[i]), 1);
ret = 0;
err:

View File

@ -1,35 +0,0 @@
From: Glauber Costa <glommer@redhat.com>
Subject: [PATCH] align vga rom to 4k boundary.
Instead of aligning to 2k boundary, as required by the bios,
align to 4k boundary, as required by kvm memory functions. Without
this patch, starting kvm with -vga std option fails with:
create_userspace_phys_mem: Invalid argument
kvm_cpu_register_physical_memory: failed
as described by: https://bugzilla.redhat.com/494376
It does not fail with cirrus vga, because it is naturally aligned.
This problem does not seem to affect upstream qemu.
Signed-off-by: Glauber Costa <glommer@redhat.com>
---
qemu/hw/pc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c
index cc84772..680d4a2 100644
--- a/qemu/hw/pc.c
+++ b/qemu/hw/pc.c
@@ -919,7 +919,7 @@ vga_bios_error:
exit(1);
}
/* Round up vga bios size to the next 2k boundary */
- vga_bios_size = (vga_bios_size + 2047) & ~2047;
+ vga_bios_size = (vga_bios_size + 4095) & ~4095;
option_rom_start = 0xc0000 + vga_bios_size;
/* setup basic memory access */
--
1.5.6.6

View File

@ -1,32 +0,0 @@
From: Pauline Middelink <middelink@polyware.nl>
To: kvm@vger.kernel.org
Subject: kvm-85 won't boot guests with virtio block device
Hi,
To follow up on the issues with kvm-85 and libvirt I discovered the following
issue: libvirt detects from the help of qemu which options it can give to
qemu. (in this case obviously /usr/kvm/bin/qemu-system-x86_64 -help)
If you look carefully to the output of the -help of qemu from kvm-84 and
kvm-85, you will notice the boot flag to the -drive option has disappeared!
Hence letting libvirt believe it isnt allowed to use it, hence the unable
to boot error.
A small patch which fixes the problem for me, is attached.
Met vriendelijke groet,
Pauline Middelink
diff -ur kvm-85/qemu/qemu-options.hx kvm-85a/qemu/qemu-options.hx
--- kvm-85/qemu/qemu-options.hx 2009-04-21 11:57:31.000000000 +0200
+++ kvm-85a/qemu/qemu-options.hx 2009-04-24 19:04:50.000000000 +0200
@@ -77,6 +77,7 @@
"-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n"
" [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n"
" [,cache=writethrough|writeback|none][,format=f][,serial=s]\n"
+ " [,boot=on|off]\n"
" use 'file' as a drive image\n")
STEXI
@item -drive @var{option}[,@var{option}[,@var{option}[,...]]]

138
qemu.spec
View File

@ -1,11 +1,11 @@
%define kvmvernum 85
%define kvmvernum 86
%define kvmvertag kvm%{kvmvernum}
%define kvmverfull kvm-devel-%{kvmvernum}
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 0.10.50
Release: 3.%{kvmvertag}%{?dist}
Release: 4.%{kvmvertag}%{?dist}
# Epoch because we pushed a qemu-1.0 package
Epoch: 2
License: GPLv2+ and LGPLv2+ and BSD
@ -22,23 +22,11 @@ Patch01: kvm-upstream-ppc.patch
# Not upstream, why?
Patch02: qemu-bios-bigger-roms.patch
# Fixed upstream by f753ff1638
Patch03: qemu-roms-more-room-fix-vga-align.patch
# Fixed upstream by 641636d19e
Patch04: qemu-fix-qcow2-corruption.patch
# Seen on kvm list
Patch05: qemu-virtio-blk-boot-on.patch
# kvm-85 build fix, submitted upstream
Patch06: qemu-fix-arm-framebuffer-build.patch
Patch03: qemu-fix-arm-framebuffer-build.patch
# Disable preadv()/pwritev() until bug #497429 is fixed
Patch07: qemu-disable-preadv.patch
# Fix build on ppc; cutils.c needs cache-utils.c
Patch08: qemu-add-cache-utils-to-block-objs.patch
Patch04: qemu-disable-preadv.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
@ -86,7 +74,6 @@ This is a meta-package that provides a qemu-system-<arch> package for native
architectures where kvm can be enabled. For example, in an x86 system, this
will install qemu-system-x86
%package img
Summary: QEMU command line tool for manipulating disk images
Group: Development/Tools
@ -220,19 +207,10 @@ such as kvmtrace and kvm_stat.
%prep
%setup -q -n qemu-%{kvmverfull}
#
# Hack - kvm-85 missing kernel/include/asm symlink
#
(cd kernel/include && ln -s asm-x86 asm)
%patch01 -p1 -b .kvm-upstream-ppc
%patch02 -p1 -b .bios-bigger-roms
%patch03 -p1 -b .roms-more-room-fix-vga-align
%patch04 -p1 -b .fix-qcow2-corruption
%patch05 -p1 -b .virtio-blk-boot-on
%patch06 -p1 -b .framebuffer-build-fix
%patch07 -p1 -b .disable-preadv
%patch08 -p1 -b .add-cache-utils-to-block-objs
%patch03 -p1 -b .framebuffer-build-fix
%patch04 -p1 -b .disable-preadv
%build
# systems like rhel build system does not have a recent enough linker so
@ -256,21 +234,24 @@ fi
# alsa works, but causes huge CPU load due to bugs
# oss works, but is very problematic because it grabs exclusive control of the device causing other apps to go haywire
./configure --target-list=x86_64-softmmu \
--kerneldir=$(pwd)/kernel --prefix=%{_prefix} \
--prefix=%{_prefix} \
--audio-drv-list=pa,sdl,alsa,oss \
--with-patched-kernel \
--disable-strip \
--qemu-ldflags=$extraldflags \
--qemu-cflags="$RPM_OPT_FLAGS"
--extra-ldflags=$extraldflags \
--extra-cflags="$RPM_OPT_FLAGS"
make V=1 %{?_smp_mflags} $buildldflags
cp qemu/x86_64-softmmu/qemu-system-x86_64 qemu-kvm
cp user/kvmtrace .
cp user/kvmtrace_format .
cp -a x86_64-softmmu/qemu-system-x86_64 qemu-kvm
make clean
make -C kvm/extboot extboot.bin
cd kvm/user
./configure --prefix=%{_prefix} --kerneldir=$(pwd)/../kernel/
make kvmtrace
cd ../../
%endif
cd qemu
./configure \
--target-list="i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu m68k-softmmu \
mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu \
@ -282,11 +263,10 @@ cd qemu
sparc32plus-linux-user" \
--prefix=%{_prefix} \
--interp-prefix=%{_prefix}/qemu-%%M \
--kerneldir=$(pwd)/../kernel --prefix=%{_prefix} \
--disable-strip \
--disable-kvm \
--extra-ldflags=$extraldflags \
--audio-drv-list=pa,sdl,alsa,oss \
--disable-kvm \
--disable-strip \
--extra-ldflags=$extraldflags \
--extra-cflags="$RPM_OPT_FLAGS"
make V=1 %{?_smp_mflags} $buildldflags
@ -297,40 +277,40 @@ rm -rf $RPM_BUILD_ROOT
%ifarch %{ix86} x86_64
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/modules
mkdir -p $RPM_BUILD_ROOT%{_bindir}/
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/modules/kvm.modules
install -m 0755 kvmtrace $RPM_BUILD_ROOT%{_bindir}/
install -m 0755 kvmtrace_format $RPM_BUILD_ROOT%{_bindir}/
install -m 0755 kvm_stat $RPM_BUILD_ROOT%{_bindir}/
install -m 0755 kvm/extboot/extboot.bin $RPM_BUILD_ROOT%{_datadir}/%{name}
install -m 0755 kvm/user/kvmtrace $RPM_BUILD_ROOT%{_bindir}/
install -m 0755 kvm/user/kvmtrace_format $RPM_BUILD_ROOT%{_bindir}/
install -m 0755 kvm/kvm_stat $RPM_BUILD_ROOT%{_bindir}/
install -m 0755 qemu-kvm $RPM_BUILD_ROOT%{_bindir}/
%endif
cd qemu
make prefix="${RPM_BUILD_ROOT}%{_prefix}" \
bindir="${RPM_BUILD_ROOT}%{_bindir}" \
sharedir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" \
sharedir="${RPM_BUILD_ROOT}%{_datadir}/%{name}" \
mandir="${RPM_BUILD_ROOT}%{_mandir}" \
docdir="${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" \
datadir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" install
datadir="${RPM_BUILD_ROOT}%{_datadir}/%{name}" install
chmod -x ${RPM_BUILD_ROOT}%{_mandir}/man1/*
install -D -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/qemu
install -D -p -m 0644 -t ${RPM_BUILD_ROOT}/%{qemudocdir} Changelog README TODO COPYING COPYING.LIB LICENSE
install -D -p -m 0644 qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl2/qemu.conf
rm -rf ${RPM_BUILD_ROOT}/usr/share//qemu/pxe*bin
rm -rf ${RPM_BUILD_ROOT}/usr/share//qemu/vgabios*bin
rm -rf ${RPM_BUILD_ROOT}/usr/share//qemu/bios.bin
rm -rf ${RPM_BUILD_ROOT}/usr/share//qemu/openbios-ppc
rm -rf ${RPM_BUILD_ROOT}/usr/share//qemu/openbios-sparc32
rm -rf ${RPM_BUILD_ROOT}/usr/share//qemu/openbios-sparc64
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/pxe*bin
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/vgabios*bin
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/bios.bin
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-ppc
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-sparc32
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-sparc64
# the pxe etherboot images will be symlinks to the images on
# /usr/share/etherboot, as QEMU doesn't know how to look
# for other paths, yet.
pxe_link() {
ln -s ../etherboot/$2.zrom %{buildroot}%{_prefix}/share/qemu/pxe-$1.bin
ln -s ../etherboot/$2.zrom %{buildroot}%{_datadir}/%{name}/pxe-$1.bin
}
pxe_link e1000 e1000-82542
@ -338,12 +318,12 @@ pxe_link ne2k_pci ne
pxe_link pcnet pcnet32
pxe_link rtl8139 rtl8139
pxe_link virtio virtio-net
ln -s ../vgabios/VGABIOS-lgpl-latest.bin %{buildroot}/%{_prefix}/share/qemu/vgabios.bin
ln -s ../vgabios/VGABIOS-lgpl-latest.cirrus.bin %{buildroot}/%{_prefix}/share/qemu/vgabios-cirrus.bin
ln -s ../bochs/BIOS-bochs-kvm %{buildroot}/%{_prefix}/share/qemu/bios.bin
ln -s ../openbios/openbios-ppc %{buildroot}/%{_prefix}/share/qemu/openbios-ppc
ln -s ../openbios/openbios-sparc32 %{buildroot}/%{_prefix}/share/qemu/openbios-sparc32
ln -s ../openbios/openbios-sparc64 %{buildroot}/%{_prefix}/share/qemu/openbios-sparc64
ln -s ../vgabios/VGABIOS-lgpl-latest.bin %{buildroot}/%{_datadir}/%{name}/vgabios.bin
ln -s ../vgabios/VGABIOS-lgpl-latest.cirrus.bin %{buildroot}/%{_datadir}/%{name}/vgabios-cirrus.bin
ln -s ../bochs/BIOS-bochs-kvm %{buildroot}/%{_datadir}/%{name}/bios.bin
ln -s ../openbios/openbios-ppc %{buildroot}/%{_datadir}/%{name}/openbios-ppc
ln -s ../openbios/openbios-sparc32 %{buildroot}/%{_datadir}/%{name}/openbios-sparc32
ln -s ../openbios/openbios-sparc64 %{buildroot}/%{_datadir}/%{name}/openbios-sparc64
%clean
rm -rf $RPM_BUILD_ROOT
@ -385,8 +365,8 @@ fi
%doc %{qemudocdir}/COPYING
%doc %{qemudocdir}/COPYING.LIB
%doc %{qemudocdir}/LICENSE
%dir %{_prefix}/share/qemu/
%{_prefix}/share/qemu/keymaps/
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/keymaps/
%{_mandir}/man1/qemu.1*
%{_mandir}/man8/qemu-nbd.8*
%{_bindir}/qemu-nbd
@ -415,16 +395,16 @@ fi
%defattr(-,root,root)
%{_bindir}/qemu
%{_bindir}/qemu-system-x86_64
%{_prefix}/share/qemu/bios.bin
%{_prefix}/share/qemu/vgabios.bin
%{_prefix}/share/qemu/vgabios-cirrus.bin
%{_prefix}/share/qemu/pxe-e1000.bin
%{_prefix}/share/qemu/pxe-virtio.bin
%{_prefix}/share/qemu/pxe-pcnet.bin
%{_prefix}/share/qemu/pxe-rtl8139.bin
%{_prefix}/share/qemu/pxe-ne2k_pci.bin
%{_datadir}/%{name}/bios.bin
%{_datadir}/%{name}/vgabios.bin
%{_datadir}/%{name}/vgabios-cirrus.bin
%{_datadir}/%{name}/pxe-e1000.bin
%{_datadir}/%{name}/pxe-virtio.bin
%{_datadir}/%{name}/pxe-pcnet.bin
%{_datadir}/%{name}/pxe-rtl8139.bin
%{_datadir}/%{name}/pxe-ne2k_pci.bin
%ifarch %{ix86} x86_64
%{_prefix}/share/qemu/extboot.bin
%{_datadir}/%{name}/extboot.bin
%{_bindir}/qemu-kvm
%{_sysconfdir}/sysconfig/modules/kvm.modules
%files kvm-tools
@ -436,8 +416,8 @@ fi
%files system-sparc
%defattr(-,root,root)
%{_bindir}/qemu-system-sparc
%{_prefix}/share/qemu/openbios-sparc32
%{_prefix}/share/qemu/openbios-sparc64
%{_datadir}/%{name}/openbios-sparc32
%{_datadir}/%{name}/openbios-sparc64
%files system-arm
%defattr(-,root,root)
%{_bindir}/qemu-system-arm
@ -452,10 +432,10 @@ fi
%{_bindir}/qemu-system-ppc
%{_bindir}/qemu-system-ppc64
%{_bindir}/qemu-system-ppcemb
%{_prefix}/share/qemu/openbios-ppc
%{_prefix}/share/qemu/video.x
%{_prefix}/share/qemu/bamboo.dtb
%{_prefix}/share/qemu/ppc_rom.bin
%{_datadir}/%{name}/openbios-ppc
%{_datadir}/%{name}/video.x
%{_datadir}/%{name}/bamboo.dtb
%{_datadir}/%{name}/ppc_rom.bin
%files system-cris
%defattr(-,root,root)
%{_bindir}/qemu-system-cris
@ -474,6 +454,10 @@ fi
%{_mandir}/man1/qemu-img.1*
%changelog
* Wed May 20 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10.50-4.kvm86
- Update to kvm-86 release
- ChangeLog here: http://marc.info/?l=kvm&m=124282885729710
* Fri May 1 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10.50-3.kvm85
- Really provide qemu-kvm as a metapackage for comps

View File

@ -1 +1 @@
3b671f64b66e7e6e571516193c184653 qemu-kvm-devel-85.tar.gz
58ba34e20886041e0cc2b5a11340f637 qemu-kvm-devel-86.tar.gz