summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyve/pci_passthru.c
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2013-01-21 08:12:59 +0000
committerneel <neel@FreeBSD.org>2013-01-21 08:12:59 +0000
commitb3baed220eae29e862f14877878344e143346d9d (patch)
treee4fd39e1bb1cb6ab0962316bfe3b4e03e36a7960 /usr.sbin/bhyve/pci_passthru.c
parent7a0ff694d265895eebd08e83b5454645938c4328 (diff)
downloadFreeBSD-src-b3baed220eae29e862f14877878344e143346d9d.zip
FreeBSD-src-b3baed220eae29e862f14877878344e143346d9d.tar.gz
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
Diffstat (limited to 'usr.sbin/bhyve/pci_passthru.c')
-rw-r--r--usr.sbin/bhyve/pci_passthru.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c
index 28abb6b..bc88166 100644
--- a/usr.sbin/bhyve/pci_passthru.c
+++ b/usr.sbin/bhyve/pci_passthru.c
@@ -362,11 +362,10 @@ init_msix_table(struct vmctx *ctx, struct passthru_softc *sc, uint64_t base)
* 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;
OpenPOWER on IntegriCloud