Displaying 20 results from an estimated 78 matches for "vm_finalize_features".
2014 Dec 04
0
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...ed offset,
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
index f5575cc..dd65c8b 100644
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@ -93,7 +93,7 @@ static u64 kvm_get_features(struct virtio_device *vdev)
return features;
}
-static void kvm_finalize_features(struct virtio_device *vdev)
+static int kvm_finalize_features(struct virtio_device *vdev)
{
unsigned int i, bits;
struct kvm_device_desc *desc = to_kvmdev(vdev)->desc;
@@ -112,6 +112,8 @@ static void kvm_finalize_features(struct virtio_device *vdev)
if (__virtio_test_bit(vdev, i))
ou...
2014 Dec 04
0
[PATCH RFC v2 3/4] virtio: allow finalize_features to fail
...ed offset,
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
index f5575cc..dd65c8b 100644
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@ -93,7 +93,7 @@ static u64 kvm_get_features(struct virtio_device *vdev)
return features;
}
-static void kvm_finalize_features(struct virtio_device *vdev)
+static int kvm_finalize_features(struct virtio_device *vdev)
{
unsigned int i, bits;
struct kvm_device_desc *desc = to_kvmdev(vdev)->desc;
@@ -112,6 +112,8 @@ static void kvm_finalize_features(struct virtio_device *vdev)
if (__virtio_test_bit(vdev, i))
ou...
2014 Dec 08
0
[PATCH v3 3/6] virtio: allow finalize_features to fail
...ed offset,
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
index f5575cc..dd65c8b 100644
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@ -93,7 +93,7 @@ static u64 kvm_get_features(struct virtio_device *vdev)
return features;
}
-static void kvm_finalize_features(struct virtio_device *vdev)
+static int kvm_finalize_features(struct virtio_device *vdev)
{
unsigned int i, bits;
struct kvm_device_desc *desc = to_kvmdev(vdev)->desc;
@@ -112,6 +112,8 @@ static void kvm_finalize_features(struct virtio_device *vdev)
if (__virtio_test_bit(vdev, i))
ou...
2014 Dec 08
0
[PATCH v3 3/6] virtio: allow finalize_features to fail
...ed offset,
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
index f5575cc..dd65c8b 100644
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@ -93,7 +93,7 @@ static u64 kvm_get_features(struct virtio_device *vdev)
return features;
}
-static void kvm_finalize_features(struct virtio_device *vdev)
+static int kvm_finalize_features(struct virtio_device *vdev)
{
unsigned int i, bits;
struct kvm_device_desc *desc = to_kvmdev(vdev)->desc;
@@ -112,6 +112,8 @@ static void kvm_finalize_features(struct virtio_device *vdev)
if (__virtio_test_bit(vdev, i))
ou...
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 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
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...its */
- writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL);
+ writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL);
+ features |= readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES);
- return readl(vm_dev->base + VIRTIO_MMIO_HOST_FEATURES);
+ return features;
}
static int vm_finalize_features(struct virtio_device *vdev)
@@ -159,11 +134,20 @@ static int vm_finalize_features(struct virtio_device *vdev)
/* Give virtio_ring a chance to accept features. */
vring_transport_features(vdev);
- /* Make sure we don't have any features > 32 bits! */
- BUG_ON((u32)vdev->features != v...
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...its */
- writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL);
+ writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL);
+ features |= readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES);
- return readl(vm_dev->base + VIRTIO_MMIO_HOST_FEATURES);
+ return features;
}
static int vm_finalize_features(struct virtio_device *vdev)
@@ -159,11 +134,20 @@ static int vm_finalize_features(struct virtio_device *vdev)
/* Give virtio_ring a chance to accept features. */
vring_transport_features(vdev);
- /* Make sure we don't have any features > 32 bits! */
- BUG_ON((u32)vdev->features != v...
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...->base + VIRTIO_MMIO_DEVICE_FEATURES);
+ features <<= 32;
- return readl(vm_dev->base + VIRTIO_MMIO_HOST_FEATURES);
+ writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL);
+ features |= readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES);
+
+ return features;
}
static int vm_finalize_features(struct virtio_device *vdev)
@@ -159,11 +134,13 @@ static int vm_finalize_features(struct virtio_device *vdev)
/* Give virtio_ring a chance to accept features. */
vring_transport_features(vdev);
- /* Make sure we don't have any features > 32 bits! */
- BUG_ON((u32)vdev->features != v...
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...->base + VIRTIO_MMIO_DEVICE_FEATURES);
+ features <<= 32;
- return readl(vm_dev->base + VIRTIO_MMIO_HOST_FEATURES);
+ writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL);
+ features |= readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES);
+
+ return features;
}
static int vm_finalize_features(struct virtio_device *vdev)
@@ -159,11 +134,13 @@ static int vm_finalize_features(struct virtio_device *vdev)
/* Give virtio_ring a chance to accept features. */
vring_transport_features(vdev);
- /* Make sure we don't have any features > 32 bits! */
- BUG_ON((u32)vdev->features != v...
2014 Nov 25
2
[PATCH v4 02/42] virtio: add support for 64 bit features.
...- 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 << i);
+ features |= (1ULL << i);
return features;
}
@@ -106,7 +106,7 @@ static void kvm_finalize_features(struct virtio_device *vdev)
memset(out_features, 0, desc->feature_len);
bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8;
for (i = 0; i < bits; i++) {
- if (vdev->features & (1 << i))
+ if (vdev->features & (1ULL << i))
out_feat...
2014 Nov 25
2
[PATCH v4 02/42] virtio: add support for 64 bit features.
...- 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 << i);
+ features |= (1ULL << i);
return features;
}
@@ -106,7 +106,7 @@ static void kvm_finalize_features(struct virtio_device *vdev)
memset(out_features, 0, desc->feature_len);
bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8;
for (i = 0; i < bits; i++) {
- if (vdev->features & (1 << i))
+ if (vdev->features & (1ULL << i))
out_feat...
2015 Jan 20
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...TIO_MMIO_HOST_FEATURES_SEL);
> + writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL);
> + features |= readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES);
>
> - return readl(vm_dev->base + VIRTIO_MMIO_HOST_FEATURES);
> + return features;
> }
>
> static int vm_finalize_features(struct virtio_device *vdev)
> @@ -159,11 +134,20 @@ static int vm_finalize_features(struct virtio_device *vdev)
> /* Give virtio_ring a chance to accept features. */
> vring_transport_features(vdev);
>
> - /* Make sure we don't have any features > 32 bits! */
> - BUG_...
2015 Jan 20
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...TIO_MMIO_HOST_FEATURES_SEL);
> + writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL);
> + features |= readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES);
>
> - return readl(vm_dev->base + VIRTIO_MMIO_HOST_FEATURES);
> + return features;
> }
>
> static int vm_finalize_features(struct virtio_device *vdev)
> @@ -159,11 +134,20 @@ static int vm_finalize_features(struct virtio_device *vdev)
> /* Give virtio_ring a chance to accept features. */
> vring_transport_features(vdev);
>
> - /* Make sure we don't have any features > 32 bits! */
> - BUG_...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...its */
- writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL);
+ writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL);
+ features |= readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES);
- return readl(vm_dev->base + VIRTIO_MMIO_HOST_FEATURES);
+ return features;
}
static int vm_finalize_features(struct virtio_device *vdev)
@@ -159,11 +134,13 @@ static int vm_finalize_features(struct virtio_device *vdev)
/* Give virtio_ring a chance to accept features. */
vring_transport_features(vdev);
- /* Make sure we don't have any features > 32 bits! */
- BUG_ON((u32)vdev->features != v...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...its */
- writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL);
+ writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL);
+ features |= readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES);
- return readl(vm_dev->base + VIRTIO_MMIO_HOST_FEATURES);
+ return features;
}
static int vm_finalize_features(struct virtio_device *vdev)
@@ -159,11 +134,13 @@ static int vm_finalize_features(struct virtio_device *vdev)
/* Give virtio_ring a chance to accept features. */
vring_transport_features(vdev);
- /* Make sure we don't have any features > 32 bits! */
- BUG_ON((u32)vdev->features != v...
2014 Oct 07
0
[PATCH RFC 02/11] virtio: add support for 64 bit features.
...- 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 << i);
+ features |= (1ULL << i);
return features;
}
@@ -106,7 +106,7 @@ static void kvm_finalize_features(struct virtio_device *vdev)
memset(out_features, 0, desc->feature_len);
bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8;
for (i = 0; i < bits; i++) {
- if (vdev->features & (1 << i))
+ if (vdev->features & (1ULL << i))
out_feat...
2014 Nov 24
0
[PATCH v3 02/41] virtio: add support for 64 bit features.
...- 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 << i);
+ features |= (1ULL << i);
return features;
}
@@ -106,7 +106,7 @@ static void kvm_finalize_features(struct virtio_device *vdev)
memset(out_features, 0, desc->feature_len);
bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8;
for (i = 0; i < bits; i++) {
- if (vdev->features & (1 << i))
+ if (vdev->features & (1ULL << i))
out_feat...