2006-11-02 13:25:47

by Avi Kivity

[permalink] [raw]
Subject: [ANNOUNCE] kvm howto

I've just uploaded a HOWTO to http://kvm.sourceforge.net, including
(hopefuly) everything needed to get kvm running. Please take a look and
comment.

BTW, we have the AMD port running with fairly impressive performance.

--
error compiling committee.c: too many arguments to function


2006-11-02 14:27:56

by Christian Hesse

[permalink] [raw]
Subject: Re: [ANNOUNCE] kvm howto

On Thursday 02 November 2006 14:25, Avi Kivity wrote:
> I've just uploaded a HOWTO to http://kvm.sourceforge.net, including
> (hopefuly) everything needed to get kvm running. Please take a look and
> comment.

CC [M] /tmp/kvm-module/kvm_main.o
{standard input}: Assembler messages:
{standard input}:168: Error: no such instruction: `vmxon 16(%esp)'
{standard input}:182: Error: no such instruction: `vmxoff'
{standard input}:192: Error: no such instruction: `vmread %eax,%eax'
{standard input}:415: Error: no such instruction: `vmwrite %ebx,%esi'
{standard input}:1103: Error: no such instruction: `vmclear 16(%esp)'
{standard input}:1676: Error: no such instruction: `vmptrld 16(%esp)'
{standard input}:4107: Error: no such instruction: `vmwrite %esp,%eax'
{standard input}:4119: Error: no such instruction: `vmlaunch '
{standard input}:4121: Error: no such instruction: `vmresume '

I get a number of errors compiling the module. No difference between the
downloaded tarball and my patched kernel tree. Any hints?
--
Regards,
Christian


Attachments:
(No filename) (1.02 kB)
(No filename) (189.00 B)
Download all attachments

2006-11-02 14:32:15

by Avi Kivity

[permalink] [raw]
Subject: Re: [ANNOUNCE] kvm howto

Hesse, Christian wrote:
> On Thursday 02 November 2006 14:25, Avi Kivity wrote:
>
>> I've just uploaded a HOWTO to http://kvm.sourceforge.net, including
>> (hopefuly) everything needed to get kvm running. Please take a look and
>> comment.
>>
>
> CC [M] /tmp/kvm-module/kvm_main.o
> {standard input}: Assembler messages:
> {standard input}:168: Error: no such instruction: `vmxon 16(%esp)'
> {standard input}:182: Error: no such instruction: `vmxoff'
> {standard input}:192: Error: no such instruction: `vmread %eax,%eax'
> {standard input}:415: Error: no such instruction: `vmwrite %ebx,%esi'
> {standard input}:1103: Error: no such instruction: `vmclear 16(%esp)'
> {standard input}:1676: Error: no such instruction: `vmptrld 16(%esp)'
> {standard input}:4107: Error: no such instruction: `vmwrite %esp,%eax'
> {standard input}:4119: Error: no such instruction: `vmlaunch '
> {standard input}:4121: Error: no such instruction: `vmresume '
>
> I get a number of errors compiling the module. No difference between the
> downloaded tarball and my patched kernel tree. Any hints?
>

You need a newer binutils. I'm using binutils-2.16.91.0.6 (gotta love
that version number), shipped with Fedora Core 5.

I'll update the howto to reflect this.

--
error compiling committee.c: too many arguments to function

2006-11-02 15:14:04

by Magnus Damm

[permalink] [raw]
Subject: Re: [ANNOUNCE] kvm howto

On 11/2/06, Avi Kivity <[email protected]> wrote:
> Hesse, Christian wrote:
> > On Thursday 02 November 2006 14:25, Avi Kivity wrote:
> >
> >> I've just uploaded a HOWTO to http://kvm.sourceforge.net, including
> >> (hopefuly) everything needed to get kvm running. Please take a look and
> >> comment.
> >>
> >
> > CC [M] /tmp/kvm-module/kvm_main.o
> > {standard input}: Assembler messages:
> > {standard input}:168: Error: no such instruction: `vmxon 16(%esp)'
> > {standard input}:182: Error: no such instruction: `vmxoff'
> > {standard input}:192: Error: no such instruction: `vmread %eax,%eax'
> > {standard input}:415: Error: no such instruction: `vmwrite %ebx,%esi'
> > {standard input}:1103: Error: no such instruction: `vmclear 16(%esp)'
> > {standard input}:1676: Error: no such instruction: `vmptrld 16(%esp)'
> > {standard input}:4107: Error: no such instruction: `vmwrite %esp,%eax'
> > {standard input}:4119: Error: no such instruction: `vmlaunch '
> > {standard input}:4121: Error: no such instruction: `vmresume '
> >
> > I get a number of errors compiling the module. No difference between the
> > downloaded tarball and my patched kernel tree. Any hints?
> >
>
> You need a newer binutils. I'm using binutils-2.16.91.0.6 (gotta love
> that version number), shipped with Fedora Core 5.

The VT-extensions added by Intel and AMD only adds a limited number of
instructions each. If you want to be user friendly it might be a good
idea to implement these instructions as macros. I'm pretty sure
VT-extension support in Xen works with my old binutils version.

/ magnus

2006-11-02 15:19:30

by Avi Kivity

[permalink] [raw]
Subject: Re: [ANNOUNCE] kvm howto

Magnus Damm wrote:
>>
>> You need a newer binutils. I'm using binutils-2.16.91.0.6 (gotta love
>> that version number), shipped with Fedora Core 5.
>
> The VT-extensions added by Intel and AMD only adds a limited number of
> instructions each. If you want to be user friendly it might be a good
> idea to implement these instructions as macros. I'm pretty sure
> VT-extension support in Xen works with my old binutils version.
>

Yes, Xen uses macros.

I figured a newish machine will have a newish binutils. Looks like I
was wrong. I don't like uglifying the code, but if many users hit this,
there won't be much of a choice.

[A minor problem with macros is that you can't let gcc choose the
registers for you with instructions that have operands]

--
error compiling committee.c: too many arguments to function

2006-11-05 17:14:34

by Tomasz Torcz

[permalink] [raw]
Subject: Re: [ANNOUNCE] kvm howto

On Thu, Nov 02, 2006 at 03:25:41PM +0200, Avi Kivity wrote:
> I've just uploaded a HOWTO to http://kvm.sourceforge.net, including
> (hopefuly) everything needed to get kvm running. Please take a look and
> comment.

I have some problems on Thinkpad z61t with Core Duo T2500.
/proc/cpuinfo shows "vmx" in flags, but module refuses to load:
[17462106.632000] kvm: disabled by bios

I wandered around BIOS setup (latest version), but didn't found
anything about virtualization. Is BIOS check really necessary?

--
Tomasz Torcz 72->| 80->|
[email protected] 72->| 80->|


Attachments:
(No filename) (681.00 B)
(No filename) (229.00 B)
Download all attachments

2006-11-06 08:15:01

by Dor Laor

[permalink] [raw]
Subject: RE: [ANNOUNCE] kvm howto

The BIOS check is a must, it checks bit #0 of MSR_IA32_FEATURE_CONTROL,
if it set this means that software cannot write to the MSR. If bit #2 is
clear too then when executing vmxon you'll get #GP.

So the check should better be there...

--
Dor Laor

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Tomasz Torcz
Sent: Sunday, November 05, 2006 7:14 PM
To: linux-kernel
Subject: Re: [ANNOUNCE] kvm howto

On Thu, Nov 02, 2006 at 03:25:41PM +0200, Avi Kivity wrote:
> I've just uploaded a HOWTO to http://kvm.sourceforge.net, including
> (hopefuly) everything needed to get kvm running. Please take a look
and
> comment.

I have some problems on Thinkpad z61t with Core Duo T2500.
/proc/cpuinfo shows "vmx" in flags, but module refuses to load:
[17462106.632000] kvm: disabled by bios

I wandered around BIOS setup (latest version), but didn't found
anything about virtualization. Is BIOS check really necessary?

--
Tomasz Torcz 72->|
80->|
[email protected] 72->|
80->|

2006-11-06 08:51:55

by Avi Kivity

[permalink] [raw]
Subject: Re: [ANNOUNCE] kvm howto

Tomasz Torcz wrote:
> On Thu, Nov 02, 2006 at 03:25:41PM +0200, Avi Kivity wrote:
>
>> I've just uploaded a HOWTO to http://kvm.sourceforge.net, including
>> (hopefuly) everything needed to get kvm running. Please take a look and
>> comment.
>>
>
> I have some problems on Thinkpad z61t with Core Duo T2500.
> /proc/cpuinfo shows "vmx" in flags, but module refuses to load:
> [17462106.632000] kvm: disabled by bios
>
>

See
http://forum.thinkpads.com/viewtopic.php?p=203419&sid=8f3fe5a07430fe35c6bf8c32e6058a87


> I wandered around BIOS setup (latest version), but didn't found
> anything about virtualization. Is BIOS check really necessary?
>

Yes. The thing is a brick as far as hardware virtualization is
concerned. Complain to your vendor.

--
error compiling committee.c: too many arguments to function

2006-11-06 10:14:57

by Arjan van de Ven

[permalink] [raw]
Subject: Re: [ANNOUNCE] kvm howto


>
> See
> http://forum.thinkpads.com/viewtopic.php?p=203419&sid=8f3fe5a07430fe35c6bf8c32e6058a87
>
>
> > I wandered around BIOS setup (latest version), but didn't found
> > anything about virtualization. Is BIOS check really necessary?
> >
>
> Yes. The thing is a brick as far as hardware virtualization is
> concerned. Complain to your vendor.

is there an easy way this can be checked for? If so I'd love to add this
as check to the linux-ready firmware developer kit (see URL in sig) as
something to test bioses for...

>
--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org

2006-11-13 20:34:41

by Tomasz Torcz

[permalink] [raw]
Subject: overriding BIOS (was: Re: [ANNOUNCE] kvm howto)

On Mon, Nov 06, 2006 at 12:15:02AM -0800, Dor Laor wrote:
> The BIOS check is a must, it checks bit #0 of MSR_IA32_FEATURE_CONTROL,
> if it set this means that software cannot write to the MSR. If bit #2 is
> clear too then when executing vmxon you'll get #GP.
>
> So the check should better be there...

You were right, just writing to this MSR (via kvm_enable) halts my laptop.
Which is kinda strange, as this solution works on Intel Mac Minis.

Anyway, complaint to Lenovo sent and got ignored.

--
Tomasz Torcz ,,(...) today's high-end is tomorrow's embedded processor.''
[email protected] -- Mitchell Blank on LKML


Attachments:
(No filename) (663.00 B)
(No filename) (229.00 B)
Download all attachments

2006-11-13 20:39:14

by Arjan van de Ven

[permalink] [raw]
Subject: Re: overriding BIOS (was: Re: [ANNOUNCE] kvm howto)

On Mon, 2006-11-13 at 21:34 +0100, Tomasz Torcz wrote:
> On Mon, Nov 06, 2006 at 12:15:02AM -0800, Dor Laor wrote:
> > The BIOS check is a must, it checks bit #0 of MSR_IA32_FEATURE_CONTROL,
> > if it set this means that software cannot write to the MSR. If bit #2 is
> > clear too then when executing vmxon you'll get #GP.
> >
> > So the check should better be there...
>
> You were right, just writing to this MSR (via kvm_enable) halts my laptop.
> Which is kinda strange, as this solution works on Intel Mac Minis.
>
> Anyway, complaint to Lenovo sent and got ignored.
>

the linux-ready firmware developer kit now tries to test for this; with
some luck the bios people will run this and fix it ;)

--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org