Fix systemtap tapsets (bz 831763)

Fix VNC audio tunnelling (bz 840653)
Don't renable ksm on update (bz 815156)
Bump usbredir dep (bz 812097)
Fix RPM install error on non-virt machines (bz 660629)
Obsolete openbios to fix upgrade dependency issues (bz 694802)
This commit is contained in:
Cole Robinson 2012-07-29 20:13:45 -04:00
parent 207a244702
commit 5439f9b0ec
7 changed files with 114 additions and 106 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@ qemu-kvm-0.13.0-25fdf4a.tar.gz
/qemu-kvm-0.15.0.tar.gz
/qemu-kvm-0.15.1.tar.gz
/qemu-kvm-1.1.0.tar.gz
/qemu-kvm-1.1.1.tar.gz

View File

@ -1,36 +0,0 @@
From 398b87f4ef3426569bdda2da2c9c2b89f4ba906f Mon Sep 17 00:00:00 2001
From: Jan Kiszka <jan.kiszka@siemens.com>
Date: Mon, 2 Jul 2012 09:34:46 +0200
Subject: [PATCH 01/17] qemu-kvm: Add missing default machine options
qemu-kvm-specific machine defaults were missing for pc-0.15 and pc-1.0.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
hw/pc_piix.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index c3fb74e..4e8a280 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -393,6 +393,7 @@ static QEMUMachine pc_machine_v1_0 = {
.desc = "Standard PC",
.init = pc_init_pci,
.max_cpus = 255,
+ .default_machine_opts = "accel=kvm,kernel_irqchip=on",
.compat_props = (GlobalProperty[]) {
PC_COMPAT_1_0,
{ /* end of list */ }
@@ -407,6 +408,7 @@ static QEMUMachine pc_machine_v0_15 = {
.desc = "Standard PC",
.init = pc_init_pci,
.max_cpus = 255,
+ .default_machine_opts = "accel=kvm,kernel_irqchip=on",
.compat_props = (GlobalProperty[]) {
PC_COMPAT_0_15,
{ /* end of list */ }
--
1.7.10.4

View File

@ -1,41 +0,0 @@
From 6f82a5ea52302bab33287b0191538be6f9138637 Mon Sep 17 00:00:00 2001
From: Jan Kiszka <jan.kiszka@siemens.com>
Date: Mon, 2 Jul 2012 10:05:39 +0200
Subject: [PATCH 02/17] qemu-kvm: virtio: Do not register mask notifiers
without in-kernel irqchip support
We crash if we registers mask notifiers without backing in-kernel
irqchip. This corresponds to the check in QEMU upstream after 1.1 now.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
hw/virtio-pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index a0c2ca7..5b64356 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -629,7 +629,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
/* Must unset mask notifier while guest notifier
* is still assigned */
- if (!assign) {
+ if (kvm_irqchip_in_kernel() && !assign) {
r = msix_unset_mask_notifier(&proxy->pci_dev);
assert(r >= 0);
}
@@ -647,7 +647,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
/* Must set mask notifier after guest notifier
* has been assigned */
- if (assign) {
+ if (kvm_irqchip_in_kernel() && assign) {
r = msix_set_mask_notifier(&proxy->pci_dev,
virtio_pci_mask_notifier);
if (r < 0) {
--
1.7.10.4

41
qemu-fix-systemtap.patch Normal file
View File

@ -0,0 +1,41 @@
commit 256a721d46a112d8807a488ec0176985c09bbbf1
Author: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Date: Mon Apr 16 12:47:58 2012 +0100
tracetool: handle DTrace keywords 'in', 'next', 'self'
Language keywords cannot be used as argument names. The DTrace backend
appends an underscore to the argument name in order to make the argument
name legal.
This patch adds 'in', 'next', and 'self' keywords to dtrace.py.
Also drop the unnecessary argument name lstrip() call. The
Arguments.build() method already ensures there is no space around
argument names. Furthermore it is misleading to do the lstrip() *after*
checking against keywords because the keyword check would not match if
spaces were in the name.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Reviewed-by: Lluís Vilanova <vilanova@ac.upc.edu>
diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py
index cebbd57..9cab75c 100644
--- a/scripts/tracetool/backend/dtrace.py
+++ b/scripts/tracetool/backend/dtrace.py
@@ -86,10 +86,10 @@ def stap(events):
i = 1
if len(e.args) > 0:
for name in e.args.names():
- # 'limit' is a reserved keyword
- if name == 'limit':
- name = '_limit'
- out(' %s = $arg%d;' % (name.lstrip(), i))
+ # Append underscore to reserved keywords
+ if name in ('limit', 'in', 'next', 'self'):
+ name += '_'
+ out(' %s = $arg%d;' % (name, i))
i += 1
out('}')

20
qemu-fix-vnc-audio.patch Normal file
View File

@ -0,0 +1,20 @@
commit 83617103984eb4d81cf46c94435f3da2c6f33b55
Author: malc <av1474@comtv.ru>
Date: Mon Jul 16 18:08:36 2012 +0400
audio: Unbreak capturing in mixemu case
Signed-off-by: malc <av1474@comtv.ru>
diff --git a/audio/audio.c b/audio/audio.c
index 583ee51..1c77389 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -818,6 +818,7 @@ static int audio_attach_capture (HWVoiceOut *hw)
sw->active = hw->enabled;
sw->conv = noop_conv;
sw->ratio = ((int64_t) hw_cap->info.freq << 32) / sw->info.freq;
+ sw->vol = nominal_volume;
sw->rate = st_rate_start (sw->info.freq, hw_cap->info.freq);
if (!sw->rate) {
dolog ("Could not start rate conversion for `%s'\n", SW_NAME (sw));

View File

@ -37,9 +37,9 @@
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 1.1.0
Release: 9%{?dist}
# Epoch because we pushed a qemu-1.0 package
Version: 1.1.1
Release: 1%{?dist}
# Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
Epoch: 2
License: GPLv2+ and LGPLv2+ and BSD
Group: Development/Tools
@ -75,10 +75,6 @@ Source9: ksmtuned.conf
Source10: qemu-guest-agent.service
Source11: 99-qemu-guest-agent.rules
# Fixes from qemu-kvm git stable-1.1 branch
Patch1: 0001-qemu-kvm-Add-missing-default-machine-options.patch
Patch2: 0002-qemu-kvm-virtio-Do-not-register-mask-notifiers-witho.patch
# Upstream patch to fix build of msi/virtio-pci.
Patch3: 0001-kvm-Enable-use-of-kvm_irqchip_in_kernel-in-hwlib-cod.patch
@ -110,6 +106,9 @@ Patch113: 0113-char-Disable-write-callback-if-throttled-chardev-is-.patch
Patch201: 0201-usb-redir-Correctly-handle-the-usb_redir_babble-usbr.patch
Patch202: 0202-usb-ehci-Fix-an-assert-whenever-isoc-transfers-are-u.patch
# Fix VNC audio tunnelling (bz 840653)
Patch203: %{name}-fix-vnc-audio.patch
BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
BuildRequires: libaio-devel
BuildRequires: rsync
@ -117,7 +116,7 @@ BuildRequires: pciutils-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: ncurses-devel
BuildRequires: libattr-devel
BuildRequires: usbredir-devel
BuildRequires: usbredir-devel >= 0.4.1
BuildRequires: texinfo
%ifarch %{ix86} x86_64
BuildRequires: spice-protocol >= 0.8.1
@ -168,6 +167,13 @@ Requires: %{name}-img = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-system-ppc
Obsoletes: %{name}-system-sparc
# Needed for F14->F16+ upgrade
# https://bugzilla.redhat.com/show_bug.cgi?id=694802
Obsoletes: openbios-common
Obsoletes: openbios-ppc
Obsoletes: openbios-sparc32
Obsoletes: openbios-sparc64
%define qemudocdir %{_docdir}/%{name}
%description
@ -215,9 +221,9 @@ Group: Development/Tools
Requires(post): /usr/bin/getent
Requires(post): /usr/sbin/groupadd
Requires(post): /usr/sbin/useradd
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service /sbin/chkconfig
Requires(postun): /sbin/service
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%description common
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
@ -265,9 +271,8 @@ fi
Summary: QEMU user mode emulation of qemu targets
Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service /sbin/chkconfig
Requires(postun): /sbin/service
Requires(post): systemd-units
Requires(postun): systemd-units
%description user
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
@ -357,8 +362,6 @@ such as kvm_stat.
%prep
%setup -q -n qemu-kvm-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
@ -380,6 +383,8 @@ such as kvm_stat.
%patch201 -p1
%patch202 -p1
%patch203 -p1
%build
# By default we build everything, but allow x86 to build a minimal version
@ -614,39 +619,47 @@ install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_udevdir}
%ifarch %{ix86} x86_64
# load kvm modules now, so we can make sure no reboot is needed.
# If there's already a kvm module installed, we don't mess with it
sh %{_sysconfdir}/sysconfig/modules/kvm.modules
sh %{_sysconfdir}/sysconfig/modules/kvm.modules || :
%endif
%post common
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl enable ksm.service >/dev/null 2>&1 || :
/bin/systemctl enable ksmtuned.service >/dev/null 2>&1 || :
fi
getent group kvm >/dev/null || groupadd -g 36 -r kvm
getent group qemu >/dev/null || groupadd -g 107 -r qemu
getent passwd qemu >/dev/null || \
useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
-c "qemu user" qemu
/bin/systemctl enable ksm.service
/bin/systemctl enable ksmtuned.service
%preun common
if [ $1 -eq 0 ]; then
/bin/systemctl --system stop ksmtuned.service &>/dev/null || :
/bin/systemctl --system stop ksm.service &>/dev/null || :
/bin/systemctl disable ksmtuned.service
/bin/systemctl disable ksm.service
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable ksmtuned.service > /dev/null 2>&1 || :
/bin/systemctl --no-reload disable ksm.service > /dev/null 2>&1 || :
/bin/systemctl stop ksmtuned.service > /dev/null 2>&1 || :
/bin/systemctl stop ksm.service > /dev/null 2>&1 || :
fi
%postun common
if [ $1 -ge 1 ]; then
/bin/systemctl --system try-restart ksm.service &>/dev/null || :
/bin/systemctl --system try-restart ksmtuned.service &>/dev/null || :
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart ksmtuned.service >/dev/null 2>&1 || :
/bin/systemctl try-restart ksm.service >/dev/null 2>&1 || :
fi
%post user
/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || :
%postun user
/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || :
%files
%defattr(-,root,root)
@ -661,6 +674,7 @@ fi
%doc %{qemudocdir}/TODO
%doc %{qemudocdir}/qemu-doc.html
%doc %{qemudocdir}/qemu-tech.html
%doc %{qemudocdir}/qmp-commands.txt
%doc %{qemudocdir}/COPYING
%doc %{qemudocdir}/COPYING.LIB
%doc %{qemudocdir}/LICENSE
@ -815,6 +829,15 @@ fi
%{_mandir}/man1/qemu-img.1*
%changelog
* Sun Jul 29 2012 Cole Robinson <crobinso@redhat.com> - 1.1.1-1
- Upstream stable release 1.1.1
- Fix systemtap tapsets (bz 831763)
- Fix VNC audio tunnelling (bz 840653)
- Don't renable ksm on update (bz 815156)
- Bump usbredir dep (bz 812097)
- Fix RPM install error on non-virt machines (bz 660629)
- Obsolete openbios to fix upgrade dependency issues (bz 694802)
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:1.1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

View File

@ -1 +1 @@
2e19185b7fdf4c144f4719a88a5bde31 qemu-kvm-1.1.0.tar.gz
f8f5629b00f48192cc0467e1d31c4dd2 qemu-kvm-1.1.1.tar.gz