Re: [kvm-devel] [ANNOUNCE] kvm-18 release

2007-03-26 Thread Avi Kivity
Michael Riepe wrote:
 Avi Kivity wrote:
   
 This is mostly to fix the 32-bit Linux guest breakage in kvm-17.
 

 Well, almost. Knoppix 5.0 and 5.2 work now, but 5.1.1 still hangs with a
 black framebuffer (no penguin logo) and a load of 100%.
   

Do you have msr complaints in dmesg? Can you try booting the guest with 
nmi_watchdog=0?


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Step by step instructions for KVM networking

2007-03-26 Thread Steve Kwee
Daniel Qarras [EMAIL PROTECTED] writes:

 
 Hi Avi, all,
 
  I tried it now, it's simple and it even works:
  
  1. Add BRIDGE=sw0 to ifcfg-eth0
  2. Create a new ifcfg-sw0 that has TYPE=Bridge, and any dhcp/ip 
  configuration you previously had in ifcfg-eth0
 
 I've now managed to get several KVM hosts working in a local intranet
 based on your help, thanks! Below are finally step-by-step instructions
 that work at least on Fedora Core 6, running other FC6 virtual hosts:
 
:
:
Hi all,

some more hints that would have saved me a lot of time:

If your eth0 is a wireless device, it might be a good idea to switch to another
device to try this. Many wireless devices have problems with bridged networking.
I switched to my wired network after a lot of testing and had success.

If you do not provide a mac addr on the commandline of qemu / kvm a static
macaddr will be used, giving you problems starting with vm no2.
In the guest an interface eth0 is instantiated with this fixed macaddr
which can be configured as usual
If you provide a macaddr the interface is instantiated as eth1 instead of eth0.
I do not understand why, maybe someone can acknoledge this fact.
Anyway thinks worked when I switched to eth1 in my hosts.

An article that helped me a lot was:
http://kidsquid.com/cgi-bin/moin.cgi/QemuNetwork






-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] KVM breaks CPU hotplug

2007-03-26 Thread Shaohua Li
When testing CPU hotplug, I found cpu can't be onlined with kvm enabled
sometimes. The reason is smp_call_function_single is a nop if the thread
is running on the target cpu. I think CPU_ONLINE case doesn't require
the fix as the online CPU isn't plugged into sheduler yet.

Signed-off-by: Shaohua Li [EMAIL PROTECTED]

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index dc7a8c7..806a931 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2360,6 +2360,7 @@ static int kvm_cpu_hotplug(struct notifier_block 
*notifier, unsigned long val,
   void *v)
 {
int cpu = (long)v;
+   int this_cpu;
 
switch (val) {
case CPU_DOWN_PREPARE:
@@ -2367,8 +2368,13 @@ static int kvm_cpu_hotplug(struct notifier_block 
*notifier, unsigned long val,
printk(KERN_INFO kvm: disabling virtualization on CPU%d\n,
   cpu);
decache_vcpus_on_cpu(cpu);
-   smp_call_function_single(cpu, kvm_arch_ops-hardware_disable,
-NULL, 0, 1);
+   this_cpu = get_cpu();
+   if (this_cpu == cpu)
+   kvm_arch_ops-hardware_disable(NULL);
+   else
+   smp_call_function_single(cpu,
+   kvm_arch_ops-hardware_disable,  NULL, 0, 1);
+   put_cpu();
break;
case CPU_ONLINE:
printk(KERN_INFO kvm: enabling virtualization on CPU%d\n,

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] RE: ia32 emulation on Intel CPU

2007-03-26 Thread Avi Kivity
Kiselev, Sergey wrote:
 Following patch adds back this functionality:
  
 Signed-off-by: Sergey Kiselev [EMAIL PROTECTED]
   

Applied, thanks.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] KVM-18 Error compilation

2007-03-26 Thread BELLEGUEULLE Damien

./configure --prefix=/usr --qemu-cc=/usr/bin/gcc-3.3.6

er -I. -I.. -I/home/bellegueulle/kvm-18/qemu/target-i386 
-I/home/bellegueulle/kvm-18/qemu -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -D__user= -I/home/bellegueulle/kvm-18/qemu/fpu -DHAS_AUDIO 
-I/home/bellegueulle/kvm-18/qemu/slirp  -c -o qemu-kvm.o 
/home/bellegueulle/kvm-18/qemu/qemu-kvm.c
/home/bellegueulle/kvm-18/qemu/qemu-kvm.c: In function `kvm_cpu_exec':
/home/bellegueulle/kvm-18/qemu/qemu-kvm.c:447: warning: implicit declaration of 
function `exit'
/home/bellegueulle/kvm-18/qemu/qemu-kvm.c: In function `kvm_shutdown':
/home/bellegueulle/kvm-18/qemu/qemu-kvm.c:599: warning: implicit declaration of 
function `qemu_system_reset_request'
/home/bellegueulle/kvm-18/qemu/qemu-kvm.c: In function `kvm_qemu_init_env':
/home/bellegueulle/kvm-18/qemu/qemu-kvm.c:732: error: unable to find a register 
to spill in class `SIREG'
/home/bellegueulle/kvm-18/qemu/qemu-kvm.c:732: error: this is the insn:
(insn:HI 37 35 38 0 0x40687c34 (parallel [
(set (reg:SI 1 edx [67])
(const_int 0 [0x0]))
(set (reg/f:SI 0 eax [64])
(plus:SI (ashift:SI (reg:SI 2 ecx [66])
(const_int 2 [0x2]))
(reg/f:SI 0 eax [64])))
(set (reg/f:SI 2 ecx [orig:65 cenv ] [65])
(plus:SI (ashift:SI (reg:SI 2 ecx [66])
(const_int 2 [0x2]))
(reg/v/f:SI 59 [ cenv ])))
(set (mem/s:BLK (reg/f:SI 0 eax [64]) [0 copy+0 S25712 A128])
(mem/s:BLK (reg/v/f:SI 59 [ cenv ]) [0 S25712 A128]))
(use (reg:SI 2 ecx [66]))
(use (reg:SI 19 dirflag))
]) 467 {rep_movsi} (insn_list 3 (insn_list 32 (insn_list 34 (insn_list 
35 (nil)
(expr_list:REG_DEAD (reg:SI 19 dirflag)
(expr_list:REG_DEAD (reg:SI 2 ecx [66])
(expr_list:REG_UNUSED (reg/f:SI 2 ecx [orig:65 cenv ] [65])
(expr_list:REG_UNUSED (reg/f:SI 0 eax [64])
(expr_list:REG_UNUSED (reg:SI 1 edx [67])
(nil)))
/home/bellegueulle/kvm-18/qemu/qemu-kvm.c:732: confused by earlier errors, 
bailing out
make[2]: *** [qemu-kvm.o] Erreur 1
make[2]: quittant le répertoire « /home/bellegueulle/kvm-18/qemu/i386-softmmu »
make[1]: *** [subdir-i386-softmmu] Erreur 2
make[1]: quittant le répertoire « /home/bellegueulle/kvm-18/qemu »
make: *** [qemu] Erreur 2


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] KVM-18 Error compilation

2007-03-26 Thread Avi Kivity
BELLEGUEULLE Damien wrote:

 ./configure --prefix=/usr --qemu-cc=/usr/bin/gcc-3.3.6

 er -I. -I.. -I/home/bellegueulle/kvm-18/qemu/target-i386 
 -I/home/bellegueulle/kvm-18/qemu -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
 -D_LARGEFILE_SOURCE -D__user= -I/home/bellegueulle/kvm-18/qemu/fpu 
 -DHAS_AUDIO -I/home/bellegueulle/kvm-18/qemu/slirp  -c -o qemu-kvm.o


This is on i386, right?

The command line needs to have -fomit-frame-pointer.  The 'er' at the 
beginning seems to indicate that this is so, can you confirm?

FWIW, i386 builds ok here with gcc 3.4.6.

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


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] KVM breaks CPU hotplug

2007-03-26 Thread Avi Kivity
Avi Kivity wrote:
 Shaohua Li wrote:
 When testing CPU hotplug, I found cpu can't be onlined with kvm enabled
 sometimes. The reason is smp_call_function_single is a nop if the thread
 is running on the target cpu. I think CPU_ONLINE case doesn't require
 the fix as the online CPU isn't plugged into sheduler yet.

   

 I think this is not enough, because:

 - this path is preemptible code, so the test (this_cpu == cpu) can run 
 one on cpu and execute later code on another
 +this_cpu = get_cpu();

...

 +put_cpu();

Sorry, I see you handled that.  But the other argument (scheduling vcpus 
later on same cpu) still holds, I think.

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


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-18 release

2007-03-26 Thread Michael Riepe
Hi!

Avi Kivity wrote:
 Michael Riepe wrote:
 
 Avi Kivity wrote:
  

 This is mostly to fix the 32-bit Linux guest breakage in kvm-17.
 


 Well, almost. Knoppix 5.0 and 5.2 work now, but 5.1.1 still hangs with a
 black framebuffer (no penguin logo) and a load of 100%.
   
 
 
 Do you have msr complaints in dmesg? Can you try booting the guest with
 nmi_watchdog=0?

Yep. After a while, I get:

kvm: emulating exchange as write
kvm: unhandled wrmsr: 0xc1
inject_general_protection: rip 0xc01154d0

With nmi_watchdog=0 on the kernel command line, the system boots and all
the messages are gone. :-)

-- 
Michael Tired Riepe [EMAIL PROTECTED]
X-Tired: Each morning I get up I die a little

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] portability layer?

2007-03-26 Thread Hollis Blanchard
Hi Avi, I was wondering what you think is the right abstraction layer to
target for porting KVM to non-x86 architectures? To me it looks like
libkvm is the answer.

The kernel/userland interface is heavily x86-specific, including things
like struct kvm_run. So it looks like the higher-level API of
kvm_init(), kvm_create(), etc would be the right cut? struct
kvm_callbacks is even reasonably portable, especially if cpuid is hidden
behind an arch callback.

-Hollis


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] KVM breaks CPU hotplug

2007-03-26 Thread Li, Shaohua


-Original Message-
From: Avi Kivity [mailto:[EMAIL PROTECTED]
Sent: Monday, March 26, 2007 6:58 PM
To: Li, Shaohua
Cc: kvm-devel; Andrew Morton
Subject: Re: [PATCH] KVM breaks CPU hotplug

Avi Kivity wrote:
 Shaohua Li wrote:
 When testing CPU hotplug, I found cpu can't be onlined with kvm
enabled
 sometimes. The reason is smp_call_function_single is a nop if the
thread
 is running on the target cpu. I think CPU_ONLINE case doesn't
require
 the fix as the online CPU isn't plugged into sheduler yet.



 I think this is not enough, because:

 - this path is preemptible code, so the test (this_cpu == cpu) can
run
 one on cpu and execute later code on another
 +this_cpu = get_cpu();

...

 +put_cpu();

Sorry, I see you handled that.  But the other argument (scheduling
vcpus
later on same cpu) still holds, I think.
How about take cpu hotplug lock for kvm_vm_ioctl and kvm_vcpu_ioctl?

Thanks,
Shaohua

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] kvm-18 breaks Cisco VPN on WinXP SP1

2007-03-26 Thread Leslie Mann
kvm-18 has broken use of Cisco VPN client on WinXP SP1 running on a FC6 
2.6.19-1.2911 client, Intel Core Duo system.  I have been running 
successfully from kvm-11 thru kvm-17 without issue.  After upgrading to 
kvm-18 any attempts to connect the VPN client result in an unresponsive 
X11 session (still can exit with ctrl-alt-bksp).  Reverting to the 
kvm-17 modules works fine.

Any suggestions on how to troubleshoot or fix?

Les

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] KVM breaks CPU hotplug

2007-03-26 Thread Avi Kivity
Li, Shaohua wrote:
 How about take cpu hotplug lock for kvm_vm_ioctl and kvm_vcpu_ioctl?

   

That will serialize calls to these functions, and we want parallel 
execution of kvm_vcpu_ioctl().  We could make it a reader-writer lock, 
but...

I think that adding a

raw_notifier_call_chain(cpu_chain, CPU_DYING, NULL);

in take_cpu_down() solve the problem.  The semantics of that would be 
that the chain is executed on the dying cpu, without being allowed to 
fail, and requiring atomic execution.  I don't know whether that would 
acceptable to the cpu hotplug maintainers.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel