* [Qemu-devel] [PULL 0/5] Net patches @ 2016-06-28 3:35 Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 1/5] net: fix qemu_announce_self not emitting packets Jason Wang ` (5 more replies) 0 siblings, 6 replies; 23+ messages in thread From: Jason Wang @ 2016-06-28 3:35 UTC (permalink / raw) To: peter.maydell, qemu-devel; +Cc: Jason Wang The following changes since commit 14e60aaece20a1cfc059a69f6491b0899f9257a8: hw/net/e1000: Don't use *_to_cpup() (2016-06-27 16:39:56 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to fetch changes up to c508277335e3b6b20cf18e6ea3a35c1fa835c64a: vmxnet3: Fix reading/writing guest memory specially when behind an IOMMU (2016-06-28 10:13:57 +0800) ---------------------------------------------------------------- ---------------------------------------------------------------- Ashijeet Acharya (1): Change net/socket.c to use socket_*() functions David Vrabel (1): rtl8139: save/load RxMulOk counter (again) KarimAllah Ahmed (1): vmxnet3: Fix reading/writing guest memory specially when behind an IOMMU Peter Lieven (1): net: fix qemu_announce_self not emitting packets Prasad J Pandit (1): net: mipsnet: check transmit buffer size before sending hw/net/mipsnet.c | 8 +- hw/net/rtl8139.c | 40 ++++------ hw/net/vmware_utils.h | 55 ++++++++------ hw/net/vmxnet3.c | 197 +++++++++++++++++++++++++++---------------------- include/qemu/sockets.h | 16 +++- net/net.c | 2 +- net/socket.c | 55 +++++++------- util/qemu-sockets.c | 36 +++++++++ 8 files changed, 237 insertions(+), 172 deletions(-) ^ permalink raw reply [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 1/5] net: fix qemu_announce_self not emitting packets 2016-06-28 3:35 [Qemu-devel] [PULL 0/5] Net patches Jason Wang @ 2016-06-28 3:35 ` Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 2/5] net: mipsnet: check transmit buffer size before sending Jason Wang ` (4 subsequent siblings) 5 siblings, 0 replies; 23+ messages in thread From: Jason Wang @ 2016-06-28 3:35 UTC (permalink / raw) To: peter.maydell, qemu-devel Cc: Peter Lieven, qemu-stable, hongyang.yang, Jason Wang From: Peter Lieven <pl@kamp.de> commit fefe2a78 accidently dropped the code path for injecting raw packets. This feature is needed for sending gratuitous ARPs after an incoming migration has completed. The result is increased network downtime for vservers where the network card is not virtio-net with the VIRTIO_NET_F_GUEST_ANNOUNCE feature. Fixes: fefe2a78abde932e0f340b21bded2c86def1d242 Cc: qemu-stable@nongnu.org Cc: hongyang.yang@easystack.cn Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Jason Wang <jasowang@redhat.com> --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index 5f3e5a9..75bb177 100644 --- a/net/net.c +++ b/net/net.c @@ -722,7 +722,7 @@ ssize_t qemu_deliver_packet_iov(NetClientState *sender, return 0; } - if (nc->info->receive_iov) { + if (nc->info->receive_iov && !(flags & QEMU_NET_PACKET_FLAG_RAW)) { ret = nc->info->receive_iov(nc, iov, iovcnt); } else { ret = nc_sendv_compat(nc, iov, iovcnt, flags); -- 2.7.4 ^ permalink raw reply related [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 2/5] net: mipsnet: check transmit buffer size before sending 2016-06-28 3:35 [Qemu-devel] [PULL 0/5] Net patches Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 1/5] net: fix qemu_announce_self not emitting packets Jason Wang @ 2016-06-28 3:35 ` Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 3/5] Change net/socket.c to use socket_*() functions Jason Wang ` (3 subsequent siblings) 5 siblings, 0 replies; 23+ messages in thread From: Jason Wang @ 2016-06-28 3:35 UTC (permalink / raw) To: peter.maydell, qemu-devel; +Cc: Prasad J Pandit, Jason Wang From: Prasad J Pandit <pjp@fedoraproject.org> When processing MIPSnet I/O port write operation, it uses a transmit buffer tx_buffer[MAX_ETH_FRAME_SIZE=1514]. Two indices 's->tx_written' and 's->tx_count' are used to control data written to this buffer. If the two were to be equal before writing, it'd lead to an OOB write access beyond tx_buffer. Add check to avoid it. Reported-by: Li Qiang <qiang6-s@360.cn> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Signed-off-by: Jason Wang <jasowang@redhat.com> --- hw/net/mipsnet.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c index cf8b823..5115adc 100644 --- a/hw/net/mipsnet.c +++ b/hw/net/mipsnet.c @@ -183,10 +183,12 @@ static void mipsnet_ioport_write(void *opaque, hwaddr addr, break; case MIPSNET_TX_DATA_BUFFER: s->tx_buffer[s->tx_written++] = val; - if (s->tx_written == s->tx_count) { + if ((s->tx_written >= MAX_ETH_FRAME_SIZE) + || (s->tx_written == s->tx_count)) { /* Send buffer. */ - trace_mipsnet_send(s->tx_count); - qemu_send_packet(qemu_get_queue(s->nic), s->tx_buffer, s->tx_count); + trace_mipsnet_send(s->tx_written); + qemu_send_packet(qemu_get_queue(s->nic), + s->tx_buffer, s->tx_written); s->tx_count = s->tx_written = 0; s->intctl |= MIPSNET_INTCTL_TXDONE; s->busy = 1; -- 2.7.4 ^ permalink raw reply related [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 3/5] Change net/socket.c to use socket_*() functions 2016-06-28 3:35 [Qemu-devel] [PULL 0/5] Net patches Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 1/5] net: fix qemu_announce_self not emitting packets Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 2/5] net: mipsnet: check transmit buffer size before sending Jason Wang @ 2016-06-28 3:35 ` Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 4/5] rtl8139: save/load RxMulOk counter (again) Jason Wang ` (2 subsequent siblings) 5 siblings, 0 replies; 23+ messages in thread From: Jason Wang @ 2016-06-28 3:35 UTC (permalink / raw) To: peter.maydell, qemu-devel; +Cc: Ashijeet Acharya, Jason Wang From: Ashijeet Acharya <ashijeetacharya@gmail.com> Use socket_*() functions from include/qemu/sockets.h instead of listen()/bind()/connect()/parse_host_port(). socket_*() fucntions are QAPI based and this patch performs this api conversion since everything will be using QAPI based sockets in the future. Also add a helper function socket_address_to_string() in util/qemu-sockets.c which returns the string representation of socket address. Thetask was listed on http://wiki.qemu.org/BiteSizedTasks page. Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> --- include/qemu/sockets.h | 16 ++++++++++++++- net/socket.c | 55 +++++++++++++++++++++++++------------------------- util/qemu-sockets.c | 36 +++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 29 deletions(-) diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 1bd9218..3a1a887 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -110,4 +110,18 @@ SocketAddress *socket_remote_address(int fd, Error **errp); void qapi_copy_SocketAddress(SocketAddress **p_dest, SocketAddress *src); -#endif /* QEMU_SOCKET_H */ +/** + * socket_address_to_string: + * @addr: the socket address struct + * @errp: pointer to uninitialized error object + * + * Get the string representation of the socket + * address. A pointer to the char array containing + * string format will be returned, the caller is + * required to release the returned value when no + * longer required with g_free. + * + * Returns: the socket address in string format, or NULL on error + */ +char *socket_address_to_string(struct SocketAddress *addr, Error **errp); +#endif /* QEMU_SOCKET_H */ \ No newline at end of file diff --git a/net/socket.c b/net/socket.c index 333fb9e..ae6f921 100644 --- a/net/socket.c +++ b/net/socket.c @@ -489,41 +489,30 @@ static int net_socket_listen_init(NetClientState *peer, { NetClientState *nc; NetSocketState *s; - struct sockaddr_in saddr; - int fd, ret; + SocketAddress *saddr; + int ret; + Error *local_error = NULL; - if (parse_host_port(&saddr, host_str) < 0) - return -1; - - fd = qemu_socket(PF_INET, SOCK_STREAM, 0); - if (fd < 0) { - perror("socket"); + saddr = socket_parse(host_str, &local_error); + if (saddr == NULL) { + error_report_err(local_error); return -1; } - qemu_set_nonblock(fd); - socket_set_fast_reuse(fd); - - ret = bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)); + ret = socket_listen(saddr, &local_error); if (ret < 0) { - perror("bind"); - closesocket(fd); - return -1; - } - ret = listen(fd, 0); - if (ret < 0) { - perror("listen"); - closesocket(fd); + error_report_err(local_error); return -1; } nc = qemu_new_net_client(&net_socket_info, peer, model, name); s = DO_UPCAST(NetSocketState, nc, nc); s->fd = -1; - s->listen_fd = fd; + s->listen_fd = ret; s->nc.link_down = true; qemu_set_fd_handler(s->listen_fd, net_socket_accept, NULL, s); + qapi_free_SocketAddress(saddr); return 0; } @@ -534,10 +523,15 @@ static int net_socket_connect_init(NetClientState *peer, { NetSocketState *s; int fd, connected, ret; - struct sockaddr_in saddr; + char *addr_str; + SocketAddress *saddr; + Error *local_error = NULL; - if (parse_host_port(&saddr, host_str) < 0) + saddr = socket_parse(host_str, &local_error); + if (saddr == NULL) { + error_report_err(local_error); return -1; + } fd = qemu_socket(PF_INET, SOCK_STREAM, 0); if (fd < 0) { @@ -545,10 +539,9 @@ static int net_socket_connect_init(NetClientState *peer, return -1; } qemu_set_nonblock(fd); - connected = 0; for(;;) { - ret = connect(fd, (struct sockaddr *)&saddr, sizeof(saddr)); + ret = socket_connect(saddr, &local_error, NULL, NULL); if (ret < 0) { if (errno == EINTR || errno == EWOULDBLOCK) { /* continue */ @@ -557,7 +550,7 @@ static int net_socket_connect_init(NetClientState *peer, errno == EINVAL) { break; } else { - perror("connect"); + error_report_err(local_error); closesocket(fd); return -1; } @@ -569,9 +562,15 @@ static int net_socket_connect_init(NetClientState *peer, s = net_socket_fd_init(peer, model, name, fd, connected); if (!s) return -1; + + addr_str = socket_address_to_string(saddr, &local_error); + if (addr_str == NULL) + return -1; + snprintf(s->nc.info_str, sizeof(s->nc.info_str), - "socket: connect to %s:%d", - inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port)); + "socket: connect to %s", addr_str); + qapi_free_SocketAddress(saddr); + g_free(addr_str); return 0; } diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 0d6cd1f..ef35889 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -1151,3 +1151,39 @@ void qapi_copy_SocketAddress(SocketAddress **p_dest, qmp_input_visitor_cleanup(qiv); qobject_decref(obj); } + +char *socket_address_to_string(struct SocketAddress *addr, Error **errp) +{ + char *buf; + InetSocketAddress *inet; + char host_port[INET6_ADDRSTRLEN + 5 + 4]; + + switch (addr->type) { + case SOCKET_ADDRESS_KIND_INET: + inet = addr->u.inet.data; + if (strchr(inet->host, ':') == NULL) { + snprintf(host_port, sizeof(host_port), "%s:%s", inet->host, + inet->port); + buf = g_strdup(host_port); + } else { + snprintf(host_port, sizeof(host_port), "[%s]:%s", inet->host, + inet->port); + buf = g_strdup(host_port); + } + break; + + case SOCKET_ADDRESS_KIND_UNIX: + buf = g_strdup(addr->u.q_unix.data->path); + break; + + case SOCKET_ADDRESS_KIND_FD: + buf = g_strdup(addr->u.fd.data->str); + break; + + default: + error_setg(errp, "socket family %d unsupported", + addr->type); + return NULL; + } + return buf; +} -- 2.7.4 ^ permalink raw reply related [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 4/5] rtl8139: save/load RxMulOk counter (again) 2016-06-28 3:35 [Qemu-devel] [PULL 0/5] Net patches Jason Wang ` (2 preceding siblings ...) 2016-06-28 3:35 ` [Qemu-devel] [PULL 3/5] Change net/socket.c to use socket_*() functions Jason Wang @ 2016-06-28 3:35 ` Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 5/5] vmxnet3: Fix reading/writing guest memory specially when behind an IOMMU Jason Wang 2016-06-28 10:07 ` [Qemu-devel] [PULL 0/5] Net patches Peter Maydell 5 siblings, 0 replies; 23+ messages in thread From: Jason Wang @ 2016-06-28 3:35 UTC (permalink / raw) To: peter.maydell, qemu-devel; +Cc: David Vrabel, Jason Wang From: David Vrabel <david.vrabel@citrix.com> Commit 9d29cdeaaca3a0383af764000b71492c4fc67c6e (rtl8139: port TallyCounters to vmstate) introduced in incompatibility in the v4 format as it omitted the RxOkMul counter. There are presumably no users that were impacted by the v4 to v4' breakage, so increase the save version to 5 and re-add the field, keeping backward compatibility with v4'. We can't have a field conditional on the section version in vmstate_tally_counters since this version checked would not be the section version (but the version defined in this structure). So, move all the fields into the main state structure. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: Jason Wang <jasowang@redhat.com> --- hw/net/rtl8139.c | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index e2b140d..07297cb 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -1351,29 +1351,6 @@ static void RTL8139TallyCounters_dma_write(RTL8139State *s, dma_addr_t tc_addr) pci_dma_write(d, tc_addr + 62, (uint8_t *)&val16, 2); } -/* Loads values of tally counters from VM state file */ - -static const VMStateDescription vmstate_tally_counters = { - .name = "tally_counters", - .version_id = 1, - .minimum_version_id = 1, - .fields = (VMStateField[]) { - VMSTATE_UINT64(TxOk, RTL8139TallyCounters), - VMSTATE_UINT64(RxOk, RTL8139TallyCounters), - VMSTATE_UINT64(TxERR, RTL8139TallyCounters), - VMSTATE_UINT32(RxERR, RTL8139TallyCounters), - VMSTATE_UINT16(MissPkt, RTL8139TallyCounters), - VMSTATE_UINT16(FAE, RTL8139TallyCounters), - VMSTATE_UINT32(Tx1Col, RTL8139TallyCounters), - VMSTATE_UINT32(TxMCol, RTL8139TallyCounters), - VMSTATE_UINT64(RxOkPhy, RTL8139TallyCounters), - VMSTATE_UINT64(RxOkBrd, RTL8139TallyCounters), - VMSTATE_UINT16(TxAbt, RTL8139TallyCounters), - VMSTATE_UINT16(TxUndrn, RTL8139TallyCounters), - VMSTATE_END_OF_LIST() - } -}; - static void rtl8139_ChipCmd_write(RTL8139State *s, uint32_t val) { DeviceState *d = DEVICE(s); @@ -3221,7 +3198,7 @@ static void rtl8139_pre_save(void *opaque) static const VMStateDescription vmstate_rtl8139 = { .name = "rtl8139", - .version_id = 4, + .version_id = 5, .minimum_version_id = 3, .post_load = rtl8139_post_load, .pre_save = rtl8139_pre_save, @@ -3292,8 +3269,19 @@ static const VMStateDescription vmstate_rtl8139 = { VMSTATE_UINT32(TimerInt, RTL8139State), VMSTATE_INT64(TCTR_base, RTL8139State), - VMSTATE_STRUCT(tally_counters, RTL8139State, 0, - vmstate_tally_counters, RTL8139TallyCounters), + VMSTATE_UINT64(tally_counters.TxOk, RTL8139State), + VMSTATE_UINT64(tally_counters.RxOk, RTL8139State), + VMSTATE_UINT64(tally_counters.TxERR, RTL8139State), + VMSTATE_UINT32(tally_counters.RxERR, RTL8139State), + VMSTATE_UINT16(tally_counters.MissPkt, RTL8139State), + VMSTATE_UINT16(tally_counters.FAE, RTL8139State), + VMSTATE_UINT32(tally_counters.Tx1Col, RTL8139State), + VMSTATE_UINT32(tally_counters.TxMCol, RTL8139State), + VMSTATE_UINT64(tally_counters.RxOkPhy, RTL8139State), + VMSTATE_UINT64(tally_counters.RxOkBrd, RTL8139State), + VMSTATE_UINT32_V(tally_counters.RxOkMul, RTL8139State, 5), + VMSTATE_UINT16(tally_counters.TxAbt, RTL8139State), + VMSTATE_UINT16(tally_counters.TxUndrn, RTL8139State), VMSTATE_UINT32_V(cplus_enabled, RTL8139State, 4), VMSTATE_END_OF_LIST() -- 2.7.4 ^ permalink raw reply related [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 5/5] vmxnet3: Fix reading/writing guest memory specially when behind an IOMMU 2016-06-28 3:35 [Qemu-devel] [PULL 0/5] Net patches Jason Wang ` (3 preceding siblings ...) 2016-06-28 3:35 ` [Qemu-devel] [PULL 4/5] rtl8139: save/load RxMulOk counter (again) Jason Wang @ 2016-06-28 3:35 ` Jason Wang 2016-06-28 10:07 ` [Qemu-devel] [PULL 0/5] Net patches Peter Maydell 5 siblings, 0 replies; 23+ messages in thread From: Jason Wang @ 2016-06-28 3:35 UTC (permalink / raw) To: peter.maydell, qemu-devel Cc: KarimAllah Ahmed, Dmitry Fleytman, Jason Wang, Anthony Liguori From: KarimAllah Ahmed <karahmed@amazon.de> When a PCI device lives behind an IOMMU, it should use 'pci_dma_*' family of functions when any transfer from/to guest memory is required while 'cpu_physical_memory_*' family of functions completely bypass any MMU/IOMMU in the system. vmxnet3 in some places was using 'cpu_physical_memory_*' family of functions which works fine with the default QEMU setup where IOMMU is not enabled but fails miserably when IOMMU is enabled. This commit converts all such instances in favor of 'pci_dma_*' Cc: Dmitry Fleytman <dmitry@daynix.com> Cc: Jason Wang <jasowang@redhat.com> Cc: qemu-devel@nongnu.org Cc: Anthony Liguori <aliguori@amazon.com> Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de> Acked-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com> --- hw/net/vmware_utils.h | 55 ++++++++------ hw/net/vmxnet3.c | 197 +++++++++++++++++++++++++++----------------------- 2 files changed, 139 insertions(+), 113 deletions(-) diff --git a/hw/net/vmware_utils.h b/hw/net/vmware_utils.h index c0dbb2f..5500601 100644 --- a/hw/net/vmware_utils.h +++ b/hw/net/vmware_utils.h @@ -26,97 +26,104 @@ * */ static inline void -vmw_shmem_read(hwaddr addr, void *buf, int len) +vmw_shmem_read(PCIDevice *d, hwaddr addr, void *buf, int len) { VMW_SHPRN("SHMEM r: %" PRIx64 ", len: %d to %p", addr, len, buf); - cpu_physical_memory_read(addr, buf, len); + pci_dma_read(d, addr, buf, len); } static inline void -vmw_shmem_write(hwaddr addr, void *buf, int len) +vmw_shmem_write(PCIDevice *d, hwaddr addr, void *buf, int len) { VMW_SHPRN("SHMEM w: %" PRIx64 ", len: %d to %p", addr, len, buf); - cpu_physical_memory_write(addr, buf, len); + pci_dma_write(d, addr, buf, len); } static inline void -vmw_shmem_rw(hwaddr addr, void *buf, int len, int is_write) +vmw_shmem_rw(PCIDevice *d, hwaddr addr, void *buf, int len, int is_write) { VMW_SHPRN("SHMEM r/w: %" PRIx64 ", len: %d (to %p), is write: %d", addr, len, buf, is_write); - cpu_physical_memory_rw(addr, buf, len, is_write); + if (is_write) + pci_dma_write(d, addr, buf, len); + else + pci_dma_read(d, addr, buf, len); } static inline void -vmw_shmem_set(hwaddr addr, uint8_t val, int len) +vmw_shmem_set(PCIDevice *d, hwaddr addr, uint8_t val, int len) { int i; VMW_SHPRN("SHMEM set: %" PRIx64 ", len: %d (value 0x%X)", addr, len, val); for (i = 0; i < len; i++) { - cpu_physical_memory_write(addr + i, &val, 1); + pci_dma_write(d, addr + i, &val, 1); } } static inline uint32_t -vmw_shmem_ld8(hwaddr addr) +vmw_shmem_ld8(PCIDevice *d, hwaddr addr) { - uint8_t res = ldub_phys(&address_space_memory, addr); + uint8_t res; + pci_dma_read(d, addr, &res, 1); VMW_SHPRN("SHMEM load8: %" PRIx64 " (value 0x%X)", addr, res); return res; } static inline void -vmw_shmem_st8(hwaddr addr, uint8_t value) +vmw_shmem_st8(PCIDevice *d, hwaddr addr, uint8_t value) { VMW_SHPRN("SHMEM store8: %" PRIx64 " (value 0x%X)", addr, value); - stb_phys(&address_space_memory, addr, value); + pci_dma_write(d, addr, &value, 1); } static inline uint32_t -vmw_shmem_ld16(hwaddr addr) +vmw_shmem_ld16(PCIDevice *d, hwaddr addr) { - uint16_t res = lduw_le_phys(&address_space_memory, addr); + uint16_t res; + pci_dma_read(d, addr, &res, 2); VMW_SHPRN("SHMEM load16: %" PRIx64 " (value 0x%X)", addr, res); return res; } static inline void -vmw_shmem_st16(hwaddr addr, uint16_t value) +vmw_shmem_st16(PCIDevice *d, hwaddr addr, uint16_t value) { VMW_SHPRN("SHMEM store16: %" PRIx64 " (value 0x%X)", addr, value); - stw_le_phys(&address_space_memory, addr, value); + pci_dma_write(d, addr, &value, 2); } static inline uint32_t -vmw_shmem_ld32(hwaddr addr) +vmw_shmem_ld32(PCIDevice *d, hwaddr addr) { - uint32_t res = ldl_le_phys(&address_space_memory, addr); + uint32_t res; + pci_dma_read(d, addr, &res, 4); VMW_SHPRN("SHMEM load32: %" PRIx64 " (value 0x%X)", addr, res); return res; } static inline void -vmw_shmem_st32(hwaddr addr, uint32_t value) +vmw_shmem_st32(PCIDevice *d, hwaddr addr, uint32_t value) { VMW_SHPRN("SHMEM store32: %" PRIx64 " (value 0x%X)", addr, value); - stl_le_phys(&address_space_memory, addr, value); + pci_dma_write(d, addr, &value, 4); } static inline uint64_t -vmw_shmem_ld64(hwaddr addr) +vmw_shmem_ld64(PCIDevice *d, hwaddr addr) { - uint64_t res = ldq_le_phys(&address_space_memory, addr); + uint64_t res; + pci_dma_read(d, addr, &res, 8); VMW_SHPRN("SHMEM load64: %" PRIx64 " (value %" PRIx64 ")", addr, res); return res; } static inline void -vmw_shmem_st64(hwaddr addr, uint64_t value) +vmw_shmem_st64(PCIDevice *d, hwaddr addr, uint64_t value) { VMW_SHPRN("SHMEM store64: %" PRIx64 " (value %" PRIx64 ")", addr, value); - stq_le_phys(&address_space_memory, addr, value); + pci_dma_write(d, addr, &value, 8); } /* Macros for simplification of operations on array-style registers */ diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index d978976..92236d3 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -74,54 +74,54 @@ #define VMXNET3_MAX_NMSIX_INTRS (1) /* Macros for rings descriptors access */ -#define VMXNET3_READ_TX_QUEUE_DESCR8(dpa, field) \ - (vmw_shmem_ld8(dpa + offsetof(struct Vmxnet3_TxQueueDesc, field))) +#define VMXNET3_READ_TX_QUEUE_DESCR8(_d, dpa, field) \ + (vmw_shmem_ld8(_d, dpa + offsetof(struct Vmxnet3_TxQueueDesc, field))) -#define VMXNET3_WRITE_TX_QUEUE_DESCR8(dpa, field, value) \ - (vmw_shmem_st8(dpa + offsetof(struct Vmxnet3_TxQueueDesc, field, value))) +#define VMXNET3_WRITE_TX_QUEUE_DESCR8(_d, dpa, field, value) \ + (vmw_shmem_st8(_d, dpa + offsetof(struct Vmxnet3_TxQueueDesc, field, value))) -#define VMXNET3_READ_TX_QUEUE_DESCR32(dpa, field) \ - (vmw_shmem_ld32(dpa + offsetof(struct Vmxnet3_TxQueueDesc, field))) +#define VMXNET3_READ_TX_QUEUE_DESCR32(_d, dpa, field) \ + (vmw_shmem_ld32(_d, dpa + offsetof(struct Vmxnet3_TxQueueDesc, field))) -#define VMXNET3_WRITE_TX_QUEUE_DESCR32(dpa, field, value) \ - (vmw_shmem_st32(dpa + offsetof(struct Vmxnet3_TxQueueDesc, field), value)) +#define VMXNET3_WRITE_TX_QUEUE_DESCR32(_d, dpa, field, value) \ + (vmw_shmem_st32(_d, dpa + offsetof(struct Vmxnet3_TxQueueDesc, field), value)) -#define VMXNET3_READ_TX_QUEUE_DESCR64(dpa, field) \ - (vmw_shmem_ld64(dpa + offsetof(struct Vmxnet3_TxQueueDesc, field))) +#define VMXNET3_READ_TX_QUEUE_DESCR64(_d, dpa, field) \ + (vmw_shmem_ld64(_d, dpa + offsetof(struct Vmxnet3_TxQueueDesc, field))) -#define VMXNET3_WRITE_TX_QUEUE_DESCR64(dpa, field, value) \ - (vmw_shmem_st64(dpa + offsetof(struct Vmxnet3_TxQueueDesc, field), value)) +#define VMXNET3_WRITE_TX_QUEUE_DESCR64(_d, dpa, field, value) \ + (vmw_shmem_st64(_d, dpa + offsetof(struct Vmxnet3_TxQueueDesc, field), value)) -#define VMXNET3_READ_RX_QUEUE_DESCR64(dpa, field) \ - (vmw_shmem_ld64(dpa + offsetof(struct Vmxnet3_RxQueueDesc, field))) +#define VMXNET3_READ_RX_QUEUE_DESCR64(_d, dpa, field) \ + (vmw_shmem_ld64(_d, dpa + offsetof(struct Vmxnet3_RxQueueDesc, field))) -#define VMXNET3_READ_RX_QUEUE_DESCR32(dpa, field) \ - (vmw_shmem_ld32(dpa + offsetof(struct Vmxnet3_RxQueueDesc, field))) +#define VMXNET3_READ_RX_QUEUE_DESCR32(_d, dpa, field) \ + (vmw_shmem_ld32(_d, dpa + offsetof(struct Vmxnet3_RxQueueDesc, field))) -#define VMXNET3_WRITE_RX_QUEUE_DESCR64(dpa, field, value) \ - (vmw_shmem_st64(dpa + offsetof(struct Vmxnet3_RxQueueDesc, field), value)) +#define VMXNET3_WRITE_RX_QUEUE_DESCR64(_d, dpa, field, value) \ + (vmw_shmem_st64(_d, dpa + offsetof(struct Vmxnet3_RxQueueDesc, field), value)) -#define VMXNET3_WRITE_RX_QUEUE_DESCR8(dpa, field, value) \ - (vmw_shmem_st8(dpa + offsetof(struct Vmxnet3_RxQueueDesc, field), value)) +#define VMXNET3_WRITE_RX_QUEUE_DESCR8(_d, dpa, field, value) \ + (vmw_shmem_st8(_d, dpa + offsetof(struct Vmxnet3_RxQueueDesc, field), value)) /* Macros for guest driver shared area access */ -#define VMXNET3_READ_DRV_SHARED64(shpa, field) \ - (vmw_shmem_ld64(shpa + offsetof(struct Vmxnet3_DriverShared, field))) +#define VMXNET3_READ_DRV_SHARED64(_d, shpa, field) \ + (vmw_shmem_ld64(_d, shpa + offsetof(struct Vmxnet3_DriverShared, field))) -#define VMXNET3_READ_DRV_SHARED32(shpa, field) \ - (vmw_shmem_ld32(shpa + offsetof(struct Vmxnet3_DriverShared, field))) +#define VMXNET3_READ_DRV_SHARED32(_d, shpa, field) \ + (vmw_shmem_ld32(_d, shpa + offsetof(struct Vmxnet3_DriverShared, field))) -#define VMXNET3_WRITE_DRV_SHARED32(shpa, field, val) \ - (vmw_shmem_st32(shpa + offsetof(struct Vmxnet3_DriverShared, field), val)) +#define VMXNET3_WRITE_DRV_SHARED32(_d, shpa, field, val) \ + (vmw_shmem_st32(_d, shpa + offsetof(struct Vmxnet3_DriverShared, field), val)) -#define VMXNET3_READ_DRV_SHARED16(shpa, field) \ - (vmw_shmem_ld16(shpa + offsetof(struct Vmxnet3_DriverShared, field))) +#define VMXNET3_READ_DRV_SHARED16(_d, shpa, field) \ + (vmw_shmem_ld16(_d, shpa + offsetof(struct Vmxnet3_DriverShared, field))) -#define VMXNET3_READ_DRV_SHARED8(shpa, field) \ - (vmw_shmem_ld8(shpa + offsetof(struct Vmxnet3_DriverShared, field))) +#define VMXNET3_READ_DRV_SHARED8(_d, shpa, field) \ + (vmw_shmem_ld8(_d, shpa + offsetof(struct Vmxnet3_DriverShared, field))) -#define VMXNET3_READ_DRV_SHARED(shpa, field, b, l) \ - (vmw_shmem_read(shpa + offsetof(struct Vmxnet3_DriverShared, field), b, l)) +#define VMXNET3_READ_DRV_SHARED(_d, shpa, field, b, l) \ + (vmw_shmem_read(_d, shpa + offsetof(struct Vmxnet3_DriverShared, field), b, l)) #define VMXNET_FLAG_IS_SET(field, flag) (((field) & (flag)) == (flag)) @@ -147,7 +147,8 @@ typedef struct { uint8_t gen; } Vmxnet3Ring; -static inline void vmxnet3_ring_init(Vmxnet3Ring *ring, +static inline void vmxnet3_ring_init(PCIDevice *d, + Vmxnet3Ring *ring, hwaddr pa, size_t size, size_t cell_size, @@ -160,7 +161,7 @@ static inline void vmxnet3_ring_init(Vmxnet3Ring *ring, ring->next = 0; if (zero_region) { - vmw_shmem_set(pa, 0, size * cell_size); + vmw_shmem_set(d, pa, 0, size * cell_size); } } @@ -190,14 +191,16 @@ static inline hwaddr vmxnet3_ring_curr_cell_pa(Vmxnet3Ring *ring) return ring->pa + ring->next * ring->cell_size; } -static inline void vmxnet3_ring_read_curr_cell(Vmxnet3Ring *ring, void *buff) +static inline void vmxnet3_ring_read_curr_cell(PCIDevice *d, Vmxnet3Ring *ring, + void *buff) { - vmw_shmem_read(vmxnet3_ring_curr_cell_pa(ring), buff, ring->cell_size); + vmw_shmem_read(d, vmxnet3_ring_curr_cell_pa(ring), buff, ring->cell_size); } -static inline void vmxnet3_ring_write_curr_cell(Vmxnet3Ring *ring, void *buff) +static inline void vmxnet3_ring_write_curr_cell(PCIDevice *d, Vmxnet3Ring *ring, + void *buff) { - vmw_shmem_write(vmxnet3_ring_curr_cell_pa(ring), buff, ring->cell_size); + vmw_shmem_write(d, vmxnet3_ring_curr_cell_pa(ring), buff, ring->cell_size); } static inline size_t vmxnet3_ring_curr_cell_idx(Vmxnet3Ring *ring) @@ -456,9 +459,9 @@ vmxnet3_on_interrupt_mask_changed(VMXNET3State *s, int lidx, bool is_masked) vmxnet3_update_interrupt_line_state(s, lidx); } -static bool vmxnet3_verify_driver_magic(hwaddr dshmem) +static bool vmxnet3_verify_driver_magic(PCIDevice *d, hwaddr dshmem) { - return (VMXNET3_READ_DRV_SHARED32(dshmem, magic) == VMXNET3_REV1_MAGIC); + return (VMXNET3_READ_DRV_SHARED32(d, dshmem, magic) == VMXNET3_REV1_MAGIC); } #define VMXNET3_GET_BYTE(x, byte_num) (((x) >> (byte_num)*8) & 0xFF) @@ -526,13 +529,14 @@ vmxnet3_dec_rx_completion_counter(VMXNET3State *s, int qidx) static void vmxnet3_complete_packet(VMXNET3State *s, int qidx, uint32_t tx_ridx) { struct Vmxnet3_TxCompDesc txcq_descr; + PCIDevice *d = PCI_DEVICE(s); VMXNET3_RING_DUMP(VMW_RIPRN, "TXC", qidx, &s->txq_descr[qidx].comp_ring); txcq_descr.txdIdx = tx_ridx; txcq_descr.gen = vmxnet3_ring_curr_gen(&s->txq_descr[qidx].comp_ring); - vmxnet3_ring_write_curr_cell(&s->txq_descr[qidx].comp_ring, &txcq_descr); + vmxnet3_ring_write_curr_cell(d, &s->txq_descr[qidx].comp_ring, &txcq_descr); /* Flush changes in TX descriptor before changing the counter value */ smp_wmb(); @@ -688,13 +692,14 @@ vmxnet3_pop_next_tx_descr(VMXNET3State *s, uint32_t *descr_idx) { Vmxnet3Ring *ring = &s->txq_descr[qidx].tx_ring; + PCIDevice *d = PCI_DEVICE(s); - vmxnet3_ring_read_curr_cell(ring, txd); + vmxnet3_ring_read_curr_cell(d, ring, txd); if (txd->gen == vmxnet3_ring_curr_gen(ring)) { /* Only read after generation field verification */ smp_rmb(); /* Re-read to be sure we got the latest version */ - vmxnet3_ring_read_curr_cell(ring, txd); + vmxnet3_ring_read_curr_cell(d, ring, txd); VMXNET3_RING_DUMP(VMW_RIPRN, "TX", qidx, ring); *descr_idx = vmxnet3_ring_curr_cell_idx(ring); vmxnet3_inc_tx_consumption_counter(s, qidx); @@ -782,9 +787,11 @@ static inline void vmxnet3_read_next_rx_descr(VMXNET3State *s, int qidx, int ridx, struct Vmxnet3_RxDesc *dbuf, uint32_t *didx) { + PCIDevice *d = PCI_DEVICE(s); + Vmxnet3Ring *ring = &s->rxq_descr[qidx].rx_ring[ridx]; *didx = vmxnet3_ring_curr_cell_idx(ring); - vmxnet3_ring_read_curr_cell(ring, dbuf); + vmxnet3_ring_read_curr_cell(d, ring, dbuf); } static inline uint8_t @@ -802,9 +809,8 @@ vmxnet3_pop_rxc_descr(VMXNET3State *s, int qidx, uint32_t *descr_gen) hwaddr daddr = vmxnet3_ring_curr_cell_pa(&s->rxq_descr[qidx].comp_ring); - pci_dma_read(PCI_DEVICE(s), daddr, - &rxcd, sizeof(struct Vmxnet3_RxCompDesc)); - + pci_dma_read(PCI_DEVICE(s), + daddr, &rxcd, sizeof(struct Vmxnet3_RxCompDesc)); ring_gen = vmxnet3_ring_curr_gen(&s->rxq_descr[qidx].comp_ring); if (rxcd.gen != ring_gen) { @@ -1058,6 +1064,7 @@ static bool vmxnet3_indicate_packet(VMXNET3State *s) { struct Vmxnet3_RxDesc rxd; + PCIDevice *d = PCI_DEVICE(s); bool is_head = true; uint32_t rxd_idx; uint32_t rx_ridx = 0; @@ -1091,7 +1098,7 @@ vmxnet3_indicate_packet(VMXNET3State *s) } chunk_size = MIN(bytes_left, rxd.len); - vmxnet3_pci_dma_writev(PCI_DEVICE(s), data, bytes_copied, + vmxnet3_pci_dma_writev(d, data, bytes_copied, le64_to_cpu(rxd.addr), chunk_size); bytes_copied += chunk_size; bytes_left -= chunk_size; @@ -1099,7 +1106,7 @@ vmxnet3_indicate_packet(VMXNET3State *s) vmxnet3_dump_rx_descr(&rxd); if (ready_rxcd_pa != 0) { - pci_dma_write(PCI_DEVICE(s), ready_rxcd_pa, &rxcd, sizeof(rxcd)); + pci_dma_write(d, ready_rxcd_pa, &rxcd, sizeof(rxcd)); } memset(&rxcd, 0, sizeof(struct Vmxnet3_RxCompDesc)); @@ -1131,7 +1138,7 @@ vmxnet3_indicate_packet(VMXNET3State *s) rxcd.eop = 1; rxcd.err = (bytes_left != 0); - pci_dma_write(PCI_DEVICE(s), ready_rxcd_pa, &rxcd, sizeof(rxcd)); + pci_dma_write(d, ready_rxcd_pa, &rxcd, sizeof(rxcd)); /* Flush RX descriptor changes */ smp_wmb(); @@ -1250,7 +1257,9 @@ static void vmxnet3_reset(VMXNET3State *s) static void vmxnet3_update_rx_mode(VMXNET3State *s) { - s->rx_mode = VMXNET3_READ_DRV_SHARED32(s->drv_shmem, + PCIDevice *d = PCI_DEVICE(s); + + s->rx_mode = VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, devRead.rxFilterConf.rxMode); VMW_CFPRN("RX mode: 0x%08X", s->rx_mode); } @@ -1258,9 +1267,10 @@ static void vmxnet3_update_rx_mode(VMXNET3State *s) static void vmxnet3_update_vlan_filters(VMXNET3State *s) { int i; + PCIDevice *d = PCI_DEVICE(s); /* Copy configuration from shared memory */ - VMXNET3_READ_DRV_SHARED(s->drv_shmem, + VMXNET3_READ_DRV_SHARED(d, s->drv_shmem, devRead.rxFilterConf.vfTable, s->vlan_table, sizeof(s->vlan_table)); @@ -1281,8 +1291,10 @@ static void vmxnet3_update_vlan_filters(VMXNET3State *s) static void vmxnet3_update_mcast_filters(VMXNET3State *s) { + PCIDevice *d = PCI_DEVICE(s); + uint16_t list_bytes = - VMXNET3_READ_DRV_SHARED16(s->drv_shmem, + VMXNET3_READ_DRV_SHARED16(d, s->drv_shmem, devRead.rxFilterConf.mfTableLen); s->mcast_list_len = list_bytes / sizeof(s->mcast_list[0]); @@ -1299,10 +1311,10 @@ static void vmxnet3_update_mcast_filters(VMXNET3State *s) } else { int i; hwaddr mcast_list_pa = - VMXNET3_READ_DRV_SHARED64(s->drv_shmem, + VMXNET3_READ_DRV_SHARED64(d, s->drv_shmem, devRead.rxFilterConf.mfTablePA); - pci_dma_read(PCI_DEVICE(s), mcast_list_pa, s->mcast_list, list_bytes); + pci_dma_read(d, mcast_list_pa, s->mcast_list, list_bytes); VMW_CFPRN("Current multicast list len is %d:", s->mcast_list_len); for (i = 0; i < s->mcast_list_len; i++) { @@ -1328,19 +1340,20 @@ static uint32_t vmxnet3_get_interrupt_config(VMXNET3State *s) static void vmxnet3_fill_stats(VMXNET3State *s) { int i; + PCIDevice *d = PCI_DEVICE(s); if (!s->device_active) return; for (i = 0; i < s->txq_num; i++) { - pci_dma_write(PCI_DEVICE(s), + pci_dma_write(d, s->txq_descr[i].tx_stats_pa, &s->txq_descr[i].txq_stats, sizeof(s->txq_descr[i].txq_stats)); } for (i = 0; i < s->rxq_num; i++) { - pci_dma_write(PCI_DEVICE(s), + pci_dma_write(d, s->rxq_descr[i].rx_stats_pa, &s->rxq_descr[i].rxq_stats, sizeof(s->rxq_descr[i].rxq_stats)); @@ -1350,8 +1363,9 @@ static void vmxnet3_fill_stats(VMXNET3State *s) static void vmxnet3_adjust_by_guest_type(VMXNET3State *s) { struct Vmxnet3_GOSInfo gos; + PCIDevice *d = PCI_DEVICE(s); - VMXNET3_READ_DRV_SHARED(s->drv_shmem, devRead.misc.driverInfo.gos, + VMXNET3_READ_DRV_SHARED(d, s->drv_shmem, devRead.misc.driverInfo.gos, &gos, sizeof(gos)); s->rx_packets_compound = (gos.gosType == VMXNET3_GOS_TYPE_WIN) ? false : true; @@ -1371,13 +1385,14 @@ vmxnet3_dump_conf_descr(const char *name, static void vmxnet3_update_pm_state(VMXNET3State *s) { struct Vmxnet3_VariableLenConfDesc pm_descr; + PCIDevice *d = PCI_DEVICE(s); pm_descr.confLen = - VMXNET3_READ_DRV_SHARED32(s->drv_shmem, devRead.pmConfDesc.confLen); + VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, devRead.pmConfDesc.confLen); pm_descr.confVer = - VMXNET3_READ_DRV_SHARED32(s->drv_shmem, devRead.pmConfDesc.confVer); + VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, devRead.pmConfDesc.confVer); pm_descr.confPA = - VMXNET3_READ_DRV_SHARED64(s->drv_shmem, devRead.pmConfDesc.confPA); + VMXNET3_READ_DRV_SHARED64(d, s->drv_shmem, devRead.pmConfDesc.confPA); vmxnet3_dump_conf_descr("PM State", &pm_descr); } @@ -1386,8 +1401,9 @@ static void vmxnet3_update_features(VMXNET3State *s) { uint32_t guest_features; int rxcso_supported; + PCIDevice *d = PCI_DEVICE(s); - guest_features = VMXNET3_READ_DRV_SHARED32(s->drv_shmem, + guest_features = VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, devRead.misc.uptFeatures); rxcso_supported = VMXNET_FLAG_IS_SET(guest_features, UPT1_F_RXCSUM); @@ -1462,12 +1478,13 @@ static void vmxnet3_activate_device(VMXNET3State *s) { int i; static const uint32_t VMXNET3_DEF_TX_THRESHOLD = 1; + PCIDevice *d = PCI_DEVICE(s); hwaddr qdescr_table_pa; uint64_t pa; uint32_t size; /* Verify configuration consistency */ - if (!vmxnet3_verify_driver_magic(s->drv_shmem)) { + if (!vmxnet3_verify_driver_magic(d, s->drv_shmem)) { VMW_ERPRN("Device configuration received from driver is invalid"); return; } @@ -1483,11 +1500,11 @@ static void vmxnet3_activate_device(VMXNET3State *s) vmxnet3_update_pm_state(s); vmxnet3_setup_rx_filtering(s); /* Cache fields from shared memory */ - s->mtu = VMXNET3_READ_DRV_SHARED32(s->drv_shmem, devRead.misc.mtu); + s->mtu = VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, devRead.misc.mtu); VMW_CFPRN("MTU is %u", s->mtu); s->max_rx_frags = - VMXNET3_READ_DRV_SHARED16(s->drv_shmem, devRead.misc.maxNumRxSG); + VMXNET3_READ_DRV_SHARED16(d, s->drv_shmem, devRead.misc.maxNumRxSG); if (s->max_rx_frags == 0) { s->max_rx_frags = 1; @@ -1496,24 +1513,24 @@ static void vmxnet3_activate_device(VMXNET3State *s) VMW_CFPRN("Max RX fragments is %u", s->max_rx_frags); s->event_int_idx = - VMXNET3_READ_DRV_SHARED8(s->drv_shmem, devRead.intrConf.eventIntrIdx); + VMXNET3_READ_DRV_SHARED8(d, s->drv_shmem, devRead.intrConf.eventIntrIdx); assert(vmxnet3_verify_intx(s, s->event_int_idx)); VMW_CFPRN("Events interrupt line is %u", s->event_int_idx); s->auto_int_masking = - VMXNET3_READ_DRV_SHARED8(s->drv_shmem, devRead.intrConf.autoMask); + VMXNET3_READ_DRV_SHARED8(d, s->drv_shmem, devRead.intrConf.autoMask); VMW_CFPRN("Automatic interrupt masking is %d", (int)s->auto_int_masking); s->txq_num = - VMXNET3_READ_DRV_SHARED8(s->drv_shmem, devRead.misc.numTxQueues); + VMXNET3_READ_DRV_SHARED8(d, s->drv_shmem, devRead.misc.numTxQueues); s->rxq_num = - VMXNET3_READ_DRV_SHARED8(s->drv_shmem, devRead.misc.numRxQueues); + VMXNET3_READ_DRV_SHARED8(d, s->drv_shmem, devRead.misc.numRxQueues); VMW_CFPRN("Number of TX/RX queues %u/%u", s->txq_num, s->rxq_num); vmxnet3_validate_queues(s); qdescr_table_pa = - VMXNET3_READ_DRV_SHARED64(s->drv_shmem, devRead.misc.queueDescPA); + VMXNET3_READ_DRV_SHARED64(d, s->drv_shmem, devRead.misc.queueDescPA); VMW_CFPRN("TX queues descriptors table is at 0x%" PRIx64, qdescr_table_pa); /* @@ -1529,25 +1546,25 @@ static void vmxnet3_activate_device(VMXNET3State *s) /* Read interrupt number for this TX queue */ s->txq_descr[i].intr_idx = - VMXNET3_READ_TX_QUEUE_DESCR8(qdescr_pa, conf.intrIdx); + VMXNET3_READ_TX_QUEUE_DESCR8(d, qdescr_pa, conf.intrIdx); assert(vmxnet3_verify_intx(s, s->txq_descr[i].intr_idx)); VMW_CFPRN("TX Queue %d interrupt: %d", i, s->txq_descr[i].intr_idx); /* Read rings memory locations for TX queues */ - pa = VMXNET3_READ_TX_QUEUE_DESCR64(qdescr_pa, conf.txRingBasePA); - size = VMXNET3_READ_TX_QUEUE_DESCR32(qdescr_pa, conf.txRingSize); + pa = VMXNET3_READ_TX_QUEUE_DESCR64(d, qdescr_pa, conf.txRingBasePA); + size = VMXNET3_READ_TX_QUEUE_DESCR32(d, qdescr_pa, conf.txRingSize); - vmxnet3_ring_init(&s->txq_descr[i].tx_ring, pa, size, + vmxnet3_ring_init(d, &s->txq_descr[i].tx_ring, pa, size, sizeof(struct Vmxnet3_TxDesc), false); VMXNET3_RING_DUMP(VMW_CFPRN, "TX", i, &s->txq_descr[i].tx_ring); s->max_tx_frags += size; /* TXC ring */ - pa = VMXNET3_READ_TX_QUEUE_DESCR64(qdescr_pa, conf.compRingBasePA); - size = VMXNET3_READ_TX_QUEUE_DESCR32(qdescr_pa, conf.compRingSize); - vmxnet3_ring_init(&s->txq_descr[i].comp_ring, pa, size, + pa = VMXNET3_READ_TX_QUEUE_DESCR64(d, qdescr_pa, conf.compRingBasePA); + size = VMXNET3_READ_TX_QUEUE_DESCR32(d, qdescr_pa, conf.compRingSize); + vmxnet3_ring_init(d, &s->txq_descr[i].comp_ring, pa, size, sizeof(struct Vmxnet3_TxCompDesc), true); VMXNET3_RING_DUMP(VMW_CFPRN, "TXC", i, &s->txq_descr[i].comp_ring); @@ -1558,7 +1575,7 @@ static void vmxnet3_activate_device(VMXNET3State *s) sizeof(s->txq_descr[i].txq_stats)); /* Fill device-managed parameters for queues */ - VMXNET3_WRITE_TX_QUEUE_DESCR32(qdescr_pa, + VMXNET3_WRITE_TX_QUEUE_DESCR32(d, qdescr_pa, ctrl.txThreshold, VMXNET3_DEF_TX_THRESHOLD); } @@ -1578,7 +1595,7 @@ static void vmxnet3_activate_device(VMXNET3State *s) /* Read interrupt number for this RX queue */ s->rxq_descr[i].intr_idx = - VMXNET3_READ_TX_QUEUE_DESCR8(qd_pa, conf.intrIdx); + VMXNET3_READ_TX_QUEUE_DESCR8(d, qd_pa, conf.intrIdx); assert(vmxnet3_verify_intx(s, s->rxq_descr[i].intr_idx)); VMW_CFPRN("RX Queue %d interrupt: %d", i, s->rxq_descr[i].intr_idx); @@ -1586,18 +1603,18 @@ static void vmxnet3_activate_device(VMXNET3State *s) /* Read rings memory locations */ for (j = 0; j < VMXNET3_RX_RINGS_PER_QUEUE; j++) { /* RX rings */ - pa = VMXNET3_READ_RX_QUEUE_DESCR64(qd_pa, conf.rxRingBasePA[j]); - size = VMXNET3_READ_RX_QUEUE_DESCR32(qd_pa, conf.rxRingSize[j]); - vmxnet3_ring_init(&s->rxq_descr[i].rx_ring[j], pa, size, + pa = VMXNET3_READ_RX_QUEUE_DESCR64(d, qd_pa, conf.rxRingBasePA[j]); + size = VMXNET3_READ_RX_QUEUE_DESCR32(d, qd_pa, conf.rxRingSize[j]); + vmxnet3_ring_init(d, &s->rxq_descr[i].rx_ring[j], pa, size, sizeof(struct Vmxnet3_RxDesc), false); VMW_CFPRN("RX queue %d:%d: Base: %" PRIx64 ", Size: %d", i, j, pa, size); } /* RXC ring */ - pa = VMXNET3_READ_RX_QUEUE_DESCR64(qd_pa, conf.compRingBasePA); - size = VMXNET3_READ_RX_QUEUE_DESCR32(qd_pa, conf.compRingSize); - vmxnet3_ring_init(&s->rxq_descr[i].comp_ring, pa, size, + pa = VMXNET3_READ_RX_QUEUE_DESCR64(d, qd_pa, conf.compRingBasePA); + size = VMXNET3_READ_RX_QUEUE_DESCR32(d, qd_pa, conf.compRingSize); + vmxnet3_ring_init(d, &s->rxq_descr[i].comp_ring, pa, size, sizeof(struct Vmxnet3_RxCompDesc), true); VMW_CFPRN("RXC queue %d: Base: %" PRIx64 ", Size: %d", i, pa, size); @@ -1764,19 +1781,21 @@ static uint64_t vmxnet3_get_command_status(VMXNET3State *s) static void vmxnet3_set_events(VMXNET3State *s, uint32_t val) { uint32_t events; + PCIDevice *d = PCI_DEVICE(s); VMW_CBPRN("Setting events: 0x%x", val); - events = VMXNET3_READ_DRV_SHARED32(s->drv_shmem, ecr) | val; - VMXNET3_WRITE_DRV_SHARED32(s->drv_shmem, ecr, events); + events = VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, ecr) | val; + VMXNET3_WRITE_DRV_SHARED32(d, s->drv_shmem, ecr, events); } static void vmxnet3_ack_events(VMXNET3State *s, uint32_t val) { + PCIDevice *d = PCI_DEVICE(s); uint32_t events; VMW_CBPRN("Clearing events: 0x%x", val); - events = VMXNET3_READ_DRV_SHARED32(s->drv_shmem, ecr) & ~val; - VMXNET3_WRITE_DRV_SHARED32(s->drv_shmem, ecr, events); + events = VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, ecr) & ~val; + VMXNET3_WRITE_DRV_SHARED32(d, s->drv_shmem, ecr, events); } static void -- 2.7.4 ^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Net patches 2016-06-28 3:35 [Qemu-devel] [PULL 0/5] Net patches Jason Wang ` (4 preceding siblings ...) 2016-06-28 3:35 ` [Qemu-devel] [PULL 5/5] vmxnet3: Fix reading/writing guest memory specially when behind an IOMMU Jason Wang @ 2016-06-28 10:07 ` Peter Maydell 5 siblings, 0 replies; 23+ messages in thread From: Peter Maydell @ 2016-06-28 10:07 UTC (permalink / raw) To: Jason Wang; +Cc: QEMU Developers On 28 June 2016 at 04:35, Jason Wang <jasowang@redhat.com> wrote: > The following changes since commit 14e60aaece20a1cfc059a69f6491b0899f9257a8: > > hw/net/e1000: Don't use *_to_cpup() (2016-06-27 16:39:56 +0100) > > are available in the git repository at: > > https://github.com/jasowang/qemu.git tags/net-pull-request > > for you to fetch changes up to c508277335e3b6b20cf18e6ea3a35c1fa835c64a: > > vmxnet3: Fix reading/writing guest memory specially when behind an IOMMU (2016-06-28 10:13:57 +0800) > > ---------------------------------------------------------------- > > ---------------------------------------------------------------- Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 0/5] Net patches @ 2019-07-29 8:33 Jason Wang 2019-07-29 11:47 ` Peter Maydell 0 siblings, 1 reply; 23+ messages in thread From: Jason Wang @ 2019-07-29 8:33 UTC (permalink / raw) To: qemu-devel, peter.maydell; +Cc: Jason Wang The following changes since commit fff3159900d2b95613a9cb75fc3703e67a674729: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190726' into staging (2019-07-26 16:23:07 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to fetch changes up to f77bed14f01557596727c4eea042e9818c242049: net/colo-compare.c: Fix memory leak and code style issue. (2019-07-29 16:29:30 +0800) ---------------------------------------------------------------- ---------------------------------------------------------------- Jason Wang (1): e1000: don't raise interrupt in pre_save() Prasad J Pandit (3): qemu-bridge-helper: restrict interface name to IFNAMSIZ qemu-bridge-helper: move repeating code in parse_acl_file net: tap: replace snprintf with g_strdup_printf calls Zhang Chen (1): net/colo-compare.c: Fix memory leak and code style issue. hw/net/e1000.c | 8 ++------ net/colo-compare.c | 27 ++++++++++++++++++++------- net/tap.c | 19 +++++++++++-------- qemu-bridge-helper.c | 24 +++++++++++++++++------- 4 files changed, 50 insertions(+), 28 deletions(-) ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Net patches 2019-07-29 8:33 Jason Wang @ 2019-07-29 11:47 ` Peter Maydell 2019-07-29 12:50 ` Jason Wang 0 siblings, 1 reply; 23+ messages in thread From: Peter Maydell @ 2019-07-29 11:47 UTC (permalink / raw) To: Jason Wang; +Cc: QEMU Developers On Mon, 29 Jul 2019 at 09:33, Jason Wang <jasowang@redhat.com> wrote: > > The following changes since commit fff3159900d2b95613a9cb75fc3703e67a674729: > > Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190726' into staging (2019-07-26 16:23:07 +0100) > > are available in the git repository at: > > https://github.com/jasowang/qemu.git tags/net-pull-request > > for you to fetch changes up to f77bed14f01557596727c4eea042e9818c242049: > > net/colo-compare.c: Fix memory leak and code style issue. (2019-07-29 16:29:30 +0800) > > ---------------------------------------------------------------- > > ---------------------------------------------------------------- > Jason Wang (1): > e1000: don't raise interrupt in pre_save() > > Prasad J Pandit (3): > qemu-bridge-helper: restrict interface name to IFNAMSIZ > qemu-bridge-helper: move repeating code in parse_acl_file > net: tap: replace snprintf with g_strdup_printf calls > > Zhang Chen (1): > net/colo-compare.c: Fix memory leak and code style issue. Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/4.1 for any user-visible changes. -- PMM ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Net patches 2019-07-29 11:47 ` Peter Maydell @ 2019-07-29 12:50 ` Jason Wang 0 siblings, 0 replies; 23+ messages in thread From: Jason Wang @ 2019-07-29 12:50 UTC (permalink / raw) To: Peter Maydell; +Cc: QEMU Developers On 2019/7/29 下午7:47, Peter Maydell wrote: > On Mon, 29 Jul 2019 at 09:33, Jason Wang <jasowang@redhat.com> wrote: >> The following changes since commit fff3159900d2b95613a9cb75fc3703e67a674729: >> >> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190726' into staging (2019-07-26 16:23:07 +0100) >> >> are available in the git repository at: >> >> https://github.com/jasowang/qemu.git tags/net-pull-request >> >> for you to fetch changes up to f77bed14f01557596727c4eea042e9818c242049: >> >> net/colo-compare.c: Fix memory leak and code style issue. (2019-07-29 16:29:30 +0800) >> >> ---------------------------------------------------------------- >> >> ---------------------------------------------------------------- >> Jason Wang (1): >> e1000: don't raise interrupt in pre_save() >> >> Prasad J Pandit (3): >> qemu-bridge-helper: restrict interface name to IFNAMSIZ >> qemu-bridge-helper: move repeating code in parse_acl_file >> net: tap: replace snprintf with g_strdup_printf calls >> >> Zhang Chen (1): >> net/colo-compare.c: Fix memory leak and code style issue. > > Applied, thanks. > > Please update the changelog at https://wiki.qemu.org/ChangeLog/4.1 > for any user-visible changes. > > -- PMM Thanks for the reminding. There's no user-visible changes. ^ permalink raw reply [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 0/5] Net patches @ 2017-08-14 3:33 Jason Wang 2017-08-14 6:51 ` Peter Maydell 0 siblings, 1 reply; 23+ messages in thread From: Jason Wang @ 2017-08-14 3:33 UTC (permalink / raw) To: qemu-devel, peter.maydell; +Cc: Jason Wang The following changes since commit 9db6ffc76676731a25a5538ab71e8ca6ac234f80: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2017-08-11 15:11:50 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to fetch changes up to 131f6055f1f0eba4cd2e862a8ff907dbde4d94d1: qemu-doc: Mention host_net_add/-remove in the deprecation chapter (2017-08-14 10:56:47 +0800) ---------------------------------------------------------------- ---------------------------------------------------------------- Mao Zhongyi (4): net/rocker: Remove the dead error handling net/rocker: Plug memory leak in pci_rocker_init() net/rocker: Convert to realize() net/rocker: Fix the unusual macro name Thomas Huth (1): qemu-doc: Mention host_net_add/-remove in the deprecation chapter hw/net/rocker/rocker.c | 94 +++++++++++-------------------------------- hw/net/rocker/rocker_desc.c | 10 ----- hw/net/rocker/rocker_fp.c | 4 -- hw/net/rocker/rocker_of_dpa.c | 20 --------- hw/net/rocker/rocker_world.c | 12 +++--- qemu-doc.texi | 8 ++++ 6 files changed, 36 insertions(+), 112 deletions(-) ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Net patches 2017-08-14 3:33 Jason Wang @ 2017-08-14 6:51 ` Peter Maydell 2017-08-14 8:07 ` Jason Wang 0 siblings, 1 reply; 23+ messages in thread From: Peter Maydell @ 2017-08-14 6:51 UTC (permalink / raw) To: Jason Wang; +Cc: QEMU Developers On 14 August 2017 at 04:33, Jason Wang <jasowang@redhat.com> wrote: > The following changes since commit 9db6ffc76676731a25a5538ab71e8ca6ac234f80: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2017-08-11 15:11:50 +0100) > > are available in the git repository at: > > https://github.com/jasowang/qemu.git tags/net-pull-request > > for you to fetch changes up to 131f6055f1f0eba4cd2e862a8ff907dbde4d94d1: > > qemu-doc: Mention host_net_add/-remove in the deprecation chapter (2017-08-14 10:56:47 +0800) > > ---------------------------------------------------------------- > > ---------------------------------------------------------------- > Mao Zhongyi (4): > net/rocker: Remove the dead error handling > net/rocker: Plug memory leak in pci_rocker_init() > net/rocker: Convert to realize() > net/rocker: Fix the unusual macro name > > Thomas Huth (1): > qemu-doc: Mention host_net_add/-remove in the deprecation chapter It's not clear to me why these should all be going into 2.10, especially since the date for rc3 is tomorrow and that in theory is our final rc. At this point we should only be taking patches that are fixes for significant bugs or bugs that are regressions since 2.9. (Docs changes are OK too.) Is there a good reason for putting in all these rocker patches that you haven't mentioned in the cover letter? They look like 2.11 material just judging by the patch titles. thanks -- PMM ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Net patches 2017-08-14 6:51 ` Peter Maydell @ 2017-08-14 8:07 ` Jason Wang 0 siblings, 0 replies; 23+ messages in thread From: Jason Wang @ 2017-08-14 8:07 UTC (permalink / raw) To: Peter Maydell; +Cc: QEMU Developers On 2017年08月14日 14:51, Peter Maydell wrote: > On 14 August 2017 at 04:33, Jason Wang <jasowang@redhat.com> wrote: >> The following changes since commit 9db6ffc76676731a25a5538ab71e8ca6ac234f80: >> >> Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2017-08-11 15:11:50 +0100) >> >> are available in the git repository at: >> >> https://github.com/jasowang/qemu.git tags/net-pull-request >> >> for you to fetch changes up to 131f6055f1f0eba4cd2e862a8ff907dbde4d94d1: >> >> qemu-doc: Mention host_net_add/-remove in the deprecation chapter (2017-08-14 10:56:47 +0800) >> >> ---------------------------------------------------------------- >> >> ---------------------------------------------------------------- >> Mao Zhongyi (4): >> net/rocker: Remove the dead error handling >> net/rocker: Plug memory leak in pci_rocker_init() >> net/rocker: Convert to realize() >> net/rocker: Fix the unusual macro name >> >> Thomas Huth (1): >> qemu-doc: Mention host_net_add/-remove in the deprecation chapter > It's not clear to me why these should all be going into 2.10, > especially since the date for rc3 is tomorrow and that in theory > is our final rc. At this point we should only be taking patches > that are fixes for significant bugs or bugs that are regressions > since 2.9. (Docs changes are OK too.) Is there a good reason > for putting in all these rocker patches that you haven't > mentioned in the cover letter? They look like 2.11 material > just judging by the patch titles. > > thanks > -- PMM Ok, let me send a V2 and remove the rocker patches. Thanks ^ permalink raw reply [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 0/5] Net patches @ 2017-02-15 3:53 Jason Wang 2017-02-16 14:23 ` Peter Maydell 0 siblings, 1 reply; 23+ messages in thread From: Jason Wang @ 2017-02-15 3:53 UTC (permalink / raw) To: peter.maydell; +Cc: qemu-devel, Jason Wang The following changes since commit 5dae13cd71f0755a1395b5a4cde635b8a6ee3f58: Merge remote-tracking branch 'remotes/rth/tags/pull-or-20170214' into staging (2017-02-14 09:55:48 +0000) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to fetch changes up to 4154c7e03fa55b4cf52509a83d50d6c09d743b77: net: e1000e: fix an infinite loop issue (2017-02-15 11:18:57 +0800) ---------------------------------------------------------------- ---------------------------------------------------------------- Li Qiang (1): net: e1000e: fix an infinite loop issue Paolo Bonzini (1): net: e1000e: fix dead code in e1000e_write_packet_to_guest Prasad J Pandit (1): net: imx: limit buffer descriptor count Thomas Huth (1): net: Mark 'vlan' parameter as deprecated Zhang Chen (1): colo-compare: sort TCP packet queue by sequence number hw/net/e1000e_core.c | 9 +++++++-- hw/net/imx_fec.c | 10 ++++++---- net/colo-compare.c | 19 +++++++++++++++++++ net/net.c | 6 ++++++ 4 files changed, 38 insertions(+), 6 deletions(-) ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Net patches 2017-02-15 3:53 Jason Wang @ 2017-02-16 14:23 ` Peter Maydell 0 siblings, 0 replies; 23+ messages in thread From: Peter Maydell @ 2017-02-16 14:23 UTC (permalink / raw) To: Jason Wang; +Cc: QEMU Developers On 15 February 2017 at 03:53, Jason Wang <jasowang@redhat.com> wrote: > The following changes since commit 5dae13cd71f0755a1395b5a4cde635b8a6ee3f58: > > Merge remote-tracking branch 'remotes/rth/tags/pull-or-20170214' into staging (2017-02-14 09:55:48 +0000) > > are available in the git repository at: > > https://github.com/jasowang/qemu.git tags/net-pull-request > > for you to fetch changes up to 4154c7e03fa55b4cf52509a83d50d6c09d743b77: > > net: e1000e: fix an infinite loop issue (2017-02-15 11:18:57 +0800) > > ---------------------------------------------------------------- > > --------------------------------------------------------------- Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 0/5] Net patches @ 2016-04-06 2:37 Jason Wang 2016-04-07 9:37 ` Peter Maydell 0 siblings, 1 reply; 23+ messages in thread From: Jason Wang @ 2016-04-06 2:37 UTC (permalink / raw) To: qemu-devel, peter.maydell; +Cc: Jason Wang The following changes since commit 7acbff99c6c285b3070bf0e768d56f511e2bf346: Update version for v2.6.0-rc1 release (2016-04-05 21:53:18 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to fetch changes up to e0a039e50d481dce6b4ee45a29002538a258cd89: filter-buffer: fix segfault when starting qemu with status=off property (2016-04-06 09:52:07 +0800) ---------------------------------------------------------------- - fix segfault when start filter with status=off - fix large array to heap for nc_sendv_compat() - fix OptsVisitor memory leak during net client init ---------------------------------------------------------------- Isaac Lozano (1): util: Improved qemu_hexmap() to include an ascii dump of the buffer Jason Wang (1): rtl8139: using CP_TX_OWN for ownership transferring during tx Paolo Bonzini (1): net: fix OptsVisitor memory leak Pooja Dhannawat (1): net: Allocating Large sized arrays to heap zhanghailiang (1): filter-buffer: fix segfault when starting qemu with status=off property hw/net/rtl8139.c | 2 +- net/filter.c | 2 +- net/net.c | 44 +++++++++++--------------------------------- util/hexdump.c | 33 ++++++++++++++++++++++----------- 4 files changed, 35 insertions(+), 46 deletions(-) ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Net patches 2016-04-06 2:37 Jason Wang @ 2016-04-07 9:37 ` Peter Maydell 0 siblings, 0 replies; 23+ messages in thread From: Peter Maydell @ 2016-04-07 9:37 UTC (permalink / raw) To: Jason Wang; +Cc: QEMU Developers On 6 April 2016 at 03:37, Jason Wang <jasowang@redhat.com> wrote: > The following changes since commit 7acbff99c6c285b3070bf0e768d56f511e2bf346: > > Update version for v2.6.0-rc1 release (2016-04-05 21:53:18 +0100) > > are available in the git repository at: > > https://github.com/jasowang/qemu.git tags/net-pull-request > > for you to fetch changes up to e0a039e50d481dce6b4ee45a29002538a258cd89: > > filter-buffer: fix segfault when starting qemu with status=off property (2016-04-06 09:52:07 +0800) > > ---------------------------------------------------------------- > - fix segfault when start filter with status=off > - fix large array to heap for nc_sendv_compat() > - fix OptsVisitor memory leak during net client init > Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 0/5] Net patches @ 2015-06-24 15:37 Stefan Hajnoczi 2015-06-25 14:23 ` Peter Maydell 0 siblings, 1 reply; 23+ messages in thread From: Stefan Hajnoczi @ 2015-06-24 15:37 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi The following changes since commit a3206972a9eab65ec8e8f9ae320ad628ba4b58f1: Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-06-22' into staging (2015-06-23 10:38:00 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/net-pull-request for you to fetch changes up to 1e81aba5ac0b908ab859bf8ddf43ece33732d49c: net: simplify net_client_init1() (2015-06-24 16:33:42 +0100) ---------------------------------------------------------------- ---------------------------------------------------------------- Stefan Hajnoczi (5): net: add missing "netmap" to host_net_devices[] net: replace net_client_init1() netdev whitelist with blacklist net: raise an error if -net type is invalid net: drop if expression that is always true net: simplify net_client_init1() net/net.c | 91 ++++++++++++++++++++++++++------------------------------------- 1 file changed, 37 insertions(+), 54 deletions(-) -- 2.4.3 ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Net patches 2015-06-24 15:37 Stefan Hajnoczi @ 2015-06-25 14:23 ` Peter Maydell 0 siblings, 0 replies; 23+ messages in thread From: Peter Maydell @ 2015-06-25 14:23 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: QEMU Developers On 24 June 2015 at 16:37, Stefan Hajnoczi <stefanha@redhat.com> wrote: > The following changes since commit a3206972a9eab65ec8e8f9ae320ad628ba4b58f1: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-06-22' into staging (2015-06-23 10:38:00 +0100) > > are available in the git repository at: > > git://github.com/stefanha/qemu.git tags/net-pull-request > > for you to fetch changes up to 1e81aba5ac0b908ab859bf8ddf43ece33732d49c: > > net: simplify net_client_init1() (2015-06-24 16:33:42 +0100) > > ---------------------------------------------------------------- > > ---------------------------------------------------------------- > > Stefan Hajnoczi (5): > net: add missing "netmap" to host_net_devices[] > net: replace net_client_init1() netdev whitelist with blacklist > net: raise an error if -net type is invalid > net: drop if expression that is always true > net: simplify net_client_init1() Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 0/5] Net patches @ 2014-12-19 13:18 Stefan Hajnoczi 2014-12-21 23:16 ` Peter Maydell 0 siblings, 1 reply; 23+ messages in thread From: Stefan Hajnoczi @ 2014-12-19 13:18 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi The following changes since commit 86b182ac0e0b44726d85598cbefb468ed22517fc: Merge remote-tracking branch 'remotes/xtensa/tags/20141217-xtensa' into staging (2014-12-17 17:31:26 +0000) are available in the git repository at: git://github.com/stefanha/qemu.git tags/net-pull-request for you to fetch changes up to 20302e71a5b654d7b4d0d61c7384e9dd8d112971: e1000: defer packets until BM enabled (2014-12-19 13:17:06 +0000) ---------------------------------------------------------------- ---------------------------------------------------------------- Jason Wang (1): net: don't use set/get_pointer() in set/get_netdev() Markus Armbruster (2): net: Fuse g_malloc(); memset() into g_new0() net: Use g_new() & friends where that makes obvious sense Michael S. Tsirkin (1): e1000: defer packets until BM enabled Wangkai (Kevin,C) (1): tap: fix vcpu long time io blocking on tap hw/core/qdev-properties-system.c | 82 +++++++++++++++++++++------------------- hw/net/e1000.c | 21 +++++++++- net/l2tpv3.c | 9 ++--- net/queue.c | 2 +- net/slirp.c | 2 +- net/tap.c | 12 ++++++ 6 files changed, 82 insertions(+), 46 deletions(-) -- 2.1.0 ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Net patches 2014-12-19 13:18 Stefan Hajnoczi @ 2014-12-21 23:16 ` Peter Maydell 0 siblings, 0 replies; 23+ messages in thread From: Peter Maydell @ 2014-12-21 23:16 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: QEMU Developers On 19 December 2014 at 13:18, Stefan Hajnoczi <stefanha@redhat.com> wrote: > The following changes since commit 86b182ac0e0b44726d85598cbefb468ed22517fc: > > Merge remote-tracking branch 'remotes/xtensa/tags/20141217-xtensa' into staging (2014-12-17 17:31:26 +0000) > > are available in the git repository at: > > git://github.com/stefanha/qemu.git tags/net-pull-request > > for you to fetch changes up to 20302e71a5b654d7b4d0d61c7384e9dd8d112971: > > e1000: defer packets until BM enabled (2014-12-19 13:17:06 +0000) > > ---------------------------------------------------------------- Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 23+ messages in thread
* [Qemu-devel] [PULL 0/5] Net patches @ 2014-06-09 13:43 Stefan Hajnoczi 2014-06-09 14:26 ` Peter Maydell 0 siblings, 1 reply; 23+ messages in thread From: Stefan Hajnoczi @ 2014-06-09 13:43 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi The following changes since commit 959e41473f2179850578482052fb73b913bc4e42: slirp/arp: do not special-case bogus IP addresses (2014-06-09 01:49:28 +0200) are available in the git repository at: git://github.com/stefanha/qemu.git tags/net-pull-request for you to fetch changes up to 7efea763772c815ad6220d5ea7a46447329f6015: e1000: remove broken support for 82573L (2014-06-09 15:38:58 +0200) ---------------------------------------------------------------- Net patches ---------------------------------------------------------------- Gabriel L. Somlo (3): e1000: allow command-line selection of card model tests: e1000: test additional device IDs e1000: remove broken support for 82573L Jiri Pirko (1): vmxnet3: fix msix vectors unuse Peter Crosthwaite (1): net: xilinx_ethlite: Fix Rx-pong interrupt hw/net/e1000.c | 110 ++++++++++++++++++++++++++++++++++++------------ hw/net/e1000_regs.h | 6 +++ hw/net/vmxnet3.c | 2 +- hw/net/xilinx_ethlite.c | 3 +- tests/e1000-test.c | 33 ++++++++++++--- 5 files changed, 117 insertions(+), 37 deletions(-) -- 1.9.3 ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Net patches 2014-06-09 13:43 Stefan Hajnoczi @ 2014-06-09 14:26 ` Peter Maydell 0 siblings, 0 replies; 23+ messages in thread From: Peter Maydell @ 2014-06-09 14:26 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: QEMU Developers On 9 June 2014 14:43, Stefan Hajnoczi <stefanha@redhat.com> wrote: > The following changes since commit 959e41473f2179850578482052fb73b913bc4e42: > > slirp/arp: do not special-case bogus IP addresses (2014-06-09 01:49:28 +0200) > > are available in the git repository at: > > git://github.com/stefanha/qemu.git tags/net-pull-request > > for you to fetch changes up to 7efea763772c815ad6220d5ea7a46447329f6015: > > e1000: remove broken support for 82573L (2014-06-09 15:38:58 +0200) > > ---------------------------------------------------------------- > Net patches > Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2019-07-29 12:51 UTC | newest] Thread overview: 23+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-06-28 3:35 [Qemu-devel] [PULL 0/5] Net patches Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 1/5] net: fix qemu_announce_self not emitting packets Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 2/5] net: mipsnet: check transmit buffer size before sending Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 3/5] Change net/socket.c to use socket_*() functions Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 4/5] rtl8139: save/load RxMulOk counter (again) Jason Wang 2016-06-28 3:35 ` [Qemu-devel] [PULL 5/5] vmxnet3: Fix reading/writing guest memory specially when behind an IOMMU Jason Wang 2016-06-28 10:07 ` [Qemu-devel] [PULL 0/5] Net patches Peter Maydell -- strict thread matches above, loose matches on Subject: below -- 2019-07-29 8:33 Jason Wang 2019-07-29 11:47 ` Peter Maydell 2019-07-29 12:50 ` Jason Wang 2017-08-14 3:33 Jason Wang 2017-08-14 6:51 ` Peter Maydell 2017-08-14 8:07 ` Jason Wang 2017-02-15 3:53 Jason Wang 2017-02-16 14:23 ` Peter Maydell 2016-04-06 2:37 Jason Wang 2016-04-07 9:37 ` Peter Maydell 2015-06-24 15:37 Stefan Hajnoczi 2015-06-25 14:23 ` Peter Maydell 2014-12-19 13:18 Stefan Hajnoczi 2014-12-21 23:16 ` Peter Maydell 2014-06-09 13:43 Stefan Hajnoczi 2014-06-09 14:26 ` Peter Maydell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).