public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] kvm tools: Speed up PS/2 mouse detection
@ 2011-08-11 20:41 Sasha Levin
  2011-08-11 20:41 ` [PATCH 2/2] kvm tools: Use correct offset for virtio-net config space Sasha Levin
  0 siblings, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2011-08-11 20:41 UTC (permalink / raw)
  To: penberg; +Cc: kvm, mingo, asias.hejun, gorcunov, Sasha Levin

This patch speeds up PS/2 mouse detection by switching to the
fastest probing method compatible with kvm tools i8042 emulation.

The result is detection taking < 0.5 sec instead of >5 sec.

Tested-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 tools/kvm/builtin-run.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index be61304..2816774 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -587,7 +587,7 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix)
 		vidmode = 0;
 
 	memset(real_cmdline, 0, sizeof(real_cmdline));
-	strcpy(real_cmdline, "notsc noapic noacpi pci=conf1 reboot=k panic=1");
+	strcpy(real_cmdline, "notsc noapic noacpi pci=conf1 reboot=k panic=1 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1");
 	if (vnc || sdl) {
 		strcat(real_cmdline, " video=vesafb console=tty0");
 	} else
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] kvm tools: Use correct offset for virtio-net config space
  2011-08-11 20:41 [PATCH 1/2] kvm tools: Speed up PS/2 mouse detection Sasha Levin
@ 2011-08-11 20:41 ` Sasha Levin
  2011-08-12  5:25   ` Pekka Enberg
  0 siblings, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2011-08-11 20:41 UTC (permalink / raw)
  To: penberg; +Cc: kvm, mingo, asias.hejun, gorcunov, Sasha Levin

This patch fixes the read action of virtio-net config by not
handling reads to the start of the space as MSI related
operations.

This fixes the MAC configuration of the device and makes uip network
work again.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 tools/kvm/virtio/net.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/tools/kvm/virtio/net.c b/tools/kvm/virtio/net.c
index 35d4997..a74f1e7 100644
--- a/tools/kvm/virtio/net.c
+++ b/tools/kvm/virtio/net.c
@@ -221,12 +221,6 @@ static bool virtio_net_pci_io_in(struct ioport *ioport, struct kvm *kvm, u16 por
 		kvm__irq_line(kvm, pci_header.irq_line, VIRTIO_IRQ_LOW);
 		ndev.isr = VIRTIO_IRQ_LOW;
 		break;
-	case VIRTIO_MSI_CONFIG_VECTOR:
-		ioport__write16(data, ndev.config_vector);
-		break;
-	case VIRTIO_MSI_QUEUE_VECTOR:
-		ioport__write16(data, ndev.vq_vector[ndev.queue_selector]);
-		break;
 	default:
 		ret = virtio_net_pci_io_device_specific_in(data, offset, size, count);
 	};
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] kvm tools: Use correct offset for virtio-net config space
  2011-08-11 20:41 ` [PATCH 2/2] kvm tools: Use correct offset for virtio-net config space Sasha Levin
@ 2011-08-12  5:25   ` Pekka Enberg
  2011-08-12  5:50     ` Sasha Levin
  0 siblings, 1 reply; 4+ messages in thread
From: Pekka Enberg @ 2011-08-12  5:25 UTC (permalink / raw)
  To: Sasha Levin; +Cc: kvm, mingo, asias.hejun, gorcunov

On Thu, 2011-08-11 at 23:41 +0300, Sasha Levin wrote:
> This patch fixes the read action of virtio-net config by not
> handling reads to the start of the space as MSI related
> operations.
> 
> This fixes the MAC configuration of the device and makes uip network
> work again.
> 
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>

Which commit broke it?

> ---
>  tools/kvm/virtio/net.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/kvm/virtio/net.c b/tools/kvm/virtio/net.c
> index 35d4997..a74f1e7 100644
> --- a/tools/kvm/virtio/net.c
> +++ b/tools/kvm/virtio/net.c
> @@ -221,12 +221,6 @@ static bool virtio_net_pci_io_in(struct ioport *ioport, struct kvm *kvm, u16 por
>  		kvm__irq_line(kvm, pci_header.irq_line, VIRTIO_IRQ_LOW);
>  		ndev.isr = VIRTIO_IRQ_LOW;
>  		break;
> -	case VIRTIO_MSI_CONFIG_VECTOR:
> -		ioport__write16(data, ndev.config_vector);
> -		break;
> -	case VIRTIO_MSI_QUEUE_VECTOR:
> -		ioport__write16(data, ndev.vq_vector[ndev.queue_selector]);
> -		break;
>  	default:
>  		ret = virtio_net_pci_io_device_specific_in(data, offset, size, count);
>  	};



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] kvm tools: Use correct offset for virtio-net config space
  2011-08-12  5:25   ` Pekka Enberg
@ 2011-08-12  5:50     ` Sasha Levin
  0 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2011-08-12  5:50 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: kvm, mingo, asias.hejun, gorcunov

On Fri, 2011-08-12 at 08:25 +0300, Pekka Enberg wrote:
> On Thu, 2011-08-11 at 23:41 +0300, Sasha Levin wrote:
> > This patch fixes the read action of virtio-net config by not
> > handling reads to the start of the space as MSI related
> > operations.
> > 
> > This fixes the MAC configuration of the device and makes uip network
> > work again.
> > 
> > Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> 
> Which commit broke it?
> 

The MSI-X one. I wasn't aware that pings always work in uip so I assumed
it was working when I sent that patch.

> > ---
> >  tools/kvm/virtio/net.c |    6 ------
> >  1 files changed, 0 insertions(+), 6 deletions(-)
> > 
> > diff --git a/tools/kvm/virtio/net.c b/tools/kvm/virtio/net.c
> > index 35d4997..a74f1e7 100644
> > --- a/tools/kvm/virtio/net.c
> > +++ b/tools/kvm/virtio/net.c
> > @@ -221,12 +221,6 @@ static bool virtio_net_pci_io_in(struct ioport *ioport, struct kvm *kvm, u16 por
> >  		kvm__irq_line(kvm, pci_header.irq_line, VIRTIO_IRQ_LOW);
> >  		ndev.isr = VIRTIO_IRQ_LOW;
> >  		break;
> > -	case VIRTIO_MSI_CONFIG_VECTOR:
> > -		ioport__write16(data, ndev.config_vector);
> > -		break;
> > -	case VIRTIO_MSI_QUEUE_VECTOR:
> > -		ioport__write16(data, ndev.vq_vector[ndev.queue_selector]);
> > -		break;
> >  	default:
> >  		ret = virtio_net_pci_io_device_specific_in(data, offset, size, count);
> >  	};
> 
> 

-- 

Sasha.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-12  5:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-11 20:41 [PATCH 1/2] kvm tools: Speed up PS/2 mouse detection Sasha Levin
2011-08-11 20:41 ` [PATCH 2/2] kvm tools: Use correct offset for virtio-net config space Sasha Levin
2011-08-12  5:25   ` Pekka Enberg
2011-08-12  5:50     ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox