Index: usr.sbin/bhyve/Makefile =================================================================== --- usr.sbin/bhyve/Makefile +++ usr.sbin/bhyve/Makefile @@ -3,6 +3,8 @@ # .include +CFLAGS+=-I${SRCTOP}/sys +.PATH: ${SRCTOP}/sys/cam/ctl PROG= bhyve PACKAGE= bhyve @@ -22,6 +24,8 @@ bootrom.c \ console.c \ consport.c \ + ctl_util.c \ + ctl_scsi_all.c \ dbgport.c \ fwctl.c \ gdb.c \ @@ -42,6 +46,7 @@ pci_virtio_console.c \ pci_virtio_net.c \ pci_virtio_rnd.c \ + pci_virtio_scsi.c \ pci_uart.c \ pci_xhci.c \ pm.c \ @@ -59,12 +64,13 @@ virtio.c \ vga.c \ xmsr.c \ - spinup_ap.c + spinup_ap.c \ + iov.c .PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm SRCS+= vmm_instruction_emul.c -LIBADD= vmmapi md pthread z +LIBADD= vmmapi md pthread z util sbuf cam .if ${MK_OPENSSL} == "no" CFLAGS+=-DNO_OPENSSL Index: usr.sbin/bhyve/bhyve.8 =================================================================== --- usr.sbin/bhyve/bhyve.8 +++ usr.sbin/bhyve/bhyve.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 1, 2018 +.Dd May 2, 2018 .Dt BHYVE 8 .Os .Sh NAME @@ -216,6 +216,8 @@ Virtio network interface. .It Li virtio-blk Virtio block storage interface. +.It Li virtio-scsi +Virtio block SCSI interface. .It Li virtio-rnd Virtio RNG interface. .It Li virtio-console @@ -285,6 +287,11 @@ Specify the logical and physical sector sizes of the emulated disk. The physical sector size is optional and is equal to the logical sector size if not explicitly specified. +.El +.Pp +Block SCSI devices: +.Bl -tag -width 10n +.It Pa /dev/cam/ Ns Oo , Ns Ar port and initiator_id Oc .El .Pp TTY devices: Index: usr.sbin/bhyve/virtio.h =================================================================== --- usr.sbin/bhyve/virtio.h +++ usr.sbin/bhyve/virtio.h @@ -213,6 +213,7 @@ #define VIRTIO_DEV_BLOCK 0x1001 #define VIRTIO_DEV_CONSOLE 0x1003 #define VIRTIO_DEV_RANDOM 0x1005 +#define VIRTIO_DEV_SCSI 0x1008 /* * PCI config space constants.