aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-05-30 13:14:12 -0400
committerRusty Russell <rusty@rustcorp.com.au>2011-05-29 21:44:12 -0400
commit990c91f0af46c57f0291060d928c7ab82f9d5667 (patch)
tree72a347b09509e3658b12d4e013f072bf2b771299 /Documentation
parentbc805a03c26e1e25171bc627c6264553d27f746c (diff)
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: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/virtual/lguest/lguest.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/Documentation/virtual/lguest/lguest.c b/Documentation/virtual/lguest/lguest.c
index 711ba9e9a007..cd9d6af61d07 100644
--- a/Documentation/virtual/lguest/lguest.c
+++ b/Documentation/virtual/lguest/lguest.c
@@ -135,9 +135,6 @@ struct device {
135 /* Is it operational */ 135 /* Is it operational */
136 bool running; 136 bool running;
137 137
138 /* Does Guest want an intrrupt on empty? */
139 bool irq_on_empty;
140
141 /* Device-specific data. */ 138 /* Device-specific data. */
142 void *priv; 139 void *priv;
143}; 140};
@@ -637,10 +634,7 @@ static void trigger_irq(struct virtqueue *vq)
637 634
638 /* If they don't want an interrupt, don't send one... */ 635 /* If they don't want an interrupt, don't send one... */
639 if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) { 636 if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) {
640 /* ... unless they've asked us to force one on empty. */ 637 return;
641 if (!vq->dev->irq_on_empty
642 || lg_last_avail(vq) != vq->vring.avail->idx)
643 return;
644 } 638 }
645 639
646 /* Send the Guest an interrupt tell them we used something up. */ 640 /* Send the Guest an interrupt tell them we used something up. */
@@ -1057,15 +1051,6 @@ static void create_thread(struct virtqueue *vq)
1057 close(vq->eventfd); 1051 close(vq->eventfd);
1058} 1052}
1059 1053
1060static bool accepted_feature(struct device *dev, unsigned int bit)
1061{
1062 const u8 *features = get_feature_bits(dev) + dev->feature_len;
1063
1064 if (dev->feature_len < bit / CHAR_BIT)
1065 return false;
1066 return features[bit / CHAR_BIT] & (1 << (bit % CHAR_BIT));
1067}
1068
1069static void start_device(struct device *dev) 1054static void start_device(struct device *dev)
1070{ 1055{
1071 unsigned int i; 1056 unsigned int i;
@@ -1079,8 +1064,6 @@ static void start_device(struct device *dev)
1079 verbose(" %02x", get_feature_bits(dev) 1064 verbose(" %02x", get_feature_bits(dev)
1080 [dev->feature_len+i]); 1065 [dev->feature_len+i]);
1081 1066
1082 dev->irq_on_empty = accepted_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY);
1083
1084 for (vq = dev->vq; vq; vq = vq->next) { 1067 for (vq = dev->vq; vq; vq = vq->next) {
1085 if (vq->service) 1068 if (vq->service)
1086 create_thread(vq); 1069 create_thread(vq);
@@ -1564,7 +1547,6 @@ static void setup_tun_net(char *arg)
1564 /* Set up the tun device. */ 1547 /* Set up the tun device. */
1565 configure_device(ipfd, tapif, ip); 1548 configure_device(ipfd, tapif, ip);
1566 1549
1567 add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY);
1568 /* Expect Guest to handle everything except UFO */ 1550 /* Expect Guest to handle everything except UFO */
1569 add_feature(dev, VIRTIO_NET_F_CSUM); 1551 add_feature(dev, VIRTIO_NET_F_CSUM);
1570 add_feature(dev, VIRTIO_NET_F_GUEST_CSUM); 1552 add_feature(dev, VIRTIO_NET_F_GUEST_CSUM);