Skip to contentSkip to conversation

Linux with kvm-intel locks up VMplayer guest is started

DISCUSSION Martin Michlmayr 5 participants 11 messages Jun 16, 2008 – Jun 18, 2008 KVM

lore
Share & tools
lore
#0 lore raw

When I start a guest in vmplayer, my laptop locks up hard. I found out that this only happens when the kvm-intel module has been loaded. When I unload this module, I can start vmware guests just fine.

I see this problem on a HP Compaq 2510p notebook with Intel Core2 Duo U7600 @ 1.20GHz, but http://laptop006.livejournal.com/41314.html
describes exactly the same problem on a Lenovo T61 (custom build), Core 2 T7500 on a Santa Rosa. I've seen this with at least 2.6.24 and 2.6.25.

I don't have a serial console, but I started VMplayer and immediately switched to the console but nothing is displayed (i.e. no kernel panic; it simply locks up hard).

Any idea if this is a kernel bug, BIOS issue or a bug in VMplayer?

Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#1 lore raw
Quoted 10 lines · Martin Michlmayr

When I start a guest in vmplayer, my laptop locks up hard. I found out that this only happens when the kvm-intel module has been loaded. When I unload this module, I can start vmware guests just fine.

I see this problem on a HP Compaq 2510p notebook with Intel Core2 Duo U7600 @ 1.20GHz, but http://laptop006.livejournal.com/41314.html
describes exactly the same problem on a Lenovo T61 (custom build), Core 2 T7500 on a Santa Rosa. I've seen this with at least 2.6.24 and 2.6.25.

Quoted 6 lines

I don't have a serial console, but I started VMplayer and immediately switched to the console but nothing is displayed (i.e. no kernel panic; it simply locks up hard).

Any idea if this is a kernel bug, BIOS issue or a bug in VMplayer?

This has been fixed in the latest KVM code base AFAIK.

Regards,

Anthony Liguori

#2 lore raw
Quoted 3 lines · Anthony Liguori
Quoted 1 line

Any idea if this is a kernel bug, BIOS issue or a bug in VMplayer?

This has been fixed in the latest KVM code base AFAIK.

Can you give some more information? Which commit fixed the problem? Was the patch submitted to the 2.6.25-stable tree?

Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#3 lore raw
Quoted 9 lines · Martin Michlmayr
Quoted 4 lines · Anthony Liguori
Quoted 2 lines

Any idea if this is a kernel bug, BIOS issue or a bug in VMplayer?

This has been fixed in the latest KVM code base AFAIK.

Can you give some more information? Which commit fixed the problem?

commit 1f4e1d64122369d65d8a9c616112780019fb6188

Author: Eli Collins <[email protected]>
Date:   Sun Jun 1 20:24:40 2008 -0700
Quoted 2 lines

Was the patch submitted to the 2.6.25-stable tree?

No, it's not a regression. I misread your first email btw, you have to unload the kvm-intel kernel module to use VMware.

VMware is a binary kernel module that's out of kernel. KVM is not misbehaving and the fact that VMware breaks when the KVM module is loaded isn't our problem. If they submitted their code for inclusion in mainline, we could possibly come up with solution for arbitrating who is using VT.

Regards,

Anthony Liguori

#4 lore raw
Quoted 5 lines · Anthony Liguori

VMware is a binary kernel module that's out of kernel. KVM is not misbehaving and the fact that VMware breaks when the KVM module is loaded isn't our problem. If they submitted their code for inclusion in mainline, we could possibly come up with solution for arbitrating who is using VT.

I feared I'd get a response like this. But unless this is a known issue in VMware (which I don't think it is), you don't know whether it's not a bug in kvm-intel.

Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#5 lore raw
Quoted 10 lines · Martin Michlmayr
Quoted 5 lines · Anthony Liguori

VMware is a binary kernel module that's out of kernel. KVM is not misbehaving and the fact that VMware breaks when the KVM module is loaded isn't our problem. If they submitted their code for inclusion in mainline, we could possibly come up with solution for arbitrating who is using VT.

I feared I'd get a response like this. But unless this is a known issue in VMware (which I don't think it is), you don't know whether it's not a bug in kvm-intel.

Sorry, Anthony, I just realized I misparsed your response. So you're saying that it's a known issue and that VMware is the problem. Thanks a lot! I'll take it up with VMware.

Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#6 lore raw
Quoted 3 lines · Martin Michlmayr

Sorry, Anthony, I just realized I misparsed your response. So you're saying that it's a known issue and that VMware is the problem. Thanks a lot! I'll take it up with VMware.

i think what he's saying is that VMWare is a closed binary blob executing in the kernel; so there's no way to certify anything with this.

as soon as you put some unknown (and unknowable, unverifiable, untrustable) code in the kernel, you can't know what will work and what won't.

Signature · 1 line
Javier
#7 lore raw
In reply to Martin Michlmayr
Quoted 10 lines · On Tue, 17 Jun 2008 15:32:34 +0200 Martin Michlmayr <[email protected]> wrote:
Quoted 5 lines · Anthony Liguori

VMware is a binary kernel module that's out of kernel. KVM is not misbehaving and the fact that VMware breaks when the KVM module is loaded isn't our problem. If they submitted their code for inclusion in mainline, we could possibly come up with solution for arbitrating who is using VT.

I feared I'd get a response like this. But unless this is a known issue in VMware (which I don't think it is), you don't know whether it's not a bug in kvm-intel.

So ask vmware. They have source to both parts we don't.

And its a bug in vmware by definition. If the emulator differs from the real thing then the emulator is at fault. It might well be that the limit is a genuine technical limit - but its still an emulator fault.

Alan

#8 lore raw
In reply to Martin Michlmayr
Quoted 9 lines · Martin Michlmayr
Quoted 6 lines · Anthony Liguori

VMware is a binary kernel module that's out of kernel. KVM is not misbehaving and the fact that VMware breaks when the KVM module is loaded isn't our problem. If they submitted their code for inclusion in mainline, we could possibly come up with solution for arbitrating who is using VT.

Quoted 4 lines

I feared I'd get a response like this. But unless this is a known issue in VMware (which I don't think it is), you don't know whether it's not a bug in kvm-intel.

We know exactly what the problem is. KVM activates VT unconditionally. There's no hardware mechanism to arbitrate access to VT. KVM is the only thing in the Linux kernel that uses VT so we don't have a software mechanism to arbitrate access to VT.

If the VMware code was upstream, then we could work together to make a software arbitration mechanism. It's not, and worse yet, it's closed source so there's no chance it will be. Even if someone wrote an arbitration mechanism and got VMware to use it, it still shouldn't be merged because KVM would be the only thing using that mechanism upstream. I'm not interested in adding kernel infrastructure to support external binary kernel modules.

Regards,

Anthony Liguori

#9 lore raw
Quoted 4 lines · Anthony Liguori

We know exactly what the problem is. KVM activates VT unconditionally. There's no hardware mechanism to arbitrate access to VT. KVM is the only thing in the Linux kernel that uses VT so we don't have a software mechanism to arbitrate access to VT.

If the VMware code was upstream, then we could work together to make a software arbitration mechanism. It's not, and worse yet, it's closed source so there's no chance it will be. Even if someone wrote an arbitration mechanism and got VMware to use it, it still shouldn't be merged because KVM would be the only thing using that mechanism upstream. I'm not interested in adding kernel infrastructure to support external binary kernel modules.

Well a recent patch from Eli Collins mentioned VMware are standardizing CR4.VMXE as an indicator of whether someone is using the VT hardware or not, and now kvm clears that bit when unloading. We could check the bit and fail if is set, thus have working mutual exclusion. Of course, it will only work with newer versions of kvm and vmware.

I don't see any reason to poke sticks into the wheels here.

Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
#10 lore raw
Quoted 7 lines · Avi Kivity
Quoted 4 lines · Anthony Liguori

We know exactly what the problem is. KVM activates VT unconditionally. There's no hardware mechanism to arbitrate access to VT. KVM is the only thing in the Linux kernel that uses VT so we don't have a software mechanism to arbitrate access to VT.

If the VMware code was upstream, then we could work together to make a software arbitration mechanism. It's not, and worse yet, it's closed source so there's no chance it will be. Even if someone wrote an arbitration mechanism and got VMware to use it, it still shouldn't be merged because KVM would be the only thing using that mechanism upstream. I'm not interested in adding kernel infrastructure to support external binary kernel modules.

Well a recent patch from Eli Collins mentioned VMware are standardizing CR4.VMXE as an indicator of whether someone is using the VT hardware or not, and now kvm clears that bit when unloading. We could check the bit and fail if is set, thus have working mutual exclusion. Of course, it will only work with newer versions of kvm and vmware.

Yup, but the original bug reporter would not be helped by this.

Quoted 1 line

I don't see any reason to poke sticks into the wheels here.

An occasional poke at binary kernel modules is always a good thing IMHO :-)

Regards,

Anthony Liguori