Cherry-pick new ppc build fix from upstream
This commit is contained in:
parent
997cc54758
commit
bc0345fd4c
@ -1,72 +0,0 @@
|
||||
From d1f92ec1f31fa25b447c8c54ccb36f33da97af69 Mon Sep 17 00:00:00 2001
|
||||
From: Glauber Costa <glommer@redhat.com>
|
||||
Date: Wed, 24 Jun 2009 14:22:57 +0100
|
||||
Subject: [PATCH] use KVM_UPSTREAM for ppc.
|
||||
|
||||
ppc should compile with upstream qemu code, so, put these
|
||||
defines in ppc specific code that references kvm functions.
|
||||
|
||||
We don put them in config.h in this case, since there are
|
||||
files (like vl.c) that includes both kvm.h and qemu-kvm.h,
|
||||
and would break compilation.
|
||||
|
||||
Signed-off-by: Glauber Costa <glommer@redhat.com>
|
||||
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
|
||||
---
|
||||
hw/ppc440.c | 1 +
|
||||
hw/ppc440_bamboo.c | 1 +
|
||||
hw/ppce500_mpc8544ds.c | 1 +
|
||||
target-ppc/helper.c | 1 +
|
||||
4 files changed, 4 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/hw/ppc440.c b/hw/ppc440.c
|
||||
index 00d82e4..164c326 100644
|
||||
--- a/hw/ppc440.c
|
||||
+++ b/hw/ppc440.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "ppc440.h"
|
||||
#include "ppc405.h"
|
||||
#include "sysemu.h"
|
||||
+#define KVM_UPSTREAM
|
||||
#include "kvm.h"
|
||||
|
||||
#define PPC440EP_PCI_CONFIG 0xeec00000
|
||||
diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
|
||||
index 00aa2c7..565571d 100644
|
||||
--- a/hw/ppc440_bamboo.c
|
||||
+++ b/hw/ppc440_bamboo.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "boards.h"
|
||||
#include "sysemu.h"
|
||||
#include "ppc440.h"
|
||||
+#define KVM_UPSTREAM
|
||||
#include "kvm.h"
|
||||
#include "kvm_ppc.h"
|
||||
#include "device_tree.h"
|
||||
diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c
|
||||
index d9ed36c..49cc135 100644
|
||||
--- a/hw/ppce500_mpc8544ds.c
|
||||
+++ b/hw/ppce500_mpc8544ds.c
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
+#define KVM_UPSTREAM
|
||||
#include "config.h"
|
||||
#include "qemu-common.h"
|
||||
#include "net.h"
|
||||
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
|
||||
index 5a7a935..c150432 100644
|
||||
--- a/target-ppc/helper.c
|
||||
+++ b/target-ppc/helper.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "exec-all.h"
|
||||
#include "helper_regs.h"
|
||||
#include "qemu-common.h"
|
||||
+#define KVM_UPSTREAM
|
||||
#include "kvm.h"
|
||||
|
||||
//#define DEBUG_MMU
|
||||
--
|
||||
1.6.2.2
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f5042b31db5e1270f7bd96a6f4b20fd63dcb013b Mon Sep 17 00:00:00 2001
|
||||
From 8b08062b369c913c9b9a66c20618f9bd82a6b676 Mon Sep 17 00:00:00 2001
|
||||
From: Glauber Costa <glommer@redhat.com>
|
||||
Date: Wed, 24 Jun 2009 14:31:41 +0100
|
||||
Subject: [PATCH] compute checksum for roms bigger than a segment
|
||||
@ -76,5 +76,5 @@ index 6186199..fc289c0 100644
|
||||
|
||||
|
||||
--
|
||||
1.6.2.2
|
||||
1.6.2.5
|
||||
|
||||
|
97
qemu-fix-ppc-softmmu-kvm-disabled-build.patch
Normal file
97
qemu-fix-ppc-softmmu-kvm-disabled-build.patch
Normal file
@ -0,0 +1,97 @@
|
||||
From 398e45e57ee98e9d1a7387816b53d7038d1c3283 Mon Sep 17 00:00:00 2001
|
||||
From: Anthony Liguori <aliguori@us.ibm.com>
|
||||
Date: Wed, 24 Jun 2009 14:25:15 -0500
|
||||
Subject: [PATCH] Fix ppc-softmmu kvm-disabled build
|
||||
|
||||
This gets ppc-softmmu building when KVM is not enabled. It may be enough to get
|
||||
it working with KVM enabled but I haven't checked.
|
||||
|
||||
(cherry picked from commit 9011bae8e2101095aae53f1f1553ca3e72919f9b)
|
||||
|
||||
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
||||
Signed-off-by: Avi Kivity <avi@redhat.com>
|
||||
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
|
||||
---
|
||||
hw/ppc440.c | 1 +
|
||||
hw/ppc440_bamboo.c | 1 +
|
||||
hw/ppce500_mpc8544ds.c | 1 +
|
||||
qemu-kvm.h | 1 +
|
||||
target-ppc/helper.c | 1 +
|
||||
target-ppc/machine.c | 1 +
|
||||
6 files changed, 6 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/hw/ppc440.c b/hw/ppc440.c
|
||||
index 00d82e4..c2c9e65 100644
|
||||
--- a/hw/ppc440.c
|
||||
+++ b/hw/ppc440.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "ppc405.h"
|
||||
#include "sysemu.h"
|
||||
#include "kvm.h"
|
||||
+#include "qemu-kvm.h"
|
||||
|
||||
#define PPC440EP_PCI_CONFIG 0xeec00000
|
||||
#define PPC440EP_PCI_INTACK 0xeed00000
|
||||
diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
|
||||
index 00aa2c7..e4aad39 100644
|
||||
--- a/hw/ppc440_bamboo.c
|
||||
+++ b/hw/ppc440_bamboo.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "kvm.h"
|
||||
#include "kvm_ppc.h"
|
||||
#include "device_tree.h"
|
||||
+#include "qemu-kvm.h"
|
||||
|
||||
#define BINARY_DEVICE_TREE_FILE "bamboo.dtb"
|
||||
|
||||
diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c
|
||||
index d9ed36c..1099b99 100644
|
||||
--- a/hw/ppce500_mpc8544ds.c
|
||||
+++ b/hw/ppce500_mpc8544ds.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "device_tree.h"
|
||||
#include "openpic.h"
|
||||
#include "ppce500.h"
|
||||
+#include "qemu-kvm.h"
|
||||
|
||||
#define BINARY_DEVICE_TREE_FILE "mpc8544ds.dtb"
|
||||
#define UIMAGE_LOAD_BASE 0
|
||||
diff --git a/qemu-kvm.h b/qemu-kvm.h
|
||||
index 68a5b40..9341d0c 100644
|
||||
--- a/qemu-kvm.h
|
||||
+++ b/qemu-kvm.h
|
||||
@@ -169,6 +169,7 @@ int kvm_has_sync_mmu(void);
|
||||
void kvm_init_vcpu(CPUState *env);
|
||||
void kvm_load_tsc(CPUState *env);
|
||||
#else
|
||||
+#define kvm_has_sync_mmu() (0)
|
||||
#define kvm_enabled() (0)
|
||||
#define kvm_nested 0
|
||||
#define qemu_kvm_irqchip_in_kernel() (0)
|
||||
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
|
||||
index 5a7a935..3629c99 100644
|
||||
--- a/target-ppc/helper.c
|
||||
+++ b/target-ppc/helper.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "helper_regs.h"
|
||||
#include "qemu-common.h"
|
||||
#include "kvm.h"
|
||||
+#include "qemu-kvm.h"
|
||||
|
||||
//#define DEBUG_MMU
|
||||
//#define DEBUG_BATS
|
||||
diff --git a/target-ppc/machine.c b/target-ppc/machine.c
|
||||
index 99ba3eb..ec8e197 100644
|
||||
--- a/target-ppc/machine.c
|
||||
+++ b/target-ppc/machine.c
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "hw/hw.h"
|
||||
#include "hw/boards.h"
|
||||
#include "kvm.h"
|
||||
+#include "qemu-kvm.h"
|
||||
|
||||
void cpu_save(QEMUFile *f, void *opaque)
|
||||
{
|
||||
--
|
||||
1.6.2.5
|
||||
|
13
qemu.spec
13
qemu.spec
@ -16,11 +16,11 @@ Source0: http://download.sourceforge.net/sourceforge/kvm/qemu-%{kvmverfull}.tar.
|
||||
Source1: qemu.init
|
||||
Source2: kvm.modules
|
||||
|
||||
# Hack until merge happens upstream
|
||||
Patch01: kvm-upstream-ppc.patch
|
||||
|
||||
# Not upstream, why?
|
||||
Patch02: qemu-bios-bigger-roms.patch
|
||||
Patch01: qemu-bios-bigger-roms.patch
|
||||
|
||||
# Fixes ppc build, cherry-picked from upstream
|
||||
Patch02: qemu-fix-ppc-softmmu-kvm-disabled-build.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
|
||||
@ -202,8 +202,8 @@ such as kvmtrace and kvm_stat.
|
||||
%prep
|
||||
%setup -q -n qemu-%{kvmverfull}
|
||||
|
||||
%patch01 -p1 -b .kvm-upstream-ppc
|
||||
%patch02 -p1 -b .bios-bigger-roms
|
||||
%patch01 -p1
|
||||
%patch02 -p1
|
||||
|
||||
%build
|
||||
# systems like rhel build system does not have a recent enough linker so
|
||||
@ -450,6 +450,7 @@ fi
|
||||
* Sat Jun 27 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10.50-7.kvm87
|
||||
- Update to kvm-87
|
||||
- Drop upstreamed patches
|
||||
- Cherry-pick new ppc build fix from upstream
|
||||
- Re-enable preadv()/pwritev() since #497429 is long since fixed
|
||||
|
||||
* Fri Jun 5 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10.50-6.kvm86
|
||||
|
Loading…
Reference in New Issue
Block a user