db8fd9 Fix default accelerator for non-KVM builds (rhbz #724814)

Authored and Committed by Daniel P. Berrange 13 years ago
    Fix default accelerator for non-KVM builds (rhbz #724814)
    
        
qemu-kvm-default-accelerator.patch ADDED
@@ -0,0 +1,18 @@
1
+ diff --git a/vl.c b/vl.c
2
+ index 7ae549e..28fd2f3 100644
3
+ --- a/vl.c
4
+ +++ b/vl.c
5
+ @@ -1953,8 +1953,13 @@ static int configure_accelerator(void)
6
+ }
7
+
8
+ if (p == NULL) {
9
+ +#ifdef CONFIG_KVM
10
+ /* Use the default "accelerator", kvm */
11
+ p = "kvm";
12
+ +#else
13
+ + /* Use the default "accelerator", tcg */
14
+ + p = "tcg";
15
+ +#endif
16
+ }
17
+
18
+ while (!accel_initalised && *p != '\0') {
file modified
+9 -1
qemu.spec CHANGED
@@ -3,7 +3,7 @@
3
3
Summary: QEMU is a FAST! processor emulator
4
4
Name: qemu
5
5
Version: 0.15.0
6
- Release: 0.2.20110728%githead%{?dist}
6
+ Release: 0.3.20110728%githead%{?dist}
7
7
# Epoch because we pushed a qemu-1.0 package
8
8
Epoch: 2
9
9
License: GPLv2+ and LGPLv2+ and BSD
@@ -55,6 +55,9 @@ Patch11: 0011-usb-redir-Add-flow-control-support.patch
55
55
Patch12: 0012-usb-redir-Call-qemu_chr_guest_open-close.patch
56
56
Patch13: 0013-spice-qemu-char-Generate-chardev-open-close-events.patch
57
57
58
+ # Fix for default accelerator in non-KVM builds
59
+ Patch100: qemu-kvm-default-accelerator.patch
60
+
58
61
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
59
62
BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
60
63
BuildRequires: libaio-devel
@@ -241,6 +244,8 @@ such as kvm_stat.
241
244
%patch12 -p1
242
245
%patch13 -p1
243
246
247
+ %patch100 -p1
248
+
244
249
%build
245
250
# By default we build everything, but allow x86 to build a minimal version
246
251
# with only similar arch target support
@@ -550,6 +555,9 @@ fi
550
555
%{_mandir}/man1/qemu-img.1*
551
556
552
557
%changelog
558
+ * Thu Aug 4 2011 Daniel P. Berrange <berrange@redhat.com> - 2:0.15.0-0.3.2011072859fadcc
559
+ - Fix default accelerator for non-KVM builds (rhbz #724814)
560
+
553
561
* Thu Jul 28 2011 Justin M. Forbes <jforbes@redhat.com> - 2:0.15.0-0.1.2011072859fadcc
554
562
- Update to 0.15.0-rc0 as we prepare for 0.15.0 release
555
563