[PATCH 1/2] kvm tools: remove unused options

2011-08-09 Thread walimis
kvm "--help" and "--version" are not implemented, so remove them to avoid ambiguous. Signed-off-by: walimis --- tools/kvm/builtin-help.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/builtin-help.c b/tools/kvm/builtin-help.c index e89

[PATCH 1/2] kvm tools: remove unused options

2011-08-09 Thread walimis
kvm "--help" and "--version" are not implemented, so remove them to avoid ambiguous. Signed-off-by: Liming Wang --- tools/kvm/builtin-help.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/builtin-help.c b/tools/kvm/builtin-help.c index e89cd5c..e70044a 100644

Re: [PATCH 2/2] kvm tools: handle failure of command

2011-08-09 Thread walimis
doesn't prompt anything. BTW, do you always login as "root" user? walimis > >> --- >> 爐ools/kvm/kvm-cmd.c | ? 11 ++- >> ?1 files changed, 10 insertions(+), 1 deletions(-) >> >> diff --git a/tools/kvm/kvm-cmd.c b/tools/kvm/kvm-cm

Re: [PATCH 2/2] kvm tools: handle failure of command

2011-08-09 Thread walimis
On Wed, Aug 10, 2011 at 08:30:19AM +0300, Pekka Enberg wrote: >On 8/10/11 8:03 AM, walimis wrote: >>On Wed, Aug 10, 2011 at 08:02:01AM +0300, Pekka Enberg wrote: >>>On Wed, Aug 10, 2011 at 5:44 AM, Liming Wang wrote: >>>>handle failure of calling command fun

Re: [PATCH 2/2] kvm tools: handle failure of command

2011-08-09 Thread walimis
On Wed, Aug 10, 2011 at 08:53:53AM +0300, Pekka Enberg wrote: >On Wed, Aug 10, 2011 at 8:33 AM, walimis wrote: >>>>Yes. Because I'm using ubuntu and if I don't use sudo to execute >>>>"kvm pause", pause command can't work and doesn't prom

Re: [PATCH 2/2] kvm tools: handle failure of command

2011-08-09 Thread walimis
On Wed, Aug 10, 2011 at 09:35:12AM +0300, Pekka Enberg wrote: >On Wed, Aug 10, 2011 at 9:12 AM, walimis wrote: >> On Wed, Aug 10, 2011 at 08:53:53AM +0300, Pekka Enberg wrote: >>>On Wed, Aug 10, 2011 at 8:33 AM, walimis wrote: >>>>>>Yes. Because I'

Re: [PATCH] kvm tools: Sanitize output characters in serial console

2011-08-10 Thread walimis
t; >>>>> @@ -57,8 +58,10 @@ int term_putc(int who, char *addr, int cnt) >>>>> if (who != active_console) >>>>> return -1; >>>>> >>>>> -while (cnt--) >>>>> -fprintf(stdout, "%c

Re: [PATCH] kvm tools: Print only serial output to the terminal

2011-08-10 Thread walimis
>>to print and by printing it we wrote junk to the users terminal. >> >>Signed-off-by: Sasha Levin > >This doesn't seem to work for me. As soon as we switch to userspace, >I don't get any output from serial console. It works for me. walimis > >>--

Re: [PATCH] kvm tools: Print only serial output to the terminal

2011-08-10 Thread walimis
:/sbin/getty -L ttyS0 9600 vt100 >> >> in guest's /etc/inittab. > >No I didn't but that's not really a solution to the problem. We can't >expect people to configure guest userspace for something as basic as >console. My suggestion is that we don't need t

Re: [PATCH 2/3] kvm tools: check negative value of num_pages

2011-08-10 Thread walimis
dev.config.num_pages -= 256; >> +if ((s32)bdev.config.num_pages < 0){ > >imo it's worth doing this check before the decrement instead of casting >to signed here. You mean that check whether num_pages less than 256 or equal to 0? > >you also need to wrap the 'if

Re: [PATCH 1/3] kvm tools: add signal placeholder to avoid balloon crash

2011-08-11 Thread walimis
> +/* signal placeholder if not enable balloon */ >> +signal(SIGKVMADDMEM, handle_empty); > >You can just do this: > signal(SIGKVMADDMEM, SIG_IGN); > >For both, and avoid the empty handler. good. New patch will be sent. walimis > >> +signal(SIGKVM

Re: [PATCH] kvm tools: Use correct size for VESA memory bar

2011-08-11 Thread walimis
;+ if (!(dev->mcr & (UART_MCR_LOOP | UART_MCR_OUT2))) I assume it was your mistake to include this part? walimis > term_putc(CONSOLE_8250, addr, size * count); > > dev->iir= UART_IIR_NO_INT; >

Re: [PATCH 1/3] kvm tools: Make keyboard termination go through regular termination path

2011-08-11 Thread walimis
>+ int i; >+ >+ for (i = 0; i < KVM_NR_CPUS; i++) >+ if (kvm_cpus[i]) >+ pthread_kill(kvm_cpus[i]->thread, SIGKVMEXIT); if so, can we remove "pthread_kill(pthread_self(), SIGKVMEXIT)" from kvm_cpu_signal_handler?

Re: [PATCH 2/3] kvm tools: check negative value of num_pages

2011-08-11 Thread walimis
t; >I'll fix it up myself. You can use the scripts/checkpatch script to >check for this kind of trivial coding style issues before sending a >patch out. OK, I will take note next time. walimis > >> bdev.config.num_pages -= 256; >>+ } >> >>

Re: [PATCH] kvm tools: Fix IRQ mapping

2011-08-11 Thread walimis
blem for you? > >Yup. But gpm still can not work, it complains can not open /dev/psaux. Do you enable mouse/ps2 option in the kernel? walimis > > >-- >Best Regards, >Asias He >-- >To unsubscribe from this list: send the line "unsubscribe kvm" in >the body of

Re: [PATCH] kvm tools: Print only serial output to the terminal

2011-08-11 Thread walimis
u want to compare it to yours or try it out. > >Tried it with your config, it works fine here. So the issue seems to be the rootfs? walimis > >Strange... > >-- > >Sasha. > >-- >To unsubscribe from this list: send the line "unsubscribe kvm" in >the bod

Re: [PATCH 1/7] kvm tools: Print version when running 'kvm --version'

2011-08-12 Thread walimis
;,kvm_cmd_version,NULL, 0 }, >+ { "--version", kvm_cmd_version,NULL, 0 }, Although it works, I think it's not good way to implement a option as a command. walimis > { "stop", kvm_cmd_stop,

Re: [PATCH 1/7] kvm tools: Print version when running 'kvm --version'

2011-08-12 Thread walimis
On Fri, Aug 12, 2011 at 06:39:46PM +0300, Pekka Enberg wrote: >On Fri, 12 Aug 2011, walimis wrote: >>>@@ -24,6 +24,7 @@ struct cmd_struct kvm_commands[] = { >>> { "balloon",kvm_cmd_balloon,NULL, 0 }, >>> { "list&qu

Re: [PATCH 1/7] kvm tools: Print version when running 'kvm --version'

2011-08-12 Thread walimis
On Fri, Aug 12, 2011 at 06:47:19PM +0300, Sasha Levin wrote: >On Fri, 2011-08-12 at 23:22 +0800, walimis wrote: >> On Fri, Aug 12, 2011 at 06:20:54PM +0300, Sasha Levin wrote: >> >Signed-off-by: Sasha Levin >> >--- >> > tools/kvm/kvm-cmd.c |1 + >

Re: [PATCH] kvm tools: Add 'kvm stat' command

2011-08-15 Thread walimis
quot;); >+ break; >+ case VIRTIO_BALLOON_S_MAJFLT: >+ printf("The number of major page faults that have >occurred:"); >+ break; >+ case VIRTIO_BALLOON_S_MINFLT: >+

Re: [PATCH] kvm tools: Add 'kvm stat' command

2011-08-15 Thread walimis
l.\n", name); >>+ return kill(pid, SIGKVMMEMSTAT); >>+} > >I applied the patch but I think we should come up with a mechanism to >transport the output back to the command. Doing the printout in the netlink or unix socket? walimis >guest terminal isn't going to work in

Re: [PATCH 2/2] kvm tools: change option type of RNG from increment to boolean

2011-08-17 Thread walimis
ld also be removed (unless we fix the >kernel to support them :) ). > >IMO this can go either way, theres no reason to keep support for >multiple devices besides making development a bit easier. OK, as you said, we can keep it for development. walimis -- To unsubscribe from this list: se