From 0552ca5eb742b540c7d59a309dd4d23a1eb960c6 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Jul 05 2012 15:03:54 +0000 Subject: Use upstream patch to fix build failure in msi/virtio-pci (thanks Hans de Goede). --- diff --git a/0001-buildsys-Move-msi-x-and-virtio-pci-from-Makefile.obj.patch b/0001-buildsys-Move-msi-x-and-virtio-pci-from-Makefile.obj.patch deleted file mode 100644 index 41b0178..0000000 --- a/0001-buildsys-Move-msi-x-and-virtio-pci-from-Makefile.obj.patch +++ /dev/null @@ -1,53 +0,0 @@ ->From 309ac5b2ef96678f30c67b71e342813688040e72 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 4 Jul 2012 17:19:20 +0200 -Subject: [PATCH 01/15] buildsys: Move msi[x] and virtio-pci from - Makefile.objs to Makefile.target - -Building both kvm and non kvm versions of qemu in the same tree, -results in a link error during the non kvm build with undefined references -to kvm_kernel_irqchip, expanded from the kvm_irqchip_in_kernel macro. - -This patch fixes this. - -Signed-off-by: Hans de Goede ---- - Makefile.objs | 2 -- - Makefile.target | 3 ++- - 2 files changed, 2 insertions(+), 3 deletions(-) - -diff --git a/Makefile.objs b/Makefile.objs -index 264f1fe..8d49738 100644 ---- a/Makefile.objs -+++ b/Makefile.objs -@@ -211,10 +211,8 @@ hw-obj-y = - hw-obj-y += vl.o loader.o - hw-obj-$(CONFIG_VIRTIO) += virtio-console.o - hw-obj-y += usb/libhw.o --hw-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o - hw-obj-y += fw_cfg.o - hw-obj-$(CONFIG_PCI) += pci_bridge.o pci_bridge_dev.o --hw-obj-$(CONFIG_PCI) += msix.o msi.o - hw-obj-$(CONFIG_PCI) += shpc.o - hw-obj-$(CONFIG_PCI) += slotid_cap.o - hw-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o -diff --git a/Makefile.target b/Makefile.target -index eda8637..ede8ed3 100644 ---- a/Makefile.target -+++ b/Makefile.target -@@ -183,9 +183,10 @@ obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o ioport.o - # virtio has to be here due to weird dependency between PCI and virtio-net. - # need to fix this properly - obj-$(CONFIG_NO_PCI) += pci-stub.o --obj-$(CONFIG_PCI) += pci.o -+obj-$(CONFIG_PCI) += pci.o msi.o msix.o - obj-$(CONFIG_VIRTIO) += virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o - obj-$(CONFIG_VIRTIO) += virtio-scsi.o -+obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o - obj-y += vhost_net.o - obj-$(CONFIG_VHOST_NET) += vhost.o - obj-$(CONFIG_REALLY_VIRTFS) += 9pfs/virtio-9p-device.o --- -1.7.10.4 - - diff --git a/0001-kvm-Enable-use-of-kvm_irqchip_in_kernel-in-hwlib-cod.patch b/0001-kvm-Enable-use-of-kvm_irqchip_in_kernel-in-hwlib-cod.patch new file mode 100644 index 0000000..fa3f4d5 --- /dev/null +++ b/0001-kvm-Enable-use-of-kvm_irqchip_in_kernel-in-hwlib-cod.patch @@ -0,0 +1,29 @@ +From bbf3b80401d55ac3339160cefa17f0015317f512 Mon Sep 17 00:00:00 2001 +From: Jan Kiszka +Date: Thu, 17 May 2012 10:32:37 -0300 +Subject: [PATCH] kvm: Enable use of kvm_irqchip_in_kernel in hwlib code + +Provide a dummy kvm_kernel_irqchip so that kvm_irqchip_in_kernel can be +used by code that is not under CONFIG_KVM protection. + +Signed-off-by: Jan Kiszka +Signed-off-by: Avi Kivity +--- + kvm-stub.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/kvm-stub.c b/kvm-stub.c +index b4cf03f..ec9a364 100644 +--- a/kvm-stub.c ++++ b/kvm-stub.c +@@ -18,6 +18,7 @@ + #include "kvm.h" + + KVMState *kvm_state; ++bool kvm_kernel_irqchip; + + int kvm_init_vcpu(CPUArchState *env) + { +-- +1.7.10.4 + diff --git a/qemu.spec b/qemu.spec index e15759a..9989a53 100644 --- a/qemu.spec +++ b/qemu.spec @@ -38,7 +38,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 1.1.0 -Release: 3%{?dist} +Release: 4%{?dist} # Epoch because we pushed a qemu-1.0 package Epoch: 2 License: GPLv2+ and LGPLv2+ and BSD @@ -79,8 +79,8 @@ Source11: 99-qemu-guest-agent.rules Patch1: 0001-qemu-kvm-Add-missing-default-machine-options.patch Patch2: 0002-qemu-kvm-virtio-Do-not-register-mask-notifiers-witho.patch -# Speculative patch to fix msi and virtio-pci modules in build (not upstream). -Patch3: 0001-buildsys-Move-msi-x-and-virtio-pci-from-Makefile.obj.patch +# Upstream patch to fix build of msi/virtio-pci. +Patch3: 0001-kvm-Enable-use-of-kvm_irqchip_in_kernel-in-hwlib-cod.patch # Use siginfo_t instead of struct siginfo, for glibc in Rawhide. # Sent upstream 2012-07-05. @@ -807,8 +807,7 @@ fi %{_mandir}/man1/qemu-img.1* %changelog -* Thu Jul 5 2012 Richard W.M. Jones - 2:1.1.0-3 -- Add a hack for glibc from Rawhide, only affects linux-user. +* Thu Jul 5 2012 Richard W.M. Jones - 2:1.1.0-4 - Disable tests since they hang intermittently. - Add kvmvapic.bin (replaces vapic.bin). - Add cpus-x86_64.conf. qemu now creates /etc/qemu/target-x86_64.conf