Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-27 Thread Gleb Natapov
On Thu, Jun 27, 2013 at 04:09:50PM +0200, Stefan Pietsch wrote:
 On 26.06.2013 12:47, Gleb Natapov wrote:
  On Mon, Jun 24, 2013 at 10:42:57PM +0200, Stefan Pietsch wrote:
  On 24.06.2013 14:30, Gleb Natapov wrote:
  On Mon, Jun 24, 2013 at 01:59:34PM +0200, Stefan Pietsch wrote:
  As soon as I remove kvmvapic.bin the virtual machine boots with
  qemu-kvm 1.5.0. I just verified this with Linux kernel 3.10.0-rc5.
  emulate_invalid_guest_state=0 or emulate_invalid_guest_state=1 make
  no difference.
 
  Please send your patches.
  Here it is, run with it and kvmvapic.bin present. See what is printed in
  dmesg after the failure.
 
 
  diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
  index f4a5b3f..65488a4 100644
  --- a/arch/x86/kvm/vmx.c
  +++ b/arch/x86/kvm/vmx.c
  @@ -3385,6 +3385,7 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
   {
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 ar;
  + unsigned long rip;
   
if (vmx-rmode.vm86_active  seg != VCPU_SREG_LDTR) {
*var = vmx-rmode.segs[seg];
  @@ -3408,6 +3409,9 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
var-db = (ar  14)  1;
var-g = (ar  15)  1;
var-unusable = (ar  16)  1;
  + rip = kvm_rip_read(vcpu);
  + if ((rip == 0xc101611c || rip == 0xc101611a)  seg == VCPU_SREG_FS)
  + printk(base=%p limit=%p selector=%x ar=%x\n, var-base, 
  var-limit, var-selector, ar);
   }
   
   static u64 vmx_get_segment_base(struct kvm_vcpu *vcpu, int seg)
 
 
  Booting kernel Linux 3.10-rc5 with your patch applied produces these
  messages in dmesg when starting a virtual machine:
 
  emulate_invalid_guest_state=0
  [  118.732151] base= limit=  (null) selector=ffff ar=0
  [  118.732341] base= limit=  (null) selector=ffff ar=0
 
  I've butchered printk format, but it gives me the idea of what is going
  on anyway. Can you try the patch below with
  emulate_invalid_guest_state=0|1?
  
  
  diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
  index f4a5b3f..eb062ce 100644
  --- a/arch/x86/kvm/vmx.c
  +++ b/arch/x86/kvm/vmx.c
  @@ -3395,19 +3395,20 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
  var-selector = vmx_read_guest_seg_selector(vmx, seg);
  return;
  }
  +
  var-base = vmx_read_guest_seg_base(vmx, seg);
  var-limit = vmx_read_guest_seg_limit(vmx, seg);
  var-selector = vmx_read_guest_seg_selector(vmx, seg);
  ar = vmx_read_guest_seg_ar(vmx, seg);
  +   var-unusable = (ar  16)  1;
  var-type = ar  15;
  var-s = (ar  4)  1;
  var-dpl = (ar  5)  3;
  -   var-present = (ar  7)  1;
  +   var-present = !var-unusable;
  var-avl = (ar  12)  1;
  var-l = (ar  13)  1;
  var-db = (ar  14)  1;
  var-g = (ar  15)  1;
  -   var-unusable = (ar  16)  1;
   }
   
   static u64 vmx_get_segment_base(struct kvm_vcpu *vcpu, int seg)
 
 
 Kernel 3.10-rc5 with your latest patch applied can successfully boot the
 virtual machine with emulate_invalid_guest_state 0 or 1.
Excellent. I will send the patch to the list. Thank you for your help
in tracking it.

--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130627200103.ga25...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-26 Thread Gleb Natapov
On Mon, Jun 24, 2013 at 10:42:57PM +0200, Stefan Pietsch wrote:
 On 24.06.2013 14:30, Gleb Natapov wrote:
  On Mon, Jun 24, 2013 at 01:59:34PM +0200, Stefan Pietsch wrote:
  As soon as I remove kvmvapic.bin the virtual machine boots with
  qemu-kvm 1.5.0. I just verified this with Linux kernel 3.10.0-rc5.
  emulate_invalid_guest_state=0 or emulate_invalid_guest_state=1 make
  no difference.
 
  Please send your patches.
  Here it is, run with it and kvmvapic.bin present. See what is printed in
  dmesg after the failure.
  
  
  diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
  index f4a5b3f..65488a4 100644
  --- a/arch/x86/kvm/vmx.c
  +++ b/arch/x86/kvm/vmx.c
  @@ -3385,6 +3385,7 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
   {
  struct vcpu_vmx *vmx = to_vmx(vcpu);
  u32 ar;
  +   unsigned long rip;
   
  if (vmx-rmode.vm86_active  seg != VCPU_SREG_LDTR) {
  *var = vmx-rmode.segs[seg];
  @@ -3408,6 +3409,9 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
  var-db = (ar  14)  1;
  var-g = (ar  15)  1;
  var-unusable = (ar  16)  1;
  +   rip = kvm_rip_read(vcpu);
  +   if ((rip == 0xc101611c || rip == 0xc101611a)  seg == VCPU_SREG_FS)
  +   printk(base=%p limit=%p selector=%x ar=%x\n, var-base, 
  var-limit, var-selector, ar);
   }
   
   static u64 vmx_get_segment_base(struct kvm_vcpu *vcpu, int seg)
 
 
 Booting kernel Linux 3.10-rc5 with your patch applied produces these
 messages in dmesg when starting a virtual machine:
 
 emulate_invalid_guest_state=0
 [  118.732151] base= limit=  (null) selector=ffff ar=0
 [  118.732341] base= limit=  (null) selector=ffff ar=0
 
I've butchered printk format, but it gives me the idea of what is going
on anyway. Can you try the patch below with
emulate_invalid_guest_state=0|1?


diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f4a5b3f..eb062ce 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3395,19 +3395,20 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
var-selector = vmx_read_guest_seg_selector(vmx, seg);
return;
}
+
var-base = vmx_read_guest_seg_base(vmx, seg);
var-limit = vmx_read_guest_seg_limit(vmx, seg);
var-selector = vmx_read_guest_seg_selector(vmx, seg);
ar = vmx_read_guest_seg_ar(vmx, seg);
+   var-unusable = (ar  16)  1;
var-type = ar  15;
var-s = (ar  4)  1;
var-dpl = (ar  5)  3;
-   var-present = (ar  7)  1;
+   var-present = !var-unusable;
var-avl = (ar  12)  1;
var-l = (ar  13)  1;
var-db = (ar  14)  1;
var-g = (ar  15)  1;
-   var-unusable = (ar  16)  1;
 }
 
 static u64 vmx_get_segment_base(struct kvm_vcpu *vcpu, int seg)

--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130626104703.gw18...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-24 Thread Gleb Natapov
On Mon, Jun 24, 2013 at 01:43:26PM +0200, Stefan Pietsch wrote:
 On 23.06.2013 19:36, Gleb Natapov wrote:
  On Sun, Jun 23, 2013 at 06:51:30PM +0200, Stefan Pietsch wrote:
  On 23.06.2013 09:51, Gleb Natapov wrote:
  On Thu, Jun 20, 2013 at 07:01:49PM +0200, Stefan Pietsch wrote:
  Can you provide the output of 25391454e73e3156202264eb3c473825afe4bc94
  and emulate_invalid_guest_state=0. Also run x/20i $pc-20 in qemu
  monitor after the hang.
 
 
  25391454e73e3156202264eb3c473825afe4bc94
   emulate_invalid_guest_state=0
 
  Very interesting. Looks like somewhere during TPR access FS
  register gets corrupted. Can you remove /usr/share/kvm/kvmvapic.bin
  and try again? This will disable some code paths during TPR access and
  will narrow down the issue.
 
 
  Doing this, qemu complains
  Could not open option rom 'kvmvapic.bin': No such file or directory,
  but the virtual machine boots successful with
  emulate_invalid_guest_state=0 and emulate_invalid_guest_state=1.
 
  Hmm, I think we ate close. Can you try with upstream qemu?
  
  kvmvapic.bin comes with Debian package seabios 1.7.2-3.
 
 I already tried this with the Debian package qemu-kvm 1.5.0+dfsg-4.
And it didn't work? Mind trying some debug kernel patches? I suspect
your CPU does something no CPU I have do, so I want to verify it.

--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130624114730.gf18...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-24 Thread Gleb Natapov
On Mon, Jun 24, 2013 at 01:59:34PM +0200, Stefan Pietsch wrote:
 On 24.06.2013 13:47, Gleb Natapov wrote:
  On Mon, Jun 24, 2013 at 01:43:26PM +0200, Stefan Pietsch wrote:
  On 23.06.2013 19:36, Gleb Natapov wrote:
  On Sun, Jun 23, 2013 at 06:51:30PM +0200, Stefan Pietsch wrote:
  On 23.06.2013 09:51, Gleb Natapov wrote:
  On Thu, Jun 20, 2013 at 07:01:49PM +0200, Stefan Pietsch wrote:
  Can you provide the output of 25391454e73e3156202264eb3c473825afe4bc94
  and emulate_invalid_guest_state=0. Also run x/20i $pc-20 in qemu
  monitor after the hang.
 
 
  25391454e73e3156202264eb3c473825afe4bc94
   emulate_invalid_guest_state=0
 
  Very interesting. Looks like somewhere during TPR access FS
  register gets corrupted. Can you remove /usr/share/kvm/kvmvapic.bin
  and try again? This will disable some code paths during TPR access and
  will narrow down the issue.
 
 
  Doing this, qemu complains
  Could not open option rom 'kvmvapic.bin': No such file or directory,
  but the virtual machine boots successful with
  emulate_invalid_guest_state=0 and emulate_invalid_guest_state=1.
 
  Hmm, I think we ate close. Can you try with upstream qemu?
 
  kvmvapic.bin comes with Debian package seabios 1.7.2-3.
 
  I already tried this with the Debian package qemu-kvm 1.5.0+dfsg-4.
  And it didn't work? Mind trying some debug kernel patches? I suspect
  your CPU does something no CPU I have do, so I want to verify it.
 
 
 As soon as I remove kvmvapic.bin the virtual machine boots with
 qemu-kvm 1.5.0. I just verified this with Linux kernel 3.10.0-rc5.
 emulate_invalid_guest_state=0 or emulate_invalid_guest_state=1 make
 no difference.
 
 Please send your patches.
Here it is, run with it and kvmvapic.bin present. See what is printed in
dmesg after the failure.


diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f4a5b3f..65488a4 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3385,6 +3385,7 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
 {
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 ar;
+   unsigned long rip;
 
if (vmx-rmode.vm86_active  seg != VCPU_SREG_LDTR) {
*var = vmx-rmode.segs[seg];
@@ -3408,6 +3409,9 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
var-db = (ar  14)  1;
var-g = (ar  15)  1;
var-unusable = (ar  16)  1;
+   rip = kvm_rip_read(vcpu);
+   if ((rip == 0xc101611c || rip == 0xc101611a)  seg == VCPU_SREG_FS)
+   printk(base=%p limit=%p selector=%x ar=%x\n, var-base, 
var-limit, var-selector, ar);
 }
 
 static u64 vmx_get_segment_base(struct kvm_vcpu *vcpu, int seg)
--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130624123049.gh18...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-23 Thread Gleb Natapov
On Thu, Jun 20, 2013 at 07:01:49PM +0200, Stefan Pietsch wrote:
  Can you provide the output of 25391454e73e3156202264eb3c473825afe4bc94
  and emulate_invalid_guest_state=0. Also run x/20i $pc-20 in qemu
  monitor after the hang.
 
 
 25391454e73e3156202264eb3c473825afe4bc94
  emulate_invalid_guest_state=0
 
Very interesting. Looks like somewhere during TPR access FS
register gets corrupted. Can you remove /usr/share/kvm/kvmvapic.bin
and try again? This will disable some code paths during TPR access and
will narrow down the issue.

--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130623075117.gn5...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-23 Thread Gleb Natapov
On Sun, Jun 23, 2013 at 06:51:30PM +0200, Stefan Pietsch wrote:
 On 23.06.2013 09:51, Gleb Natapov wrote:
  On Thu, Jun 20, 2013 at 07:01:49PM +0200, Stefan Pietsch wrote:
  Can you provide the output of 25391454e73e3156202264eb3c473825afe4bc94
  and emulate_invalid_guest_state=0. Also run x/20i $pc-20 in qemu
  monitor after the hang.
 
 
  25391454e73e3156202264eb3c473825afe4bc94
   emulate_invalid_guest_state=0
 
  Very interesting. Looks like somewhere during TPR access FS
  register gets corrupted. Can you remove /usr/share/kvm/kvmvapic.bin
  and try again? This will disable some code paths during TPR access and
  will narrow down the issue.
 
 
 Doing this, qemu complains
 Could not open option rom 'kvmvapic.bin': No such file or directory,
 but the virtual machine boots successful with
 emulate_invalid_guest_state=0 and emulate_invalid_guest_state=1.
 
Hmm, I think we ate close. Can you try with upstream qemu?

 kvmvapic.bin comes with Debian package seabios 1.7.2-3.

--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130623173627.ga29...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-19 Thread Gleb Natapov
On Sun, Jun 16, 2013 at 02:25:04AM +0200, Stefan Pietsch wrote:
 On 13.06.2013 16:59, Stefan Pietsch wrote:
  On 13.06.2013 15:42, Paolo Bonzini wrote:
  Il 13/06/2013 07:57, Stefan Pietsch ha scritto:
  git bisect tells me:
  79fd50c67f91136add9726fb7719b57a66c6f763 is the first bad commit
 
  This is an s390 commit, so the bisect somehow went wrong.  Can you
  confirm that 3.7 works and 3.8 doesn't?
  
  Confirmed. Something went wrong.
  I replayed the bisect log and now I have
  
  git bisect bad 9626357371b519f2b955fef399647181034a77fe
  git bisect good ef4e359d9b9e2dc022f79840fd207796b524a893
  git bisect good b5c78e04dd061b776978dad61dd85357081147b0
  git bisect good 9e2d59ad580d590134285f361a0e80f0e98c0207
  git bisect bad 69086a78bdc973ec0b722be790b146e84ba8a8c4
  git bisect good 9ecf9b085a0926e07c78c08a07296bbfd1c37d07
  git bisect bad 21fbd5809ad126b949206d78e0a0e07ec872ea11
  git bisect bad 79fd50c67f91136add9726fb7719b57a66c6f763
  git bisect bad aa11e3a8a6d9f92c3fe4b91a9aca5d8c23d55d4d
  git bisect good 66cdd0ceaf65a18996f561b770eedde1d123b019
  git bisect bad d99e415275dd3f757b75981adad8645cdc26da45
  
  So please wait for my results.
 
 
 Bisecting leads to
 
 git bisect bad 378a8b099fc207ddcb91b19a8c1457667e0af398
 git bisect good 007a3b547512d69f67ceb9641796d64552bd337e
 git bisect good 1f3141e80b149e7215313dff29e9a0c47811b1d1
 git bisect good 286da4156dc65c8a054580fdd96b7709132dce8d
 git bisect bad 25391454e73e3156202264eb3c473825afe4bc94
 git bisect good 218e763f458c44f30041c1b48b4371e130fd4317
 
 
 first bad commit: [25391454e73e3156202264eb3c473825afe4bc94]
 KVM: VMX: don't clobber segment AR of unusable segments.
 
 
 25391454e73e3156202264eb3c473825afe4bc94
 emulate_invalid_guest_state=0 - hangs and shows KVM: entry failed
 emulate_invalid_guest_state=1 - hangs

With emulate_invalid_guest_state=1 the commit does nothing. Can you
double check that 218e763f458c44f30041c1b48b4371e130fd4317 works for you
with emulate_invalid_guest_state=1?
 
--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130619134154.gn5...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-19 Thread Gleb Natapov
On Wed, Jun 19, 2013 at 04:12:04PM +0200, Stefan Pietsch wrote:
 On 19.06.2013 15:41, Gleb Natapov wrote:
  On Sun, Jun 16, 2013 at 02:25:04AM +0200, Stefan Pietsch wrote:
 
  first bad commit: [25391454e73e3156202264eb3c473825afe4bc94]
  KVM: VMX: don't clobber segment AR of unusable segments.
 
 
  25391454e73e3156202264eb3c473825afe4bc94
  emulate_invalid_guest_state=0 - hangs and shows KVM: entry failed
  emulate_invalid_guest_state=1 - hangs
 
  With emulate_invalid_guest_state=1 the commit does nothing. Can you
  double check that 218e763f458c44f30041c1b48b4371e130fd4317 works for you
  with emulate_invalid_guest_state=1?
 
 
 218e763f458c44f30041c1b48b4371e130fd4317
 emulate_invalid_guest_state=0 - works
 emulate_invalid_guest_state=1 - hangs
 
 25391454e73e3156202264eb3c473825afe4bc94 broke
 emulate_invalid_guest_state=0.
Can you provide the output of 25391454e73e3156202264eb3c473825afe4bc94
and emulate_invalid_guest_state=0. Also run x/20i $pc-20 in qemu
monitor after the hang.

--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130619143820.gq5...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-09 Thread Gleb Natapov
On Thu, Jun 06, 2013 at 02:10:39PM +0200, Stefan Pietsch wrote:
 On 06.06.2013 13:40, Gleb Natapov wrote:
  On Thu, Jun 06, 2013 at 01:35:13PM +0200, Stefan Pietsch wrote:
 
  I had no success with the Debian kernel 3.10~rc4-1~exp1 (3.10-rc4-686-pae).
 
  The machine hangs after Enabling APIC mode:  Flat.  Using 1 I/O APICs.
  OK, since it looks like it hangs during timer initialization can you try
  to disable kvmclock? Add -cpu qemu64,-kvmclock to your command line.
  Also can you provide the output of cat /proc/cpuinfo on your host? And
  complete serial output before hang.
 
 
 command line:
 qemu-system-i386 -machine accel=kvm -m 512 -cpu qemu64,-kvmclock -cdrom
 grml32-full_2013.02.iso -serial file:ttyS0.log
 
 
 ttyS0.log:
 ##
 

Nothing out of ordinary here. Since you can reproduce the hang and I
cannot, can you try and bisect it? Also can trace kvm during the hang
http://www.linux-kvm.org/page/Tracing? Start the trace as close to hang
as possible and stop it as quick after it as possible too to make trace
file smaller.

--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130609094328.gm4...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-06 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 02:51:19PM +0200, Stefan Pietsch wrote:
 On 05.06.2013 14:10, Gleb Natapov wrote:
  On Wed, Jun 05, 2013 at 01:57:25PM +0200, Stefan Pietsch wrote:
  On 19.05.2013 14:32, Gleb Natapov wrote:
  On Sun, May 19, 2013 at 02:00:31AM +0100, Ben Hutchings wrote:
  Dear KVM maintainers, it appears that there is a gap in x86 emulation,
  at least on a 32-bit host.  Stefan found this when running GRML, a live
  distribution which can be downloaded from:
  http://download.grml.org/grml32-full_2013.02.iso.  His original
  reported is at http://bugs.debian.org/707257.
 
  Can you verify with latest linux.git HEAD? It works for me there on
  64bit. There were a lot of problems fixed in this area in 3.9/3.10 time 
  frame,
  so it would be helpful if you'll test 32bit before I install one myself.
 
 
  Kernel version 3.9.4-1 (linux-image-3.9-1-686-pae) made things worse.
 
  The virtual machine tries to boot the kernel, but stops after a few
  seconds and the kern.log shows:
  At what point does it stop?
 
 
 The machine stops at:
 
 Performance Events: Broken PMU hardware detected, using software events
 only.
 Failed to access perfctr msr (MSR c1 is 0)
 Enabling APIC mode:  Flat.  Using 1 I/O APICs
Timer initialization is what comes next.

I tried 32bit kernel compiled from kvm.git next (3.10.0-rc2+) branch and 
upstream
qemu and I cannot reproduce the problem. The guest boots fine.

--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130606064240.gr4...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-06 Thread Gleb Natapov
On Thu, Jun 06, 2013 at 09:42:40AM +0300, Gleb Natapov wrote:
 On Wed, Jun 05, 2013 at 02:51:19PM +0200, Stefan Pietsch wrote:
  On 05.06.2013 14:10, Gleb Natapov wrote:
   On Wed, Jun 05, 2013 at 01:57:25PM +0200, Stefan Pietsch wrote:
   On 19.05.2013 14:32, Gleb Natapov wrote:
   On Sun, May 19, 2013 at 02:00:31AM +0100, Ben Hutchings wrote:
   Dear KVM maintainers, it appears that there is a gap in x86 emulation,
   at least on a 32-bit host.  Stefan found this when running GRML, a live
   distribution which can be downloaded from:
   http://download.grml.org/grml32-full_2013.02.iso.  His original
   reported is at http://bugs.debian.org/707257.
  
   Can you verify with latest linux.git HEAD? It works for me there on
   64bit. There were a lot of problems fixed in this area in 3.9/3.10 time 
   frame,
   so it would be helpful if you'll test 32bit before I install one myself.
  
  
   Kernel version 3.9.4-1 (linux-image-3.9-1-686-pae) made things worse.
  
   The virtual machine tries to boot the kernel, but stops after a few
   seconds and the kern.log shows:
   At what point does it stop?
  
  
  The machine stops at:
  
  Performance Events: Broken PMU hardware detected, using software events
  only.
  Failed to access perfctr msr (MSR c1 is 0)
  Enabling APIC mode:  Flat.  Using 1 I/O APICs
 Timer initialization is what comes next.
 
 I tried 32bit kernel compiled from kvm.git next (3.10.0-rc2+) branch and 
 upstream
 qemu and I cannot reproduce the problem. The guest boots fine.
 
Actually the branch I tested is master not next, but this should not
make a difference.

--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130606072008.gu4...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-06 Thread Gleb Natapov
On Thu, Jun 06, 2013 at 01:35:13PM +0200, Stefan Pietsch wrote:
 On 06.06.2013 08:42, Gleb Natapov wrote:
  On Wed, Jun 05, 2013 at 02:51:19PM +0200, Stefan Pietsch wrote:
  On 05.06.2013 14:10, Gleb Natapov wrote:
  On Wed, Jun 05, 2013 at 01:57:25PM +0200, Stefan Pietsch wrote:
  On 19.05.2013 14:32, Gleb Natapov wrote:
  On Sun, May 19, 2013 at 02:00:31AM +0100, Ben Hutchings wrote:
  Dear KVM maintainers, it appears that there is a gap in x86 emulation,
  at least on a 32-bit host.  Stefan found this when running GRML, a live
  distribution which can be downloaded from:
  http://download.grml.org/grml32-full_2013.02.iso.  His original
  reported is at http://bugs.debian.org/707257.
 
  Can you verify with latest linux.git HEAD? It works for me there on
  64bit. There were a lot of problems fixed in this area in 3.9/3.10 time 
  frame,
  so it would be helpful if you'll test 32bit before I install one myself.
 
 
  Kernel version 3.9.4-1 (linux-image-3.9-1-686-pae) made things worse.
 
  The virtual machine tries to boot the kernel, but stops after a few
  seconds and the kern.log shows:
  At what point does it stop?
 
 
  The machine stops at:
 
  Performance Events: Broken PMU hardware detected, using software events
  only.
  Failed to access perfctr msr (MSR c1 is 0)
  Enabling APIC mode:  Flat.  Using 1 I/O APICs
  Timer initialization is what comes next.
  
  I tried 32bit kernel compiled from kvm.git next (3.10.0-rc2+) branch and 
  upstream
  qemu and I cannot reproduce the problem. The guest boots fine.
 
 
 I had no success with the Debian kernel 3.10~rc4-1~exp1 (3.10-rc4-686-pae).
 
 The machine hangs after Enabling APIC mode:  Flat.  Using 1 I/O APICs.
OK, since it looks like it hangs during timer initialization can you try
to disable kvmclock? Add -cpu qemu64,-kvmclock to your command line.
Also can you provide the output of cat /proc/cpuinfo on your host? And
complete serial output before hang.

--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130606114025.gc4...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-06-05 Thread Gleb Natapov
On Wed, Jun 05, 2013 at 01:57:25PM +0200, Stefan Pietsch wrote:
 On 19.05.2013 14:32, Gleb Natapov wrote:
  On Sun, May 19, 2013 at 02:00:31AM +0100, Ben Hutchings wrote:
  Dear KVM maintainers, it appears that there is a gap in x86 emulation,
  at least on a 32-bit host.  Stefan found this when running GRML, a live
  distribution which can be downloaded from:
  http://download.grml.org/grml32-full_2013.02.iso.  His original
  reported is at http://bugs.debian.org/707257.
 
  Can you verify with latest linux.git HEAD? It works for me there on
  64bit. There were a lot of problems fixed in this area in 3.9/3.10 time 
  frame,
  so it would be helpful if you'll test 32bit before I install one myself.
 
 
 Kernel version 3.9.4-1 (linux-image-3.9-1-686-pae) made things worse.
 
 The virtual machine tries to boot the kernel, but stops after a few
 seconds and the kern.log shows:
At what point does it stop?

 
 kernel: [13851.000412] kvm [7482]: vcpu0 disabled perfctr wrmsr: 0xc1
 data 0x
 
That's harmless.

 
 virtual machine was started with:
 qemu-system-i386 -machine accel=kvm -m 512 -cdrom grml32-full_2013.02.iso
 
 qemu-system-x86: 1.5.0+dfsg-3

--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130605121024.gz4...@redhat.com



Bug#707257: linux-image-3.8-1-686-pae: KVM crashes with entry failed, hardware error 0x80000021

2013-05-19 Thread Gleb Natapov
On Sun, May 19, 2013 at 02:00:31AM +0100, Ben Hutchings wrote:
 Dear KVM maintainers, it appears that there is a gap in x86 emulation,
 at least on a 32-bit host.  Stefan found this when running GRML, a live
 distribution which can be downloaded from:
 http://download.grml.org/grml32-full_2013.02.iso.  His original
 reported is at http://bugs.debian.org/707257.
 
Can you verify with latest linux.git HEAD? It works for me there on
64bit. There were a lot of problems fixed in this area in 3.9/3.10 time frame,
so it would be helpful if you'll test 32bit before I install one myself.

 On Thu, 2013-05-16 at 13:26 +0200, Stefan Pietsch wrote:
  On 09.05.2013 20:56, Stefan Pietsch wrote:
   On 09.05.2013 03:08, Ben Hutchings wrote:
   
   Please could you test some of the intermediate versions at
   http://snapshot.debian.org/package/linux/ to find the first upstream
   version where this was broken.
   
   The first version which does not work is 3.6.4-1~experimental.1.
   3.5.5-1~experimental.1 works.
  
  
  I was able to start KVM under kernel version 3.8.12-1 after loading the
  kvm_intel module with the option emulate_invalid_guest_state=0.
 
 And one of the many changes between 3.5 and 3.6 was to change the
 default value of that parameter from 0 to 1.  So we don't know when the
 the bug in emulation was introduced (or if it was always there).
 
 Ben.
 
 -- 
 Ben Hutchings
 The generation of random numbers is too important to be left to chance.
 - Robert Coveyou



--
Gleb.


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130519123227.ga13...@redhat.com