Commit 990c91f0 authored by Rusty Russell's avatar Rusty Russell

lguest: remove support for VIRTIO_F_NOTIFY_ON_EMPTY.

No virtio device does this any more, so no need to clutter lguest with it.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent bc805a03
...@@ -135,9 +135,6 @@ struct device { ...@@ -135,9 +135,6 @@ struct device {
/* Is it operational */ /* Is it operational */
bool running; bool running;
/* Does Guest want an intrrupt on empty? */
bool irq_on_empty;
/* Device-specific data. */ /* Device-specific data. */
void *priv; void *priv;
}; };
...@@ -637,10 +634,7 @@ static void trigger_irq(struct virtqueue *vq) ...@@ -637,10 +634,7 @@ static void trigger_irq(struct virtqueue *vq)
/* If they don't want an interrupt, don't send one... */ /* If they don't want an interrupt, don't send one... */
if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) { if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) {
/* ... unless they've asked us to force one on empty. */ return;
if (!vq->dev->irq_on_empty
|| lg_last_avail(vq) != vq->vring.avail->idx)
return;
} }
/* Send the Guest an interrupt tell them we used something up. */ /* Send the Guest an interrupt tell them we used something up. */
...@@ -1057,15 +1051,6 @@ static void create_thread(struct virtqueue *vq) ...@@ -1057,15 +1051,6 @@ static void create_thread(struct virtqueue *vq)
close(vq->eventfd); close(vq->eventfd);
} }
static bool accepted_feature(struct device *dev, unsigned int bit)
{
const u8 *features = get_feature_bits(dev) + dev->feature_len;
if (dev->feature_len < bit / CHAR_BIT)
return false;
return features[bit / CHAR_BIT] & (1 << (bit % CHAR_BIT));
}
static void start_device(struct device *dev) static void start_device(struct device *dev)
{ {
unsigned int i; unsigned int i;
...@@ -1079,8 +1064,6 @@ static void start_device(struct device *dev) ...@@ -1079,8 +1064,6 @@ static void start_device(struct device *dev)
verbose(" %02x", get_feature_bits(dev) verbose(" %02x", get_feature_bits(dev)
[dev->feature_len+i]); [dev->feature_len+i]);
dev->irq_on_empty = accepted_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY);
for (vq = dev->vq; vq; vq = vq->next) { for (vq = dev->vq; vq; vq = vq->next) {
if (vq->service) if (vq->service)
create_thread(vq); create_thread(vq);
...@@ -1564,7 +1547,6 @@ static void setup_tun_net(char *arg) ...@@ -1564,7 +1547,6 @@ static void setup_tun_net(char *arg)
/* Set up the tun device. */ /* Set up the tun device. */
configure_device(ipfd, tapif, ip); configure_device(ipfd, tapif, ip);
add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY);
/* Expect Guest to handle everything except UFO */ /* Expect Guest to handle everything except UFO */
add_feature(dev, VIRTIO_NET_F_CSUM); add_feature(dev, VIRTIO_NET_F_CSUM);
add_feature(dev, VIRTIO_NET_F_GUEST_CSUM); add_feature(dev, VIRTIO_NET_F_GUEST_CSUM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment