Commit 990c91f0af46c57f0291060d928c7ab82f9d5667
1 parent
bc805a03c2
Exists in
master
and in
39 other branches
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>
Showing 1 changed file with 1 additions and 19 deletions Side-by-side Diff
Documentation/virtual/lguest/lguest.c
... | ... | @@ -135,9 +135,6 @@ |
135 | 135 | /* Is it operational */ |
136 | 136 | bool running; |
137 | 137 | |
138 | - /* Does Guest want an intrrupt on empty? */ | |
139 | - bool irq_on_empty; | |
140 | - | |
141 | 138 | /* Device-specific data. */ |
142 | 139 | void *priv; |
143 | 140 | }; |
... | ... | @@ -637,10 +634,7 @@ |
637 | 634 | |
638 | 635 | /* If they don't want an interrupt, don't send one... */ |
639 | 636 | if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) { |
640 | - /* ... unless they've asked us to force one on empty. */ | |
641 | - if (!vq->dev->irq_on_empty | |
642 | - || lg_last_avail(vq) != vq->vring.avail->idx) | |
643 | - return; | |
637 | + return; | |
644 | 638 | } |
645 | 639 | |
646 | 640 | /* Send the Guest an interrupt tell them we used something up. */ |
... | ... | @@ -1057,15 +1051,6 @@ |
1057 | 1051 | close(vq->eventfd); |
1058 | 1052 | } |
1059 | 1053 | |
1060 | -static 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 | - | |
1069 | 1054 | static void start_device(struct device *dev) |
1070 | 1055 | { |
1071 | 1056 | unsigned int i; |
... | ... | @@ -1079,8 +1064,6 @@ |
1079 | 1064 | verbose(" %02x", get_feature_bits(dev) |
1080 | 1065 | [dev->feature_len+i]); |
1081 | 1066 | |
1082 | - dev->irq_on_empty = accepted_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY); | |
1083 | - | |
1084 | 1067 | for (vq = dev->vq; vq; vq = vq->next) { |
1085 | 1068 | if (vq->service) |
1086 | 1069 | create_thread(vq); |
... | ... | @@ -1564,7 +1547,6 @@ |
1564 | 1547 | /* Set up the tun device. */ |
1565 | 1548 | configure_device(ipfd, tapif, ip); |
1566 | 1549 | |
1567 | - add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY); | |
1568 | 1550 | /* Expect Guest to handle everything except UFO */ |
1569 | 1551 | add_feature(dev, VIRTIO_NET_F_CSUM); |
1570 | 1552 | add_feature(dev, VIRTIO_NET_F_GUEST_CSUM); |