Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread Avi Kivity
On 11/17/2011 07:13 PM, David Evensky wrote:
> func 000d ind 0001 flags 0001 -> 0001   
> 
> func 8001 ind  flags  ->   0001 
> 28100800
> func 000d ind 0003 flags 0001 ->    
> 
> func 000d ind 0004 flags 0001 ->    
> 
> func 000d ind 0005 flags 0001 ->    
> 

Leaf 0xd handling is broken in 3.0:

case 0xd: {
int i;

entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
for (i = 1; *nent < maxnent && i < 64; ++i) {
if (entry[i].eax == 0)
continue;
do_cpuid_1_ent(&entry[i], function, i);
entry[i].flags |=
   KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
++*nent;
}
break;
}

We check entry[i].eax before we compute it.  3.2 is fine, so it's only a
matter of backports.

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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread David Evensky

Avi, sure:

evensky@waltz:~$ gcc supported-cpuid.c -o supported-cpuid
evensky@waltz:~$ ./supported-cpuid 
Returned entries: 37
func  ind  flags  -> 000d 756e6547 6c65746e 49656e69
func 0001 ind  flags  -> 000206a7 01100800 16b82203 0f8bfbff
func 0002 ind  flags 0006 -> 76035a01 00f0b2ff  00ca
func 0003 ind  flags  ->    
func 0004 ind  flags 0001 -> 1c004121 01c0003f 003f 
func 0004 ind 0001 flags 0001 -> 1c004122 01c0003f 003f 
func 0004 ind 0002 flags 0001 -> 1c004143 01c0003f 01ff 
func 0004 ind 0003 flags 0001 -> 1c03c163 03c0003f 0fff 0006
func 0004 ind 0004 flags 0001 ->    
func 0005 ind  flags  -> 0040 0040 0003 00021120
func 0006 ind  flags  -> 0077 0002 0009 
func 0007 ind  flags  ->    
func 0008 ind  flags  ->    
func 0009 ind  flags  ->    
func 000a ind  flags  -> 07300403   0603
func 000b ind  flags 0001 -> 0001 0002 0100 0001
func 000b ind 0001 flags 0001 -> 0004 0004 0201 0001
func 000b ind 0002 flags 0001 ->   0002 0001
func 000c ind  flags  ->    
func 000d ind  flags 0001 -> 0007 0340 0340 
func 000d ind 0001 flags 0001 -> 0001   
func 8001 ind  flags  ->   0001 28100800
func 000d ind 0003 flags 0001 ->    
func 000d ind 0004 flags 0001 ->    
func 000d ind 0005 flags 0001 ->    
func 8005 ind  flags  ->    
func 8000 ind  flags  -> 8008   
func 8001 ind  flags  ->   0001 28100800
func 8002 ind  flags  -> 20202020 49202020 6c65746e 20295228
func 8003 ind  flags  -> 65726f43 294d5428 2d376920 30323632
func 8004 ind  flags  -> 5043204d 20402055 30372e32 007a4847
func 8005 ind  flags  ->    
func 8006 ind  flags  ->   01006040 
func 8007 ind  flags  ->    0100
func 8008 ind  flags  -> 3024   
func 4000 ind  flags  ->  4b4d564b 564b4d56 004d
func 4001 ind  flags  -> 011b   

\dae

On Thu, Nov 17, 2011 at 06:49:16PM +0200, Avi Kivity wrote:
> On 11/17/2011 06:29 PM, David Evensky wrote:
> > Avi,
> >
> > evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 
> > 0x01 ./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys 
> > %histogram){print "$o: $histogram{$o}\n"}'
> > KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 3
> > Returned entries: 31: 9995
> > Returned entries: 32: 1
> > Returned entries: 64: 1
> > evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 
> > 0x02 ./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys 
> > %histogram){print "$o: $histogram{$o}\n"}'
> > KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 1
> > Returned entries: 31: 
> > evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 
> > 0x03 ./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys 
> > %histogram){print "$o: $histogram{$o}\n"}'
> > KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 3
> > Returned entries: 31: 9995
> > Returned entries: 57: 1
> > Returned entries: 58: 1
> > evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 
> > 0x04 ./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys 
> > %histogram){print "$o: $histogram{$o}\n"}'
> > Returned entries: 31: 1
> > evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 
> > 0x08 ./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys 
> > %histogram){print "$o: $histogram{$o}\n"}'
> > KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 1
> > Returned entries: 31: 9998
> > Returned entries: 54: 1
> >
> 
> Please run the attached program (which works for me, btw). 
> 
> -- 
> error compiling committee.c: too many arguments to function
> 

> #include 
> #include 
> #include 
> #include 
> #include 
> 
> int main(void)
> {
> struct

Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread Avi Kivity
On 11/17/2011 06:29 PM, David Evensky wrote:
> Avi,
>
> evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 
> 0x01 ./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys 
> %histogram){print "$o: $histogram{$o}\n"}'
> KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 3
> Returned entries: 31: 9995
> Returned entries: 32: 1
> Returned entries: 64: 1
> evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 
> 0x02 ./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys 
> %histogram){print "$o: $histogram{$o}\n"}'
> KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 1
> Returned entries: 31: 
> evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 
> 0x03 ./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys 
> %histogram){print "$o: $histogram{$o}\n"}'
> KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 3
> Returned entries: 31: 9995
> Returned entries: 57: 1
> Returned entries: 58: 1
> evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 
> 0x04 ./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys 
> %histogram){print "$o: $histogram{$o}\n"}'
> Returned entries: 31: 1
> evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 
> 0x08 ./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys 
> %histogram){print "$o: $histogram{$o}\n"}'
> KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 1
> Returned entries: 31: 9998
> Returned entries: 54: 1
>

Please run the attached program (which works for me, btw). 

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

#include 
#include 
#include 
#include 
#include 

int main(void)
{
struct kvm_cpuid2 *cpuid;
int kvm, r = 0, i, j;

for (i = 0; i < 100; ++i) {
kvm = open("/dev/kvm", O_RDWR);
cpuid = malloc(sizeof(*cpuid) + sizeof(struct kvm_cpuid_entry2) * 100);
cpuid->nent = 100;

r = ioctl(kvm, KVM_GET_SUPPORTED_CPUID, cpuid);
if (r)
printf("KVM_GET_SUPPORTED_CPUID returned %d with errno %d\n", r, errno);
else if (cpuid->nent > 31) {
printf("Returned entries: %d\n", cpuid->nent);
for (j = 0; j < cpuid->nent; ++j) {
struct kvm_cpuid_entry2 *e = &cpuid->entries[j];

printf("func %08x ind %08x flags %08x -> %08x %08x %08x %08x\n",
   e->function, e->index, e->flags,
   e->eax, e->ebx, e->ecx, e->edx);
	}
return 1;
}

	free(cpuid);
	close(kvm);
}

return 0;
}


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread David Evensky

Avi,

evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 0x01 
./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys %histogram){print 
"$o: $histogram{$o}\n"}'
KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 3
Returned entries: 31: 9995
Returned entries: 32: 1
Returned entries: 64: 1
evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 0x02 
./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys %histogram){print 
"$o: $histogram{$o}\n"}'
KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 1
Returned entries: 31: 
evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 0x03 
./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys %histogram){print 
"$o: $histogram{$o}\n"}'
KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 3
Returned entries: 31: 9995
Returned entries: 57: 1
Returned entries: 58: 1
evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 0x04 
./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys %histogram){print 
"$o: $histogram{$o}\n"}'
Returned entries: 31: 1
evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..1){ $o=`taskset 0x08 
./4sasha`; chomp($o); $histogram{$o}++}; for $o (sort keys %histogram){print 
"$o: $histogram{$o}\n"}'
KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 1
Returned entries: 31: 9998
Returned entries: 54: 1

\dae

On Thu, Nov 17, 2011 at 06:20:33PM +0200, Avi Kivity wrote:
> On 11/17/2011 06:12 PM, David Evensky wrote:
> >
> > evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..10){ 
> > $o=`./4sasha`; chomp($o); $histogram{$o}++}; for $o (keys %histogram){print 
> > "$o: $histogram{$o}\n"}'
> > Returned entries: 31: 99987
> > Returned entries: 56: 1
> > KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 8
> > Returned entries: 37: 4
> >
> >
> 
> So it seems to be cpu migration related.  But there's a get_cpu() in
> do_cpuid_ent().
> 
> What happens if you change `./4sasha` to `taskset 1 ./4sasha`? or 2 4 8
> 10 20 etc?
> 
> -- 
> error compiling committee.c: too many arguments to function
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread Avi Kivity
On 11/17/2011 06:12 PM, David Evensky wrote:
>
> evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..10){ $o=`./4sasha`; 
> chomp($o); $histogram{$o}++}; for $o (keys %histogram){print "$o: 
> $histogram{$o}\n"}'
> Returned entries: 31: 99987
> Returned entries: 56: 1
> KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 8
> Returned entries: 37: 4
>
>

So it seems to be cpu migration related.  But there's a get_cpu() in
do_cpuid_ent().

What happens if you change `./4sasha` to `taskset 1 ./4sasha`? or 2 4 8
10 20 etc?

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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread Sasha Levin
On Thu, 2011-11-17 at 08:12 -0800, David Evensky wrote:
> 
> evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..10){ $o=`./4sasha`; 
> chomp($o); $histogram{$o}++}; for $o (keys %histogram){print "$o: 
> $histogram{$o}\n"}'
> Returned entries: 31: 99987
> Returned entries: 56: 1
> KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 8
> Returned entries: 37: 4

Awesome, thanks!

So it's a kernel thing.



--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread David Evensky


evensky@waltz:~/megatux/vmatic$ perl -e 'for $cnt (1..10){ $o=`./4sasha`; 
chomp($o); $histogram{$o}++}; for $o (keys %histogram){print "$o: 
$histogram{$o}\n"}'
Returned entries: 31: 99987
Returned entries: 56: 1
KVM_GET_SUPPORTED_CPUID returned -1 with errno 7: 8
Returned entries: 37: 4

\dae

On Thu, Nov 17, 2011 at 05:53:50PM +0200, Avi Kivity wrote:
> On 11/17/2011 05:52 PM, Sasha Levin wrote:
> > On Thu, 2011-11-17 at 07:50 -0800, David Evensky wrote:
> > > It prints 'Returned entries: 31'
> > > \dae
> >
> > Thats the OK scenario, could you run it several times to see if you can
> > trigger it to print something else?
> 
> Maybe with 'taskset' to get it to run on different cpus?
> 
> In a loop please.
> 
> -- 
> error compiling committee.c: too many arguments to function
> 

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread David Evensky
On Thu, Nov 17, 2011 at 08:07:35AM +0200, Sasha Levin wrote:
> On Wed, 2011-11-16 at 16:42 -0800, David Evensky wrote:
> > 
> > ...
> This should be '-n mode=tap,guest_mac=00:11:11:11:11:11'
> ...
Thanks!

> > 
> > Also, when I start the guest I sometimes get the following error message:
> > 
> >   # kvm run -k /path/to/bzImage-3.0.8 -m 256 -c 1 --name guest-15757
> > KVM_GET_SUPPORTED_CPUID failed: Argument list too long
> 
> Heh, we were talking about it couple of weeks ago, but since I couldn't
> reproduce it here (it was happening to me before, but now it's gone) the
> discussing died.
> 
> Could you please provide some statistics on how often it happens to you?
> Also, can you try wrapping the ioctl with a 'while (1)' (theres only 1
> ioctl call to KVM_GET_SUPPORTED_CPUID) and see if it would happen at
> some point?

Last night I was getting it > 10%; but now that the sun has risen, of
course I can't produce it with 10 tries with 3 sets of args that I was
using. I did upgrade a few packages last night, but nothing that
should affect this.

> Thanks!
> 
> > I haven't seen that before.
> > 
> > Thanks,
> > \dae
> > ...

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread Avi Kivity
On 11/17/2011 05:52 PM, Sasha Levin wrote:
> On Thu, 2011-11-17 at 07:50 -0800, David Evensky wrote:
> > It prints 'Returned entries: 31'
> > \dae
>
> Thats the OK scenario, could you run it several times to see if you can
> trigger it to print something else?

Maybe with 'taskset' to get it to run on different cpus?

In a loop please.

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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread Sasha Levin
On Thu, 2011-11-17 at 07:50 -0800, David Evensky wrote:
> It prints 'Returned entries: 31'
> \dae

Thats the OK scenario, could you run it several times to see if you can
trigger it to print something else?

-- 

Sasha.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread David Evensky

It prints 'Returned entries: 31'
\dae

On Thu, Nov 17, 2011 at 05:43:49PM +0200, Sasha Levin wrote:
> On Thu, 2011-11-17 at 07:38 -0800, David Evensky wrote:
> > On Thu, Nov 17, 2011 at 08:56:38AM +0200, Sasha Levin wrote:
> > > On Thu, 2011-11-17 at 08:53 +0200, Pekka Enberg wrote:
> > > > On Thu, Nov 17, 2011 at 8:07 AM, Sasha Levin  
> > > > wrote:
> > > > >> Also, when I start the guest I sometimes get the following error 
> > > > >> message:
> > > 
> > > 
> > > David, which host kernel do you use?
> > 
> > I'm using the kernel that ships with Debian Sid, which I last booted as 
> > 3.0.0-2-amd64.
> > My guest kernel is a 32bit kernel built from kernel.org's linux-3.0.8.
> 
> Hm... This should be new enough...
> 
> Could you please try compiling and running the code below several times
> and see if you get an error message? This should help us understand if
> it's a usermode or a kernel issue.
> 
> Thanks!
> 
>  cut here---
> 
> #include 
> #include 
> #include 
> #include 
> #include 
> 
> int main(void)
> {
>   struct kvm_cpuid2 *cpuid;
>   int kvm, r = 0;
> 
>   kvm = open("/dev/kvm", O_RDWR);
>   cpuid = malloc(sizeof(*cpuid) + sizeof(struct kvm_cpuid_entry2) * 100);
>   cpuid->nent = 100;
> 
>   r = ioctl(kvm, KVM_GET_SUPPORTED_CPUID, cpuid);
>   if (r)
>   printf("KVM_GET_SUPPORTED_CPUID returned %d with errno %d\n", 
> r, errno);
>   else
>   printf("Returned entries: %d\n", cpuid->nent);
> 
>   free(cpuid);
>   close(kvm);
> 
>   return 0;
> }
> 
> -- 
> 
> Sasha.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread Sasha Levin
On Thu, 2011-11-17 at 07:38 -0800, David Evensky wrote:
> On Thu, Nov 17, 2011 at 08:56:38AM +0200, Sasha Levin wrote:
> > On Thu, 2011-11-17 at 08:53 +0200, Pekka Enberg wrote:
> > > On Thu, Nov 17, 2011 at 8:07 AM, Sasha Levin  
> > > wrote:
> > > >> Also, when I start the guest I sometimes get the following error 
> > > >> message:
> > 
> > 
> > David, which host kernel do you use?
> 
> I'm using the kernel that ships with Debian Sid, which I last booted as 
> 3.0.0-2-amd64.
> My guest kernel is a 32bit kernel built from kernel.org's linux-3.0.8.

Hm... This should be new enough...

Could you please try compiling and running the code below several times
and see if you get an error message? This should help us understand if
it's a usermode or a kernel issue.

Thanks!

 cut here---

#include 
#include 
#include 
#include 
#include 

int main(void)
{
struct kvm_cpuid2 *cpuid;
int kvm, r = 0;

kvm = open("/dev/kvm", O_RDWR);
cpuid = malloc(sizeof(*cpuid) + sizeof(struct kvm_cpuid_entry2) * 100);
cpuid->nent = 100;

r = ioctl(kvm, KVM_GET_SUPPORTED_CPUID, cpuid);
if (r)
printf("KVM_GET_SUPPORTED_CPUID returned %d with errno %d\n", 
r, errno);
else
printf("Returned entries: %d\n", cpuid->nent);

free(cpuid);
close(kvm);

return 0;
}

-- 

Sasha.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread David Evensky
On Thu, Nov 17, 2011 at 08:56:38AM +0200, Sasha Levin wrote:
> On Thu, 2011-11-17 at 08:53 +0200, Pekka Enberg wrote:
> > On Thu, Nov 17, 2011 at 8:07 AM, Sasha Levin  
> > wrote:
> > >> Also, when I start the guest I sometimes get the following error message:
> 
> 
> David, which host kernel do you use?

I'm using the kernel that ships with Debian Sid, which I last booted as 
3.0.0-2-amd64.
My guest kernel is a 32bit kernel built from kernel.org's linux-3.0.8.

> 
> -- 
> 
> Sasha.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread Sasha Levin
On Thu, 2011-11-17 at 11:04 +0200, Avi Kivity wrote:
> On 11/17/2011 08:56 AM, Sasha Levin wrote:
> > On Thu, 2011-11-17 at 08:53 +0200, Pekka Enberg wrote:
> > > On Thu, Nov 17, 2011 at 8:07 AM, Sasha Levin  
> > > wrote:
> > > >> Also, when I start the guest I sometimes get the following error 
> > > >> message:
> > > >>
> > > >>   # kvm run -k /path/to/bzImage-3.0.8 -m 256 -c 1 --name guest-15757
> > > >> KVM_GET_SUPPORTED_CPUID failed: Argument list too long
> > > >
> > > > Heh, we were talking about it couple of weeks ago, but since I couldn't
> > > > reproduce it here (it was happening to me before, but now it's gone) the
> > > > discussing died.
> > > >
> > > > Could you please provide some statistics on how often it happens to you?
> > > > Also, can you try wrapping the ioctl with a 'while (1)' (theres only 1
> > > > ioctl call to KVM_GET_SUPPORTED_CPUID) and see if it would happen at
> > > > some point?
> > > 
> > > I'm no longer able to reproduce it here with 3.2-rc1. We could just
> > > try the easy way out and do what Qemu does and retry for E2BIG...
> >
> > Let's not do that :)
> 
> Right :)
> 
> > It'll just get uncovered again when someone decides to use
> > KVM_GET_SUPPORTED_CPUID somewhere else (like in Avi's cpuid patch).
> >
> > I'll try going back to <3.0 later today and see if it comes back.
> 
> It might be worthwhile to write a small program that only does
> KVM_GET_SUPPORTED_CPUID, to rule out issues in userspace (though there
> isn't much of a window for such issues).

Heh... It actually discovered a different (minor) issue there, and a
documentation error as well.

I'll send patches in a bit.

-- 

Sasha.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-17 Thread Avi Kivity
On 11/17/2011 08:56 AM, Sasha Levin wrote:
> On Thu, 2011-11-17 at 08:53 +0200, Pekka Enberg wrote:
> > On Thu, Nov 17, 2011 at 8:07 AM, Sasha Levin  
> > wrote:
> > >> Also, when I start the guest I sometimes get the following error message:
> > >>
> > >>   # kvm run -k /path/to/bzImage-3.0.8 -m 256 -c 1 --name guest-15757
> > >> KVM_GET_SUPPORTED_CPUID failed: Argument list too long
> > >
> > > Heh, we were talking about it couple of weeks ago, but since I couldn't
> > > reproduce it here (it was happening to me before, but now it's gone) the
> > > discussing died.
> > >
> > > Could you please provide some statistics on how often it happens to you?
> > > Also, can you try wrapping the ioctl with a 'while (1)' (theres only 1
> > > ioctl call to KVM_GET_SUPPORTED_CPUID) and see if it would happen at
> > > some point?
> > 
> > I'm no longer able to reproduce it here with 3.2-rc1. We could just
> > try the easy way out and do what Qemu does and retry for E2BIG...
>
> Let's not do that :)

Right :)

> It'll just get uncovered again when someone decides to use
> KVM_GET_SUPPORTED_CPUID somewhere else (like in Avi's cpuid patch).
>
> I'll try going back to <3.0 later today and see if it comes back.

It might be worthwhile to write a small program that only does
KVM_GET_SUPPORTED_CPUID, to rule out issues in userspace (though there
isn't much of a window for such issues).


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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-16 Thread Sasha Levin
On Thu, 2011-11-17 at 08:53 +0200, Pekka Enberg wrote:
> On Thu, Nov 17, 2011 at 8:07 AM, Sasha Levin  wrote:
> >> Also, when I start the guest I sometimes get the following error message:
> >>
> >>   # kvm run -k /path/to/bzImage-3.0.8 -m 256 -c 1 --name guest-15757
> >> KVM_GET_SUPPORTED_CPUID failed: Argument list too long
> >
> > Heh, we were talking about it couple of weeks ago, but since I couldn't
> > reproduce it here (it was happening to me before, but now it's gone) the
> > discussing died.
> >
> > Could you please provide some statistics on how often it happens to you?
> > Also, can you try wrapping the ioctl with a 'while (1)' (theres only 1
> > ioctl call to KVM_GET_SUPPORTED_CPUID) and see if it would happen at
> > some point?
> 
> I'm no longer able to reproduce it here with 3.2-rc1. We could just
> try the easy way out and do what Qemu does and retry for E2BIG...

Let's not do that :)

It'll just get uncovered again when someone decides to use
KVM_GET_SUPPORTED_CPUID somewhere else (like in Avi's cpuid patch).

I'll try going back to <3.0 later today and see if it comes back.

David, which host kernel do you use?

-- 

Sasha.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-16 Thread Pekka Enberg
On Thu, Nov 17, 2011 at 8:07 AM, Sasha Levin  wrote:
>> Also, when I start the guest I sometimes get the following error message:
>>
>>   # kvm run -k /path/to/bzImage-3.0.8 -m 256 -c 1 --name guest-15757
>> KVM_GET_SUPPORTED_CPUID failed: Argument list too long
>
> Heh, we were talking about it couple of weeks ago, but since I couldn't
> reproduce it here (it was happening to me before, but now it's gone) the
> discussing died.
>
> Could you please provide some statistics on how often it happens to you?
> Also, can you try wrapping the ioctl with a 'while (1)' (theres only 1
> ioctl call to KVM_GET_SUPPORTED_CPUID) and see if it would happen at
> some point?

I'm no longer able to reproduce it here with 3.2-rc1. We could just
try the easy way out and do what Qemu does and retry for E2BIG...
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-16 Thread Sasha Levin
On Wed, 2011-11-16 at 16:42 -0800, David Evensky wrote:
> 
> There was a patch (quoted below) that changed networking at the end of 
> September. When I
> try to set the guest_mac from the usage in the patch and an admittaly too
> brief a look at the code, the guest's mac address isn't being set. I'm using:
> 
> sudo /path/to/linux-kvm/tools/kvm/kvm run -c 1 -m 256 -k 
> /path/to/bzImage-3.0.8 \
>-i /path/to/initramfs-host.img --console serial -p ' console=ttyS0  ' -n 
> tap,guest_mac=00:11:11:11:11:11
> 
> In the guest I get:
> 
> # ifconfig eth0
> eth0  Link encap:Ethernet  HWaddr 02:15:15:15:15:15  
>   inet addr:192.168.122.237  Bcast:192.168.122.255  Mask:255.255.255.0
>   UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>   RX packets:24 errors:0 dropped:2 overruns:0 frame:0
>   TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
>   collisions:0 txqueuelen:1000 
>   RX bytes:1874 (1.8 KiB)  TX bytes:656 (656.0 B)
> 
> which is the default.

This should be '-n mode=tap,guest_mac=00:11:11:11:11:11'

It will set the right mac:

sh-2.05b# ifconfig
eth0  Link encap:Ethernet  HWaddr 00:11:11:11:11:11
[...]

> 
> Also, when I start the guest I sometimes get the following error message:
> 
>   # kvm run -k /path/to/bzImage-3.0.8 -m 256 -c 1 --name guest-15757
> KVM_GET_SUPPORTED_CPUID failed: Argument list too long

Heh, we were talking about it couple of weeks ago, but since I couldn't
reproduce it here (it was happening to me before, but now it's gone) the
discussing died.

Could you please provide some statistics on how often it happens to you?
Also, can you try wrapping the ioctl with a 'while (1)' (theres only 1
ioctl call to KVM_GET_SUPPORTED_CPUID) and see if it would happen at
some point?

Thanks!

> I haven't seen that before.
> 
> Thanks,
> \dae
> 
> On Sat, Sep 24, 2011 at 12:17:51PM +0300, Sasha Levin wrote:
> > This patch adds support for multiple network devices. The command line 
> > syntax
> > changes to the following:
> > 
> > --network/-n [mode=[tap/user/none]] [guest_ip=[guest ip]] [host_ip=
> > [host_ip]] [guest_mac=[guest_mac]] [script=[script]]
> > 
> > Each of the parameters is optional, and the config defaults to a TAP based
> > networking with a random MAC.
> > ...
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 

Sasha.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed.

2011-11-16 Thread David Evensky


There was a patch (quoted below) that changed networking at the end of 
September. When I
try to set the guest_mac from the usage in the patch and an admittaly too
brief a look at the code, the guest's mac address isn't being set. I'm using:

sudo /path/to/linux-kvm/tools/kvm/kvm run -c 1 -m 256 -k /path/to/bzImage-3.0.8 
\
   -i /path/to/initramfs-host.img --console serial -p ' console=ttyS0  ' -n 
tap,guest_mac=00:11:11:11:11:11

In the guest I get:

# ifconfig eth0
eth0  Link encap:Ethernet  HWaddr 02:15:15:15:15:15  
  inet addr:192.168.122.237  Bcast:192.168.122.255  Mask:255.255.255.0
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:24 errors:0 dropped:2 overruns:0 frame:0
  TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000 
  RX bytes:1874 (1.8 KiB)  TX bytes:656 (656.0 B)

which is the default.

Also, when I start the guest I sometimes get the following error message:

  # kvm run -k /path/to/bzImage-3.0.8 -m 256 -c 1 --name guest-15757
KVM_GET_SUPPORTED_CPUID failed: Argument list too long

I haven't seen that before.

Thanks,
\dae

On Sat, Sep 24, 2011 at 12:17:51PM +0300, Sasha Levin wrote:
> This patch adds support for multiple network devices. The command line syntax
> changes to the following:
> 
>   --network/-n [mode=[tap/user/none]] [guest_ip=[guest ip]] [host_ip=
> [host_ip]] [guest_mac=[guest_mac]] [script=[script]]
> 
> Each of the parameters is optional, and the config defaults to a TAP based
> networking with a random MAC.
> ...

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html