Displaying 16 results from an estimated 16 matches for "virtio_config_buf".
2011 Aug 14
2
[PATCH 1/3] virtio-console: Use virtio_config_val() for retrieving config
This patch modifies virtio-console to use virtio_config_val() instead
of a 'if(virtio_has_feature()) vdev->config->get()' construct to retrieve
optional values from the config space.
Cc: Amit Shah <amit.shah at redhat.com>
Cc: "Michael S. Tsirkin" <mst at redhat.com>
Cc: Rusty Russell <rusty at rustcorp.com.au>
Cc: virtualization at
2011 Aug 14
2
[PATCH 1/3] virtio-console: Use virtio_config_val() for retrieving config
This patch modifies virtio-console to use virtio_config_val() instead
of a 'if(virtio_has_feature()) vdev->config->get()' construct to retrieve
optional values from the config space.
Cc: Amit Shah <amit.shah at redhat.com>
Cc: "Michael S. Tsirkin" <mst at redhat.com>
Cc: Rusty Russell <rusty at rustcorp.com.au>
Cc: virtualization at
2009 Sep 29
0
[PATCH 3/4] virtio_blk: implement a request-based ID command, VIRTIO_BLK_T_GET_ID
...RTIO_BLK_T_FLUSH;
@@ -201,29 +208,59 @@ struct virtio_blk_config_deprecated {
__u8 identify[VIRTIO_BLK_ID_BYTES];
} __attribute__((packed));
-static int virtblk_identify(struct gendisk *disk, void *argp)
+static int virtblk_identify_deprecated(struct virtio_blk *vblk, void *opaque)
+{
+ return virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY,
+ offsetof(struct virtio_blk_config_deprecated, identify), opaque,
+ VIRTIO_BLK_ID_BYTES);
+}
+
+static int virtblk_get_id(struct virtio_blk *vblk, void *opaque)
+{
+ struct request *req;
+ struct bio *bio;
+
+ bio = bio_map_kern(vblk->disk->queue, opaq...
2009 Sep 29
0
[PATCH 3/4] virtio_blk: implement a request-based ID command, VIRTIO_BLK_T_GET_ID
...RTIO_BLK_T_FLUSH;
@@ -201,29 +208,59 @@ struct virtio_blk_config_deprecated {
__u8 identify[VIRTIO_BLK_ID_BYTES];
} __attribute__((packed));
-static int virtblk_identify(struct gendisk *disk, void *argp)
+static int virtblk_identify_deprecated(struct virtio_blk *vblk, void *opaque)
+{
+ return virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY,
+ offsetof(struct virtio_blk_config_deprecated, identify), opaque,
+ VIRTIO_BLK_ID_BYTES);
+}
+
+static int virtblk_get_id(struct virtio_blk *vblk, void *opaque)
+{
+ struct request *req;
+ struct bio *bio;
+
+ bio = bio_map_kern(vblk->disk->queue, opaq...
2008 Apr 22
3
[RFC PATCH] virtio: change config to guest endian.
...;config->feature((vdev), (fbit))) { \
- __virtio_config_val((vdev), (offset), (v)); \
- _err = 0; \
- } else \
- _err = -ENOENT; \
- _err; \
-})
+ * the config value is copied into whatever is pointed to by v. */
+#define virtio_config_val(vdev, fbit, offset, v) \
+ virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(v))
-/**
- * __virtio_config_val - get a single virtio config without feature check.
- * @vdev: the virtio device
- * @offset: the type to search for.
- * @val: a pointer to the value to fill in.
- *
- * The value is endian-corrected and returned in v. */
-#d...
2008 Apr 22
3
[RFC PATCH] virtio: change config to guest endian.
...;config->feature((vdev), (fbit))) { \
- __virtio_config_val((vdev), (offset), (v)); \
- _err = 0; \
- } else \
- _err = -ENOENT; \
- _err; \
-})
+ * the config value is copied into whatever is pointed to by v. */
+#define virtio_config_val(vdev, fbit, offset, v) \
+ virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(v))
-/**
- * __virtio_config_val - get a single virtio config without feature check.
- * @vdev: the virtio device
- * @offset: the type to search for.
- * @val: a pointer to the value to fill in.
- *
- * The value is endian-corrected and returned in v. */
-#d...
2009 Sep 29
1
[PATCH 1/4] virtio_blk: deprecate the 1024-byte ID field.
...BLK_SIZE) */
+ __u32 blk_size;
+ __u8 identify[VIRTIO_BLK_ID_BYTES];
+} __attribute__((packed));
+
static int virtblk_identify(struct gendisk *disk, void *argp)
{
struct virtio_blk *vblk = disk->private_data;
@@ -196,7 +212,7 @@ static int virtblk_identify(struct gendi
goto out;
err = virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY,
- offsetof(struct virtio_blk_config, identify), opaque,
+ offsetof(struct virtio_blk_config_deprecated, identify), opaque,
VIRTIO_BLK_ID_BYTES);
if (err)
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h
--- a/include/linux/virtio_bl...
2009 Sep 29
1
[PATCH 1/4] virtio_blk: deprecate the 1024-byte ID field.
...BLK_SIZE) */
+ __u32 blk_size;
+ __u8 identify[VIRTIO_BLK_ID_BYTES];
+} __attribute__((packed));
+
static int virtblk_identify(struct gendisk *disk, void *argp)
{
struct virtio_blk *vblk = disk->private_data;
@@ -196,7 +212,7 @@ static int virtblk_identify(struct gendi
goto out;
err = virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY,
- offsetof(struct virtio_blk_config, identify), opaque,
+ offsetof(struct virtio_blk_config_deprecated, identify), opaque,
VIRTIO_BLK_ID_BYTES);
if (err)
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h
--- a/include/linux/virtio_bl...
2009 May 14
1
[PATCHv6 2/4] virtio: find_vqs/del_vqs virtio operations
...*, unsigned nvqs,
+ struct virtqueue *vqs[],
+ vq_callback_t *callbacks[],
+ const char *names[]);
+ void (*del_vqs)(struct virtio_device *);
u32 (*get_features)(struct virtio_device *vdev);
void (*finalize_features)(struct virtio_device *vdev);
};
@@ -128,5 +140,18 @@ static inline int virtio_config_buf(struct virtio_device *vdev,
vdev->config->get(vdev, offset, buf, len);
return 0;
}
+
+static inline
+struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev,
+ vq_callback_t *c, const char *n)
+{
+ vq_callback_t *callbacks[] = { c };
+ const char *names[] = { n };
+ struct...
2009 May 14
1
[PATCHv6 2/4] virtio: find_vqs/del_vqs virtio operations
...*, unsigned nvqs,
+ struct virtqueue *vqs[],
+ vq_callback_t *callbacks[],
+ const char *names[]);
+ void (*del_vqs)(struct virtio_device *);
u32 (*get_features)(struct virtio_device *vdev);
void (*finalize_features)(struct virtio_device *vdev);
};
@@ -128,5 +140,18 @@ static inline int virtio_config_buf(struct virtio_device *vdev,
vdev->config->get(vdev, offset, buf, len);
return 0;
}
+
+static inline
+struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev,
+ vq_callback_t *c, const char *n)
+{
+ vq_callback_t *callbacks[] = { c };
+ const char *names[] = { n };
+ struct...
2009 May 13
1
[PATCHv5 1/3] virtio: find_vqs/del_vqs virtio operations
...*, unsigned nvqs,
+ struct virtqueue *vqs[],
+ vq_callback_t *callbacks[],
+ const char *names[]);
+ void (*del_vqs)(struct virtio_device *);
u32 (*get_features)(struct virtio_device *vdev);
void (*finalize_features)(struct virtio_device *vdev);
};
@@ -128,5 +139,18 @@ static inline int virtio_config_buf(struct virtio_device *vdev,
vdev->config->get(vdev, offset, buf, len);
return 0;
}
+
+static inline
+struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev,
+ vq_callback_t *c, const char *n)
+{
+ vq_callback_t *callbacks[] = { c };
+ const char *names[] = { n };
+ struct...
2009 May 13
1
[PATCHv5 1/3] virtio: find_vqs/del_vqs virtio operations
...*, unsigned nvqs,
+ struct virtqueue *vqs[],
+ vq_callback_t *callbacks[],
+ const char *names[]);
+ void (*del_vqs)(struct virtio_device *);
u32 (*get_features)(struct virtio_device *vdev);
void (*finalize_features)(struct virtio_device *vdev);
};
@@ -128,5 +139,18 @@ static inline int virtio_config_buf(struct virtio_device *vdev,
vdev->config->get(vdev, offset, buf, len);
return 0;
}
+
+static inline
+struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev,
+ vq_callback_t *c, const char *n)
+{
+ vq_callback_t *callbacks[] = { c };
+ const char *names[] = { n };
+ struct...
2013 Apr 05
8
[PATCH 0/7] virtio cleanups
Aiming these for coming merge window.
Nothing should change, but get ready for a non-guest-endian config transports,
and > 32 features bits.
Final one is just an overdue consolidation.
Cheers,
Rusty.
Rusty Russell (7):
virtio_config: introduce size-based accessors.
virtio: use size-based config accessors.
virtio_config: helpers for non-converting accessors.
virtio_config: make
2013 Apr 05
8
[PATCH 0/7] virtio cleanups
Aiming these for coming merge window.
Nothing should change, but get ready for a non-guest-endian config transports,
and > 32 features bits.
Final one is just an overdue consolidation.
Cheers,
Rusty.
Rusty Russell (7):
virtio_config: introduce size-based accessors.
virtio: use size-based config accessors.
virtio_config: helpers for non-converting accessors.
virtio_config: make
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