mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-01 08:56:55 +00:00
dm: code clean up
Following functions have never been used anywhere. Let's remove them. fbsdrun_muxed() fbsdrun_vmexit_on_hlt() fbsdrun_vmexit_on_pause() fbsdrun_disable_x2apic() Remove weird prefix "fbsdrun" from following functions' name. fbsdrun_virtio_msix() --> virtio_uses_msix() fbsdrun_start_thread() --> start_thread() Signed-off-by: Jie Deng <jie.deng@intel.com> Reviewed-by: Hao Li <hao.l.li@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -388,7 +388,7 @@ virtio_blk_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
pci_set_cfgdata16(dev, PCIR_SUBDEV_0, VIRTIO_TYPE_BLOCK);
|
||||
pci_set_cfgdata16(dev, PCIR_SUBVEND_0, VIRTIO_VENDOR);
|
||||
|
||||
if (virtio_interrupt_init(&blk->base, fbsdrun_virtio_msix())) {
|
||||
if (virtio_interrupt_init(&blk->base, virtio_uses_msix())) {
|
||||
blockif_close(blk->bc);
|
||||
free(blk);
|
||||
return -1;
|
||||
|
@@ -859,7 +859,7 @@ virtio_console_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
pci_set_cfgdata16(dev, PCIR_SUBDEV_0, VIRTIO_TYPE_CONSOLE);
|
||||
pci_set_cfgdata16(dev, PCIR_SUBVEND_0, VIRTIO_VENDOR);
|
||||
|
||||
if (virtio_interrupt_init(&console->base, fbsdrun_virtio_msix())) {
|
||||
if (virtio_interrupt_init(&console->base, virtio_uses_msix())) {
|
||||
if (console) {
|
||||
if (console->config)
|
||||
free(console->config);
|
||||
|
@@ -1302,7 +1302,7 @@ virtio_heci_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
WPRINTF(("vheci init: mutexattr init fail, erro %d!\r\n", rc));
|
||||
goto fail;
|
||||
}
|
||||
if (fbsdrun_virtio_msix()) {
|
||||
if (virtio_uses_msix()) {
|
||||
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_DEFAULT);
|
||||
if (rc) {
|
||||
WPRINTF(("vheci init: mutexattr_settype failed with "
|
||||
@@ -1340,7 +1340,7 @@ virtio_heci_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
pci_set_cfgdata16(dev, PCIR_SUBDEV_0, VIRTIO_TYPE_HECI);
|
||||
pci_set_cfgdata16(dev, PCIR_SUBVEND_0, INTEL_VENDOR_ID);
|
||||
|
||||
if (virtio_interrupt_init(&vheci->base, fbsdrun_virtio_msix()))
|
||||
if (virtio_interrupt_init(&vheci->base, virtio_uses_msix()))
|
||||
goto setup_fail;
|
||||
virtio_set_io_bar(&vheci->base, 0);
|
||||
|
||||
|
@@ -306,7 +306,7 @@ virtio_hyper_dmabuf_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
if (rc)
|
||||
DPRINTF("mutexattr init failed with erro %d!\n", rc);
|
||||
|
||||
if (fbsdrun_virtio_msix()) {
|
||||
if (virtio_uses_msix()) {
|
||||
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_DEFAULT);
|
||||
DPRINTF("virtio_msix: mutexattr_settype ");
|
||||
DPRINTF("failed with error %d!\n", rc);
|
||||
@@ -347,7 +347,7 @@ virtio_hyper_dmabuf_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
pci_set_cfgdata16(dev, PCIR_SUBDEV_0, VIRTIO_TYPE_HYPERDMABUF);
|
||||
pci_set_cfgdata16(dev, PCIR_SUBVEND_0, INTEL_VENDOR_ID);
|
||||
|
||||
if (virtio_interrupt_init(&hyper_dmabuf->base, fbsdrun_virtio_msix())) {
|
||||
if (virtio_interrupt_init(&hyper_dmabuf->base, virtio_uses_msix())) {
|
||||
if (hyper_dmabuf)
|
||||
free(hyper_dmabuf);
|
||||
return -1;
|
||||
|
@@ -1003,7 +1003,7 @@ virtio_net_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
net->nmd != NULL);
|
||||
|
||||
/* use BAR 1 to map MSI-X table and PBA, if we're using MSI-X */
|
||||
if (virtio_interrupt_init(&net->base, fbsdrun_virtio_msix())) {
|
||||
if (virtio_interrupt_init(&net->base, virtio_uses_msix())) {
|
||||
if (net)
|
||||
free(net);
|
||||
return -1;
|
||||
|
@@ -387,7 +387,7 @@ virtio_rnd_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
rc = pthread_mutexattr_init(&attr);
|
||||
if (rc)
|
||||
DPRINTF(("mutexattr init failed with erro %d!\n", rc));
|
||||
if (fbsdrun_virtio_msix()) {
|
||||
if (virtio_uses_msix()) {
|
||||
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_DEFAULT);
|
||||
if (rc)
|
||||
DPRINTF(("virtio_msix: mutexattr_settype failed with "
|
||||
@@ -435,7 +435,7 @@ virtio_rnd_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
pci_set_cfgdata16(dev, PCIR_SUBDEV_0, VIRTIO_TYPE_ENTROPY);
|
||||
pci_set_cfgdata16(dev, PCIR_SUBVEND_0, VIRTIO_VENDOR);
|
||||
|
||||
if (virtio_interrupt_init(&rnd->base, fbsdrun_virtio_msix())) {
|
||||
if (virtio_interrupt_init(&rnd->base, virtio_uses_msix())) {
|
||||
if (rnd)
|
||||
free(rnd);
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user