- add fix for PPC in HV KVM mode

OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=38
This commit is contained in:
Alexander Graf 2012-01-10 15:43:02 +00:00 committed by Git OBS Bridge
parent 982b65b42a
commit eb35a566ca
39 changed files with 76 additions and 36 deletions

View File

@ -1,7 +1,7 @@
From 4cc09e9530fb08123594be6c72dfc381df5dcddc Mon Sep 17 00:00:00 2001
From: Peter Maydell <peter.maydell@linaro.org>
Date: Wed, 5 Oct 2011 10:04:02 +0100
Subject: [PATCH 01/36] Handle CPU interrupts by inline checking of a flag
Subject: [PATCH 01/37] Handle CPU interrupts by inline checking of a flag
Fix the nasty TCG race conditions and crashes by implementing cpu_exit
as setting a flag which is checked at the start of each TB. This is

View File

@ -1,7 +1,7 @@
From 0588bc446fd48bdb1965a6773d008c05a4ba16c1 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Sun, 20 Nov 2011 13:02:54 +0100
Subject: [PATCH 02/36] linux-user: fix QEMU_STRACE=1 segfault
Subject: [PATCH 02/37] linux-user: fix QEMU_STRACE=1 segfault
While debugging some issues with QEMU_STRACE I stumbled over segmentation
faults that were pretty reproducible. Turns out we tried to treat a

View File

@ -1,7 +1,7 @@
From 67c12998086c44ebef7f92a394154d6aba446178 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 2 Nov 2011 09:23:22 +0000
Subject: [PATCH 03/36] linux-user: save auxv length
Subject: [PATCH 03/37] linux-user: save auxv length
We create our own AUXV segment on stack and save a pointer to it.
However we don't save the length of it, so any code that wants to

View File

@ -1,7 +1,7 @@
From 99590488e94b6b7f10ecf9a99398fd24a69a7039 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 2 Nov 2011 09:23:23 +0000
Subject: [PATCH 04/36] linux-user: add open() hijack infrastructure
Subject: [PATCH 04/37] linux-user: add open() hijack infrastructure
There are a number of files in /proc that expose host information
to the guest program. This patch adds infrastructure to override

View File

@ -1,7 +1,7 @@
From 059e727a9a4be00de949769105e9e0ea876fc64b Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 2 Nov 2011 09:23:24 +0000
Subject: [PATCH 05/36] linux-user: fake /proc/self/maps
Subject: [PATCH 05/37] linux-user: fake /proc/self/maps
glibc's pthread_attr_getstack tries to find the stack range from
/proc/self/maps. Unfortunately, /proc is usually the host's /proc

View File

@ -1,7 +1,7 @@
From 7ee3fd47eed19e4dfa26a8d0176ed3550b8d0ccf Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 2 Nov 2011 09:23:25 +0000
Subject: [PATCH 06/36] linux-user: fake /proc/self/stat
Subject: [PATCH 06/37] linux-user: fake /proc/self/stat
The boehm gc finds the program's stack starting pointer by
checking /proc/self/stat. Unfortunately, so far it reads

View File

@ -1,7 +1,7 @@
From ddf0d4037b10c07d9e5b168f9f96e60a1601c75b Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 2 Nov 2011 09:23:26 +0000
Subject: [PATCH 07/36] linux-user: fake /proc/self/auxv
Subject: [PATCH 07/37] linux-user: fake /proc/self/auxv
Gtk tries to read /proc/self/auxv to find its auxv table instead of
taking it from its own program memory space.

View File

@ -1,7 +1,7 @@
From 4bc96d88f91417aa2bb029da2e8343456fe86631 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 21 Nov 2011 23:50:36 +0100
Subject: [PATCH 08/36] XXX dont dump core on sigabort
Subject: [PATCH 08/37] XXX dont dump core on sigabort
---
linux-user/signal.c | 6 ++++++

View File

@ -1,7 +1,7 @@
From ee5137d38109fdcb55a58be447c2c27be2b16eb0 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 22 Nov 2011 17:53:40 +0100
Subject: [PATCH 09/36] linux-user: fix wait* syscall status returns
Subject: [PATCH 09/37] linux-user: fix wait* syscall status returns
When calling wait4 or waitpid with a status pointer and WNOHANG, the
syscall can potentially not modify the status pointer input. Now if we

View File

@ -1,7 +1,7 @@
From 5cfce885dd1b3a229cd2ea7a94dfe2445ec29417 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 24 Nov 2011 00:38:22 +0100
Subject: [PATCH 10/36] Revert "linux-user: fix wait* syscall status returns"
Subject: [PATCH 10/37] Revert "linux-user: fix wait* syscall status returns"
This reverts commit 93092792064d880eb91679004b4761639d754081.
---

View File

@ -1,7 +1,7 @@
From b71ee7a063f7cffdf8a2cf73fcbc1d461fbbb80e Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 24 Nov 2011 00:39:35 +0100
Subject: [PATCH 11/36] linux-user: fix wait* syscall status returns
Subject: [PATCH 11/37] linux-user: fix wait* syscall status returns
When calling wait4 or waitpid with a status pointer and WNOHANG, the
syscall can potentially not modify the status pointer input. Now if we

View File

@ -1,7 +1,7 @@
From 146dddbec44c48417f776d54f823093b464e596c Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 28 Nov 2011 17:05:24 +0100
Subject: [PATCH 12/36] XXX linux-user: fake /proc/self/maps even more
Subject: [PATCH 12/37] XXX linux-user: fake /proc/self/maps even more
---
linux-user/syscall.c | 40 +++++++++++++++++++++++++++++++++++++++-

View File

@ -1,7 +1,7 @@
From 79a59902304b66e9270d11901a554e5b22042d6e Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 1 Dec 2011 19:00:01 +0100
Subject: [PATCH 13/36] XXX work around SA_RESTART race with boehm-gc (ARM only)
Subject: [PATCH 13/37] XXX work around SA_RESTART race with boehm-gc (ARM only)
---
linux-user/main.c | 25 ++++++++-----

View File

@ -1,7 +1,7 @@
From e534a77a0e1f880d0f74514ac50de5de3dd4811a Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 5 Dec 2011 23:37:52 +0100
Subject: [PATCH 14/36] XXX move qemu binary lower in address space so we have space for guest stuff
Subject: [PATCH 14/37] XXX move qemu binary lower in address space so we have space for guest stuff
---
x86_64.ld | 2 +-

View File

@ -1,7 +1,7 @@
From edda5e8f49b7857379733d652d6b259488bd7b70 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 6 Dec 2011 00:39:50 +0100
Subject: [PATCH 15/36] linux-user: map lower in address space
Subject: [PATCH 15/37] linux-user: map lower in address space
While trying to compile Java I can into situations where there was simply
no virtual address space left for a 32-bit guest to take. For example when

View File

@ -1,7 +1,7 @@
From 3580a90d40df10410b7268f89aae58ce05dd2bed Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 8 Dec 2011 23:19:32 +0100
Subject: [PATCH 16/36] XXX fake /proc/self/maps: also fclose real file
Subject: [PATCH 16/37] XXX fake /proc/self/maps: also fclose real file
---
linux-user/syscall.c | 1 +

View File

@ -1,7 +1,7 @@
From 91f12fe177833e0112cd7f7cf5781b26377667a5 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Sat, 10 Dec 2011 00:03:56 +0100
Subject: [PATCH 17/36] XXX map qemu higher again so we have space for brk
Subject: [PATCH 17/37] XXX map qemu higher again so we have space for brk
---
linux-user/mmap.c | 2 +-

View File

@ -1,7 +1,7 @@
From 434801ec78b031170eb0762302b52062e6c27d0e Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:18:44 +0200
Subject: [PATCH 18/36] qemu-0.9.0.cvs-binfmt
Subject: [PATCH 18/37] qemu-0.9.0.cvs-binfmt
Fixes binfmt_misc setup script:
- x86_64 is i386-compatible

View File

@ -1,7 +1,7 @@
From b41a72d0c29f97610dfdd5573b8be383823bc88f Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:20:50 +0200
Subject: [PATCH 19/36] qemu-cvs-alsa_bitfield
Subject: [PATCH 19/37] qemu-cvs-alsa_bitfield
Implements TYPE_INTBITFIELD partially. (required for ALSA support)

View File

@ -1,7 +1,7 @@
From 33f065c217c1921759df12467954eb4638f84a72 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:23:27 +0200
Subject: [PATCH 20/36] qemu-cvs-alsa_ioctl
Subject: [PATCH 20/37] qemu-cvs-alsa_ioctl
Implements ALSA ioctls on PPC hosts.

View File

@ -1,7 +1,7 @@
From 8b67814c8ab4645ddd43664b1092e78ea6a743d8 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:24:15 +0200
Subject: [PATCH 21/36] qemu-cvs-alsa_mmap
Subject: [PATCH 21/37] qemu-cvs-alsa_mmap
Hack to prevent ALSA from using mmap() interface to simplify emulation.

View File

@ -1,7 +1,7 @@
From c0ce4deb6c2ac843e337b7252fbefc190d625ca5 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:25:41 +0200
Subject: [PATCH 22/36] qemu-cvs-gettimeofday
Subject: [PATCH 22/37] qemu-cvs-gettimeofday
No clue what this is for.
---

View File

@ -1,7 +1,7 @@
From 6232258009a4735d7f4f53b5589e7ebd90a9885d Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:26:33 +0200
Subject: [PATCH 23/36] qemu-cvs-ioctl_debug
Subject: [PATCH 23/37] qemu-cvs-ioctl_debug
Extends unsupported ioctl debug output.

View File

@ -1,7 +1,7 @@
From 926d75fa4b4b5d95d4b0111e3e0af4d983a9d46b Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:27:36 +0200
Subject: [PATCH 24/36] qemu-cvs-ioctl_nodirection
Subject: [PATCH 24/37] qemu-cvs-ioctl_nodirection
the direction given in the ioctl should be correct so we can assume the
communication is uni-directional. The alsa developers did not like this

View File

@ -1,7 +1,7 @@
From 90b3180677c5615bafc9a1f8252fbc4af1dc1ae4 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:37:42 +0200
Subject: [PATCH 25/36] qemu-img-vmdk-scsi
Subject: [PATCH 25/37] qemu-img-vmdk-scsi
Support creation of SCSI VMDK images in qemu-img.

View File

@ -1,7 +1,7 @@
From 7e6479e0d45e45e888cb79759fd44d6c14be19f4 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:38:20 +0200
Subject: [PATCH 26/36] qemu-nonvoid_return
Subject: [PATCH 26/37] qemu-nonvoid_return
Squelches GCC warnings about undefined return values.

View File

@ -1,7 +1,7 @@
From 164cf539481164978d9fa6ad69eb20cda7dc0e12 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Wed, 25 Aug 2010 14:23:43 +0200
Subject: [PATCH 27/36] fix mipsn32*-linux-user builds
Subject: [PATCH 27/37] fix mipsn32*-linux-user builds
Signed-off-by: Ulrich Hecht <uli@suse.de>
---

View File

@ -1,7 +1,7 @@
From 15d6a32b38abc6c2f8143ebccfcdd05d204f0fcd Mon Sep 17 00:00:00 2001
From: Benjamin <mlspirat42@gmail.com>
Date: Sat, 8 Oct 2011 07:31:33 +0000
Subject: [PATCH 28/36] Integrating Dynamips and GNS3 UDP tunnels (Patches)
Subject: [PATCH 28/37] Integrating Dynamips and GNS3 UDP tunnels (Patches)
On 10/07/11 10:35, Jan Kiszka wrote:
>

View File

@ -1,7 +1,7 @@
From 47ff084e9af71b217e6f842f720d12fe9e12f2fd Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Fri, 30 Sep 2011 19:40:36 +0200
Subject: [PATCH 29/36] linux-user: add binfmt wrapper for argv[0] handling
Subject: [PATCH 29/37] linux-user: add binfmt wrapper for argv[0] handling
When using qemu's linux-user binaries through binfmt, argv[0] gets lost
along the execution because qemu only gets passed in the full file name

View File

@ -1,7 +1,7 @@
From 269d801698bf7640dd325cfb4b195c4a207a07ee Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Sun, 11 Dec 2011 01:19:24 +0100
Subject: [PATCH 30/36] linux-user: Ignore timer_create syscall
Subject: [PATCH 30/37] linux-user: Ignore timer_create syscall
We don't implement the timer_create syscall, but shouting out loud
about it breaks some %check tests in OBS, so better ignore it silently.

View File

@ -1,7 +1,7 @@
From 36f403e159ecb5fcaeda5346c2df762cc904a91b Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Sun, 11 Dec 2011 01:21:51 +0100
Subject: [PATCH 31/36] linux-user: be silent about capget failures
Subject: [PATCH 31/37] linux-user: be silent about capget failures
Complaining about capget doesn't buy us anything, but makes %check
fail in certain builds. So better not complain about its missing

View File

@ -1,7 +1,7 @@
From 4fddaa4befeb3ddb1c14d9b2c882474ba4166940 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 12 Dec 2011 23:16:43 +0100
Subject: [PATCH 32/36] PPC: Fix linker scripts on ppc hosts
Subject: [PATCH 32/37] PPC: Fix linker scripts on ppc hosts
When compiling qemu statically with multilib on PPC, we hit the
same issue that commit 845f2c2812d9ed24b36c02a3d06ee83aeafe8b49

View File

@ -1,7 +1,7 @@
From ac233b323ad7e498c665e8c74df7e44de4a542c0 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 14 Dec 2011 00:33:28 +0100
Subject: [PATCH 33/36] linux-user: reserve 4GB of vmem for 32-on-64
Subject: [PATCH 33/37] linux-user: reserve 4GB of vmem for 32-on-64
When running 32-on-64 bit guests, we should always reserve as much
virtual memory as we possibly can for the guest process, so it can

View File

@ -1,7 +1,7 @@
From 96ac7aa8753cb2d79121c5a579a6e93160428a40 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Fri, 6 Jan 2012 01:05:55 +0100
Subject: [PATCH 34/36] PPC: KVM: Disable mmu notifier check
Subject: [PATCH 34/37] PPC: KVM: Disable mmu notifier check
When using hugetlbfs (which is required for HV mode KVM on 970), we
check for MMU notifiers that on 970 can not be implemented properly.

View File

@ -1,7 +1,7 @@
From 872ebeaa24ed1c4b0c1596a7ad37f2bf2275efb0 Mon Sep 17 00:00:00 2001
From: Fabio Erculiani <lxnay@sabayon.org>
Date: Tue, 3 Jan 2012 09:38:34 +0000
Subject: [PATCH 35/36] linux-user: improve fake /proc/self/stat making `ps` not segfault.
Subject: [PATCH 35/37] linux-user: improve fake /proc/self/stat making `ps` not segfault.
With the current fake /proc/self/stat implementation `ps` is
segfaulting because it expects to read PID and argv[0] as first and

View File

@ -1,7 +1,7 @@
From 7dc45b21c5ef8a9445463f8d3754e502621192a7 Mon Sep 17 00:00:00 2001
From: Fabio Erculiani <lxnay@sabayon.org>
Date: Tue, 3 Jan 2012 09:38:35 +0000
Subject: [PATCH 36/36] linux-user: target_argv is placed on ts->bprm->argv and can't be freed()
Subject: [PATCH 36/37] linux-user: target_argv is placed on ts->bprm->argv and can't be freed()
TaskState contains linux_bprm struct which encapsulates argv among
other things.

View File

@ -0,0 +1,33 @@
From 0d04677df6aabf7404c7bbe454d7be973a773bb0 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 10 Jan 2012 16:25:27 +0100
Subject: [PATCH 37/37] PPC: KVM: Ignore SET_ONE_REG failures
The SET_ONE_REG interface didn't make it upstream in the form that is used
in qemu-1.0, so the code won't work. Make the error a warning, so we can
at least use the HV target.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
target-ppc/kvm.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 429349f..a03e99c 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -759,7 +759,10 @@ void kvmppc_set_papr(CPUState *env)
reg.u.reg64 = env->spr[SPR_HIOR];
ret = kvm_vcpu_ioctl(env, KVM_SET_ONE_REG, &reg);
if (ret) {
- goto fail;
+ fprintf(stderr, "Couldn't set HIOR. Maybe you're running an old \n"
+ "kernel with support for HV KVM but no PAPR PR \n"
+ "KVM in which case things will work. If they don't \n"
+ "please update your host kernel!\n");
}
/* Set SDR1 so kernel space finds the HTAB */
--
1.6.0.2

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jan 10 15:26:21 UTC 2012 - agraf@suse.de
- add fix for PPC in HV KVM mode
-------------------------------------------------------------------
Thu Jan 6 01:18:00 UTC 2012 - agraf@suse.de

View File

@ -62,6 +62,7 @@ Patch0033: 0033-linux-user-reserve-4GB-of-vmem-for-32-on-64.patch
Patch0034: 0034-PPC-KVM-Disable-mmu-notifier-check.patch
Patch0035: 0035-linux-user-improve-fake-proc-self-stat-making-ps.patch
Patch0036: 0036-linux-user-target_argv-is-placed-on-ts-bprm-argv.patch
Patch0037: 0037-PPC-KVM-Ignore-SET_ONE_REG-failures.patch
# this is to make lint happy
Source300: rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -157,6 +158,7 @@ run cross architectures builds
%patch0034 -p1
%patch0035 -p1
%patch0036 -p1
%patch0037 -p1
%build
# build QEMU