search for: qemu_get_queue

Displaying 20 results from an estimated 51 matches for "qemu_get_queue".

2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...st_multi = 0; > n->mac_table.multi_overflow = 0; > n->mac_table.uni_overflow = 0; > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); > memset(n->vlans, 0, MAX_VLAN >> 3); > } > > So device seems to lose all state, you have to re-program it. Oh, indeed! The guest does not reset its state, so it might be out of sync with the host after the operation. Was this not an issue when prev...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...st_multi = 0; > n->mac_table.multi_overflow = 0; > n->mac_table.uni_overflow = 0; > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); > memset(n->vlans, 0, MAX_VLAN >> 3); > } > > So device seems to lose all state, you have to re-program it. Oh, indeed! The guest does not reset its state, so it might be out of sync with the host after the operation. Was this not an issue when prev...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...le.multi_overflow = 0; >> > n->mac_table.uni_overflow = 0; >> > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); >> > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); >> > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); >> > memset(n->vlans, 0, MAX_VLAN >> 3); >> > } >> > >> > So device seems to lose all state, you have to re-program it. >> >> Oh, indeed! The guest does not reset its state, so it might >> be out of sync with...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...le.multi_overflow = 0; >> > n->mac_table.uni_overflow = 0; >> > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); >> > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); >> > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); >> > memset(n->vlans, 0, MAX_VLAN >> 3); >> > } >> > >> > So device seems to lose all state, you have to re-program it. >> >> Oh, indeed! The guest does not reset its state, so it might >> be out of sync with...
2017 Oct 17
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...n->mac_table.uni_overflow = 0; > > > > > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); > > > > > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); > > > > > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); > > > > > memset(n->vlans, 0, MAX_VLAN >> 3); > > > > > } > > > > > > > > > > So device seems to lose all state, you have to re-program it. > > > > Oh, indeed! The guest does not reset its...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
>> +static int virtnet_reset(struct virtnet_info *vi) >> +{ >> + struct virtio_device *dev = vi->vdev; >> + int ret; >> + >> + virtio_config_disable(dev); >> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED; >> + virtnet_freeze_down(dev, true); >> + remove_vq_common(vi); >> +
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
>> +static int virtnet_reset(struct virtnet_info *vi) >> +{ >> + struct virtio_device *dev = vi->vdev; >> + int ret; >> + >> + virtio_config_disable(dev); >> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED; >> + virtnet_freeze_down(dev, true); >> + remove_vq_common(vi); >> +
2017 Oct 16
0
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...n->mac_table.first_multi = 0; n->mac_table.multi_overflow = 0; n->mac_table.uni_overflow = 0; memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); memset(n->vlans, 0, MAX_VLAN >> 3); } So device seems to lose all state, you have to re-program it. > > Also, it seems that LINK_ANNOUNCE requests will get ignored > > even if they got set before the reset, leading to downtime. > > Do you m...
2014 Nov 26
1
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
...ff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 1e214b5..fcfc95f 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,10 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && !get_vhost_net(nc->peer)) { + features |= (1 << (VIRTIO_F_VERSION_1 - 32)); + } + if (index > 0) { return features; } -- 1.7.9.5
2014 Nov 26
0
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
...b/hw/net/virtio-net.c > index 1e214b5..fcfc95f 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -447,6 +447,10 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, > VirtIONet *n = VIRTIO_NET(vdev); > NetClientState *nc = qemu_get_queue(n->nic); > > + if (index == 1 && !get_vhost_net(nc->peer)) { > + features |= (1 << (VIRTIO_F_VERSION_1 - 32)); > + } > + > if (index > 0) { > return features; > } > -- > 1.7.9.5
2014 Dec 11
0
[PATCH RFC v6 15/20] virtio-net: no writeable mac for virtio-1
..., n->config_size); if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR) && + !virtio_has_feature(vdev, VIRTIO_F_VERSION_1) && memcmp(netcfg.mac, n->mac, ETH_ALEN)) { memcpy(n->mac, netcfg.mac, ETH_ALEN); qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); -- 1.7.9.5
2014 Nov 26
1
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
...ff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 1e214b5..fcfc95f 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,10 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && !get_vhost_net(nc->peer)) { + features |= (1 << (VIRTIO_F_VERSION_1 - 32)); + } + if (index > 0) { return features; } -- 1.7.9.5
2014 Dec 11
0
[PATCH RFC v6 15/20] virtio-net: no writeable mac for virtio-1
..., n->config_size); if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR) && + !virtio_has_feature(vdev, VIRTIO_F_VERSION_1) && memcmp(netcfg.mac, n->mac, ETH_ALEN)) { memcpy(n->mac, netcfg.mac, ETH_ALEN); qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); -- 1.7.9.5
2017 Oct 17
0
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...w = 0; >>>> n->mac_table.uni_overflow = 0; >>>> memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); >>>> memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); >>>> qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); >>>> memset(n->vlans, 0, MAX_VLAN >> 3); >>>> } >>>> >>>> So device seems to lose all state, you have to re-program it. >>> Oh, indeed! The guest does not reset its state, so it might >>> be out...
2014 Oct 24
5
[PATCH RFC 00/11] qemu: towards virtio-1 host support
...iff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 67f91c0..4b75105 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,9 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && get_vhost_net(nc->peer)) { + features &= ~(1 << (VIRTIO_F_VERSION_1 - 32)); + } if (index > 0) { return features; } diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 80efe88..07fbf40 100644 ---...
2014 Oct 24
5
[PATCH RFC 00/11] qemu: towards virtio-1 host support
...iff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 67f91c0..4b75105 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,9 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && get_vhost_net(nc->peer)) { + features &= ~(1 << (VIRTIO_F_VERSION_1 - 32)); + } if (index > 0) { return features; } diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 80efe88..07fbf40 100644 ---...
2017 Oct 16
0
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...n->mac_table.multi_overflow = 0; > > n->mac_table.uni_overflow = 0; > > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); > > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); > > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); > > memset(n->vlans, 0, MAX_VLAN >> 3); > > } > > > > So device seems to lose all state, you have to re-program it. > > Oh, indeed! The guest does not reset its state, so it might > be out of sync with the host after the operati...
2017 Dec 28
0
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...ac_table.uni_overflow = 0; >> > > > > memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); >> > > > > memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); >> > > > > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); >> > > > > memset(n->vlans, 0, MAX_VLAN >> 3); >> > > > > } >> > > > > >> > > > > So device seems to lose all state, you have to re-program it. >> > > > Oh, indeed! The guest...
2014 Oct 28
0
[PATCH RFC 00/11] qemu: towards virtio-1 host support
...c b/hw/net/virtio-net.c > index 67f91c0..4b75105 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -447,6 +447,9 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, > VirtIONet *n = VIRTIO_NET(vdev); > NetClientState *nc = qemu_get_queue(n->nic); > > + if (index == 1 && get_vhost_net(nc->peer)) { > + features &= ~(1 << (VIRTIO_F_VERSION_1 - 32)); > + } > if (index > 0) { > return features; > } > diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-...
2014 Dec 11
0
[PATCH RFC v6 03/20] virtio: feature bit manipulation helpers
...ff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index e574bd4..f1aa100 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -446,23 +446,23 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32_t features) VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); - features |= (1 << VIRTIO_NET_F_MAC); + virtio_add_feature(&features, VIRTIO_NET_F_MAC); if (!peer_has_vnet_hdr(n)) { - features &= ~(0x1 << VIRTIO_NET_F_CSUM); - features &= ~(0x1 << VIRTIO_NET_F_HOST_TSO4); - features...