search for: virtio_feature_desc

Displaying 20 results from an estimated 78 matches for "virtio_feature_desc".

2014 Dec 09
2
[PATCH v3 3/6] virtio: allow finalize_features to fail
...> @@ -752,7 +752,7 @@ out_free: > return rc; > } > > -static void virtio_ccw_finalize_features(struct virtio_device *vdev) > +static int virtio_ccw_finalize_features(struct virtio_device *vdev) > { > struct virtio_ccw_device *vcdev = to_vc_device(vdev); > struct virtio_feature_desc *features; > @@ -760,7 +760,7 @@ static void virtio_ccw_finalize_features(struct virtio_device *vdev) > > ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); > if (!ccw) > - return; > + return 0; I think we'll want to return an error in this case as well to fail probing...
2014 Dec 09
2
[PATCH v3 3/6] virtio: allow finalize_features to fail
...> @@ -752,7 +752,7 @@ out_free: > return rc; > } > > -static void virtio_ccw_finalize_features(struct virtio_device *vdev) > +static int virtio_ccw_finalize_features(struct virtio_device *vdev) > { > struct virtio_ccw_device *vcdev = to_vc_device(vdev); > struct virtio_feature_desc *features; > @@ -760,7 +760,7 @@ static void virtio_ccw_finalize_features(struct virtio_device *vdev) > > ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); > if (!ccw) > - return; > + return 0; I think we'll want to return an error in this case as well to fail probing...
2014 Dec 09
0
[PATCH v3 3/6] virtio: allow finalize_features to fail
...> return rc; > > } > > > > -static void virtio_ccw_finalize_features(struct virtio_device *vdev) > > +static int virtio_ccw_finalize_features(struct virtio_device *vdev) > > { > > struct virtio_ccw_device *vcdev = to_vc_device(vdev); > > struct virtio_feature_desc *features; > > @@ -760,7 +760,7 @@ static void virtio_ccw_finalize_features(struct virtio_device *vdev) > > > > ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); > > if (!ccw) > > - return; > > + return 0; > > I think we'll want to return an er...
2014 Dec 09
0
[PATCH v3 3/6] virtio: allow finalize_features to fail
...> return rc; > > } > > > > -static void virtio_ccw_finalize_features(struct virtio_device *vdev) > > +static int virtio_ccw_finalize_features(struct virtio_device *vdev) > > { > > struct virtio_ccw_device *vcdev = to_vc_device(vdev); > > struct virtio_feature_desc *features; > > @@ -760,7 +760,7 @@ static void virtio_ccw_finalize_features(struct virtio_device *vdev) > > > > ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); > > if (!ccw) > > - return; > > + return 0; > > I think we'll want to return an er...
2014 Dec 09
7
[PATCH 0/2] virtio_ccw: minor enhancements
Two enhancements for virtio_ccw, on top of latest 1.0 patchset Cornelia Huck (1): virtio_ccw: finalize_features error handling Michael S. Tsirkin (1): virtio_ccw: future-proof finalize_features drivers/s390/kvm/virtio_ccw.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) -- MST
2014 Dec 09
7
[PATCH 0/2] virtio_ccw: minor enhancements
Two enhancements for virtio_ccw, on top of latest 1.0 patchset Cornelia Huck (1): virtio_ccw: finalize_features error handling Michael S. Tsirkin (1): virtio_ccw: future-proof finalize_features drivers/s390/kvm/virtio_ccw.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) -- MST
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 Dec 04
0
[PATCH RFC 3/3] virtio_ccw: rev 1 devices set VIRTIO_F_VERSION_1
...set VIRTIO_F_VERSION_1 */ + if (!(rc & BIT_ULL(VIRTIO_F_VERSION_1))) { + vcdev->features_invalid = true; + rc |= BIT_ULL(VIRTIO_F_VERSION_1); + } + out_free: kfree(features); kfree(ccw); @@ -758,6 +765,10 @@ static void virtio_ccw_finalize_features(struct virtio_device *vdev) struct virtio_feature_desc *features; struct ccw1 *ccw; + /* Invalid features? Let's not try to drive this device. */ + if (vcdev->features_invalid) + return; + ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); if (!ccw) return; @@ -869,6 +880,10 @@ static void virtio_ccw_set_status(struct virtio_device *...
2014 Dec 09
0
[PATCH 1/2] virtio_ccw: future-proof finalize_features
...ertion(+), 1 deletion(-) diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c index f9f87ba..f92b9e6 100644 --- a/drivers/s390/kvm/virtio_ccw.c +++ b/drivers/s390/kvm/virtio_ccw.c @@ -758,7 +758,7 @@ static int virtio_ccw_finalize_features(struct virtio_device *vdev) struct virtio_feature_desc *features; struct ccw1 *ccw; - if (vcdev->revision == 1 && + if (vcdev->revision >= 1 && !__virtio_test_bit(vdev, VIRTIO_F_VERSION_1)) { dev_err(&vdev->dev, "virtio: device uses revision 1 " "but does not have VIRTIO_F_VERSION_1\n&quot...
2014 Dec 04
0
[PATCH RFC 3/3] virtio_ccw: rev 1 devices set VIRTIO_F_VERSION_1
...set VIRTIO_F_VERSION_1 */ + if (!(rc & BIT_ULL(VIRTIO_F_VERSION_1))) { + vcdev->features_invalid = true; + rc |= BIT_ULL(VIRTIO_F_VERSION_1); + } + out_free: kfree(features); kfree(ccw); @@ -758,6 +765,10 @@ static void virtio_ccw_finalize_features(struct virtio_device *vdev) struct virtio_feature_desc *features; struct ccw1 *ccw; + /* Invalid features? Let's not try to drive this device. */ + if (vcdev->features_invalid) + return; + ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); if (!ccw) return; @@ -869,6 +880,10 @@ static void virtio_ccw_set_status(struct virtio_device *...
2014 Dec 09
0
[PATCH 1/2] virtio_ccw: future-proof finalize_features
...ertion(+), 1 deletion(-) diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c index f9f87ba..f92b9e6 100644 --- a/drivers/s390/kvm/virtio_ccw.c +++ b/drivers/s390/kvm/virtio_ccw.c @@ -758,7 +758,7 @@ static int virtio_ccw_finalize_features(struct virtio_device *vdev) struct virtio_feature_desc *features; struct ccw1 *ccw; - if (vcdev->revision == 1 && + if (vcdev->revision >= 1 && !__virtio_test_bit(vdev, VIRTIO_F_VERSION_1)) { dev_err(&vdev->dev, "virtio: device uses revision 1 " "but does not have VIRTIO_F_VERSION_1\n&quot...
2014 Oct 07
0
[PATCH RFC 10/11] KVM: s390: virtio-ccw revision 1 SET_VQ
...o_ccw_device { void *airq_info; }; -struct vq_info_block { +struct vq_info_block_legacy { __u64 queue; __u32 align; __u16 index; __u16 num; } __packed; +struct vq_info_block { + __u64 desc; + __u32 res0; + __u16 index; + __u16 num; + __u64 avail; + __u64 used; +} __packed; + struct virtio_feature_desc { __u32 features; __u8 index; @@ -100,7 +109,10 @@ struct virtio_ccw_vq_info { struct virtqueue *vq; int num; void *queue; - struct vq_info_block *info_block; + union { + struct vq_info_block s; + struct vq_info_block_legacy l; + } *info_block; int bit_nr; struct list_head node; l...
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 04
0
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...io_ccw.c +++ b/drivers/s390/kvm/virtio_ccw.c @@ -752,7 +752,7 @@ out_free: return rc; } -static void virtio_ccw_finalize_features(struct virtio_device *vdev) +static int virtio_ccw_finalize_features(struct virtio_device *vdev) { struct virtio_ccw_device *vcdev = to_vc_device(vdev); struct virtio_feature_desc *features; @@ -760,7 +760,7 @@ static void virtio_ccw_finalize_features(struct virtio_device *vdev) ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); if (!ccw) - return; + return 0; features = kzalloc(sizeof(*features), GFP_DMA | GFP_KERNEL); if (!features) @@ -793,6 +793,8 @@ static...
2014 Dec 04
0
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...io_ccw.c +++ b/drivers/s390/kvm/virtio_ccw.c @@ -752,7 +752,7 @@ out_free: return rc; } -static void virtio_ccw_finalize_features(struct virtio_device *vdev) +static int virtio_ccw_finalize_features(struct virtio_device *vdev) { struct virtio_ccw_device *vcdev = to_vc_device(vdev); struct virtio_feature_desc *features; @@ -760,7 +760,7 @@ static void virtio_ccw_finalize_features(struct virtio_device *vdev) ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); if (!ccw) - return; + return 0; features = kzalloc(sizeof(*features), GFP_DMA | GFP_KERNEL); if (!features) @@ -793,6 +793,8 @@ static...
2014 Dec 04
5
[PATCH RFC 1/3] 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> --- include/linux/virtio.h | 2 ++ drivers/virtio/virtio.c | 6 ++++++ 2 files changed, 8
2014 Dec 04
5
[PATCH RFC 1/3] 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> --- include/linux/virtio.h | 2 ++ drivers/virtio/virtio.c | 6 ++++++ 2 files changed, 8
2014 Nov 30
0
[PATCH v7 04/46] virtio: add support for 64 bit features.
...o_ccw.c @@ -660,7 +660,7 @@ static void virtio_ccw_reset(struct virtio_device *vdev) kfree(ccw); } -static u32 virtio_ccw_get_features(struct virtio_device *vdev) +static u64 virtio_ccw_get_features(struct virtio_device *vdev) { struct virtio_ccw_device *vcdev = to_vc_device(vdev); struct virtio_feature_desc *features; diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 2b9aafb..746d350 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -159,7 +159,7 @@ static int virtio_dev_probe(struct device *_d) int err, i; struct virtio_device *dev = dev_to_virtio(_d); str...