diff mbox

[4/5] Revert "virtio-net: enable virtio 1.0"

Message ID 1436766411-29144-4-git-send-email-jasowang@redhat.com
State New
Headers show

Commit Message

Jason Wang July 13, 2015, 5:46 a.m. UTC
This reverts commit df91055db5c9cee93d70ca8c08d72119a240b987.

This is because:
- vhost support virtio 1.0 now
- transport code (e.g virtio-pci) set this feature when modern is
  enabled, setting this unconditionally will break disable-modern=on.

Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 hw/net/virtio-net.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Cornelia Huck July 13, 2015, 6:16 a.m. UTC | #1
On Mon, 13 Jul 2015 13:46:50 +0800
Jason Wang <jasowang@redhat.com> wrote:

> This reverts commit df91055db5c9cee93d70ca8c08d72119a240b987.
> 
> This is because:
> - vhost support virtio 1.0 now
> - transport code (e.g virtio-pci) set this feature when modern is
>   enabled, setting this unconditionally will break disable-modern=on.

*scratches head*

Why is transport code now supposed to set VERSION_1? I thought we
wanted to have the individual devices offer it, once they are converted.

No objection on removing the dependency on !vhost.

> 
> Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
>  hw/net/virtio-net.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index d728233..e3c2db3 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -466,7 +466,6 @@ static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features)
>      }
> 
>      if (!get_vhost_net(nc->peer)) {
> -        virtio_add_feature(&features, VIRTIO_F_VERSION_1);
>          return features;
>      }
>      return vhost_net_get_features(get_vhost_net(nc->peer), features);
Michael S. Tsirkin July 13, 2015, 7:22 a.m. UTC | #2
On Mon, Jul 13, 2015 at 08:16:17AM +0200, Cornelia Huck wrote:
> On Mon, 13 Jul 2015 13:46:50 +0800
> Jason Wang <jasowang@redhat.com> wrote:
> 
> > This reverts commit df91055db5c9cee93d70ca8c08d72119a240b987.
> > 
> > This is because:
> > - vhost support virtio 1.0 now
> > - transport code (e.g virtio-pci) set this feature when modern is
> >   enabled, setting this unconditionally will break disable-modern=on.
> 
> *scratches head*
> 
> Why is transport code now supposed to set VERSION_1? I thought we
> wanted to have the individual devices offer it, once they are converted.

Because all devices have been converted now.  Excepting bugs, but we can
fix these.

> No objection on removing the dependency on !vhost.
> 
> > 
> > Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
> > Signed-off-by: Jason Wang <jasowang@redhat.com>
> > ---
> >  hw/net/virtio-net.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> > index d728233..e3c2db3 100644
> > --- a/hw/net/virtio-net.c
> > +++ b/hw/net/virtio-net.c
> > @@ -466,7 +466,6 @@ static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features)
> >      }
> > 
> >      if (!get_vhost_net(nc->peer)) {
> > -        virtio_add_feature(&features, VIRTIO_F_VERSION_1);
> >          return features;
> >      }
> >      return vhost_net_get_features(get_vhost_net(nc->peer), features);
Jason Wang July 13, 2015, 8:29 a.m. UTC | #3
On 07/13/2015 02:16 PM, Cornelia Huck wrote:
> On Mon, 13 Jul 2015 13:46:50 +0800
> Jason Wang <jasowang@redhat.com> wrote:
>
>> This reverts commit df91055db5c9cee93d70ca8c08d72119a240b987.
>>
>> This is because:
>> - vhost support virtio 1.0 now
>> - transport code (e.g virtio-pci) set this feature when modern is
>>   enabled, setting this unconditionally will break disable-modern=on.
> *scratches head*
>
> Why is transport code now supposed to set VERSION_1? I thought we
> wanted to have the individual devices offer it, once they are converted.

As Michael pointed out, all device have been converted. And offering
this in device needs knowledge of transport capability but device should
know nothing about this.

>
> No objection on removing the dependency on !vhost.
>
>> Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
>> Signed-off-by: Jason Wang <jasowang@redhat.com>
>> ---
>>  hw/net/virtio-net.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
>> index d728233..e3c2db3 100644
>> --- a/hw/net/virtio-net.c
>> +++ b/hw/net/virtio-net.c
>> @@ -466,7 +466,6 @@ static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features)
>>      }
>>
>>      if (!get_vhost_net(nc->peer)) {
>> -        virtio_add_feature(&features, VIRTIO_F_VERSION_1);
>>          return features;
>>      }
>>      return vhost_net_get_features(get_vhost_net(nc->peer), features);
Cornelia Huck July 13, 2015, 8:46 a.m. UTC | #4
On Mon, 13 Jul 2015 10:22:17 +0300
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Mon, Jul 13, 2015 at 08:16:17AM +0200, Cornelia Huck wrote:
> > On Mon, 13 Jul 2015 13:46:50 +0800
> > Jason Wang <jasowang@redhat.com> wrote:
> > 
> > > This reverts commit df91055db5c9cee93d70ca8c08d72119a240b987.
> > > 
> > > This is because:
> > > - vhost support virtio 1.0 now
> > > - transport code (e.g virtio-pci) set this feature when modern is
> > >   enabled, setting this unconditionally will break disable-modern=on.
> > 
> > *scratches head*
> > 
> > Why is transport code now supposed to set VERSION_1? I thought we
> > wanted to have the individual devices offer it, once they are converted.
> 
> Because all devices have been converted now.  Excepting bugs, but we can
> fix these.

Must have missed this. Will rework the virtio-1 enabling patch for
virtio-ccw (for 2.5).
diff mbox

Patch

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index d728233..e3c2db3 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -466,7 +466,6 @@  static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features)
     }
 
     if (!get_vhost_net(nc->peer)) {
-        virtio_add_feature(&features, VIRTIO_F_VERSION_1);
         return features;
     }
     return vhost_net_get_features(get_vhost_net(nc->peer), features);