Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/pci_virtio_rnd.c
Context not available. | |||||
#include <sysexits.h> | #include <sysexits.h> | ||||
#include "bhyverun.h" | #include "bhyverun.h" | ||||
#include "config.h" | |||||
#include "debug.h" | #include "debug.h" | ||||
#include "pci_emul.h" | #include "pci_emul.h" | ||||
#include "virtio.h" | #include "virtio.h" | ||||
Context not available. | |||||
pci_set_cfgdata16(pi, PCIR_VENDOR, VIRTIO_VENDOR); | pci_set_cfgdata16(pi, PCIR_VENDOR, VIRTIO_VENDOR); | ||||
pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_CRYPTO); | pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_CRYPTO); | ||||
pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_ID_ENTROPY); | pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_ID_ENTROPY); | ||||
pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_VENDOR); | const char *subvendor = get_config_value("virtio_subvendor"); | ||||
if (subvendor == NULL || strcmp(subvendor, "oracle") != 0) { | |||||
pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_VENDOR); | |||||
} else { | |||||
pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_VENDOR_ORACLE); | |||||
} | |||||
if (vi_intr_init(&sc->vrsc_vs, 1, fbsdrun_virtio_msix())) | if (vi_intr_init(&sc->vrsc_vs, 1, fbsdrun_virtio_msix())) | ||||
return (1); | return (1); | ||||
Context not available. |