Date: Mon, 21 Jan 2013 08:12:59 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245740 - head/usr.sbin/bhyve Message-ID: <201301210812.r0L8Cxb4022656@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Mon Jan 21 08:12:59 2013 New Revision: 245740 URL: http://svnweb.freebsd.org/changeset/base/245740 Log: Get rid of redundant 'table_size' field in struct pi_msix. If needed it can always be calculated from the number of entries in the MSI-X table. Obtained from: NetApp Modified: head/usr.sbin/bhyve/pci_emul.h head/usr.sbin/bhyve/pci_passthru.c Modified: head/usr.sbin/bhyve/pci_emul.h ============================================================================== --- head/usr.sbin/bhyve/pci_emul.h Mon Jan 21 07:50:38 2013 (r245739) +++ head/usr.sbin/bhyve/pci_emul.h Mon Jan 21 08:12:59 2013 (r245740) @@ -119,7 +119,6 @@ struct pci_devinst { int table_bar; int pba_bar; size_t table_offset; - size_t table_size; int table_count; size_t pba_offset; struct msix_table_entry table[MAX_MSIX_TABLE_SIZE]; Modified: head/usr.sbin/bhyve/pci_passthru.c ============================================================================== --- head/usr.sbin/bhyve/pci_passthru.c Mon Jan 21 07:50:38 2013 (r245739) +++ head/usr.sbin/bhyve/pci_passthru.c Mon Jan 21 08:12:59 2013 (r245740) @@ -362,11 +362,10 @@ init_msix_table(struct vmctx *ctx, struc * XXX for now, assume that the table is not in the middle */ table_size = pi->pi_msix.table_count * MSIX_TABLE_ENTRY_SIZE; - pi->pi_msix.table_size = table_size; idx = pi->pi_msix.table_bar; /* Round up to page size */ - table_size = (table_size + 0x1000) & ~0xFFF; + table_size = roundup2(table_size, 4096); if (pi->pi_msix.table_offset == 0) { /* Map everything after the MSI-X table */ start = pi->pi_bar[idx].addr + table_size;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301210812.r0L8Cxb4022656>