summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyve/pci_virtio_block.c
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2013-10-18 22:05:17 +0000
committergrehan <grehan@FreeBSD.org>2013-10-18 22:05:17 +0000
commit9ad9e387e9806be0093be97b2e0952a7fab968e9 (patch)
treeb4a49ea2f380dac64bdf8e0bcf704afa5d09ca0c /usr.sbin/bhyve/pci_virtio_block.c
parent4bbe413766853fb56498b922eeb0146111eb7ca3 (diff)
downloadFreeBSD-src-9ad9e387e9806be0093be97b2e0952a7fab968e9.zip
FreeBSD-src-9ad9e387e9806be0093be97b2e0952a7fab968e9.tar.gz
MFC r256709:
Eliminate unconditional debug printfs. Linux writes to these nominally read-only registers, so avoid having bhyve write warning messages to stdout when the reg writes can be safely ignored. Change the WPRINTF to DPRINTF which is conditional. Approved by: re (delphij)
Diffstat (limited to 'usr.sbin/bhyve/pci_virtio_block.c')
-rw-r--r--usr.sbin/bhyve/pci_virtio_block.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/usr.sbin/bhyve/pci_virtio_block.c b/usr.sbin/bhyve/pci_virtio_block.c
index a190497..a7556d7 100644
--- a/usr.sbin/bhyve/pci_virtio_block.c
+++ b/usr.sbin/bhyve/pci_virtio_block.c
@@ -256,8 +256,6 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts)
off_t size;
int fd;
int sectsz;
- int use_msix;
- const char *env_msi;
if (opts == NULL) {
printf("virtio-block: backing device required\n");
@@ -336,12 +334,7 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts)
pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_STORAGE);
pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_BLOCK);
- use_msix = 1;
- if ((env_msi = getenv("BHYVE_USE_MSI"))) {
- if (strcasecmp(env_msi, "yes") == 0)
- use_msix = 0;
- }
- if (vi_intr_init(&sc->vbsc_vs, 1, use_msix))
+ if (vi_intr_init(&sc->vbsc_vs, 1, fbsdrun_virtio_msix()))
return (1);
vi_set_io_bar(&sc->vbsc_vs, 0);
return (0);
OpenPOWER on IntegriCloud