Skip to content

Commit

Permalink
12679 want viona driver for bhyve
Browse files Browse the repository at this point in the history
Portions contributed by: Ryan Zezeski <rpz@joyent.com>
Portions contributed by: John Levon <john.levon@joyent.com>
Portions contributed by: Jason King <jason.king@joyent.com>
Portions contributed by: Robert Mustacchi <rm@joyent.com>
Portions contributed by: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Ryan Zezeski <ryan@zinascii.com>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
pfmooney committed May 19, 2020
1 parent d77e6e0 commit b22a70a
Show file tree
Hide file tree
Showing 29 changed files with 4,689 additions and 1,639 deletions.
3 changes: 2 additions & 1 deletion usr/src/cmd/bhyve/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ SRCS = acpi.c \
pci_virtio_console.c \
pci_virtio_net.c \
pci_virtio_rnd.c \
pci_virtio_viona.c \
pci_xhci.c \
pm.c \
post.c \
Expand Down Expand Up @@ -120,7 +121,7 @@ CSTD= $(CSTD_GNU99)
C99MODE= -xc99=%all
C99LMODE= -Xc99=%all

$(PROG) := LDLIBS += -lsocket -lnsl -ldlpi -lmd -luuid -lvmmapi -lz
$(PROG) := LDLIBS += -lsocket -lnsl -ldlpi -ldladm -lmd -luuid -lvmmapi -lz
$(MEVENT_TEST_PROG) := LDLIBS += -lsocket

.KEEP_STATE:
Expand Down
5 changes: 5 additions & 0 deletions usr/src/cmd/bhyve/pci_emul.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,11 @@ pci_lintr_update(struct pci_devinst *pi)
pci_irq_assert(pi);
}
pthread_mutex_unlock(&pi->pi_lintr.lock);
#ifndef __FreeBSD__
if (pi->pi_d->pe_lintrupdate != NULL) {
pi->pi_d->pe_lintrupdate(pi);
}
#endif /* __FreeBSD__ */
}

int
Expand Down
7 changes: 7 additions & 0 deletions usr/src/cmd/bhyve/pci_emul.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
*
* $FreeBSD$
*/
/*
* Copyright 2018 Joyent, Inc.
*/

#ifndef _PCI_EMUL_H_
#define _PCI_EMUL_H_
Expand Down Expand Up @@ -71,6 +74,10 @@ struct pci_devemu {
uint64_t (*pe_barread)(struct vmctx *ctx, int vcpu,
struct pci_devinst *pi, int baridx,
uint64_t offset, int size);

#ifndef __FreeBSD__
void (*pe_lintrupdate)(struct pci_devinst *pi);
#endif /* __FreeBSD__ */
};
#define PCI_EMUL_SET(x) DATA_SET(pci_devemu_set, x);

Expand Down
Loading

0 comments on commit b22a70a

Please sign in to comment.