[qemu] Fix default machine type patch to apply correctly

Daniel P. Berrange berrange at fedoraproject.org
Mon Jul 16 14:23:19 UTC 2012


commit 5da8fbc4fb57370463269831e257df0bb52aadda
Author: Daniel P. Berrange <berrange at redhat.com>
Date:   Mon Jul 16 15:21:11 2012 +0100

    Fix default machine type patch to apply correctly
    
    The previous commit added a new patch  0001-qemu-kvm-Fix-default-machine-options.patch
    but then mistakenly applied the old patch 0001-qemu-kvm-Add-missing-default-machine-options.patch
    as Patch5 (having previously disabled it as Patch1). The new patch
    did not actually apply cleanly anyway, since it was diff'd against
    master, not stable-1.1

 0001-qemu-kvm-Fix-default-machine-options.patch |   41 +++++++++--------------
 qemu.spec                                       |   11 ++++--
 2 files changed, 23 insertions(+), 29 deletions(-)
---
diff --git a/0001-qemu-kvm-Fix-default-machine-options.patch b/0001-qemu-kvm-Fix-default-machine-options.patch
index fc9e2e0..8c6cde7 100644
--- a/0001-qemu-kvm-Fix-default-machine-options.patch
+++ b/0001-qemu-kvm-Fix-default-machine-options.patch
@@ -12,10 +12,10 @@ kernel_irqchip=on that is now enable by default in upstream.
  1 file changed, 16 insertions(+), 7 deletions(-)
 
 diff --git a/hw/pc_piix.c b/hw/pc_piix.c
-index 98a06fa..5860d52 100644
+index 4e8a280..50e108a 100644
 --- a/hw/pc_piix.c
 +++ b/hw/pc_piix.c
-@@ -353,6 +353,12 @@ static void pc_xen_hvm_init(ram_addr_t ram_size,
+@@ -355,6 +355,12 @@ static void pc_xen_hvm_init(ram_addr_t ram_size,
  }
  #endif
  
@@ -25,10 +25,10 @@ index 98a06fa..5860d52 100644
 +#define KVM_MACHINE_OPTIONS ""
 +#endif
 +
- static QEMUMachine pc_machine_v1_2 = {
-     .name = "pc-1.2",
+ static QEMUMachine pc_machine_v1_1 = {
+     .name = "pc-1.1",
      .alias = "pc",
-@@ -360,7 +366,7 @@ static QEMUMachine pc_machine_v1_2 = {
+@@ -362,7 +368,7 @@ static QEMUMachine pc_machine_v1_1 = {
      .init = pc_init_pci,
      .max_cpus = 255,
      .is_default = 1,
@@ -36,32 +36,26 @@ index 98a06fa..5860d52 100644
 +    .default_machine_opts = KVM_MACHINE_OPTIONS,
  };
  
- #define PC_COMPAT_1_1 \
-@@ -387,6 +393,7 @@ static QEMUMachine pc_machine_v1_1 = {
-     .desc = "Standard PC",
-     .init = pc_init_pci,
-     .max_cpus = 255,
-+    .default_machine_opts = KVM_MACHINE_OPTIONS,
-     .compat_props = (GlobalProperty[]) {
-         PC_COMPAT_1_1,
-         { /* end of list */ }
-@@ -422,6 +429,7 @@ static QEMUMachine pc_machine_v1_0 = {
+ #define PC_COMPAT_1_0 \
+@@ -393,7 +399,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",
 +    .default_machine_opts = KVM_MACHINE_OPTIONS,
      .compat_props = (GlobalProperty[]) {
          PC_COMPAT_1_0,
          { /* end of list */ }
-@@ -437,6 +445,7 @@ static QEMUMachine pc_machine_v0_15 = {
+@@ -408,7 +414,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",
 +    .default_machine_opts = KVM_MACHINE_OPTIONS,
      .compat_props = (GlobalProperty[]) {
          PC_COMPAT_0_15,
          { /* end of list */ }
-@@ -469,7 +478,7 @@ static QEMUMachine pc_machine_v0_14 = {
+@@ -440,7 +446,7 @@ static QEMUMachine pc_machine_v0_14 = {
      .desc = "Standard PC",
      .init = pc_init_pci,
      .max_cpus = 255,
@@ -70,7 +64,7 @@ index 98a06fa..5860d52 100644
      .compat_props = (GlobalProperty[]) {
          PC_COMPAT_0_14, 
          {
-@@ -503,7 +512,7 @@ static QEMUMachine pc_machine_v0_13 = {
+@@ -473,7 +479,7 @@ static QEMUMachine pc_machine_v0_13 = {
      .desc = "Standard PC",
      .init = pc_init_pci_no_kvmclock,
      .max_cpus = 255,
@@ -79,7 +73,7 @@ index 98a06fa..5860d52 100644
      .compat_props = (GlobalProperty[]) {
          PC_COMPAT_0_13,
          {
-@@ -541,7 +550,7 @@ static QEMUMachine pc_machine_v0_12 = {
+@@ -510,7 +516,7 @@ static QEMUMachine pc_machine_v0_12 = {
      .desc = "Standard PC",
      .init = pc_init_pci_no_kvmclock,
      .max_cpus = 255,
@@ -88,7 +82,7 @@ index 98a06fa..5860d52 100644
      .compat_props = (GlobalProperty[]) {
          PC_COMPAT_0_12,
          {
-@@ -575,7 +584,7 @@ static QEMUMachine pc_machine_v0_11 = {
+@@ -543,7 +549,7 @@ static QEMUMachine pc_machine_v0_11 = {
      .desc = "Standard PC, qemu 0.11",
      .init = pc_init_pci_no_kvmclock,
      .max_cpus = 255,
@@ -97,7 +91,7 @@ index 98a06fa..5860d52 100644
      .compat_props = (GlobalProperty[]) {
          PC_COMPAT_0_11,
          {
-@@ -597,7 +606,7 @@ static QEMUMachine pc_machine_v0_10 = {
+@@ -564,7 +570,7 @@ static QEMUMachine pc_machine_v0_10 = {
      .desc = "Standard PC, qemu 0.10",
      .init = pc_init_pci_no_kvmclock,
      .max_cpus = 255,
@@ -106,7 +100,7 @@ index 98a06fa..5860d52 100644
      .compat_props = (GlobalProperty[]) {
          PC_COMPAT_0_11,
          {
-@@ -631,7 +640,7 @@ static QEMUMachine isapc_machine = {
+@@ -597,7 +603,7 @@ static QEMUMachine isapc_machine = {
      .desc = "ISA-only PC",
      .init = pc_init_isa,
      .max_cpus = 1,
@@ -115,6 +109,3 @@ index 98a06fa..5860d52 100644
      .compat_props = (GlobalProperty[]) {
          {
              .driver   = "pc-sysfw",
--- 
-1.7.10.4
-
diff --git a/qemu.spec b/qemu.spec
index 79f2e75..bf3b5ef 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: 7%{?dist}
+Release: 8%{?dist}
 # Epoch because we pushed a qemu-1.0 package
 Epoch: 2
 License: GPLv2+ and LGPLv2+ and BSD
@@ -76,7 +76,7 @@ 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
+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.
@@ -89,7 +89,7 @@ Patch4:   0001-Replace-struct-siginfo-with-siginfo_t.patch
 # Patch to fix default machine options.
 # http://www.spinics.net/lists/kvm/msg75509.html
 # Sent upstream by danpb on 2012-07-06.
-Patch5:   0001-qemu-kvm-Add-missing-default-machine-options.patch
+Patch5:   0001-qemu-kvm-Fix-default-machine-options.patch
 
 # The infamous chardev flow control patches
 Patch101: 0101-char-Split-out-tcp-socket-close-code-in-a-separate-f.patch
@@ -357,7 +357,7 @@ such as kvm_stat.
 
 %prep
 %setup -q -n qemu-kvm-%{version}
-#%patch1 -p1
+%patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
@@ -815,6 +815,9 @@ fi
 %{_mandir}/man1/qemu-img.1*
 
 %changelog
+* Tue Jul 10 2012 Richard W.M. Jones <rjones at redhat.com> - 2:1.1.0-8
+- Re-diff previous patch so that it applies and actually apply it
+
 * Tue Jul 10 2012 Richard W.M. Jones <rjones at redhat.com> - 2:1.1.0-7
 - Add patch to fix default machine options.  This fixes libvirt
   detection of qemu.


More information about the scm-commits mailing list