Bug#604604: qemu-kvm: vm entry failed with error 0xffffffff; kvm_run returned -22

2010-11-28 Thread Michael Tokarev
28.11.2010 05:25, Ben Hutchings wrote:
 Please can you test whether this is fixed in 2.6.32-28?  We backported a
 KVM feature (VCPU_EVENTS) which meant we needed an additional fix beyond
 the one which Michael Tokarev identified, and that was done in -28.

Yes, with 2.6.32-28 686 kernel I can't reproduce the problem anymore,
kvm works as intended, while reverting back to -27 returns the issue.

Reading #599507 again, together with this #604604 and also #604900, it
looks like all this stuff is the same thing.  There's also #580652.

Out of curiocity, why this feature (VCPU_EVENTS) were backported/applied
in the first place (it was in 2.6.32-12)?  Isn't it somewhat too buggy
having in mind all the above?

Thank you!

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604604: qemu-kvm: vm entry failed with error 0xffffffff; kvm_run returned -22

2010-11-28 Thread Ben Hutchings
On Sun, 2010-11-28 at 13:39 +0300, Michael Tokarev wrote:
 28.11.2010 05:25, Ben Hutchings wrote:
  Please can you test whether this is fixed in 2.6.32-28?  We backported a
  KVM feature (VCPU_EVENTS) which meant we needed an additional fix beyond
  the one which Michael Tokarev identified, and that was done in -28.
 
 Yes, with 2.6.32-28 686 kernel I can't reproduce the problem anymore,
 kvm works as intended, while reverting back to -27 returns the issue.

Excellent.

 Reading #599507 again, together with this #604604 and also #604900, it
 looks like all this stuff is the same thing.  There's also #580652.

Could be, but error code -22 (EINVAL) is not very specific.

 Out of curiocity, why this feature (VCPU_EVENTS) were backported/applied
 in the first place (it was in 2.6.32-12)?  Isn't it somewhat too buggy
 having in mind all the above?

The svn changelog says:
 r15572 | maks | 2010-04-27 17:36:34 +0100 (Tue, 27 Apr 2010) | 3 lines
 
 backport KVM: x86: Add KVM_GET/SET_VCPU_EVENTS
 
 is said to help with troubles on vmsave/restore.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.


signature.asc
Description: This is a digitally signed message part


Bug#604604: qemu-kvm: vm entry failed with error 0xffffffff; kvm_run returned -22

2010-11-27 Thread Ben Hutchings
Please can you test whether this is fixed in 2.6.32-28?  We backported a
KVM feature (VCPU_EVENTS) which meant we needed an additional fix beyond
the one which Michael Tokarev identified, and that was done in -28.

Note, by the way, that an i386 version of qemu-kvm will not work with
the amd64 kernel flavour in version 2.6.32-28.  I have a candidate fix
for this but I am trying to get the upstream KVM maintainers to check
it.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.


signature.asc
Description: This is a digitally signed message part


Bug#604604: qemu-kvm: vm entry failed with error 0xffffffff; kvm_run returned -22

2010-11-23 Thread Michael Tokarev
tags 604604 + moreinfo
thanks

23.11.2010 01:20, Jakub Wilk wrote:
 Package: qemu-kvm
 Version: 0.13.0+dfsg-2
 Severity: grave
 Justification: renders package unusable
 
 After 0.12.5+dfsg-5 - 0.13.0+dfsg-2 upgrade kvm doesn't start anymore.
 I get an error immediately:
 
 $ kvm
 kvm: vm entry failed with error 0x
 
 kvm_run returned -22

 model name: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
 Architecture: i386 (i686)
 Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
 linux-image-2.6.32-5-686 [lin 2.6.32-27  Linux 2.6.32 for modern PCs

This looks like a kernel problem which is fixed by
a recent -stable upstream kernel (2.6.32.26):

From mtosa...@redhat.com  Fri Oct 29 15:18:43 2010
From: Joerg Roedel joerg.roe...@amd.com
Date: Thu, 28 Oct 2010 16:48:09 -0200
Subject: KVM: SVM: Fix wrong intercept masks on 32 bit
To: g...@kroah.com
Cc: a...@redhat.com, mtosa...@redhat.com, sta...@kernel.org, Jan Kiszka 
jan.kis...@siemens.com, Gleb Natapov g...@redhat.com, Joerg Roedel 
joerg.roe...@amd.com
Message-ID: 20101028185026.905098...@amt.cnet
Content-Disposition: inline; 
filename=0001-KVM-SVM-Fix-wrong-intercept-masks-on-32-bit.patch

From: Joerg Roedel joerg.roe...@amd.com

commit 061e2fd16863009c8005b4b5fdfb75c7215c0b99 upstream.

This patch makes KVM on 32 bit SVM working again by
correcting the masks used for iret interception. With the
wrong masks the upper 32 bits of the intercepts are masked
out which leaves vmrun unintercepted. This is not legal on
svm and the vmrun fails.
Bug was introduced by commits 95ba827313 and 3cfc3092.

Cc: Jan Kiszka jan.kis...@siemens.com
Cc: Gleb Natapov g...@redhat.com
Signed-off-by: Joerg Roedel joerg.roe...@amd.com
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Greg Kroah-Hartman gre...@suse.de

---
 arch/x86/kvm/svm.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


The problem case happens on 32bit kernel only and does
not happen on 64bit.  Please try with amd64 kernel
(linux-image-2.6.32-5-amd64) - it should just work.

Note that almost no one tests kvm on 32bits nowadays,
consider running 64bit kernel with either 32 or 64
bit userspace.  I run 64bit kernel and 32bit userspace
for a long time and now finally I can say most probs
in this configuration has been fixed - for more than
a year I haven't encountered one :)

And please also consider switching to AthlonII - your
processor lacks npt (nested page tables) support and
TSC syncronisation, both affects performance and stability
of kvm guest in significant way.  Not related to this
bugreport, just a general suggestion.

Tagging as 'moreinfo' for now, if the problem turns
out to be what I think it is, I'll reassign it to
kernel-image and downgrade to normal.

Thanks!

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604604: qemu-kvm: vm entry failed with error 0xffffffff; kvm_run returned -22

2010-11-23 Thread Michael Tokarev
tags 604604 - moreinfo
tags 604604 + confirmed upstream patch
reassign 604604 linux-image-2.6.32-5-i686 2.6.32-27
severity 604604 normal
thanks

23.11.2010 01:20, Jakub Wilk wrote:
 Package: qemu-kvm
 Version: 0.13.0+dfsg-2
 Severity: grave
 Justification: renders package unusable
 
 After 0.12.5+dfsg-5 - 0.13.0+dfsg-2 upgrade kvm doesn't start anymore.
 I get an error immediately:
 
 $ kvm
 kvm: vm entry failed with error 0x
 
 kvm_run returned -22

I can confirm this issue on 32bit kernel (not on 64bit one), and
the patch I referred to before fixes the issue.  So I'm reassigning
this bug to linux-2.6 (kernel), lowering severity and tagging
appropriately.

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604604: qemu-kvm: vm entry failed with error 0xffffffff; kvm_run returned -22

2010-11-23 Thread Michael Tokarev
tags 604604 - upstream patch
thanks

Hello again.

After a bit more testing it turns out this problem is
somehow specific to debian 2.6.32-5-686-27 kernel,
it does not occur on upstream (kernel.org) kernel
even when not applying the mentioned patch (which
went into upstream -stable just a few days ago,
but which was in debian for quite some time already).

Stock kernel - with or without that patch - works fine.
amd64 Debian kernel works fine too.  But Debian 686
kernel immediately returns that ugly -22 to every
kvm_run().  At least here on a CPU similar to your
(mine is Turion TL-52, which is of the same generation
as 4400+ you're using, with the same problems).

I'm not sure yet if it's specific to svm (amd) or
general.

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604604: qemu-kvm: vm entry failed with error 0xffffffff; kvm_run returned -22

2010-11-23 Thread Jakub Wilk

* Michael Tokarev m...@tls.msk.ru, 2010-11-23, 11:02:

The problem case happens on 32bit kernel only and does
not happen on 64bit.  Please try with amd64 kernel
(linux-image-2.6.32-5-amd64) - it should just work.


Indeed, it works fine with linux-image-2.6.32-5-amd64.

Thanks for your work on this issue!

--
Jakub Wilk



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#604604: qemu-kvm: vm entry failed with error 0xffffffff; kvm_run returned -22

2010-11-22 Thread Jakub Wilk

Package: qemu-kvm
Version: 0.13.0+dfsg-2
Severity: grave
Justification: renders package unusable

After 0.12.5+dfsg-5 - 0.13.0+dfsg-2 upgrade kvm doesn't start anymore. 
I get an error immediately:


$ kvm
kvm: vm entry failed with error 0x

kvm_run returned -22


-- Package-specific info:


/proc/cpuinfo:

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 15
model   : 107
model name  : AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
stepping: 2
cpu MHz : 2300.000
cache size  : 512 KB
physical id : 0
siblings: 2
core id : 0
cpu cores   : 2
apicid  : 0
initial apicid  : 0
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 1
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 
3dnowext 3dnow extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 
3dnowprefetch
bogomips: 4620.39
clflush size: 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc 100mhzsteps

processor   : 1
vendor_id   : AuthenticAMD
cpu family  : 15
model   : 107
model name  : AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
stepping: 2
cpu MHz : 2300.000
cache size  : 512 KB
physical id : 0
siblings: 2
core id : 1
cpu cores   : 2
apicid  : 1
initial apicid  : 1
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 1
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 
3dnowext 3dnow extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 
3dnowprefetch
bogomips: 4620.39
clflush size: 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc 100mhzsteps



-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'experimental'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages qemu-kvm depends on:
ii  adduser   3.112+nmu1 add and remove users and groups
ii  bridge-utils  1.4-5  Utilities for configuring the Linu
ii  etherboot-qemu5.4.4-7Bootstrapping for various network 
ii  iproute   20100519-3 networking and traffic control too
ii  libaio1   0.3.107-7  Linux kernel AIO access library - 
ii  libasound21.0.23-2.1 shared library for ALSA applicatio

ii  libattr1  1:2.4.44-2 Extended attribute shared library
ii  libbluetooth3 4.70-1 Library to use the BlueZ Linux Blu
ii  libbrlapi0.5  4.2-6  braille display access via BRLTTY 
ii  libc6 2.11.2-7   Embedded GNU C Library: Shared lib

ii  libcurl3-gnutls   7.21.2-1   Multi-protocol file transfer libra
ii  libgnutls26   2.10.3-1   the GNU TLS library - runtime libr
ii  libjpeg62 6b1-1  The Independent JPEG Group's JPEG 
ii  libncurses5   5.7+20100313-4 shared libraries for terminal hand

ii  libpng12-01.2.44-1   PNG library - runtime
ii  libpulse0 0.9.21-3   PulseAudio client libraries
ii  libsasl2-22.1.23.dfsg1-6 Cyrus SASL - authentication abstra
ii  libsdl1.2debian   1.2.14-6.1 Simple DirectMedia Layer
ii  libuuid1  2.17.2-3.3 Universally Unique ID library
ii  libvdeplug2   2.2.3-3Virtual Distributed Ethernet - Plu
ii  libx11-6  2:1.3.3-4  X11 client-side library
ii  python2.6.6-5interactive high-level object-orie
ii  qemu-keymaps  0.13.0+dfsg-2  QEMU keyboard maps
ii  qemu-utils0.13.0+dfsg-2  QEMU utilities
ii  zlib1g1:1.2.5.dfsg-1 compression library - runtime

Versions of packages qemu-kvm recommends:
ii  linux-image-2.6.32-5-686 [lin 2.6.32-27  Linux 2.6.32 for modern PCs

Versions of packages qemu-kvm suggests:
ii  debootstrap   1.0.26 Bootstrap a basic Debian system
pn  samba none (no description available)
pn  vde2  none (no description available)

-- no debconf information

--
Jakub Wilk



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe.