From 62f14bb11fb06aab05e1392f510f6cfd75937ab6 Mon Sep 17 00:00:00 2001 From: yliu79 Date: Wed, 22 May 2019 10:15:45 -0700 Subject: [PATCH] DM: remove unused function virtio_dev_error Change-Id: I6e94ab0286e73435429e2ccf971207c7d8ed6ef6 Tracked-On: #3123 Signed-off-by: Ying Liu Acked-by: Anthony Xu --- devicemodel/hw/pci/virtio/virtio.c | 24 ------------------------ devicemodel/include/virtio.h | 13 ------------- 2 files changed, 37 deletions(-) diff --git a/devicemodel/hw/pci/virtio/virtio.c b/devicemodel/hw/pci/virtio/virtio.c index 5f16718ec..98cbea62a 100644 --- a/devicemodel/hw/pci/virtio/virtio.c +++ b/devicemodel/hw/pci/virtio/virtio.c @@ -1177,30 +1177,6 @@ virtio_set_modern_bar(struct virtio_base *base, bool use_notify_pio) return rc; } -/** - * @brief Indicate the device has experienced an error. - * - * This is called when the device has experienced an error from which it - * cannot re-cover. DEVICE_NEEDS_RESET is set to the device status register - * and a config change intr is sent to the guest driver. - * - * @param base Pointer to struct virtio_base. - * - * @return None - */ -void -virtio_dev_error(struct virtio_base *base) -{ - if (base->negotiated_caps & (1UL << VIRTIO_F_VERSION_1)) { - /* see 2.1.2. if DRIVER_OK is set, need to send - * a device configuration change notification to the driver - */ - base->status |= VIRTIO_CONFIG_S_NEEDS_RESET; - if (base->status & VIRTIO_CONFIG_S_DRIVER_OK) - virtio_config_changed(base); - } -} - static struct cap_region { uint64_t cap_offset; /* offset of capability region */ int cap_size; /* size of capability region */ diff --git a/devicemodel/include/virtio.h b/devicemodel/include/virtio.h index 1c1e2f269..eb4ba4a45 100644 --- a/devicemodel/include/virtio.h +++ b/devicemodel/include/virtio.h @@ -716,19 +716,6 @@ uint64_t virtio_pci_read(struct vmctx *ctx, int vcpu, struct pci_vdev *dev, void virtio_pci_write(struct vmctx *ctx, int vcpu, struct pci_vdev *dev, int baridx, uint64_t offset, int size, uint64_t value); -/** - * @brief Indicate the device has experienced an error. - * - * This is called when the device has experienced an error from which it - * cannot re-cover. DEVICE_NEEDS_RESET is set to the device status register - * and a config change intr is sent to the guest driver. - * - * @param base Pointer to struct virtio_base. - * - * @return None - */ -void virtio_dev_error(struct virtio_base *base); - /** * @brief Set modern BAR (usually 4) to map PCI config registers. *