Merge lp:~serge-hallyn/ubuntu/lucid/qemu-kvm/fix-4096 into lp:ubuntu/lucid/qemu-kvm

Proposed by Serge Hallyn
Status: Merged
Merge reported by: Michael Vogt
Merged at revision: not available
Proposed branch: lp:~serge-hallyn/ubuntu/lucid/qemu-kvm/fix-4096
Merge into: lp:ubuntu/lucid/qemu-kvm
Diff against target: 65 lines (+45/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/Fix-segfault-with-ram_size-4095M-without-kvm.patch (+37/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~serge-hallyn/ubuntu/lucid/qemu-kvm/fix-4096
Reviewer Review Type Date Requested Status
Ubuntu Sponsors Pending
Review via email: mp+29592@code.launchpad.net

Description of the change

This adds a patch to return an error message instead of
segfaulting when qemu-system-x86_64 is used without kvm
and with > 4095M ram. (LP: #602539)

To post a comment you must log in.
Revision history for this message
Thierry Carrez (ttx) wrote :

Looks sane, but if this is for a Lucid SRU, there should be a SRU report on bug 602539. It should also be fixed in maverick before.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks Thierry, will do the SRU report. Note that the bug does not apply
to maverick.

Revision history for this message
Thierry Carrez (ttx) wrote :

We already have one qemu-kvm in lucid-proposed, so this one should wait a bit.

A few remarks:
The merge proposal should be based on top of lp:ubuntu/lucid-proposed/qemu-kvm rather than lp:ubuntu/lucid/qemu-kvm (which contains the original lucid version). The changelog entry should read:

qemu-kvm (0.12.3+noroms-0ubuntu9.4) lucid-proposed; urgency=low

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Quoting Thierry Carrez (<email address hidden>):
> We already have one qemu-kvm in lucid-proposed, so this one should wait a bit.

Thanks, Thierry - how long do you think I should wait to re-base and
re-propose?

> A few remarks:
> The merge proposal should be based on top of lp:ubuntu/lucid-proposed/qemu-kvm rather than lp:ubuntu/lucid/qemu-kvm (which contains the original lucid version). The changelog entry should read:
>
> qemu-kvm (0.12.3+noroms-0ubuntu9.4) lucid-proposed; urgency=low

Will do.

thanks,
-serge

Revision history for this message
Thierry Carrez (ttx) wrote :

The packaged in -proposed needs to be tested in bug 595438, Once that is done, it will move to -updates, so we'll be able to move another package (9.4) in -proposed.

Revision history for this message
Michael Vogt (mvo) wrote :

The branch got uploaded into:
https://code.launchpad.net/~ubuntu-branches/ubuntu/lucid/qemu-kvm/lucid-proposed

So it should not actually appear in the sponsoring queue anymore, I mark it as "merged"
(please note that the SRU bugreport is still in verification-needed state).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-04-23 18:45:55 +0000
3+++ debian/changelog 2010-07-09 17:28:41 +0000
4@@ -1,3 +1,10 @@
5+qemu-kvm (0.12.3+noroms-0ubuntu10) lucid; urgency=low
6+
7+ * Incorporate fix to prevent segfault when using non-kvm qemu with
8+ memory size > 4095M. (LP: #602539)
9+
10+ -- Serge Hallyn <serge.hallyn@canonical.com> Fri, 09 Jul 2010 11:39:24 -0500
11+
12 qemu-kvm (0.12.3+noroms-0ubuntu9) lucid; urgency=low
13
14 * Architecture-specific fixes (LP: #568904)
15
16=== added file 'debian/patches/Fix-segfault-with-ram_size-4095M-without-kvm.patch'
17--- debian/patches/Fix-segfault-with-ram_size-4095M-without-kvm.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/Fix-segfault-with-ram_size-4095M-without-kvm.patch 2010-07-09 17:28:41 +0000
19@@ -0,0 +1,37 @@
20+commit b299b12b176792db8ff47c4d22fa62e4d64a0614
21+Author: Ryan Harper <ryanh@us.ibm.com>
22+Date: Tue Feb 23 09:13:14 2010 -0600
23+
24+ Fix segfault with ram_size > 4095M without kvm
25+
26+ Currently, x86_64-softmmu qemu segfaults when trying to use > 4095M memsize.
27+ This patch adds a simple check and error message (much like the 2047 limit on
28+ 32-bit hosts) on ram_size in the control path after we determine we're
29+ not using kvm
30+
31+ Upstream qemu-kvm is affected if using the -no-kvm option; this patch address
32+ the segfault there as well.
33+
34+ Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
35+ Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
36+
37+Origin: upstream, http://git.savannah.gnu.org/cgit/qemu.git/commit/?id=b299b12b176792db8ff47c4d22fa62e4d64a0614
38+Bug-ubuntu: https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/602539
39+
40+diff --git a/vl.c b/vl.c
41+index 2dbb6db..bb9c21c 100644
42+--- a/vl.c
43++++ b/vl.c
44+@@ -5792,6 +5792,12 @@ int main(int argc, char **argv, char **envp)
45+ fprintf(stderr, "failed to initialize KVM\n");
46+ exit(1);
47+ }
48++ } else {
49++ /* without kvm enabled, we can only support 4095 MB RAM */
50++ if (ram_size > (4095UL << 20)) {
51++ fprintf(stderr, "qemu: without kvm support at most 4095 MB RAM can be simulated\n");
52++ exit(1);
53++ }
54+ }
55+
56+ if (qemu_init_main_loop()) {
57
58=== modified file 'debian/patches/series'
59--- debian/patches/series 2010-04-01 00:22:02 +0000
60+++ debian/patches/series 2010-07-09 17:28:41 +0000
61@@ -9,3 +9,4 @@
62 arm-higher-initrd-load-address.patch
63 larger_default_ram_size.patch
64 SDL-wrong-behaviour-of-caps-lock.patch
65+Fix-segfault-with-ram_size-4095M-without-kvm.patch

Subscribers

People subscribed via source and target branches