Date: Fri, 5 Aug 2016 14:14:41 GMT From: vincenzo@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r307239 - soc2016/vincenzo/head/usr.sbin/bhyve Message-ID: <201608051414.u75EEf3j019223@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vincenzo Date: Fri Aug 5 14:14:40 2016 New Revision: 307239 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=307239 Log: bhyve: ptnet_regif: fix cookie computation Modified: soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_netif.c Modified: soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_netif.c ============================================================================== --- soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_netif.c Fri Aug 5 14:13:39 2016 (r307238) +++ soc2016/vincenzo/head/usr.sbin/bhyve/pci_ptnetmap_netif.c Fri Aug 5 14:14:40 2016 (r307239) @@ -119,6 +119,7 @@ for (i = 0; i < sc->num_rings; i++, kick_addr += 4) { struct msix_table_entry *mte; + void *cookie = ((void*)sc) + 4*i; cfg->entries[i].irqfd = vm_get_fd(vmctx); cfg->entries[i].ioctl.com = VM_LAPIC_MSI; @@ -133,12 +134,12 @@ ret = vm_io_reg_handler(vmctx, kick_addr /* ioaddr */, 0 /* in */, 0 /* mask_data */, 0 /* data */, VM_IO_REGH_KWEVENTS, - (void *)sc + 4*i /* cookie */); + cookie /* cookie */); if (ret) { fprintf(stderr, "%s: vm_io_reg_handler %d\n", __func__, ret); } - cfg->entries[i].ioeventfd = (uint64_t) (sc + 4*i); + cfg->entries[i].ioeventfd = (uint64_t) cookie; } ret = ptnetmap_create(sc->ptbe, cfg);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608051414.u75EEf3j019223>