[fedora-virt-maint] rpms/qemu/devel qemu-fix-cpuid-trimming.patch, NONE, 1.1 qemu.spec, 1.97, 1.98

Mark McLoughlin markmc at fedoraproject.org
Fri Jun 5 09:33:04 UTC 2009


Author: markmc

Update of /cvs/pkgs/rpms/qemu/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16847

Modified Files:
	qemu.spec 
Added Files:
	qemu-fix-cpuid-trimming.patch 
Log Message:
* Fri Jun  5 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10.50-6.kvm86
- Fix 'kernel requires an x86-64 CPU' error
- BuildRequires ncurses-devel to enable '-curses' option (#504226)


qemu-fix-cpuid-trimming.patch:

--- NEW FILE qemu-fix-cpuid-trimming.patch ---
From: Mark McLoughlin <markmc at redhat.com>
Subject: [PATCH] Work around supported cpuid ioctl() brokenness

KVM_GET_SUPPORTED_CPUID has been known to fail to return -E2BIG
when it runs out of entries. Detect this by always trying again
with a bigger table if the ioctl() fills the table.

Signed-off-by: Mark McLoughlin <markmc at redhat.com>
Signed-off-by: Avi Kivity <avi at redhat.com>
---
 kvm/libkvm/libkvm-x86.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kvm/libkvm/libkvm-x86.c b/kvm/libkvm/libkvm-x86.c
index a2f6320..4f9539a 100644
--- a/kvm/libkvm/libkvm-x86.c
+++ b/kvm/libkvm/libkvm-x86.c
@@ -575,6 +575,8 @@ static struct kvm_cpuid2 *try_get_cpuid(kvm_context_t kvm, int max)
 	r = ioctl(kvm->fd, KVM_GET_SUPPORTED_CPUID, cpuid);
 	if (r == -1)
 		r = -errno;
+	else if (r == 0 && cpuid->nent >= max)
+		r = -E2BIG;
 	if (r < 0) {
 		if (r == -E2BIG) {
 			free(cpuid);
-- 
1.6.0.6



Index: qemu.spec
===================================================================
RCS file: /cvs/pkgs/rpms/qemu/devel/qemu.spec,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -p -r1.97 -r1.98
--- qemu.spec	3 Jun 2009 15:02:25 -0000	1.97
+++ qemu.spec	5 Jun 2009 09:32:34 -0000	1.98
@@ -5,7 +5,7 @@
 Summary: QEMU is a FAST! processor emulator
 Name: qemu
 Version: 0.10.50
-Release: 5.%{kvmvertag}%{?dist}
+Release: 6.%{kvmvertag}%{?dist}
 # Epoch because we pushed a qemu-1.0 package
 Epoch: 2
 License: GPLv2+ and LGPLv2+ and BSD
@@ -34,11 +34,15 @@ Patch05: qemu-prevent-cdrom-media-eject-
 # Avoid harmless "unhandled wrmsr" warnings (#499712)
 Patch06: qemu-avoid-harmless-msr-warnings.patch
 
+# Fix from upstream for "kernel requires an x86-64 CPU" error
+Patch07: qemu-fix-cpuid-trimming.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
 BuildRequires: rsync dev86 iasl
 BuildRequires: pciutils-devel
 BuildRequires: pulseaudio-libs-devel
+BuildRequires: ncurses-devel
 Requires: %{name}-user = %{epoch}:%{version}-%{release}
 Requires: %{name}-system-x86 = %{epoch}:%{version}-%{release}
 Requires: %{name}-system-sparc = %{epoch}:%{version}-%{release}
@@ -219,6 +223,7 @@ such as kvmtrace and kvm_stat.
 %patch04 -p1 -b .disable-preadv
 %patch05 -p1 -b .prevent-cdrom-eject
 %patch06 -p1 -b .wrmsr-warnings
+%patch07 -p1 -b .cpuid-trimming
 
 %build
 # systems like rhel build system does not have a recent enough linker so
@@ -462,6 +467,10 @@ fi
 %{_mandir}/man1/qemu-img.1*
 
 %changelog
+* Fri Jun  5 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10.50-6.kvm86
+- Fix 'kernel requires an x86-64 CPU' error
+- BuildRequires ncurses-devel to enable '-curses' option (#504226)
+
 * Wed Jun  3 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10.50-5.kvm86
 - Prevent locked cdrom eject - fixes hang at end of anaconda installs (#501412)
 - Avoid harmless 'unhandled wrmsr' warnings (#499712)




More information about the Fedora-virt-maint mailing list