Skip to contentSkip to conversation

2.6.23-rc1, KVM-AMD problem

DISCUSSION Alistair John Strachan 3 participants 12 messages Jul 28, 2007 – Aug 4, 2007 KVM

lore
Share & tools
lore
#0 lore raw

Hi,

I'm getting periodic oopses running KVM-33 on 2.6.23-rc1. Here is a digital photo of the oops. Alarmingly, a lot of the time it triple faults the machine and I don't get a chance to grab it. This time I was lucky, though.

http://devzero.co.uk/~alistair/kvm-2.6.23-rc1.jpg

Unfortunately, some of the oops text scrolled out of the screen. I will endeavour to reproduce the bug over serial console, but I can make no guarantees.

The CPU is an AMD X2 BE-2350, chipset is AMD 690G.

Signature · 11 lines
Cheers,
Alistair.

137/1 Warrender Park Road, Edinburgh, UK.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
#1 lore raw
Quoted 11 lines · Alistair John Strachan

Hi,

I'm getting periodic oopses running KVM-33 on 2.6.23-rc1. Here is a digital photo of the oops. Alarmingly, a lot of the time it triple faults the machine and I don't get a chance to grab it. This time I was lucky, though.

http://devzero.co.uk/~alistair/kvm-2.6.23-rc1.jpg

Unfortunately, some of the oops text scrolled out of the screen. I will endeavour to reproduce the bug over serial console, but I can make no guarantees.

The CPU is an AMD X2 BE-2350, chipset is AMD 690G.

If you are using the modules from 2.6.23-rc1, try upgrading to latest -git, which contains a patch that might fix this problem. If you are using the modules from kvm-33, try applying the attached patch.

Signature · 1 line
error compiling committee.c: too many arguments to function

commit bfa6c62f98bd0602025d7b48e267d817082f5d07

Author: Aurelien Jarno <[email protected]>
Date:   Wed Jul 25 10:19:54 2007 +0200

KVM: disable writeback for 0x0f 0x01 instructions.

0x0f 0x01 instructions (ie lgdt, lidt, smsw, lmsw and invlpg) does not use writeback. This patch set no_wb=1 when emulating those instructions.

This fixes a regression booting the FreeBSD kernel on AMD.

drivers/kvm/x86_emulate.c +2 -0
index 21ce977..cbbb9c5 100644
@@ -1183,6 +1183,8 @@ pop_instruction:
 twobyte_insn:
 	switch (b) {
 	case 0x01: /* lgdt, lidt, lmsw */
+		/* Disable writeback. */
+		no_wb = 1;
 		switch (modrm_reg) {
 			u16 size;
 			unsigned long address;

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

#2 lore raw
Quoted 14 lines · On Sunday 29 July 2007 09:16:43 Avi Kivity wrote:
Quoted 13 lines · Alistair John Strachan

Hi,

I'm getting periodic oopses running KVM-33 on 2.6.23-rc1. Here is a digital photo of the oops. Alarmingly, a lot of the time it triple faults the machine and I don't get a chance to grab it. This time I was lucky, though.

http://devzero.co.uk/~alistair/kvm-2.6.23-rc1.jpg

Unfortunately, some of the oops text scrolled out of the screen. I will endeavour to reproduce the bug over serial console, but I can make no guarantees.

Quoted 5 lines
Quoted 1 line

The CPU is an AMD X2 BE-2350, chipset is AMD 690G.

If you are using the modules from 2.6.23-rc1, try upgrading to latest -git, which contains a patch that might fix this problem. If you are using the modules from kvm-33, try applying the attached patch.

Doesn't help, I still get the same crashes. I tried 2.6.22 again and it's rock solid by comparison.

Signature · 11 lines
Cheers,
Alistair.

137/1 Warrender Park Road, Edinburgh, UK.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
#3 lore raw
Quoted 17 lines · Alistair John Strachan
Quoted 15 lines · On Sunday 29 July 2007 09:16:43 Avi Kivity wrote:
Quoted 13 lines · Alistair John Strachan

Hi,

I'm getting periodic oopses running KVM-33 on 2.6.23-rc1. Here is a digital photo of the oops. Alarmingly, a lot of the time it triple faults the machine and I don't get a chance to grab it. This time I was lucky, though.

http://devzero.co.uk/~alistair/kvm-2.6.23-rc1.jpg

Unfortunately, some of the oops text scrolled out of the screen. I will endeavour to reproduce the bug over serial console, but I can make no guarantees.

Quoted 10 lines
Quoted 6 lines
Quoted 2 lines

The CPU is an AMD X2 BE-2350, chipset is AMD 690G.

If you are using the modules from 2.6.23-rc1, try upgrading to latest -git, which contains a patch that might fix this problem. If you are using the modules from kvm-33, try applying the attached patch.

Doesn't help, I still get the same crashes. I tried 2.6.22 again and it's rock solid by comparison.

Do you mean, kvm-33 on top of 2.6.22, or the kvm modules from 2.6.22? Please describe your configuration *exactly*.

And what do you mean, "rock solid by comparison"? Either it's rock solid or it isn't.

Signature · 1 line
error compiling committee.c: too many arguments to function
#4 lore raw

On Sunday 29 July 2007 12:34:28 you wrote:
[snip]

Quoted 5 lines
Quoted 2 lines

Doesn't help, I still get the same crashes. I tried 2.6.22 again and it's rock solid by comparison.

Do you mean, kvm-33 on top of 2.6.22, or the kvm modules from 2.6.22? Please describe your configuration *exactly*.

I'm using the kvm-33 *userspace* package (based on Debian's kvm-28 packaging) and 2.6.23-rc1's KVM modules. I patched 2.6.23-rc1 with the patch you provided in your last email. So I'm not using -git HEAD.

Maybe there's been additional necessary fixes to -git requiring me to update to HEAD? That wasn't clear from your last email.

Quoted 2 lines

And what do you mean, "rock solid by comparison"? Either it's rock solid or it isn't.

It's rock solid. It does not crash.

Signature · 11 lines
Cheers,
Alistair.

137/1 Warrender Park Road, Edinburgh, UK.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
#5 lore raw
Quoted 6 lines · Alistair John Strachan

On Sunday 29 July 2007 12:34:28 you wrote:
[snip]

Quoted 3 lines
Quoted 3 lines

Doesn't help, I still get the same crashes. I tried 2.6.22 again and it's rock solid by comparison.

Quoted 8 lines
Quoted 3 lines

Do you mean, kvm-33 on top of 2.6.22, or the kvm modules from 2.6.22? Please describe your configuration *exactly*.

I'm using the kvm-33 *userspace* package (based on Debian's kvm-28 packaging) and 2.6.23-rc1's KVM modules. I patched 2.6.23-rc1 with the patch you provided in your last email. So I'm not using -git HEAD.

Maybe there's been additional necessary fixes to -git requiring me to update to HEAD? That wasn't clear from your last email.

No, that patch is the only potential fix post -rc1. There are a few other fixes there, but they are intended to avoid guest crashes, not host crashes.

What guest are you running? Maybe I can reproduce it here.

Signature · 1 line
error compiling committee.c: too many arguments to function
#6 lore raw
Quoted 14 lines · On Sunday 29 July 2007 14:47:57 you wrote:
Quoted 13 lines · Alistair John Strachan

On Sunday 29 July 2007 12:34:28 you wrote:
[snip]

Quoted 5 lines
Quoted 2 lines

Doesn't help, I still get the same crashes. I tried 2.6.22 again and it's rock solid by comparison.

Do you mean, kvm-33 on top of 2.6.22, or the kvm modules from 2.6.22? Please describe your configuration *exactly*.

I'm using the kvm-33 *userspace* package (based on Debian's kvm-28 packaging) and 2.6.23-rc1's KVM modules. I patched 2.6.23-rc1 with the patch you provided in your last email. So I'm not using -git HEAD.

Quoted 8 lines
Quoted 2 lines

Maybe there's been additional necessary fixes to -git requiring me to update to HEAD? That wasn't clear from your last email.

No, that patch is the only potential fix post -rc1. There are a few other fixes there, but they are intended to avoid guest crashes, not host crashes.

What guest are you running? Maybe I can reproduce it here.

Right now, Windows XP. I'm pretty sure Linux (well, Debian Etch) works fine. I could only get Windows to install with -no-acpi, but I run it with the following (if this is at all useful):

kvm -no-acpi -m 256 -hda $IMAGE -net nic -net tap,script=/etc/kvm/kvm-ifup

Basically, the installer seems to work fine, but Windows seemed to have problems after installing post-SP2 updates. Maybe that's why not everybody is seeing it yet.

Signature · 11 lines
Cheers,
Alistair.

137/1 Warrender Park Road, Edinburgh, UK.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
#7 lore raw
Quoted 25 lines · Alistair John Strachan
Quoted 23 lines · On Sunday 29 July 2007 14:47:57 you wrote:
Quoted 10 lines · Alistair John Strachan

On Sunday 29 July 2007 12:34:28 you wrote:
[snip]

Quoted 6 lines
Quoted 3 lines

Doesn't help, I still get the same crashes. I tried 2.6.22 again and it's rock solid by comparison.

Do you mean, kvm-33 on top of 2.6.22, or the kvm modules from 2.6.22? Please describe your configuration *exactly*.

Quoted 7 lines

I'm using the kvm-33 *userspace* package (based on Debian's kvm-28 packaging) and 2.6.23-rc1's KVM modules. I patched 2.6.23-rc1 with the patch you provided in your last email. So I'm not using -git HEAD.

Maybe there's been additional necessary fixes to -git requiring me to update to HEAD? That wasn't clear from your last email.

No, that patch is the only potential fix post -rc1. There are a few other fixes there, but they are intended to avoid guest crashes, not host crashes.

Quoted 10 lines
Quoted 2 lines

What guest are you running? Maybe I can reproduce it here.

Right now, Windows XP. I'm pretty sure Linux (well, Debian Etch) works fine. I could only get Windows to install with -no-acpi, but I run it with the following (if this is at all useful):

kvm -no-acpi -m 256 -hda $IMAGE -net nic -net tap,script=/etc/kvm/kvm-ifup

Basically, the installer seems to work fine, but Windows seemed to have problems after installing post-SP2 updates. Maybe that's why not everybody is seeing it yet.

How about the attached patch? (I haven't yet tried to reproduce, but this can cause an AMD-only oops).

Signature · 1 line
error compiling committee.c: too many arguments to function

commit 80917728e43e248155c019f743655806b582b099

Author: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/[email protected]>
Date:   Mon Jul 30 15:56:36 2007 +0300

KVM: x86 emulator: disable writeback for debug register instructions

These are handled internally by the instruction.

drivers/kvm/x86_emulate.c +2 -0
index 1a90ba0..2136da5 100644
@@ -1222,11 +1222,13 @@ twobyte_insn:
 		}
 		break;
 	case 0x21: /* mov from dr to reg */
+		no_wb = 1;
 		if (modrm_mod != 3)
 			goto cannot_emulate;
 		rc = emulator_get_dr(ctxt, modrm_reg, &_regs[modrm_rm]);
 		break;
 	case 0x23: /* mov from reg to dr */
+		no_wb = 1;
 		if (modrm_mod != 3)
 			goto cannot_emulate;
 		rc = emulator_set_dr(ctxt, modrm_reg, _regs[modrm_rm]);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

#8 lore raw
Quoted 2 lines · On Monday 30 July 2007 14:00:13 Avi Kivity wrote:

How about the attached patch? (I haven't yet tried to reproduce, but this can cause an AMD-only oops).

This seems to have fixed the problem. Thanks Avi.

Signature · 11 lines
Cheers,
Alistair.

137/1 Warrender Park Road, Edinburgh, UK.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
#9 lore raw
Quoted 9 lines · Alistair John Strachan
Quoted 3 lines · On Monday 30 July 2007 14:00:13 Avi Kivity wrote:

How about the attached patch? (I haven't yet tried to reproduce, but this can cause an AMD-only oops).

This seems to have fixed the problem. Thanks Avi.

Excellent. I'll submit this fix for 2.6.23.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
#10 lore raw
In reply to Avi Kivity

Am Montag 30 Juli 2007 schrieb Avi Kivity:

Quoted 1 line

Alistair John Strachan wrote:

[...]

Quoted 6 lines
Quoted 3 lines

Basically, the installer seems to work fine, but Windows seemed to have problems after installing post-SP2 updates. Maybe that's why not everybody is seeing it yet.

How about the attached patch? (I haven't yet tried to reproduce, but this can cause an AMD-only oops).

commit 80917728e43e248155c019f743655806b582b099

Author: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/[email protected]>
Date:   Mon Jul 30 15:56:36 2007 +0300

KVM: x86 emulator: disable writeback for debug register instructions

These are handled internally by the instruction.

drivers/kvm/x86_emulate.c +2 -0
index 1a90ba0..2136da5 100644
@@ -1222,11 +1222,13 @@ twobyte_insn:
                }
                break;
        case 0x21: /* mov from dr to reg */
+               no_wb = 1;
                if (modrm_mod != 3)
                        goto cannot_emulate;
                rc = emulator_get_dr(ctxt, modrm_reg, &_regs[modrm_rm]);
                break;
        case 0x23: /* mov from reg to dr */
+               no_wb = 1;
                if (modrm_mod != 3)
                        goto cannot_emulate;
                rc = emulator_set_dr(ctxt, modrm_reg, _regs[modrm_rm]);

Unfortunately this doesn't seem to have made it into 2.6.23-rc2. I need it as well, to make Windows XP boot up w/o hanging or reebooting my host machine.

Cheers,

Signature · 3 lines
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

#11 lore raw
Quoted 3 lines · On Saturday 04 August 2007 14:17:34 Prakash Punnoor wrote:

Unfortunately this doesn't seem to have made it into 2.6.23-rc2. I need it as well, to make Windows XP boot up w/o hanging or reebooting my host machine.

It isn't in 2.6.23-rc2. I guess Avi should re-send to Linus and hopefully it'll be in -rc3. Thanks for pointing this out.

Signature · 4 lines
Cheers,
Alistair.

137/1 Warrender Park Road, Edinburgh, UK.