Displaying 20 results from an estimated 41 matches for "virtio_blk_get_featur".
Did you mean:
virtio_blk_get_features
2014 Dec 11
0
[PATCH RFC v6 19/20] virtio-blk: revision specific feature bits
...nelia.huck at de.ibm.com>
---
hw/block/virtio-blk.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 9cfae66..fdc236a 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -587,6 +587,24 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features)
return features;
}
+static uint64_t virtio_blk_get_features_rev(VirtIODevice *vdev,
+ uint64_t features,
+ unsigned int revision)
+{
+ if (revision == 0) {
+...
2014 Dec 11
0
[PATCH RFC v6 19/20] virtio-blk: revision specific feature bits
...nelia.huck at de.ibm.com>
---
hw/block/virtio-blk.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 9cfae66..fdc236a 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -587,6 +587,24 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features)
return features;
}
+static uint64_t virtio_blk_get_features_rev(VirtIODevice *vdev,
+ uint64_t features,
+ unsigned int revision)
+{
+ if (revision == 0) {
+...
2014 Dec 28
2
[PATCH RFC v6 19/20] virtio-blk: revision specific feature bits
...w/block/virtio-blk.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
> index 9cfae66..fdc236a 100644
> --- a/hw/block/virtio-blk.c
> +++ b/hw/block/virtio-blk.c
> @@ -587,6 +587,24 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features)
> return features;
> }
>
> +static uint64_t virtio_blk_get_features_rev(VirtIODevice *vdev,
> + uint64_t features,
> + unsigned int revision)
>...
2014 Dec 28
2
[PATCH RFC v6 19/20] virtio-blk: revision specific feature bits
...w/block/virtio-blk.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
> index 9cfae66..fdc236a 100644
> --- a/hw/block/virtio-blk.c
> +++ b/hw/block/virtio-blk.c
> @@ -587,6 +587,24 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features)
> return features;
> }
>
> +static uint64_t virtio_blk_get_features_rev(VirtIODevice *vdev,
> + uint64_t features,
> + unsigned int revision)
>...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 3/7] userspace virtio
...nfig)
+{
+ VirtIOBlock *s = to_virtio_blk(vdev);
+ struct virtio_blk_config blkcfg;
+ int64_t capacity;
+
+ bdrv_get_geometry(s->bs, &capacity);
+ blkcfg.capacity = capacity;
+ blkcfg.seg_max = 128 - 2;
+ memcpy(config, &blkcfg, sizeof(blkcfg));
+}
+
+static uint32_t virtio_blk_get_features(VirtIODevice *vdev)
+{
+ return (1 << VIRTIO_BLK_F_SEG_MAX);
+}
+
+void *virtio_blk_init(PCIBus *bus, uint16_t vendor, uint16_t device,
+ BlockDriverState *bs)
+{
+ VirtIOBlock *s;
+
+ s = (VirtIOBlock *)virtio_init_pci(bus, "virtio-blk", 6900, 0x1001,
+...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 3/7] userspace virtio
...nfig)
+{
+ VirtIOBlock *s = to_virtio_blk(vdev);
+ struct virtio_blk_config blkcfg;
+ int64_t capacity;
+
+ bdrv_get_geometry(s->bs, &capacity);
+ blkcfg.capacity = capacity;
+ blkcfg.seg_max = 128 - 2;
+ memcpy(config, &blkcfg, sizeof(blkcfg));
+}
+
+static uint32_t virtio_blk_get_features(VirtIODevice *vdev)
+{
+ return (1 << VIRTIO_BLK_F_SEG_MAX);
+}
+
+void *virtio_blk_init(PCIBus *bus, uint16_t vendor, uint16_t device,
+ BlockDriverState *bs)
+{
+ VirtIOBlock *s;
+
+ s = (VirtIOBlock *)virtio_init_pci(bus, "virtio-blk", 6900, 0x1001,
+...
2014 Nov 26
1
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
....com>
---
hw/block/virtio-blk.c | 4 ++++
hw/net/virtio-net.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 6d86f60..3781f98 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -569,6 +569,10 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev, unsigned int index,
{
VirtIOBlock *s = VIRTIO_BLK(vdev);
+ if (index == 1) {
+ features |= (1 << (VIRTIO_F_VERSION_1 - 32));
+ }
+
if (index > 0) {
return features;
}
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index...
2014 Nov 26
0
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
...4 ++++
> hw/net/virtio-net.c | 4 ++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
> index 6d86f60..3781f98 100644
> --- a/hw/block/virtio-blk.c
> +++ b/hw/block/virtio-blk.c
> @@ -569,6 +569,10 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev, unsigned int index,
> {
> VirtIOBlock *s = VIRTIO_BLK(vdev);
>
> + if (index == 1) {
> + features |= (1 << (VIRTIO_F_VERSION_1 - 32));
> + }
> +
> if (index > 0) {
> return features;
> }
> diff -...
2014 Nov 26
1
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
....com>
---
hw/block/virtio-blk.c | 4 ++++
hw/net/virtio-net.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 6d86f60..3781f98 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -569,6 +569,10 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev, unsigned int index,
{
VirtIOBlock *s = VIRTIO_BLK(vdev);
+ if (index == 1) {
+ features |= (1 << (VIRTIO_F_VERSION_1 - 32));
+ }
+
if (index > 0) {
return features;
}
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index...
2009 Aug 10
1
[PATCH] qemu/virtio: move features to an inline function
...dev)
{
- return 0;
+ return virtio_common_features();
}
static ram_addr_t virtio_balloon_to_target(void *opaque, ram_addr_t target)
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 2beff52..7d33fee 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -364,7 +364,7 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev)
if (strcmp(s->serial_str, "0"))
features |= 1 << VIRTIO_BLK_F_IDENTIFY;
- return features;
+ return features | virtio_common_features();
}
static void virtio_blk_save(QEMUFile *f, void *opaque)
diff --git a/hw/virtio-console.c b/hw/...
2009 Aug 10
1
[PATCH] qemu/virtio: move features to an inline function
...dev)
{
- return 0;
+ return virtio_common_features();
}
static ram_addr_t virtio_balloon_to_target(void *opaque, ram_addr_t target)
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 2beff52..7d33fee 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -364,7 +364,7 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev)
if (strcmp(s->serial_str, "0"))
features |= 1 << VIRTIO_BLK_F_IDENTIFY;
- return features;
+ return features | virtio_common_features();
}
static void virtio_blk_save(QEMUFile *f, void *opaque)
diff --git a/hw/virtio-console.c b/hw/...
2009 Nov 02
1
[PATCHv4 1/6] qemu/virtio: move features to an inline function
...dev)
{
- return 0;
+ return virtio_common_features();
}
static ram_addr_t virtio_balloon_to_target(void *opaque, ram_addr_t target)
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 2630b99..db727b9 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -445,7 +445,7 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev)
if (strcmp(s->serial_str, "0"))
features |= 1 << VIRTIO_BLK_F_IDENTIFY;
- return features;
+ return features | virtio_common_features();
}
static void virtio_blk_save(QEMUFile *f, void *opaque)
diff --git a/hw/virtio-console.c b/hw/...
2009 Nov 02
1
[PATCHv4 1/6] qemu/virtio: move features to an inline function
...dev)
{
- return 0;
+ return virtio_common_features();
}
static ram_addr_t virtio_balloon_to_target(void *opaque, ram_addr_t target)
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 2630b99..db727b9 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -445,7 +445,7 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev)
if (strcmp(s->serial_str, "0"))
features |= 1 << VIRTIO_BLK_F_IDENTIFY;
- return features;
+ return features | virtio_common_features();
}
static void virtio_blk_save(QEMUFile *f, void *opaque)
diff --git a/hw/virtio-console.c b/hw/...
2014 Dec 11
0
[PATCH RFC v6 03/20] virtio: feature bit manipulation helpers
...lt;< VIRTIO_9P_MOUNT_TAG;
+ virtio_add_feature(&features, VIRTIO_9P_MOUNT_TAG);
return features;
}
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index b19b102..3f76e2a 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -568,20 +568,20 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev, uint32_t features)
{
VirtIOBlock *s = VIRTIO_BLK(vdev);
- features |= (1 << VIRTIO_BLK_F_SEG_MAX);
- features |= (1 << VIRTIO_BLK_F_GEOMETRY);
- features |= (1 << VIRTIO_BLK_F_TOPOLOGY);
- features |= (1 << VIRTIO_BLK_F_BLK_SIZE);
-...
2014 Dec 11
0
[PATCH RFC v6 03/20] virtio: feature bit manipulation helpers
...lt;< VIRTIO_9P_MOUNT_TAG;
+ virtio_add_feature(&features, VIRTIO_9P_MOUNT_TAG);
return features;
}
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index b19b102..3f76e2a 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -568,20 +568,20 @@ static uint32_t virtio_blk_get_features(VirtIODevice *vdev, uint32_t features)
{
VirtIOBlock *s = VIRTIO_BLK(vdev);
- features |= (1 << VIRTIO_BLK_F_SEG_MAX);
- features |= (1 << VIRTIO_BLK_F_GEOMETRY);
- features |= (1 << VIRTIO_BLK_F_TOPOLOGY);
- features |= (1 << VIRTIO_BLK_F_BLK_SIZE);
-...
2014 Dec 02
0
[PATCH RFC v5 05/19] virtio: support more feature bits
...virtio-blk.c b/hw/block/virtio-blk.c
index 27f263a..9cfae66 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -564,7 +564,7 @@ static void virtio_blk_set_config(VirtIODevice *vdev, const uint8_t *config)
aio_context_release(blk_get_aio_context(s->blk));
}
-static uint32_t virtio_blk_get_features(VirtIODevice *vdev, uint32_t features)
+static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features)
{
VirtIOBlock *s = VIRTIO_BLK(vdev);
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index d49883f..2d2ed9c 100644
--- a/hw/char/virtio-serial-bus....
2014 Dec 02
0
[PATCH RFC v5 05/19] virtio: support more feature bits
...virtio-blk.c b/hw/block/virtio-blk.c
index 27f263a..9cfae66 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -564,7 +564,7 @@ static void virtio_blk_set_config(VirtIODevice *vdev, const uint8_t *config)
aio_context_release(blk_get_aio_context(s->blk));
}
-static uint32_t virtio_blk_get_features(VirtIODevice *vdev, uint32_t features)
+static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features)
{
VirtIOBlock *s = VIRTIO_BLK(vdev);
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index d49883f..2d2ed9c 100644
--- a/hw/char/virtio-serial-bus....
2014 Dec 02
24
[PATCH RFC v5 00/19] qemu: towards virtio-1 host support
Another iteration of virtio-1 patches for qemu, as always available on
git://github.com/cohuck/qemu virtio-1
This one seems to work together with the current vhost-next patches
(well, I can ping :)
Changes from v4:
- add helpers for feature bit manipulation and checking
- use 64 bit feature bits instead of 32 bit arrays
- infrastructure to allow devices to offer different sets of feature
bits
2014 Dec 02
24
[PATCH RFC v5 00/19] qemu: towards virtio-1 host support
Another iteration of virtio-1 patches for qemu, as always available on
git://github.com/cohuck/qemu virtio-1
This one seems to work together with the current vhost-next patches
(well, I can ping :)
Changes from v4:
- add helpers for feature bit manipulation and checking
- use 64 bit feature bits instead of 32 bit arrays
- infrastructure to allow devices to offer different sets of feature
bits
2014 Oct 07
1
[PATCH RFC 03/11] virtio: support more feature bits
...rtio-blk.c b/hw/block/virtio-blk.c
index 45e0c8f..5abc327 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -561,10 +561,15 @@ static void virtio_blk_set_config(VirtIODevice *vdev, const uint8_t *config)
aio_context_release(bdrv_get_aio_context(s->bs));
}
-static uint32_t virtio_blk_get_features(VirtIODevice *vdev, uint32_t features)
+static uint32_t virtio_blk_get_features(VirtIODevice *vdev, unsigned int index,
+ uint32_t features)
{
VirtIOBlock *s = VIRTIO_BLK(vdev);
+ if (index > 0) {
+ return features;
+ }
+
feature...