diff mbox

[2/2] kvm tools: Use correct offset for virtio-net config space

Message ID 1313095311-7413-2-git-send-email-levinsasha928@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sasha Levin Aug. 11, 2011, 8:41 p.m. UTC
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(-)

Comments

Pekka Enberg Aug. 12, 2011, 5:25 a.m. UTC | #1
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);
>  	};


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sasha Levin Aug. 12, 2011, 5:50 a.m. UTC | #2
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);
> >  	};
> 
>
diff mbox

Patch

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);
 	};