qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging

slirp updates

# gpg: Signature made Sun 14 Jan 2018 17:19:24 GMT
# gpg: using RSA key 0x996849C1CF560478
# gpg: Good signature from "Samuel Thibault <samuel.thibault@aquilenet.fr>"
# gpg: aka "Samuel Thibault <sthibault@debian.org>"
# gpg: aka "Samuel Thibault <samuel.thibault@gnu.org>"
# gpg: aka "Samuel Thibault <samuel.thibault@inria.fr>"
# gpg: aka "Samuel Thibault <samuel.thibault@labri.fr>"
# gpg: aka "Samuel Thibault <samuel.thibault@ens-lyon.org>"
# gpg: aka "Samuel Thibault <samuel.thibault@u-bordeaux.fr>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 900C B024 B679 31D4 0F82 304B D017 8C76 7D06 9EE6
# Subkey fingerprint: 3A3A 5D46 4660 E867 610C A427 9968 49C1 CF56 0478

* remotes/thibault/tags/samuel-thibault:
slirp: add in6_dhcp_multicast()
slirp: removed unused code
slirp: remove unnecessary struct declaration
slirp: remove unused header
slirp: avoid IN6_IS_ADDR_UNSPECIFIED(), rather use in6_zero()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

+9 -21
+3
slirp/dhcpv6.h
··· 17 17 0x00, 0x00, 0x00, 0x00,\ 18 18 0x00, 0x01, 0x00, 0x02 } } 19 19 20 + #define in6_dhcp_multicast(a)\ 21 + in6_equal(a, &(struct in6_addr)ALLDHCP_MULTICAST) 22 + 20 23 void dhcpv6_input(struct sockaddr_in6 *srcsas, struct mbuf *m); 21 24 22 25 #endif
-13
slirp/ip.h
··· 233 233 #define ipf_next ipf_link.next 234 234 #define ipf_prev ipf_link.prev 235 235 236 - /* 237 - * Structure stored in mbuf in inpcb.ip_options 238 - * and passed to ip_output when ip options are in use. 239 - * The actual length of the options (including ipopt_dst) 240 - * is in m_len. 241 - */ 242 - #define MAX_IPOPTLEN 40 243 - 244 - struct ipoption { 245 - struct in_addr ipopt_dst; /* first-hop dst if source routed */ 246 - int8_t ipopt_list[MAX_IPOPTLEN]; /* options proper */ 247 - } QEMU_PACKED; 248 - 249 236 #endif
+3 -3
slirp/ip6_icmp.c
··· 77 77 DEBUG_ARGS((dfd, " type = %d, code = %d\n", type, code)); 78 78 79 79 if (IN6_IS_ADDR_MULTICAST(&ip->ip_src) || 80 - IN6_IS_ADDR_UNSPECIFIED(&ip->ip_src)) { 80 + in6_zero(&ip->ip_src)) { 81 81 /* TODO icmp error? */ 82 82 return; 83 83 } ··· 272 272 struct mbuf *t = m_get(slirp); 273 273 struct ip6 *rip = mtod(t, struct ip6 *); 274 274 rip->ip_src = icmp->icmp6_nns.target; 275 - if (IN6_IS_ADDR_UNSPECIFIED(&ip->ip_src)) { 275 + if (in6_zero(&ip->ip_src)) { 276 276 rip->ip_dst = (struct in6_addr)ALLNODES_MULTICAST; 277 277 } else { 278 278 rip->ip_dst = ip->ip_src; ··· 350 350 && icmp->icmp6_code == 0 351 351 && !IN6_IS_ADDR_MULTICAST(&icmp->icmp6_nns.target) 352 352 && ntohs(ip->ip_pl) >= ICMP6_NDP_NS_MINLEN 353 - && (!IN6_IS_ADDR_UNSPECIFIED(&ip->ip_src) 353 + && (!in6_zero(&ip->ip_src) 354 354 || in6_solicitednode_multicast(&ip->ip_dst))) { 355 355 if (in6_equal_host(&icmp->icmp6_nns.target)) { 356 356 /* Gratuitous NDP */
-1
slirp/libslirp.h
··· 3 3 4 4 #include "qemu-common.h" 5 5 6 - struct Slirp; 7 6 typedef struct Slirp Slirp; 8 7 9 8 int get_dns_addr(struct in_addr *pdns_addr);
+2 -2
slirp/ndp_table.c
··· 23 23 ethaddr[0], ethaddr[1], ethaddr[2], 24 24 ethaddr[3], ethaddr[4], ethaddr[5])); 25 25 26 - if (IN6_IS_ADDR_MULTICAST(&ip_addr) || IN6_IS_ADDR_UNSPECIFIED(&ip_addr)) { 26 + if (IN6_IS_ADDR_MULTICAST(&ip_addr) || in6_zero(&ip_addr)) { 27 27 /* Do not register multicast or unspecified addresses */ 28 28 DEBUG_CALL(" abort: do not register multicast or unspecified address"); 29 29 return; ··· 60 60 DEBUG_ARG("ip = %s", addrstr); 61 61 #endif 62 62 63 - assert(!IN6_IS_ADDR_UNSPECIFIED(&ip_addr)); 63 + assert(!in6_zero(&ip_addr)); 64 64 65 65 /* Multicast address: fec0::abcd:efgh/8 -> 33:33:ab:cd:ef:gh */ 66 66 if (IN6_IS_ADDR_MULTICAST(&ip_addr)) {
-1
slirp/slirp.h
··· 1 1 #ifndef SLIRP_H 2 2 #define SLIRP_H 3 3 4 - #include "qemu/host-utils.h" 5 4 #include "slirp_config.h" 6 5 7 6 #ifdef _WIN32
+1 -1
slirp/udp6.c
··· 65 65 /* handle DHCPv6 */ 66 66 if (ntohs(uh->uh_dport) == DHCPV6_SERVER_PORT && 67 67 (in6_equal(&ip->ip_dst, &slirp->vhost_addr6) || 68 - in6_equal(&ip->ip_dst, &(struct in6_addr)ALLDHCP_MULTICAST))) { 68 + in6_dhcp_multicast(&ip->ip_dst))) { 69 69 m->m_data += iphlen; 70 70 m->m_len -= iphlen; 71 71 dhcpv6_input(&lhost, m);