diff options
author | Neel Natu <neel@FreeBSD.org> | 2013-01-21 08:12:59 +0000 |
---|---|---|
committer | Neel Natu <neel@FreeBSD.org> | 2013-01-21 08:12:59 +0000 |
commit | c3cbaac942459742f77139df8af9562affbff94f (patch) | |
tree | e4fd39e1bb1cb6ab0962316bfe3b4e03e36a7960 | |
parent | f74d878fda32359551249d683f7c4f495fb9126e (diff) | |
download | src-c3cbaac942459742f77139df8af9562affbff94f.tar.gz src-c3cbaac942459742f77139df8af9562affbff94f.zip |
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
Notes
Notes:
svn path=/head/; revision=245740
-rw-r--r-- | usr.sbin/bhyve/pci_emul.h | 1 | ||||
-rw-r--r-- | usr.sbin/bhyve/pci_passthru.c | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/usr.sbin/bhyve/pci_emul.h b/usr.sbin/bhyve/pci_emul.h index e924475fec4e..80a4eacf8640 100644 --- a/usr.sbin/bhyve/pci_emul.h +++ b/usr.sbin/bhyve/pci_emul.h @@ -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]; diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 28abb6b1a409..bc88166af8b2 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; |