search for: to_lgdev

Displaying 20 results from an estimated 60 matches for "to_lgdev".

2011 Mar 10
3
[PATCH 00/02] virtio: Virtio platform driver
virtio: Virtio platform driver [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c [PATCH 02/02] virtio: Add virtio platform driver These patches add a virtio platform driver to the Linux kernel. This platform driver has the same role as the virtio_pci driver, but instead of building on top of emulated PCI this driver is making use of the platform bus together with driver
2011 Mar 10
3
[PATCH 00/02] virtio: Virtio platform driver
virtio: Virtio platform driver [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c [PATCH 02/02] virtio: Add virtio platform driver These patches add a virtio platform driver to the Linux kernel. This platform driver has the same role as the virtio_pci driver, but instead of building on top of emulated PCI this driver is making use of the platform bus together with driver
2011 Jun 21
6
[PATCH 00/02][RESEND] virtio: Virtio platform driver
virtio: Virtio platform driver [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c [PATCH 02/02] virtio: Add virtio platform driver These patches add a virtio platform driver to the Linux kernel. This platform driver has the same role as the virtio_pci driver, but instead of building on top of emulated PCI this driver is making use of the platform bus together with driver
2011 Jun 21
6
[PATCH 00/02][RESEND] virtio: Virtio platform driver
virtio: Virtio platform driver [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c [PATCH 02/02] virtio: Add virtio platform driver These patches add a virtio platform driver to the Linux kernel. This platform driver has the same role as the virtio_pci driver, but instead of building on top of emulated PCI this driver is making use of the platform bus together with driver
2009 May 07
6
[PATCH 1/3] virtio: find_vqs/del_vqs virtio operations
...rtqueue **vqs; + int nvqs; + /* The entry in the lguest_devices page for this device. */ struct lguest_device_desc *desc; }; @@ -312,6 +316,47 @@ static void lg_del_vq(struct virtqueue *vq) kfree(lvq); } +static void lg_del_vqs(struct virtio_device *vdev) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + if (!ldev->vqs) + return; + for (i = 0; i < ldev->nvqs; ++i) + lg_del_vq(ldev->vqs[i]); + kfree(ldev->vqs); + ldev->vqs = NULL; + ldev->nvqs = 0; +} + +static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[] +...
2009 May 07
6
[PATCH 1/3] virtio: find_vqs/del_vqs virtio operations
...rtqueue **vqs; + int nvqs; + /* The entry in the lguest_devices page for this device. */ struct lguest_device_desc *desc; }; @@ -312,6 +316,47 @@ static void lg_del_vq(struct virtqueue *vq) kfree(lvq); } +static void lg_del_vqs(struct virtio_device *vdev) +{ + struct lguest_device *ldev = to_lgdev(vdev); + int i; + if (!ldev->vqs) + return; + for (i = 0; i < ldev->nvqs; ++i) + lg_del_vq(ldev->vqs[i]); + kfree(ldev->vqs); + ldev->vqs = NULL; + ldev->nvqs = 0; +} + +static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[] +...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 1/13] [Mostly resend] virtio additions
...d of a given type for a device's configuration. */ -static void *lg_find(struct virtio_device *vdev, u8 type, unsigned int *len) +/* The config space comes after the two feature bitmasks. */ +static u8 *lg_config(const struct lguest_device_desc *desc) { - struct lguest_device_desc *desc = to_lgdev(vdev)->desc; - int i; - - for (i = 0; i < desc->config_len; i += FHDR_LEN + desc->config[i+1]) { - if (desc->config[i] == type) { - /* Mark it used, so Host can know we looked at it, and - * also so we won't find the same one twice. */ -...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 1/13] [Mostly resend] virtio additions
...d of a given type for a device's configuration. */ -static void *lg_find(struct virtio_device *vdev, u8 type, unsigned int *len) +/* The config space comes after the two feature bitmasks. */ +static u8 *lg_config(const struct lguest_device_desc *desc) { - struct lguest_device_desc *desc = to_lgdev(vdev)->desc; - int i; - - for (i = 0; i < desc->config_len; i += FHDR_LEN + desc->config[i+1]) { - if (desc->config[i] == type) { - /* Mark it used, so Host can know we looked at it, and - * also so we won't find the same one twice. */ -...
2008 Jan 23
2
[PATCH 1/2] reset support: make net driver alloc/cleanup in probe and remove
Since we want to reset the device to remove them, this is simpler (device is reset for us on driver remove). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/net/virtio_net.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff -r 7e5b3ff06f60 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Wed Jan 23 22:53:14
2008 Jan 23
2
[PATCH 1/2] reset support: make net driver alloc/cleanup in probe and remove
Since we want to reset the device to remove them, this is simpler (device is reset for us on driver remove). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/net/virtio_net.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff -r 7e5b3ff06f60 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Wed Jan 23 22:53:14
2014 Dec 04
0
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...* sorted out, this routine is called so we can tell the Host which features we * understand and accept. */ -static void lg_finalize_features(struct virtio_device *vdev) +static int lg_finalize_features(struct virtio_device *vdev) { unsigned int i, bits; struct lguest_device_desc *desc = to_lgdev(vdev)->desc; @@ -153,6 +153,8 @@ static void lg_finalize_features(struct virtio_device *vdev) /* Tell Host we've finished with this device's feature negotiation */ status_notify(vdev); + + return 0; } /* Once they've found a field, getting a copy of it is easy. */ diff --gi...
2014 Dec 04
0
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...* sorted out, this routine is called so we can tell the Host which features we * understand and accept. */ -static void lg_finalize_features(struct virtio_device *vdev) +static int lg_finalize_features(struct virtio_device *vdev) { unsigned int i, bits; struct lguest_device_desc *desc = to_lgdev(vdev)->desc; @@ -153,6 +153,8 @@ static void lg_finalize_features(struct virtio_device *vdev) /* Tell Host we've finished with this device's feature negotiation */ status_notify(vdev); + + return 0; } /* Once they've found a field, getting a copy of it is easy. */ diff --gi...
2008 Jan 18
2
[PATCH 2/3] Make IRQ handlers typesafe.
This patch lets interrupt handler functions have their natural type (ie. exactly match the data pointer type); for transition it allows the old irq_handler_t type as well. To do this it uses a gcc extension, cast-to-union, which allows a type to be cast to any type within the union. When used in a wrapper macro, it's a simple way of allowing one of several types. (Some drivers now need to
2008 Jan 18
2
[PATCH 2/3] Make IRQ handlers typesafe.
This patch lets interrupt handler functions have their natural type (ie. exactly match the data pointer type); for transition it allows the old irq_handler_t type as well. To do this it uses a gcc extension, cast-to-union, which allows a type to be cast to any type within the union. When used in a wrapper macro, it's a simple way of allowing one of several types. (Some drivers now need to
2014 Dec 08
0
[PATCH v3 3/6] virtio: allow finalize_features to fail
...* sorted out, this routine is called so we can tell the Host which features we * understand and accept. */ -static void lg_finalize_features(struct virtio_device *vdev) +static int lg_finalize_features(struct virtio_device *vdev) { unsigned int i, bits; struct lguest_device_desc *desc = to_lgdev(vdev)->desc; @@ -153,6 +153,8 @@ static void lg_finalize_features(struct virtio_device *vdev) /* Tell Host we've finished with this device's feature negotiation */ status_notify(vdev); + + return 0; } /* Once they've found a field, getting a copy of it is easy. */ diff --gi...
2014 Dec 08
0
[PATCH v3 3/6] virtio: allow finalize_features to fail
...* sorted out, this routine is called so we can tell the Host which features we * understand and accept. */ -static void lg_finalize_features(struct virtio_device *vdev) +static int lg_finalize_features(struct virtio_device *vdev) { unsigned int i, bits; struct lguest_device_desc *desc = to_lgdev(vdev)->desc; @@ -153,6 +153,8 @@ static void lg_finalize_features(struct virtio_device *vdev) /* Tell Host we've finished with this device's feature negotiation */ status_notify(vdev); + + return 0; } /* Once they've found a field, getting a copy of it is easy. */ diff --gi...
2013 Mar 21
24
[PATCH 00/22] New virtio PCI layout
I've renewed this again, with some comments from HPA. I've tried to keep the new patches separate, so you can see the changes since we last discussed this (and so it's easy to back it out if we decide it's insane). I haven't even looked at the QEMU side so this is completely untested. Comments gratefully received! Rusty. Michael S Tsirkin (1): pci: add pci_iomap_range
2013 Mar 21
24
[PATCH 00/22] New virtio PCI layout
I've renewed this again, with some comments from HPA. I've tried to keep the new patches separate, so you can see the changes since we last discussed this (and so it's easy to back it out if we decide it's insane). I haven't even looked at the QEMU side so this is completely untested. Comments gratefully received! Rusty. Michael S Tsirkin (1): pci: add pci_iomap_range
2011 Apr 11
3
[RFC][PATCH] virtio: 64 bit features
...onst struct lguest_device_desc *desc) } /* This gets the device's feature bits. */ -static u32 lg_get_features(struct virtio_device *vdev) +static u64 lg_get_features(struct virtio_device *vdev) { unsigned int i; - u32 features = 0; + u64 features = 0; struct lguest_device_desc *desc = to_lgdev(vdev)->desc; u8 *in_features = lg_features(desc); /* We do this the slow but generic way. */ - for (i = 0; i < min(desc->feature_len * 8, 32); i++) + for (i = 0; i < min(desc->feature_len * 8, 64); i++) if (in_features[i / 8] & (1 << (i % 8))) - features |= (1 &l...
2011 Apr 11
3
[RFC][PATCH] virtio: 64 bit features
...onst struct lguest_device_desc *desc) } /* This gets the device's feature bits. */ -static u32 lg_get_features(struct virtio_device *vdev) +static u64 lg_get_features(struct virtio_device *vdev) { unsigned int i; - u32 features = 0; + u64 features = 0; struct lguest_device_desc *desc = to_lgdev(vdev)->desc; u8 *in_features = lg_features(desc); /* We do this the slow but generic way. */ - for (i = 0; i < min(desc->feature_len * 8, 32); i++) + for (i = 0; i < min(desc->feature_len * 8, 64); i++) if (in_features[i / 8] & (1 << (i % 8))) - features |= (1 &l...