Displaying 20 results from an estimated 38 matches for "virtio_crypto_s_hw_ready".
2016 Nov 28
2
[PATCH v3] crypto: add virtio-crypto driver
...> +static int virtcrypto_update_status(struct virtio_crypto *vcrypto)
> +{
> + u32 status;
> + int err;
> +
> + virtio_cread(vcrypto->vdev,
> + struct virtio_crypto_config, status, &status);
> +
> + /* Ignore unknown (future) status bits */
> + status &= VIRTIO_CRYPTO_S_HW_READY;
I'm wondering what the driver really should do if it encounters unknown
status bits.
I'd expect that new status bits are guarded by a feature bit and that
the device should not set status bits if the respective feature bit has
not been negotiated. Therefore, unknown status bits would be...
2016 Nov 28
2
[PATCH v3] crypto: add virtio-crypto driver
...> +static int virtcrypto_update_status(struct virtio_crypto *vcrypto)
> +{
> + u32 status;
> + int err;
> +
> + virtio_cread(vcrypto->vdev,
> + struct virtio_crypto_config, status, &status);
> +
> + /* Ignore unknown (future) status bits */
> + status &= VIRTIO_CRYPTO_S_HW_READY;
I'm wondering what the driver really should do if it encounters unknown
status bits.
I'd expect that new status bits are guarded by a feature bit and that
the device should not set status bits if the respective feature bit has
not been negotiated. Therefore, unknown status bits would be...
2016 Nov 29
0
[virtio-dev] Re: [PATCH v3] crypto: add virtio-crypto driver
...uct virtio_crypto *vcrypto)
> > +{
> > + u32 status;
> > + int err;
> > +
> > + virtio_cread(vcrypto->vdev,
> > + struct virtio_crypto_config, status, &status);
> > +
> > + /* Ignore unknown (future) status bits */
> > + status &= VIRTIO_CRYPTO_S_HW_READY;
>
> I'm wondering what the driver really should do if it encounters unknown
> status bits.
>
> I'd expect that new status bits are guarded by a feature bit and that
> the device should not set status bits if the respective feature bit has
> not been negotiated. There...
2016 Nov 29
1
[virtio-dev] Re: [PATCH v3] crypto: add virtio-crypto driver
...> > > + u32 status;
> > > + int err;
> > > +
> > > + virtio_cread(vcrypto->vdev,
> > > + struct virtio_crypto_config, status, &status);
> > > +
> > > + /* Ignore unknown (future) status bits */
> > > + status &= VIRTIO_CRYPTO_S_HW_READY;
> >
> > I'm wondering what the driver really should do if it encounters unknown
> > status bits.
> >
> > I'd expect that new status bits are guarded by a feature bit and that
> > the device should not set status bits if the respective feature bit has
&...
2016 Nov 29
1
[virtio-dev] Re: [PATCH v3] crypto: add virtio-crypto driver
...> > > + u32 status;
> > > + int err;
> > > +
> > > + virtio_cread(vcrypto->vdev,
> > > + struct virtio_crypto_config, status, &status);
> > > +
> > > + /* Ignore unknown (future) status bits */
> > > + status &= VIRTIO_CRYPTO_S_HW_READY;
> >
> > I'm wondering what the driver really should do if it encounters unknown
> > status bits.
> >
> > I'd expect that new status bits are guarded by a feature bit and that
> > the device should not set status bits if the respective feature bit has
&...
2016 Nov 14
3
[PATCH] crypto: add virtio-crypto driver
...+ return 0;
+
+err_free:
+ virtcrypto_free_queues(vi);
+err:
+ return ret;
+}
+
+static void virtcrypto_update_status(struct virtio_crypto *vcrypto)
+{
+ u32 v;
+
+ virtio_cread(vcrypto->vdev, struct virtio_crypto_config, status, &v);
+
+ /* Ignore unknown (future) status bits */
+ v &= VIRTIO_CRYPTO_S_HW_READY;
+
+ if (vcrypto->status == v)
+ return;
+
+ vcrypto->status = v;
+
+ if (vcrypto->status & VIRTIO_CRYPTO_S_HW_READY)
+ pr_info("virtio_crypto: accelerator is ready\n");
+ else
+ pr_info("virtio_crypto: accelerator is not ready\n");
+}
+
+static int virtcrypto_pr...
2016 Nov 14
3
[PATCH] crypto: add virtio-crypto driver
...+ return 0;
+
+err_free:
+ virtcrypto_free_queues(vi);
+err:
+ return ret;
+}
+
+static void virtcrypto_update_status(struct virtio_crypto *vcrypto)
+{
+ u32 v;
+
+ virtio_cread(vcrypto->vdev, struct virtio_crypto_config, status, &v);
+
+ /* Ignore unknown (future) status bits */
+ v &= VIRTIO_CRYPTO_S_HW_READY;
+
+ if (vcrypto->status == v)
+ return;
+
+ vcrypto->status = v;
+
+ if (vcrypto->status & VIRTIO_CRYPTO_S_HW_READY)
+ pr_info("virtio_crypto: accelerator is ready\n");
+ else
+ pr_info("virtio_crypto: accelerator is not ready\n");
+}
+
+static int virtcrypto_pr...
2016 Nov 28
4
[PATCH v3] virtio-crypto: add Linux driver
v3:
- set cpu affinity when data queues are not equal to the number of online cpus. [Michael]
- add TODO comments for cpu hotplug (changing the relationship of binding virtqueue and cpu)
- use __u32/64 in the config space since the virtio->get() doesn't support byte-swap yet. [Michael]
- drop the whole patch 1 of v2 because the above reason.
- add VERSION_1 check at the beginning of
2016 Nov 28
4
[PATCH v3] virtio-crypto: add Linux driver
v3:
- set cpu affinity when data queues are not equal to the number of online cpus. [Michael]
- add TODO comments for cpu hotplug (changing the relationship of binding virtqueue and cpu)
- use __u32/64 in the config space since the virtio->get() doesn't support byte-swap yet. [Michael]
- drop the whole patch 1 of v2 because the above reason.
- add VERSION_1 check at the beginning of
2016 Nov 22
0
[PATCH v2 2/2] crypto: add virtio-crypto driver
...rypto_update_status(struct virtio_crypto *vcrypto)
+{
+ __le32 status_le;
+ u32 status;
+ int err;
+
+ status_le = virtio_cread32_le(vcrypto->vdev,
+ offsetof(struct virtio_crypto_config, status));
+ status = le32_to_cpu(status_le);
+
+ /* Ignore unknown (future) status bits */
+ status &= VIRTIO_CRYPTO_S_HW_READY;
+
+ if (vcrypto->status == status)
+ return 0;
+
+ vcrypto->status = status;
+
+ if (vcrypto->status & VIRTIO_CRYPTO_S_HW_READY) {
+ err = virtcrypto_dev_start(vcrypto);
+ if (err) {
+ dev_err(&vcrypto->vdev->dev,
+ "Failed to start virtio crypto device.\n"...
2016 Nov 28
0
[PATCH v3] crypto: add virtio-crypto driver
...tcrypto_free_queues(vi);
+err:
+ return ret;
+}
+
+static int virtcrypto_update_status(struct virtio_crypto *vcrypto)
+{
+ u32 status;
+ int err;
+
+ virtio_cread(vcrypto->vdev,
+ struct virtio_crypto_config, status, &status);
+
+ /* Ignore unknown (future) status bits */
+ status &= VIRTIO_CRYPTO_S_HW_READY;
+
+ if (vcrypto->status == status)
+ return 0;
+
+ vcrypto->status = status;
+
+ if (vcrypto->status & VIRTIO_CRYPTO_S_HW_READY) {
+ err = virtcrypto_dev_start(vcrypto);
+ if (err) {
+ dev_err(&vcrypto->vdev->dev,
+ "Failed to start virtio crypto device.\n"...
2016 Nov 29
0
[PATCH v4 1/1] crypto: add virtio-crypto driver
...status(struct virtio_crypto *vcrypto)
+{
+ u32 status;
+ int err;
+
+ virtio_cread(vcrypto->vdev,
+ struct virtio_crypto_config, status, &status);
+
+ /*
+ * Unknown status bits would be a host error and the driver
+ * should consider the device to be broken.
+ */
+ if (status & (~VIRTIO_CRYPTO_S_HW_READY)) {
+ dev_err(&vcrypto->vdev->dev,
+ "Unknown status bits: 0x%x\n", status);
+
+ virtio_break_device(vcrypto->vdev);
+ return -EPERM;
+ }
+
+ if (vcrypto->status == status)
+ return 0;
+
+ vcrypto->status = status;
+
+ if (vcrypto->status & VIRTIO_CRYPTO_S...
2016 Nov 28
5
[PATCH v3] crypto: add virtio-crypto driver
...> +static int virtcrypto_update_status(struct virtio_crypto *vcrypto)
> +{
> + u32 status;
> + int err;
> +
> + virtio_cread(vcrypto->vdev,
> + struct virtio_crypto_config, status, &status);
> +
> + /* Ignore unknown (future) status bits */
> + status &= VIRTIO_CRYPTO_S_HW_READY;
> +
> + if (vcrypto->status == status)
> + return 0;
> +
> + vcrypto->status = status;
> +
> + if (vcrypto->status & VIRTIO_CRYPTO_S_HW_READY) {
> + err = virtcrypto_dev_start(vcrypto);
> + if (err) {
> + dev_err(&vcrypto->vdev->dev,
> +...
2016 Nov 28
5
[PATCH v3] crypto: add virtio-crypto driver
...> +static int virtcrypto_update_status(struct virtio_crypto *vcrypto)
> +{
> + u32 status;
> + int err;
> +
> + virtio_cread(vcrypto->vdev,
> + struct virtio_crypto_config, status, &status);
> +
> + /* Ignore unknown (future) status bits */
> + status &= VIRTIO_CRYPTO_S_HW_READY;
> +
> + if (vcrypto->status == status)
> + return 0;
> +
> + vcrypto->status = status;
> +
> + if (vcrypto->status & VIRTIO_CRYPTO_S_HW_READY) {
> + err = virtcrypto_dev_start(vcrypto);
> + if (err) {
> + dev_err(&vcrypto->vdev->dev,
> +...
2016 Dec 01
0
[PATCH v5 1/1] crypto: add virtio-crypto driver
...ypto *vcrypto)
+{
+ u32 status;
+ int err;
+ unsigned long flags;
+
+ virtio_cread(vcrypto->vdev,
+ struct virtio_crypto_config, status, &status);
+
+ /*
+ * Unknown status bits would be a host error and the driver
+ * should consider the device to be broken.
+ */
+ if (status & (~VIRTIO_CRYPTO_S_HW_READY)) {
+ dev_warn(&vcrypto->vdev->dev,
+ "Unknown status bits: 0x%x\n", status);
+
+ spin_lock_irqsave(&vcrypto->lock, flags);
+ virtio_break_device(vcrypto->vdev);
+ spin_unlock_irqrestore(&vcrypto->lock, flags);
+ return -EPERM;
+ }
+
+ if (vcrypto->st...
2016 Dec 08
0
[PATCH v6 2/2] crypto: add virtio-crypto driver
...ypto *vcrypto)
+{
+ u32 status;
+ int err;
+ unsigned long flags;
+
+ virtio_cread(vcrypto->vdev,
+ struct virtio_crypto_config, status, &status);
+
+ /*
+ * Unknown status bits would be a host error and the driver
+ * should consider the device to be broken.
+ */
+ if (status & (~VIRTIO_CRYPTO_S_HW_READY)) {
+ dev_warn(&vcrypto->vdev->dev,
+ "Unknown status bits: 0x%x\n", status);
+
+ spin_lock_irqsave(&vcrypto->lock, flags);
+ virtio_break_device(vcrypto->vdev);
+ spin_unlock_irqrestore(&vcrypto->lock, flags);
+ return -EPERM;
+ }
+
+ if (vcrypto->st...
2016 Dec 14
0
[PATCH v7 1/1] crypto: add virtio-crypto driver
...ypto *vcrypto)
+{
+ u32 status;
+ int err;
+ unsigned long flags;
+
+ virtio_cread(vcrypto->vdev,
+ struct virtio_crypto_config, status, &status);
+
+ /*
+ * Unknown status bits would be a host error and the driver
+ * should consider the device to be broken.
+ */
+ if (status & (~VIRTIO_CRYPTO_S_HW_READY)) {
+ dev_warn(&vcrypto->vdev->dev,
+ "Unknown status bits: 0x%x\n", status);
+
+ spin_lock_irqsave(&vcrypto->lock, flags);
+ virtio_break_device(vcrypto->vdev);
+ spin_unlock_irqrestore(&vcrypto->lock, flags);
+ return -EPERM;
+ }
+
+ if (vcrypto->st...
2016 Dec 15
0
[PATCH v8 1/1] crypto: add virtio-crypto driver
...status(struct virtio_crypto *vcrypto)
+{
+ u32 status;
+ int err;
+
+ virtio_cread(vcrypto->vdev,
+ struct virtio_crypto_config, status, &status);
+
+ /*
+ * Unknown status bits would be a host error and the driver
+ * should consider the device to be broken.
+ */
+ if (status & (~VIRTIO_CRYPTO_S_HW_READY)) {
+ dev_warn(&vcrypto->vdev->dev,
+ "Unknown status bits: 0x%x\n", status);
+
+ virtio_break_device(vcrypto->vdev);
+ return -EPERM;
+ }
+
+ if (vcrypto->status == status)
+ return 0;
+
+ vcrypto->status = status;
+
+ if (vcrypto->status & VIRTIO_CRYPTO_...
2016 Dec 08
4
[PATCH v6 0/2] virtio-crypto: add Linux driver
v6:
- add patch 1/2 to make sparc architecture happy. [Sam]
- close created sessions previousely when rekeying.
- convert the priority of virtio crypto algs from 4001 to 501
which is enough.
v5:
- add comments for algs_lock and table_lock. [Stefan]
- use kzfree instead of kfree for key material security. [Stefan]
- drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx.
-
2016 Dec 08
4
[PATCH v6 0/2] virtio-crypto: add Linux driver
v6:
- add patch 1/2 to make sparc architecture happy. [Sam]
- close created sessions previousely when rekeying.
- convert the priority of virtio crypto algs from 4001 to 501
which is enough.
v5:
- add comments for algs_lock and table_lock. [Stefan]
- use kzfree instead of kfree for key material security. [Stefan]
- drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx.
-