[qemu/f13/master] Update spec changelog

Justin M. Forbes jforbes at fedoraproject.org
Thu Mar 3 19:31:56 UTC 2011


commit 87782127248fc3051271c220851acb9a85b05ee4
Author: Justin M. Forbes <jforbes at redhat.com>
Date:   Thu Mar 3 13:31:40 2011 -0600

    Update spec changelog

 ...vhost-net-patches-for-qemu-0.13.0-tarball.patch |  316 +++++
 0038-msix-migration-fix.patch                      |   43 -
 0039-vhost-logging-thinko-fix.patch                |   28 -
 0040-vhost-move-vhost_set_vq_addr.patch            |   72 -
 0041-vhost-used-addr-migration-fix.patch           |   70 -
 0042-vhost-fix-used-logging-size-math.patch        |   37 -
 ...st-logging-mistake-enable-not-disable-log.patch |   26 -
 0044-vhost-fix-log-base.patch                      |   38 -
 ...dora-13-machine-type-that-contains-backpo.patch |   62 -
 ...ward-compatibility-options-for-virtio-ser.patch |   72 -
 ...serial-don-t-set-MULTIPORT-for-1-port-dev.patch |   39 -
 ...irtio-serial-pci-Allow-MSI-to-be-disabled.patch |   44 -
 0049-migration-Clear-fd-also-in-error-cases.patch  |  100 --
 ...raw-posix-Detect-CDROM-via-ioctl-on-linux.patch |   61 -
 ...-increase-buffer-for-USB-control-requests.patch |   33 -
 0052-virtio-console-patches.patch                  |  936 --------------
 0053-net-remove-NICInfo.bootable-field.patch       |   43 -
 ...broken-net_set_boot_mask-boot-device-vali.patch |  100 --
 ...emove-unused-boot_devices_bitmap-variable.patch |   63 -
 ksm.init                                           |    6 +-
 ksmtuned                                           |    6 +-
 ksmtuned.init                                      |    8 +-
 ...edora-13-machine-type-for-backward-compat.patch |   37 +
 qemu-Move-virtio-serial-to-Makefile.objs.patch     |   44 -
 qemu-exec-memory-notifiers.patch                   |  199 ---
 qemu-fix-linux-user-build-on-ppc.patch             |  135 --
 qemu-fix-qcow2-backing-file-with-virtio.patch      |  140 --
 qemu-kvm-add-API-to-set-ioeventfd.patch            |   81 --
 qemu-kvm-add-vhost.h-header.patch                  |  147 ---
 qemu-kvm-irqfd-support.patch                       |   59 -
 qemu-msix-add-mask-unmask-notifiers.patch          |  121 --
 qemu-net-add-API-to-disable-enable-polling.patch   |   68 -
 qemu-notifier-event-notifier-implementation.patch  |  122 --
 qemu-qdev-add-bit-property-type.patch              |  156 ---
 ...-qdev-fix-thinko-leading-to-guest-crashes.patch |   24 -
 ...-tap-add-API-to-retrieve-vhost-net-header.patch |   37 -
 qemu-tap-add-interface-to-get-device-fd.patch      |   39 -
 qemu-tap-add-vhost-vhostfd-options.patch           |  117 --
 ...ting-too-large-iovecs-in-multiwrite_merge.patch |   41 -
 qemu-vhost-add-configure-check.patch               |  118 --
 qemu-vhost-vhost-net-support.patch                 |  869 -------------
 ...ove-duplicate-macro-definition-for-max.-v.patch |   47 -
 qemu-virtio-add-APIs-for-queue-fields.patch        |  111 --
 qemu-virtio-add-features-as-qdev-properties.patch  |  400 ------
 qemu-virtio-add-notifier-support.patch             |   78 --
 qemu-virtio-add-status-change-callback.patch       |   76 --
 ...-virtio-avoid-crash-with-non-tap-backends.patch |   25 -
 ...sole-Rename-virtio-serial.c-back-to-virti.patch |  341 -----
 ...nsole-qdev-conversion-new-virtio-serial-b.patch | 1366 --------------------
 qemu-virtio-move-typedef-to-qemu-common.patch      |   34 -
 qemu-virtio-net-mac-property-is-mandatory.patch    |   40 -
 qemu-virtio-net-vhost-net-support.patch            |  153 ---
 qemu-virtio-pci-fill-in-notifier-support.patch     |   98 --
 qemu-virtio-pci-irqfd-fix-nonkvm-build.patch       |   34 -
 qemu-virtio-pci-irqfd-support.patch                |   70 -
 qemu-virtio-rename-features-guest_features.patch   |  149 ---
 ...erial-Add-a-virtserialport-device-for-gen.patch |   63 -
 ...erial-Use-MSI-vectors-for-port-virtqueues.patch |   45 -
 ...erial-bus-Add-a-port-name-property-for-po.patch |  116 --
 ...erial-bus-Add-ability-to-hot-unplug-ports.patch |   40 -
 ...ial-bus-Maintain-guest-and-host-port-open.patch |  232 ----
 qemu-virtio-serial-features-build-fix.patch        |   25 -
 qemu.spec                                          |  156 +--
 sources                                            |    2 +-
 64 files changed, 402 insertions(+), 8056 deletions(-)
---
diff --git a/0001-vhost-net-patches-for-qemu-0.13.0-tarball.patch b/0001-vhost-net-patches-for-qemu-0.13.0-tarball.patch
new file mode 100644
index 0000000..d8478d7
--- /dev/null
+++ b/0001-vhost-net-patches-for-qemu-0.13.0-tarball.patch
@@ -0,0 +1,316 @@
+From 2ed38f61f1054e188838bae9244fc1c327f8cda4 Mon Sep 17 00:00:00 2001
+From: Marcelo Tosatti <mtosatti at redhat.com>
+Date: Mon, 18 Oct 2010 16:17:00 -0200
+Subject: [PATCH 42/42] vhost-net patches for qemu-0.13.0 tarball
+
+Justin,
+
+Attached are the patches to fix vhost-net on the 0.13.0 tarball.
+Untested.
+
+commit f76cfc6f0882f227101f21d5a5b80804710b88cb
+Author: Michael S. Tsirkin <mst at redhat.com>
+Date:   Wed Oct 6 07:22:00 2010 +0200
+
+    vhost: fix up irqfd support
+
+    vhost irqfd support: case where many vqs are
+    mapped to a single msix vector is currently broken.
+    Fix it up.
+
+    	Includes this patch from qemu.git:
+
+    virtio: change set guest notifier to per-device
+
+    When using irqfd with vhost-net to inject interrupts,
+    a single evenfd might inject multiple interrupts.
+    Implementing this is much easier with a single
+    per-device callback to set guest notifiers.
+
+    Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
+---
+ hw/msix.c       |   82 +++++++++++++++++++++++++++++++-----------------------
+ hw/msix.h       |    4 +-
+ hw/pci.h        |    3 +-
+ hw/virtio-pci.c |   56 +++++++++++++++++++++++++++++++------
+ 4 files changed, 97 insertions(+), 48 deletions(-)
+
+diff --git a/hw/msix.c b/hw/msix.c
+index 3dd0456..c0c6b50 100644
+--- a/hw/msix.c
++++ b/hw/msix.c
+@@ -300,10 +300,8 @@ static void msix_mmio_writel(void *opaque, target_phys_addr_t addr,
+     if (kvm_enabled() && kvm_irqchip_in_kernel()) {
+         kvm_msix_update(dev, vector, was_masked, msix_is_masked(dev, vector));
+     }
+-    if (was_masked != msix_is_masked(dev, vector) &&
+-        dev->msix_mask_notifier && dev->msix_mask_notifier_opaque[vector]) {
++    if (was_masked != msix_is_masked(dev, vector) && dev->msix_mask_notifier) {
+         int r = dev->msix_mask_notifier(dev, vector,
+-					dev->msix_mask_notifier_opaque[vector],
+ 					msix_is_masked(dev, vector));
+         assert(r >= 0);
+     }
+@@ -351,9 +349,8 @@ static void msix_mask_all(struct PCIDevice *dev, unsigned nentries)
+         int was_masked = msix_is_masked(dev, vector);
+         dev->msix_table_page[offset] |= MSIX_VECTOR_MASK;
+         if (was_masked != msix_is_masked(dev, vector) &&
+-            dev->msix_mask_notifier && dev->msix_mask_notifier_opaque[vector]) {
++            dev->msix_mask_notifier) {
+             r = dev->msix_mask_notifier(dev, vector,
+-                                        dev->msix_mask_notifier_opaque[vector],
+                                         msix_is_masked(dev, vector));
+             assert(r >= 0);
+         }
+@@ -379,8 +376,6 @@ int msix_init(struct PCIDevice *dev, unsigned short nentries,
+                                             sizeof *dev->msix_irq_entries);
+     }
+ #endif
+-    dev->msix_mask_notifier_opaque =
+-        qemu_mallocz(nentries * sizeof *dev->msix_mask_notifier_opaque);
+     dev->msix_mask_notifier = NULL;
+     dev->msix_entry_used = qemu_mallocz(MSIX_MAX_ENTRIES *
+                                         sizeof *dev->msix_entry_used);
+@@ -444,8 +439,6 @@ int msix_uninit(PCIDevice *dev)
+     dev->msix_entry_used = NULL;
+     qemu_free(dev->msix_irq_entries);
+     dev->msix_irq_entries = NULL;
+-    qemu_free(dev->msix_mask_notifier_opaque);
+-    dev->msix_mask_notifier_opaque = NULL;
+     dev->cap_present &= ~QEMU_PCI_CAP_MSIX;
+     return 0;
+ }
+@@ -590,46 +583,65 @@ void msix_unuse_all_vectors(PCIDevice *dev)
+     msix_free_irq_entries(dev);
+ }
+
+-int msix_set_mask_notifier(PCIDevice *dev, unsigned vector, void *opaque)
++/* Invoke the notifier if vector entry is used and unmasked. */
++static int msix_notify_if_unmasked(PCIDevice *dev, unsigned vector, int masked)
+ {
+-    int r = 0;
+-    if (vector >= dev->msix_entries_nr || !dev->msix_entry_used[vector])
++    assert(dev->msix_mask_notifier);
++    if (!dev->msix_entry_used[vector] || msix_is_masked(dev, vector)) {
+         return 0;
++    }
++    return dev->msix_mask_notifier(dev, vector, masked);
++}
+
+-    assert(dev->msix_mask_notifier);
+-    assert(opaque);
+-    assert(!dev->msix_mask_notifier_opaque[vector]);
++static int msix_set_mask_notifier_for_vector(PCIDevice *dev, unsigned vector)
++{
++	/* Notifier has been set. Invoke it on unmasked vectors. */
++	return msix_notify_if_unmasked(dev, vector, 0);
++}
++
++static int msix_unset_mask_notifier_for_vector(PCIDevice *dev, unsigned vector)
++{
++	/* Notifier will be unset. Invoke it to mask unmasked entries. */
++	return msix_notify_if_unmasked(dev, vector, 1);
++}
+
+-    /* Unmask the new notifier unless vector is masked. */
+-    if (!msix_is_masked(dev, vector)) {
+-        r = dev->msix_mask_notifier(dev, vector, opaque, false);
++int msix_set_mask_notifier(PCIDevice *dev, msix_mask_notifier_func f)
++{
++    int r, n;
++    assert(!dev->msix_mask_notifier);
++    dev->msix_mask_notifier = f;
++    for (n = 0; n < dev->msix_entries_nr; ++n) {
++        r = msix_set_mask_notifier_for_vector(dev, n);
+         if (r < 0) {
+-            return r;
++            goto undo;
+         }
+     }
+-    dev->msix_mask_notifier_opaque[vector] = opaque;
++    return 0;
++
++undo:
++    while (--n >= 0) {
++        msix_unset_mask_notifier_for_vector(dev, n);
++    }
++    dev->msix_mask_notifier = NULL;
+     return r;
+ }
+
+-int msix_unset_mask_notifier(PCIDevice *dev, unsigned vector)
++int msix_unset_mask_notifier(PCIDevice *dev)
+ {
+-    int r = 0;
+-    void *opaque;
+-    if (vector >= dev->msix_entries_nr || !dev->msix_entry_used[vector])
+-        return 0;
+-
+-    opaque = dev->msix_mask_notifier_opaque[vector];
+-
++    int r, n;
+     assert(dev->msix_mask_notifier);
+-    assert(opaque);
+-
+-    /* Mask the old notifier unless it is already masked. */
+-    if (!msix_is_masked(dev, vector)) {
+-        r = dev->msix_mask_notifier(dev, vector, opaque, true);
++    for (n = 0; n < dev->msix_entries_nr; ++n) {
++        r = msix_unset_mask_notifier_for_vector(dev, n);
+         if (r < 0) {
+-            return r;
++            goto undo;
+         }
+     }
+-    dev->msix_mask_notifier_opaque[vector] = NULL;
++    dev->msix_mask_notifier = NULL;
++    return 0;
++
++undo:
++    while (--n >= 0) {
++        msix_set_mask_notifier_for_vector(dev, n);
++    }
+     return r;
+ }
+diff --git a/hw/msix.h b/hw/msix.h
+index 6b21ffb..5a81df5 100644
+--- a/hw/msix.h
++++ b/hw/msix.h
+@@ -33,6 +33,6 @@ void msix_reset(PCIDevice *dev);
+
+ extern int msix_supported;
+
+-int msix_set_mask_notifier(PCIDevice *dev, unsigned vector, void *opaque);
+-int msix_unset_mask_notifier(PCIDevice *dev, unsigned vector);
++int msix_set_mask_notifier(PCIDevice *dev, msix_mask_notifier_func);
++int msix_unset_mask_notifier(PCIDevice *dev);
+ #endif
+diff --git a/hw/pci.h b/hw/pci.h
+index ccb99d0..a40dc14 100644
+--- a/hw/pci.h
++++ b/hw/pci.h
+@@ -131,7 +131,7 @@ enum {
+ #define PCI_CAPABILITY_CONFIG_MSIX_LENGTH 0x10
+
+ typedef int (*msix_mask_notifier_func)(PCIDevice *, unsigned vector,
+-				       void *opaque, int masked);
++				       int masked);
+
+ struct PCIDevice {
+     DeviceState qdev;
+@@ -198,7 +198,6 @@ struct PCIDevice {
+
+     struct kvm_irq_routing_entry *msix_irq_entries;
+
+-    void **msix_mask_notifier_opaque;
+     msix_mask_notifier_func msix_mask_notifier;
+
+     /* Device capability configuration space */
+diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
+index 83b7871..72bc80e 100644
+--- a/hw/virtio-pci.c
++++ b/hw/virtio-pci.c
+@@ -427,11 +427,10 @@ static void virtio_pci_guest_notifier_read(void *opaque)
+     }
+ }
+
+-static int virtio_pci_mask_notifier(PCIDevice *dev, unsigned vector,
+-                                    void *opaque, int masked)
++static int virtio_pci_mask_vq(PCIDevice *dev, unsigned vector,
++                              VirtQueue *vq, int masked)
+ {
+ #ifdef CONFIG_KVM
+-    VirtQueue *vq = opaque;
+     EventNotifier *notifier = virtio_queue_get_guest_notifier(vq);
+     int r = kvm_set_irqfd(dev->msix_irq_entries[vector].gsi,
+                           event_notifier_get_fd(notifier),
+@@ -452,6 +451,34 @@ static int virtio_pci_mask_notifier(PCIDevice *dev, unsigned vector,
+ #endif
+ }
+
++static int virtio_pci_mask_notifier(PCIDevice *dev, unsigned vector,
++                                    int masked)
++{
++    VirtIOPCIProxy *proxy = container_of(dev, VirtIOPCIProxy, pci_dev);
++    VirtIODevice *vdev = proxy->vdev;
++    int r, n;
++
++    for (n = 0; n < VIRTIO_PCI_QUEUE_MAX; n++) {
++        if (!virtio_queue_get_num(vdev, n)) {
++            break;
++        }
++        if (virtio_queue_vector(vdev, n) != vector) {
++            continue;
++        }
++        r = virtio_pci_mask_vq(dev, vector, virtio_get_queue(vdev, n), masked);
++        if (r < 0) {
++            goto undo;
++        }
++    }
++    return 0;
++undo:
++    while (--n >= 0) {
++        virtio_pci_mask_vq(dev, vector, virtio_get_queue(vdev, n), !masked);
++    }
++    return r;
++}
++
++
+ static int virtio_pci_set_guest_notifier(void *opaque, int n, bool assign)
+ {
+     VirtIOPCIProxy *proxy = opaque;
+@@ -465,11 +492,7 @@ static int virtio_pci_set_guest_notifier(void *opaque, int n, bool assign)
+         }
+         qemu_set_fd_handler(event_notifier_get_fd(notifier),
+                             virtio_pci_guest_notifier_read, NULL, vq);
+-        msix_set_mask_notifier(&proxy->pci_dev,
+-                               virtio_queue_vector(proxy->vdev, n), vq);
+     } else {
+-        msix_unset_mask_notifier(&proxy->pci_dev,
+-				 virtio_queue_vector(proxy->vdev, n));
+         qemu_set_fd_handler(event_notifier_get_fd(notifier),
+                             NULL, NULL, NULL);
+         /* Test and clear notifier before closing it,
+@@ -487,6 +510,13 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
+     VirtIODevice *vdev = proxy->vdev;
+     int r, n;
+
++    /* Must unset mask notifier while guest notifier
++     * is still assigned */
++    if (!assign) {
++	    r = msix_unset_mask_notifier(&proxy->pci_dev);
++            assert(r >= 0);
++    }
++
+     for (n = 0; n < VIRTIO_PCI_QUEUE_MAX; n++) {
+         if (!virtio_queue_get_num(vdev, n)) {
+             break;
+@@ -498,6 +528,16 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
+         }
+     }
+
++    /* Must set mask notifier after guest notifier
++     * has been assigned */
++    if (assign) {
++        r = msix_set_mask_notifier(&proxy->pci_dev,
++                                   virtio_pci_mask_notifier);
++        if (r < 0) {
++            goto assign_error;
++        }
++    }
++
+     return 0;
+
+ assign_error:
+@@ -583,8 +623,6 @@ static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev,
+
+     proxy->pci_dev.config_write = virtio_write_config;
+
+-    proxy->pci_dev.msix_mask_notifier = virtio_pci_mask_notifier;
+-
+     size = VIRTIO_PCI_REGION_SIZE(&proxy->pci_dev) + vdev->config_len;
+     if (size & (size-1))
+         size = 1 << qemu_fls(size);
+-- 
+1.7.2.3
+
diff --git a/ksm.init b/ksm.init
index 8561993..a4bed2d 100644
--- a/ksm.init
+++ b/ksm.init
@@ -40,8 +40,10 @@ default_max_kernel_pages () {
 
 start() {
     echo -n $"Starting $prog: "
-    KSM_MAX_KERNEL_PAGES=${KSM_MAX_KERNEL_PAGES:-`default_max_kernel_pages`}
-    echo $KSM_MAX_KERNEL_PAGES > /sys/kernel/mm/ksm/max_kernel_pages
+    if [ -f /sys/kernel/mm/ksm/max_kernel_pages ]; then
+        KSM_MAX_KERNEL_PAGES=${KSM_MAX_KERNEL_PAGES:-`default_max_kernel_pages`}
+        echo $KSM_MAX_KERNEL_PAGES > /sys/kernel/mm/ksm/max_kernel_pages
+    fi
     echo 1 > /sys/kernel/mm/ksm/run
     RETVAL=$?
     [ $RETVAL = 0 ] && success $"$prog startup" || failure $"$prog startup"
diff --git a/ksmtuned b/ksmtuned
index 205ff84..c59dec0 100644
--- a/ksmtuned
+++ b/ksmtuned
@@ -71,12 +71,12 @@ KSMCTL () {
 committed_memory () {
     # calculate how much memory is committed to running qemu processes
     local progname
-    progname=${1:-qemu}
-    ps -o vsz `pgrep $progname` | awk '{ sum += $1 }; END { print sum }'
+    progname=${1:-qemu-kvm}
+    ps -C "$progname" -o rsz | awk '{ sum += $1 }; END { print sum }'
 }
 
 free_memory () {
-    awk '/^(MemFree|Buffers|MemCached):/ {free += $2}; END {print free}' \
+    awk '/^(MemFree|Buffers|Cached):/ {free += $2}; END {print free}' \
                 /proc/meminfo
 }
 
diff --git a/ksmtuned.init b/ksmtuned.init
index e055785..5cd6090 100644
--- a/ksmtuned.init
+++ b/ksmtuned.init
@@ -77,8 +77,14 @@ case "$1" in
 	condrestart
 	;;
   retune)
-        kill -SIGUSR1 `cat ${pidfile}`
+        pid=`cat ${pidfile} 2> /dev/null`
         RETVAL=$?
+        if [ -z "$pid" ]; then
+	    echo $"Cannot retune, service is not running."
+	else
+            kill -SIGUSR1 $pid
+            RETVAL=$?
+	fi
         ;;
   *)
 	echo $"Usage: $prog {start|stop|restart|force-reload|condrestart|try-restart|status|retune|help}"
diff --git a/pc-add-a-Fedora-13-machine-type-for-backward-compat.patch b/pc-add-a-Fedora-13-machine-type-for-backward-compat.patch
new file mode 100644
index 0000000..25938aa
--- /dev/null
+++ b/pc-add-a-Fedora-13-machine-type-for-backward-compat.patch
@@ -0,0 +1,37 @@
+From: Justin M. Forbes <jforbes at redhat.com>
+Date: Thu, Aug 19 09:13:45 2010 -0500
+Subject: pc: Add a Fedora-13 machine type for backwards compatibility.
+
+In Fedora 13 a fedora-13 machine type was added as default to allow
+interaction with upstream stable qemu which did not support the same
+feature set.  As a result we need to support this machine type through
+the Fedora 15 release.
+
+
+diff --git a/hw/pc_piix.c b/hw/pc_piix.c
+index 9e4bac8..eb1ed05 100644
+--- a/hw/pc_piix.c
++++ b/hw/pc_piix.c
+@@ -237,6 +237,14 @@ static QEMUMachine pc_machine = {
+     .is_default = 1,
+ };
+
++static QEMUMachine pc_machine_f13 = {
++    .name = "fedora-13",
++    .desc = "Standard PC",
++    .init = pc_init_pci,
++    .max_cpus = 255,
++    .is_default = 0,
++};
++
+ static QEMUMachine pc_machine_v0_12 = {
+     .name = "pc-0.12",
+     .desc = "Standard PC",
+@@ -348,6 +356,7 @@ static QEMUMachine isapc_machine = {
+ static void pc_machine_init(void)
+ {
+     qemu_register_machine(&pc_machine);
++    qemu_register_machine(&pc_machine_f13);
+     qemu_register_machine(&pc_machine_v0_12);
+     qemu_register_machine(&pc_machine_v0_11);
+     qemu_register_machine(&pc_machine_v0_10);
diff --git a/qemu.spec b/qemu.spec
index 44f7bcc..ddc74da 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -1,6 +1,6 @@
 Summary: QEMU is a FAST! processor emulator
 Name: qemu
-Version: 0.12.5
+Version: 0.13.0
 Release: 1%{?dist}
 # Epoch because we pushed a qemu-1.0 package
 Epoch: 2
@@ -12,6 +12,11 @@ URL: http://www.qemu.org/
 # architecture support (--with x86only):
 %define with_x86only  %{?_with_x86only:     1} %{?!_with_x86only:     0}
 
+# OOM killer breaks builds with parallel make on s390(x)
+%ifarch s390 s390x
+%define _smp_mflags %{nil}
+%endif
+
 Source0: http://downloads.sourceforge.net/sourceforge/kvm/qemu-kvm-%{version}.tar.gz
 Source1: qemu.init
 
@@ -28,64 +33,12 @@ Source6: ksmtuned.init
 Source7: ksmtuned
 Source8: ksmtuned.conf
 
-# virtio-console changes for the F13 VirtioSerial feature
-Patch01: qemu-virtio-Remove-duplicate-macro-definition-for-max.-v.patch
-Patch02: qemu-virtio-console-qdev-conversion-new-virtio-serial-b.patch
-Patch03: qemu-virtio-serial-bus-Maintain-guest-and-host-port-open.patch
-Patch04: qemu-virtio-serial-bus-Add-a-port-name-property-for-po.patch
-Patch05: qemu-virtio-serial-bus-Add-ability-to-hot-unplug-ports.patch
-Patch06: qemu-virtio-serial-Add-a-virtserialport-device-for-gen.patch
-Patch07: qemu-Move-virtio-serial-to-Makefile.objs.patch
-Patch08: qemu-virtio-serial-Use-MSI-vectors-for-port-virtqueues.patch
-Patch09: qemu-virtio-console-Rename-virtio-serial.c-back-to-virti.patch
-
-# VHostNet Patches
-Patch11: qemu-net-add-API-to-disable-enable-polling.patch
-Patch12: qemu-virtio-rename-features-guest_features.patch
-Patch13: qemu-qdev-add-bit-property-type.patch
-Patch14: qemu-qdev-fix-thinko-leading-to-guest-crashes.patch
-Patch15: qemu-virtio-add-features-as-qdev-properties.patch
-Patch16: qemu-virtio-net-mac-property-is-mandatory.patch
-Patch17: qemu-exec-memory-notifiers.patch
-Patch18: qemu-kvm-add-API-to-set-ioeventfd.patch
-Patch19: qemu-notifier-event-notifier-implementation.patch
-Patch20: qemu-virtio-add-notifier-support.patch
-Patch21: qemu-virtio-add-APIs-for-queue-fields.patch
-Patch22: qemu-virtio-add-status-change-callback.patch
-Patch23: qemu-virtio-move-typedef-to-qemu-common.patch
-Patch24: qemu-virtio-pci-fill-in-notifier-support.patch
-Patch25: qemu-tap-add-interface-to-get-device-fd.patch
-Patch26: qemu-vhost-vhost-net-support.patch
-Patch27: qemu-tap-add-vhost-vhostfd-options.patch
-Patch28: qemu-tap-add-API-to-retrieve-vhost-net-header.patch
-Patch29: qemu-virtio-net-vhost-net-support.patch
-Patch30: qemu-kvm-add-vhost.h-header.patch
-Patch31: qemu-kvm-irqfd-support.patch
-Patch32: qemu-msix-add-mask-unmask-notifiers.patch
-Patch33: qemu-virtio-pci-irqfd-support.patch
-Patch34: qemu-virtio-avoid-crash-with-non-tap-backends.patch
-Patch35: qemu-virtio-serial-features-build-fix.patch
-Patch36: qemu-virtio-pci-irqfd-fix-nonkvm-build.patch
-Patch37: qemu-vhost-add-configure-check.patch
+# This patch must be carried through F-15 to support guests created
+# with F-13/
+Patch00: pc-add-a-Fedora-13-machine-type-for-backward-compat.patch
 
 # Fixes from upstream  
-Patch38: 0038-msix-migration-fix.patch
-Patch39: 0039-vhost-logging-thinko-fix.patch
-Patch40: 0040-vhost-move-vhost_set_vq_addr.patch
-Patch41: 0041-vhost-used-addr-migration-fix.patch
-Patch42: 0042-vhost-fix-used-logging-size-math.patch
-Patch43: 0043-vhost-logging-mistake-enable-not-disable-log.patch
-Patch44: 0044-vhost-fix-log-base.patch
-Patch45: 0045-pc-Add-a-Fedora-13-machine-type-that-contains-backpo.patch
-Patch46: 0046-pc-Add-backward-compatibility-options-for-virtio-ser.patch
-Patch47: 0047-virtio-serial-don-t-set-MULTIPORT-for-1-port-dev.patch
-Patch48: 0048-virtio-serial-pci-Allow-MSI-to-be-disabled.patch
-Patch49: 0049-migration-Clear-fd-also-in-error-cases.patch
-Patch50: 0050-raw-posix-Detect-CDROM-via-ioctl-on-linux.patch
-Patch51: 0051-usb-linux-increase-buffer-for-USB-control-requests.patch
-Patch52: 0052-virtio-console-patches.patch
-Patch55: 0055-boot-remove-unused-boot_devices_bitmap-variable.patch
-
+Patch01: 0001-vhost-net-patches-for-qemu-0.13.0-tarball.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
@@ -94,6 +47,7 @@ BuildRequires: rsync
 BuildRequires: pciutils-devel
 BuildRequires: pulseaudio-libs-devel
 BuildRequires: ncurses-devel
+BuildRequires: texinfo
 Requires: %{name}-user = %{epoch}:%{version}-%{release}
 Requires: %{name}-system-x86 = %{epoch}:%{version}-%{release}
 Requires: %{name}-system-sparc = %{epoch}:%{version}-%{release}
@@ -271,65 +225,14 @@ Group: Development/Tools
 
 %description kvm-tools
 This package contains some diagnostics and debugging tools for KVM,
-such as kvmtrace and kvm_stat.
+such as kvm_stat.
 %endif
 
 %prep
 %setup -q -n qemu-kvm-%{version}
 
+%patch00 -p1
 %patch01 -p1
-%patch02 -p1
-%patch03 -p1
-%patch04 -p1
-%patch05 -p1
-%patch06 -p1
-%patch07 -p1
-%patch08 -p1
-%patch09 -p1
-
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
-%patch19 -p1
-%patch20 -p1
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
-%patch24 -p1
-%patch25 -p1
-%patch26 -p1
-%patch27 -p1
-%patch28 -p1
-%patch29 -p1
-%patch30 -p1
-%patch31 -p1
-%patch32 -p1
-%patch33 -p1
-%patch34 -p1
-%patch35 -p1
-%patch36 -p1
-%patch37 -p1
-%patch38 -p1
-%patch39 -p1
-%patch40 -p1
-%patch41 -p1
-%patch42 -p1
-%patch43 -p1
-%patch44 -p1
-%patch45 -p1
-%patch46 -p1
-%patch47 -p1
-%patch48 -p1
-%patch49 -p1
-%patch50 -p1
-%patch51 -p1
-%patch52 -p1
-%patch55 -p1
 
 %build
 # By default we build everything, but allow x86 to build a minimal version
@@ -352,16 +255,23 @@ such as kvmtrace and kvm_stat.
 extraldflags="-Wl,--build-id";
 buildldflags="VL_LDFLAGS=-Wl,--build-id"
 
+%ifarch s390
+# drop -g flag to prevent memory exhaustion by linker
+%global optflags %(echo %{optflags} | sed 's/-g//')
+sed -i.debug 's/-g//g' configure
+%endif
+
 %ifarch %{ix86} x86_64
 # sdl outputs to alsa or pulseaudio depending on system config, but it's broken (#495964)
 # 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 \
             --prefix=%{_prefix} \
+            --sysconfdir=%{_sysconfdir} \
             --audio-drv-list=pa,sdl,alsa,oss \
             --disable-strip \
             --extra-ldflags=$extraldflags \
-            --extra-cflags="$RPM_OPT_FLAGS" \
+            --extra-cflags="%{optflags}" \
             --disable-xen
 
 echo "config-host.mak contents:"
@@ -373,22 +283,20 @@ make V=1 %{?_smp_mflags} $buildldflags
 cp -a x86_64-softmmu/qemu-system-x86_64 qemu-kvm
 make clean
 
-cd kvm/user
-./configure --prefix=%{_prefix} --kerneldir=$(pwd)/../kernel/
-make kvmtrace
-cd ../../
 %endif
 
 ./configure \
     --target-list="$buildarch" \
     --prefix=%{_prefix} \
+    --sysconfdir=%{_sysconfdir} \
     --interp-prefix=%{_prefix}/qemu-%%M \
     --audio-drv-list=pa,sdl,alsa,oss \
     --disable-kvm \
     --disable-strip \
     --extra-ldflags=$extraldflags \
-    --extra-cflags="$RPM_OPT_FLAGS" \
-    --disable-xen
+    --extra-cflags="%{optflags}" \
+    --disable-xen \
+    --disable-werror
 
 echo "config-host.mak contents:"
 echo "==="
@@ -414,8 +322,6 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
 
 install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/kvm.modules
-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}/
 install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
@@ -426,7 +332,8 @@ make prefix="${RPM_BUILD_ROOT}%{_prefix}" \
      sharedir="${RPM_BUILD_ROOT}%{_datadir}/%{name}" \
      mandir="${RPM_BUILD_ROOT}%{_mandir}" \
      docdir="${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" \
-     datadir="${RPM_BUILD_ROOT}%{_datadir}/%{name}" install
+     datadir="${RPM_BUILD_ROOT}%{_datadir}/%{name}" \
+     sysconfdir="${RPM_BUILD_ROOT}%{_sysconfdir}" install
 chmod -x ${RPM_BUILD_ROOT}%{_mandir}/man1/*
 install -D -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/qemu
 install -D -p -m 0644 -t ${RPM_BUILD_ROOT}%{qemudocdir} Changelog README TODO COPYING COPYING.LIB LICENSE
@@ -435,11 +342,13 @@ install -D -p -m 0644 qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl2/qemu.conf
 
 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}/gpxe*rom
 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
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/petalogix-s3adsp1800.dtb
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/s390-zipl.rom
 %if %{with_x86only}
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/bamboo.dtb
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/ppc_rom.bin
@@ -542,6 +451,7 @@ fi
 %{_initddir}/ksmtuned
 %{_sbindir}/ksmtuned
 %config(noreplace) %{_sysconfdir}/ksmtuned.conf
+%dir %{_sysconfdir}/qemu
 %files user
 %defattr(-,root,root)
 %{_initddir}/qemu
@@ -579,6 +489,7 @@ fi
 %{_datadir}/%{name}/pxe-pcnet.bin
 %{_datadir}/%{name}/pxe-rtl8139.bin
 %{_datadir}/%{name}/pxe-ne2k_pci.bin
+%config(noreplace) %{_sysconfdir}/qemu/target-x86_64.conf
 %ifarch %{ix86} x86_64
 %{_datadir}/%{name}/extboot.bin
 %{_bindir}/qemu-kvm
@@ -586,8 +497,6 @@ fi
 %{_sysconfdir}/udev/rules.d/80-kvm.rules
 %files kvm-tools
 %defattr(-,root,root,-)
-%{_bindir}/kvmtrace
-%{_bindir}/kvmtrace_format
 %{_bindir}/kvm_stat
 %endif
 %if !%{with_x86only}
@@ -633,6 +542,9 @@ fi
 %{_mandir}/man1/qemu-img.1*
 
 %changelog
+* Thu Mar 03 2011 Justin M. Forbes <jforbes at redhat.com> - 2:0.13.0-1
+- Update to 0.13.0 to remove 50+ patches and catch several bugfixes.
+
 * Wed Aug 11 2010 Justin M. Forbes <jforbes at redhat.com> - 2:0.12.5-1
 - Fix e1000 gpxe rom requires.
 - Update to 0.12.5 stable for a number of bug fixes.
diff --git a/sources b/sources
index ebdc03d..5298816 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c7303c30432dc4eb0a39bb85a9d15cc9  qemu-kvm-0.12.5.tar.gz
+68d100da381284a3dee486d3b9690e6d  qemu-kvm-0.13.0.tar.gz


More information about the scm-commits mailing list