search for: ctrl_lock

Displaying 20 results from an estimated 52 matches for "ctrl_lock".

Did you mean: call_lock
2016 Nov 28
1
[PATCH v3] crypto: add virtio-crypto driver
...= kmalloc(keylen, GFP_ATOMIC); >>> > > + >>> > > + if (!cipher_key) >>> > > + return -ENOMEM; >>> > > + >>> > > + memcpy(cipher_key, key, keylen); >>> > > + >>> > > + spin_lock(&vcrypto->ctrl_lock); >>> > > + /* Pad ctrl header */ >>> > > + vcrypto->ctrl.header.opcode = >>> > > + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); >>> > > + vcrypto->ctrl.header.algo = cpu_to_le32(alg); >>> > > + /* Set the defaul...
2016 Nov 28
1
[PATCH v3] crypto: add virtio-crypto driver
...= kmalloc(keylen, GFP_ATOMIC); >>> > > + >>> > > + if (!cipher_key) >>> > > + return -ENOMEM; >>> > > + >>> > > + memcpy(cipher_key, key, keylen); >>> > > + >>> > > + spin_lock(&vcrypto->ctrl_lock); >>> > > + /* Pad ctrl header */ >>> > > + vcrypto->ctrl.header.opcode = >>> > > + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); >>> > > + vcrypto->ctrl.header.algo = cpu_to_le32(alg); >>> > > + /* Set the defaul...
2023 Apr 03
2
[PATCH resend 1/2] vdpa/snet: support getting and setting VQ state
...; > > > At least you need to use smp_wmb() but if you want to serialize MMIO > writes you can simply use spinlocks after the removal of mmiowb > work[1]. > I'm not sure how a spinlock can help in this case. The entire control mechanism is protected by the spinlock snet->ctrl_lock, so multiple CPUs won't use it simultaneously. > Note that Documentation/memory-barriers.txt said: > > 1. All readX() and writeX() accesses to the same peripheral are ordered > with respect to each other. This ensures that MMIO register accesses >...
2023 Mar 20
3
[PATCH 0/2] vdpa/snet: support [s/g]et_vq_state and suspend
Add more vDPA callbacks. [s/g]et_vq_state is added in patch 1, including a new control mechanism to read data from the DPU. suspend is added in patch 2. Alvaro Karsz (2): vdpa/snet: support getting and setting VQ state vdpa/snet: support the suspend vDPA callback drivers/vdpa/solidrun/Makefile | 1 + drivers/vdpa/solidrun/snet_ctrl.c | 324 +++++++++++++++++++++++++++++
2023 Apr 02
2
[PATCH resend 0/2] vdpa/snet: support [s/g]et_vq_state and suspend
Add more vDPA callbacks. [s/g]et_vq_state is added in patch 1, including a new control mechanism to read data from the DPU. suspend is added in patch 2. Alvaro Karsz (2): vdpa/snet: support getting and setting VQ state vdpa/snet: support the suspend vDPA callback drivers/vdpa/solidrun/Makefile | 1 + drivers/vdpa/solidrun/snet_ctrl.c | 324 +++++++++++++++++++++++++++++
2016 Nov 28
5
[PATCH v3] crypto: add virtio-crypto driver
...mp;vdev->dev, "Failed to add new virtio crypto device.\n"); > + goto free; > + } > + vcrypto->owner = THIS_MODULE; > + vcrypto = vdev->priv = vcrypto; > + vcrypto->vdev = vdev; > + spin_lock_init(&vcrypto->lock); > + spin_lock_init(&vcrypto->ctrl_lock); > + > + /* Use single data queue as default */ > + vcrypto->curr_queue = 1; > + vcrypto->max_data_queues = max_data_queues; > + vcrypto->max_cipher_key_len = max_cipher_key_len; > + vcrypto->max_auth_key_len = max_auth_key_len; > + vcrypto->max_size = max_size;...
2016 Nov 28
5
[PATCH v3] crypto: add virtio-crypto driver
...mp;vdev->dev, "Failed to add new virtio crypto device.\n"); > + goto free; > + } > + vcrypto->owner = THIS_MODULE; > + vcrypto = vdev->priv = vcrypto; > + vcrypto->vdev = vdev; > + spin_lock_init(&vcrypto->lock); > + spin_lock_init(&vcrypto->ctrl_lock); > + > + /* Use single data queue as default */ > + vcrypto->curr_queue = 1; > + vcrypto->max_data_queues = max_data_queues; > + vcrypto->max_cipher_key_len = max_cipher_key_len; > + vcrypto->max_auth_key_len = max_auth_key_len; > + vcrypto->max_size = max_size;...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...mp;vdev->dev, "Failed to add new virtio crypto device.\n"); > + goto free; > + } > + vcrypto->owner = THIS_MODULE; > + vcrypto = vdev->priv = vcrypto; > + vcrypto->vdev = vdev; > + spin_lock_init(&vcrypto->lock); > + spin_lock_init(&vcrypto->ctrl_lock); > + > + /* Use sigle data queue as default */ > + vcrypto->curr_queue = 1; > + vcrypto->max_cipher_key_len = le32_to_cpu(max_cipher_key_len_le); > + vcrypto->max_auth_key_len = le32_to_cpu(max_auth_key_len_le); > + vcrypto->max_size = le64_to_cpu(max_size_le); > +...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...mp;vdev->dev, "Failed to add new virtio crypto device.\n"); > + goto free; > + } > + vcrypto->owner = THIS_MODULE; > + vcrypto = vdev->priv = vcrypto; > + vcrypto->vdev = vdev; > + spin_lock_init(&vcrypto->lock); > + spin_lock_init(&vcrypto->ctrl_lock); > + > + /* Use sigle data queue as default */ > + vcrypto->curr_queue = 1; > + vcrypto->max_cipher_key_len = le32_to_cpu(max_cipher_key_len_le); > + vcrypto->max_auth_key_len = le32_to_cpu(max_auth_key_len_le); > + vcrypto->max_size = le64_to_cpu(max_size_le); > +...
2016 Nov 28
0
[virtio-dev] Re: [PATCH v2 2/2] crypto: add virtio-crypto driver
...d new virtio crypto device.\n"); > > + goto free; > > + } > > + vcrypto->owner = THIS_MODULE; > > + vcrypto = vdev->priv = vcrypto; > > + vcrypto->vdev = vdev; > > + spin_lock_init(&vcrypto->lock); > > + spin_lock_init(&vcrypto->ctrl_lock); > > + > > + /* Use sigle data queue as default */ > > + vcrypto->curr_queue = 1; > > + vcrypto->max_cipher_key_len = le32_to_cpu(max_cipher_key_len_le); > > + vcrypto->max_auth_key_len = le32_to_cpu(max_auth_key_len_le); > > + vcrypto->max_size = le...
2016 Nov 22
0
[PATCH v2 2/2] crypto: add virtio-crypto driver
...crypto); + if (err) { + dev_err(&vdev->dev, "Failed to add new virtio crypto device.\n"); + goto free; + } + vcrypto->owner = THIS_MODULE; + vcrypto = vdev->priv = vcrypto; + vcrypto->vdev = vdev; + spin_lock_init(&vcrypto->lock); + spin_lock_init(&vcrypto->ctrl_lock); + + /* Use sigle data queue as default */ + vcrypto->curr_queue = 1; + vcrypto->max_cipher_key_len = le32_to_cpu(max_cipher_key_len_le); + vcrypto->max_auth_key_len = le32_to_cpu(max_auth_key_len_le); + vcrypto->max_size = le64_to_cpu(max_size_le); + + err = virtcrypto_init_vqs(vcrypt...
2016 Nov 28
0
[PATCH v3] crypto: add virtio-crypto driver
...crypto); + if (err) { + dev_err(&vdev->dev, "Failed to add new virtio crypto device.\n"); + goto free; + } + vcrypto->owner = THIS_MODULE; + vcrypto = vdev->priv = vcrypto; + vcrypto->vdev = vdev; + spin_lock_init(&vcrypto->lock); + spin_lock_init(&vcrypto->ctrl_lock); + + /* Use single data queue as default */ + vcrypto->curr_queue = 1; + vcrypto->max_data_queues = max_data_queues; + vcrypto->max_cipher_key_len = max_cipher_key_len; + vcrypto->max_auth_key_len = max_auth_key_len; + vcrypto->max_size = max_size; + + dev_info(&vdev->dev, +...
2016 Nov 29
0
[PATCH v4 1/1] crypto: add virtio-crypto driver
...gned int num_out = 0, num_in = 0; + + /* + * Avoid to do DMA from the stack, switch to using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32(alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CR...
2016 Dec 01
0
[PATCH v5 1/1] crypto: add virtio-crypto driver
...gned int num_out = 0, num_in = 0; + + /* + * Avoid to do DMA from the stack, switch to using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32(alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CR...
2016 Dec 08
0
[PATCH v6 2/2] crypto: add virtio-crypto driver
...gned int num_out = 0, num_in = 0; + + /* + * Avoid to do DMA from the stack, switch to using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32(alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CR...
2016 Dec 14
0
[PATCH v7 1/1] crypto: add virtio-crypto driver
...gned int num_out = 0, num_in = 0; + + /* + * Avoid to do DMA from the stack, switch to using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32(alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CR...
2016 Dec 15
0
[PATCH v8 1/1] crypto: add virtio-crypto driver
...gned int num_out = 0, num_in = 0; + + /* + * Avoid to do DMA from the stack, switch to using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32(alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CR...
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 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. -