search for: __virtio_config_val

Displaying 18 results from an estimated 18 matches for "__virtio_config_val".

2008 Apr 22
3
[RFC PATCH] virtio: change config to guest endian.
...ht the config might be part of the PCI config space for virtio_pci. It's actually a separate mmio region, so that argument holds little water; as only x86 is currently using the virtio mechanism, we can change this (but must do so now, before the impending s390 and ppc merges). API changes: - __virtio_config_val() just becomes a striaght vdev->config_get() call. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/block/virtio_blk.c | 4 +-- drivers/virtio/virtio_balloon.c | 6 ++--- include/linux/virtio_config.h | 47 +++++++++++++--------------------------- 3 file...
2008 Apr 22
3
[RFC PATCH] virtio: change config to guest endian.
...ht the config might be part of the PCI config space for virtio_pci. It's actually a separate mmio region, so that argument holds little water; as only x86 is currently using the virtio mechanism, we can change this (but must do so now, before the impending s390 and ppc merges). API changes: - __virtio_config_val() just becomes a striaght vdev->config_get() call. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/block/virtio_blk.c | 4 +-- drivers/virtio/virtio_balloon.c | 6 ++--- include/linux/virtio_config.h | 47 +++++++++++++--------------------------- 3 file...
2008 Apr 16
1
[PATCH] add virtio disk geometry feature
..._data; + int err = 0; + + /* see if the host passed in geometry config */ + err = virtio_config_val(vblk->vdev, VIRTIO_BLK_F_GEOMETRY, + offsetof(struct virtio_blk_config, cylinders), + &geo->cylinders); + + /* if host sets geo flag, all 3 values must be present */ + if (!err) { + __virtio_config_val(vblk->vdev, + offsetof(struct virtio_blk_config, heads), + &geo->heads); + __virtio_config_val(vblk->vdev, + offsetof(struct virtio_blk_config, sectors), + &geo->sectors); + } else { + /* some standard values, similar to sd */ + geo->heads = 1 << 6; + ge...
2008 Apr 16
1
[PATCH] add virtio disk geometry feature
..._data; + int err = 0; + + /* see if the host passed in geometry config */ + err = virtio_config_val(vblk->vdev, VIRTIO_BLK_F_GEOMETRY, + offsetof(struct virtio_blk_config, cylinders), + &geo->cylinders); + + /* if host sets geo flag, all 3 values must be present */ + if (!err) { + __virtio_config_val(vblk->vdev, + offsetof(struct virtio_blk_config, heads), + &geo->heads); + __virtio_config_val(vblk->vdev, + offsetof(struct virtio_blk_config, sectors), + &geo->sectors); + } else { + /* some standard values, similar to sd */ + geo->heads = 1 << 6; + ge...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 1/13] [Mostly resend] virtio additions
..., QUEUE_ORDERED_TAG, NULL); - err = virtio_config_val(vdev, VIRTIO_CONFIG_BLK_F_CAPACITY, &cap); - if (err) { - dev_err(&vdev->dev, "Bad/missing capacity in config\n"); - goto out_cleanup_queue; - } + /* Host must always specify the capacity. */ + __virtio_config_val(vdev, offsetof(struct virtio_blk_config, capacity), + &cap); /* If capacity is too big, truncate with warning. */ if ((sector_t)cap != cap) { @@ -234,27 +229,23 @@ static int virtblk_probe(struct virtio_device *vdev) } set_capacity(vblk->disk, cap); -...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 1/13] [Mostly resend] virtio additions
..., QUEUE_ORDERED_TAG, NULL); - err = virtio_config_val(vdev, VIRTIO_CONFIG_BLK_F_CAPACITY, &cap); - if (err) { - dev_err(&vdev->dev, "Bad/missing capacity in config\n"); - goto out_cleanup_queue; - } + /* Host must always specify the capacity. */ + __virtio_config_val(vdev, offsetof(struct virtio_blk_config, capacity), + &cap); /* If capacity is too big, truncate with warning. */ if ((sector_t)cap != cap) { @@ -234,27 +229,23 @@ static int virtblk_probe(struct virtio_device *vdev) } set_capacity(vblk->disk, cap); -...
2007 Sep 24
3
[PATCH 0/3] virtio implementation (draft VI)
I'm not reposting the drivers this time since they haven't changed significantly. See http://lguest.ozlabs.org/patches for the whole thing, from new-io.patch onwards). Changes since last version: - Switch to our own bus implementation, rather than relying on an implementation-specific bus to back this up. - Make virtio_config_ops much higher-level, don't assume layout of
2007 Sep 24
3
[PATCH 0/3] virtio implementation (draft VI)
I'm not reposting the drivers this time since they haven't changed significantly. See http://lguest.ozlabs.org/patches for the whole thing, from new-io.patch onwards). Changes since last version: - Switch to our own bus implementation, rather than relying on an implementation-specific bus to back this up. - Make virtio_config_ops much higher-level, don't assume layout of
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
This patch changes virtio_pci to use a shared memory area for virtio config info instead of using the PCI configuration space. This is closer semantically to what the virtio API exposes and is it a lot easier to implement on both ends. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index eb9a8e0..7e6e453 100644
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
This patch changes virtio_pci to use a shared memory area for virtio config info instead of using the PCI configuration space. This is closer semantically to what the virtio API exposes and is it a lot easier to implement on both ends. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index eb9a8e0..7e6e453 100644
2008 Mar 11
3
[PATCH 1/4] virtio: Use spin_lock_irqsave/restore for virtio-pci
From: Anthony Liguori <aliguori at us.ibm.com> virtio-pci acquires its spin lock in an interrupt context so it's necessary to use spin_lock_irqsave/restore variants. This patch fixes guest SMP when using virtio devices in KVM. Signed-off-by: Anthony Liguori <aliguori at us.ibm.com> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/virtio/virtio_pci.c |
2008 Mar 11
3
[PATCH 1/4] virtio: Use spin_lock_irqsave/restore for virtio-pci
From: Anthony Liguori <aliguori at us.ibm.com> virtio-pci acquires its spin lock in an interrupt context so it's necessary to use spin_lock_irqsave/restore variants. This patch fixes guest SMP when using virtio devices in KVM. Signed-off-by: Anthony Liguori <aliguori at us.ibm.com> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/virtio/virtio_pci.c |
2008 Jan 14
6
[PATCH] KVM virtio balloon driver
...lloon *v = vdev->priv; + + kthread_stop(v->balloon_thread); + vdev->config->del_vq(v->vq); + list_del(&v->list); + kfree(v); +} + +static void balloon_config_changed(struct virtio_device *vdev) +{ + struct virtballoon *v = vdev->priv; + + spin_lock(&v->plist_lock); + __virtio_config_val(v->vdev, 0, &v->target_nrpages); + spin_unlock(&v->plist_lock); + wake_up(&v->balloon_wait); + dprintk(&vdev->dev, "%s\n", __func__); +} + +static struct virtio_driver virtio_balloon = { + .driver.name = KBUILD_MODNAME, + .driver.owner = THIS_MODULE, + .id_...
2008 Jan 14
6
[PATCH] KVM virtio balloon driver
...lloon *v = vdev->priv; + + kthread_stop(v->balloon_thread); + vdev->config->del_vq(v->vq); + list_del(&v->list); + kfree(v); +} + +static void balloon_config_changed(struct virtio_device *vdev) +{ + struct virtballoon *v = vdev->priv; + + spin_lock(&v->plist_lock); + __virtio_config_val(v->vdev, 0, &v->target_nrpages); + spin_unlock(&v->plist_lock); + wake_up(&v->balloon_wait); + dprintk(&vdev->dev, "%s\n", __func__); +} + +static struct virtio_driver virtio_balloon = { + .driver.name = KBUILD_MODNAME, + .driver.owner = THIS_MODULE, + .id_...
2008 Jan 08
1
[PATCH] kvm guest balloon driver
...t;buf = buf; + + list_add(&work->list, &balloon_work); + } + spin_unlock(&balloon_queue_lock); + wake_up(&virtballoon.balloon_wait); + + return true; +} + +static irqreturn_t balloon_irq(int irq, void *opaque) +{ + struct virtballoon *vb = opaque; + uint32_t target_nrpages; + + __virtio_config_val(vb->dev, 0, &target_nrpages); + + dprintk("%s: target_nrpages = %d, vb->target_nrpages = %d\n", + __func__, target_nrpages, vb->target_nrpages); + + if (target_nrpages != vb->target_nrpages) { + vb->target_nrpages = target_nrpages; + wake_up(&vb->balloon_wait)...
2008 Jan 08
1
[PATCH] kvm guest balloon driver
...t;buf = buf; + + list_add(&work->list, &balloon_work); + } + spin_unlock(&balloon_queue_lock); + wake_up(&virtballoon.balloon_wait); + + return true; +} + +static irqreturn_t balloon_irq(int irq, void *opaque) +{ + struct virtballoon *vb = opaque; + uint32_t target_nrpages; + + __virtio_config_val(vb->dev, 0, &target_nrpages); + + dprintk("%s: target_nrpages = %d, vb->target_nrpages = %d\n", + __func__, target_nrpages, vb->target_nrpages); + + if (target_nrpages != vb->target_nrpages) { + vb->target_nrpages = target_nrpages; + wake_up(&vb->balloon_wait)...
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c