search for: mic_finalize_featur

Displaying 20 results from an estimated 44 matches for "mic_finalize_featur".

Did you mean: mic_finalize_features
2014 Dec 04
0
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...it a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index d027d29..e486a0c 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -84,7 +84,7 @@ static u64 mic_get_features(struct virtio_device *vdev) return features; } -static void mic_finalize_features(struct virtio_device *vdev) +static int mic_finalize_features(struct virtio_device *vdev) { unsigned int i, bits; struct mic_device_desc __iomem *desc = to_micvdev(vdev)->desc; @@ -107,6 +107,8 @@ static void mic_finalize_features(struct virtio_device *vdev) iowrite8(ioread8(&out_...
2014 Dec 04
0
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...it a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index d027d29..e486a0c 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -84,7 +84,7 @@ static u64 mic_get_features(struct virtio_device *vdev) return features; } -static void mic_finalize_features(struct virtio_device *vdev) +static int mic_finalize_features(struct virtio_device *vdev) { unsigned int i, bits; struct mic_device_desc __iomem *desc = to_micvdev(vdev)->desc; @@ -107,6 +107,8 @@ static void mic_finalize_features(struct virtio_device *vdev) iowrite8(ioread8(&out_...
2014 Dec 08
0
[PATCH v3 3/6] virtio: allow finalize_features to fail
...it a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index d027d29..e486a0c 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -84,7 +84,7 @@ static u64 mic_get_features(struct virtio_device *vdev) return features; } -static void mic_finalize_features(struct virtio_device *vdev) +static int mic_finalize_features(struct virtio_device *vdev) { unsigned int i, bits; struct mic_device_desc __iomem *desc = to_micvdev(vdev)->desc; @@ -107,6 +107,8 @@ static void mic_finalize_features(struct virtio_device *vdev) iowrite8(ioread8(&out_...
2014 Dec 08
0
[PATCH v3 3/6] virtio: allow finalize_features to fail
...it a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index d027d29..e486a0c 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -84,7 +84,7 @@ static u64 mic_get_features(struct virtio_device *vdev) return features; } -static void mic_finalize_features(struct virtio_device *vdev) +static int mic_finalize_features(struct virtio_device *vdev) { unsigned int i, bits; struct mic_device_desc __iomem *desc = to_micvdev(vdev)->desc; @@ -107,6 +107,8 @@ static void mic_finalize_features(struct virtio_device *vdev) iowrite8(ioread8(&out_...
2014 Dec 04
4
[PATCH RFC v2 1/4] virtio: add API to detect legacy devices
transports need to be able to detect legacy-only devices (ATM balloon only) to use legacy path to drive them. Add a core API to do just that. The implementation just blacklists balloon: not too pretty, but let's not over-engineer. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> Acked-by: Cornelia Huck <cornelia.huck at de.ibm.com> --- include/linux/virtio.h | 2 ++
2014 Dec 04
4
[PATCH RFC v2 1/4] virtio: add API to detect legacy devices
transports need to be able to detect legacy-only devices (ATM balloon only) to use legacy path to drive them. Add a core API to do just that. The implementation just blacklists balloon: not too pretty, but let's not over-engineer. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> Acked-by: Cornelia Huck <cornelia.huck at de.ibm.com> --- include/linux/virtio.h | 2 ++
2014 Dec 08
7
[PATCH v3 0/6] virtio 1.0 enhancements
These are minor robustness enhancements on top of v8 of the patchset [PATCH v8 00/50] linux: towards virtio-1 guest support http://mid.gmane.org/1417449619-24896-1-git-send-email-mst at redhat.com As that one seems stable and actually seems to work well for people, I'm not respinning it anymore. The main motivation is to prevent us accidentally supporting bad configurations, such as legacy
2014 Dec 08
7
[PATCH v3 0/6] virtio 1.0 enhancements
These are minor robustness enhancements on top of v8 of the patchset [PATCH v8 00/50] linux: towards virtio-1 guest support http://mid.gmane.org/1417449619-24896-1-git-send-email-mst at redhat.com As that one seems stable and actually seems to work well for people, I'm not respinning it anymore. The main motivation is to prevent us accidentally supporting bad configurations, such as legacy
2014 Nov 27
2
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...(1 << i)) out_features[i / 8] |= (1 << (i % 8)); } diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index e647947..0acd564 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -101,7 +101,7 @@ static void mic_finalize_features(struct virtio_device *vdev) bits = min_t(unsigned, feature_len, sizeof(vdev->features)) * 8; for (i = 0; i < bits; i++) { - if (test_bit(i, vdev->features)) + if (vdev->features & BIT(bits)) iowrite8(ioread8(&out_features[i / 8]) | (1 << (i % 8)), &amp...
2014 Nov 27
2
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...(1 << i)) out_features[i / 8] |= (1 << (i % 8)); } diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index e647947..0acd564 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -101,7 +101,7 @@ static void mic_finalize_features(struct virtio_device *vdev) bits = min_t(unsigned, feature_len, sizeof(vdev->features)) * 8; for (i = 0; i < bits; i++) { - if (test_bit(i, vdev->features)) + if (vdev->features & BIT(bits)) iowrite8(ioread8(&out_features[i / 8]) | (1 << (i % 8)), &amp...
2014 Nov 27
0
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...et_feature_bit() ... clear_feature_bit() ... > diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c > index e647947..0acd564 100644 > --- a/drivers/misc/mic/card/mic_virtio.c > +++ b/drivers/misc/mic/card/mic_virtio.c > @@ -101,7 +101,7 @@ static void mic_finalize_features(struct virtio_device *vdev) > bits = min_t(unsigned, feature_len, > sizeof(vdev->features)) * 8; > for (i = 0; i < bits; i++) { > - if (test_bit(i, vdev->features)) > + if (vdev->features & BIT(bits)) Hm, shouldn't that also be "if (vdev->featu...
2014 Nov 27
0
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...et_feature_bit() ... clear_feature_bit() ... > diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c > index e647947..0acd564 100644 > --- a/drivers/misc/mic/card/mic_virtio.c > +++ b/drivers/misc/mic/card/mic_virtio.c > @@ -101,7 +101,7 @@ static void mic_finalize_features(struct virtio_device *vdev) > bits = min_t(unsigned, feature_len, > sizeof(vdev->features)) * 8; > for (i = 0; i < bits; i++) { > - if (test_bit(i, vdev->features)) > + if (vdev->features & BIT(bits)) Hm, shouldn't that also be "if (vdev->featu...
2014 Nov 27
1
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...more. Good point. > > diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c > > index e647947..0acd564 100644 > > --- a/drivers/misc/mic/card/mic_virtio.c > > +++ b/drivers/misc/mic/card/mic_virtio.c > > @@ -101,7 +101,7 @@ static void mic_finalize_features(struct virtio_device *vdev) > > bits = min_t(unsigned, feature_len, > > sizeof(vdev->features)) * 8; > > for (i = 0; i < bits; i++) { > > - if (test_bit(i, vdev->features)) > > + if (vdev->features & BIT(bits)) > > Hm, shouldn't th...
2014 Nov 27
1
[PATCH v5 01/45] virtio: use u32, not bitmap for struct virtio_device's features
...more. Good point. > > diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c > > index e647947..0acd564 100644 > > --- a/drivers/misc/mic/card/mic_virtio.c > > +++ b/drivers/misc/mic/card/mic_virtio.c > > @@ -101,7 +101,7 @@ static void mic_finalize_features(struct virtio_device *vdev) > > bits = min_t(unsigned, feature_len, > > sizeof(vdev->features)) * 8; > > for (i = 0; i < bits; i++) { > > - if (test_bit(i, vdev->features)) > > + if (vdev->features & BIT(bits)) > > Hm, shouldn't th...
2014 Nov 27
0
[PATCH v5 04/45] virtio: assert 32 bit features in transports
...* means we could just memcpy. But it's not time critical, and in diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index d037f57..dbeff38 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -96,6 +96,9 @@ static void mic_finalize_features(struct virtio_device *vdev) /* Give virtio_ring a chance to accept features. */ vring_transport_features(vdev); + /* Make sure we don't have any features > 32 bits! */ + BUG_ON((u32)vdev->features != vdev->features); + memset_io(out_features, 0, feature_len); bits = min_t(u...
2014 Nov 27
0
[PATCH v5 04/45] virtio: assert 32 bit features in transports
...* means we could just memcpy. But it's not time critical, and in diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index d037f57..dbeff38 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -96,6 +96,9 @@ static void mic_finalize_features(struct virtio_device *vdev) /* Give virtio_ring a chance to accept features. */ vring_transport_features(vdev); + /* Make sure we don't have any features > 32 bits! */ + BUG_ON((u32)vdev->features != vdev->features); + memset_io(out_features, 0, feature_len); bits = min_t(u...
2014 Nov 30
0
[PATCH v7 05/46] virtio: assert 32 bit features in transports
...* means we could just memcpy. But it's not time critical, and in diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index f5e7561..d027d29 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -96,6 +96,9 @@ static void mic_finalize_features(struct virtio_device *vdev) /* Give virtio_ring a chance to accept features. */ vring_transport_features(vdev); + /* Make sure we don't have any features > 32 bits! */ + BUG_ON((u32)vdev->features != vdev->features); + memset_io(out_features, 0, feature_len); bits = min_t(u...
2014 Dec 01
0
[PATCH v8 05/50] virtio: assert 32 bit features in transports
...* means we could just memcpy. But it's not time critical, and in diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index f5e7561..d027d29 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -96,6 +96,9 @@ static void mic_finalize_features(struct virtio_device *vdev) /* Give virtio_ring a chance to accept features. */ vring_transport_features(vdev); + /* Make sure we don't have any features > 32 bits! */ + BUG_ON((u32)vdev->features != vdev->features); + memset_io(out_features, 0, feature_len); bits = min_t(u...
2014 Nov 30
0
[PATCH v7 05/46] virtio: assert 32 bit features in transports
...* means we could just memcpy. But it's not time critical, and in diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index f5e7561..d027d29 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -96,6 +96,9 @@ static void mic_finalize_features(struct virtio_device *vdev) /* Give virtio_ring a chance to accept features. */ vring_transport_features(vdev); + /* Make sure we don't have any features > 32 bits! */ + BUG_ON((u32)vdev->features != vdev->features); + memset_io(out_features, 0, feature_len); bits = min_t(u...
2014 Dec 01
0
[PATCH v8 05/50] virtio: assert 32 bit features in transports
...* means we could just memcpy. But it's not time critical, and in diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index f5e7561..d027d29 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -96,6 +96,9 @@ static void mic_finalize_features(struct virtio_device *vdev) /* Give virtio_ring a chance to accept features. */ vring_transport_features(vdev); + /* Make sure we don't have any features > 32 bits! */ + BUG_ON((u32)vdev->features != vdev->features); + memset_io(out_features, 0, feature_len); bits = min_t(u...