search for: virtio_ccw_set_config

Displaying 20 results from an estimated 25 matches for "virtio_ccw_set_config".

Did you mean: virtio_ccw_get_config
2018 Sep 18
0
[RFC PATCH 1/2] virtio/s390: avoid race on vcdev->config
On Wed, 12 Sep 2018 16:02:01 +0200 Halil Pasic <pasic at linux.ibm.com> wrote: > Currently we have a race on vcdev->config in virtio_ccw_get_config() and > in virtio_ccw_set_config(). > > This normally does not cause problems, as these are usually infrequent > operations. But occasionally sysfs attributes are directly dependent on > pieces of virio config and trigger a get on each read. This gives us at > least one trigger. So, the problem is that you might g...
2018 Sep 19
0
[RFC PATCH 1/2] virtio/s390: avoid race on vcdev->config
...inux.ibm.com> wrote: > On 09/18/2018 08:29 PM, Cornelia Huck wrote: > > On Wed, 12 Sep 2018 16:02:01 +0200 > > Halil Pasic <pasic at linux.ibm.com> wrote: > > > >> Currently we have a race on vcdev->config in virtio_ccw_get_config() and > >> in virtio_ccw_set_config(). > >> > >> This normally does not cause problems, as these are usually infrequent > >> operations. But occasionally sysfs attributes are directly dependent on > >> pieces of virio config and trigger a get on each read. This gives us at > >> least one t...
2018 Sep 26
4
[PULL 0/2] virtio-ccw fixes
The following changes since commit 8c0f9f5b309d627182d5da72a69246f58bde1026: Revert "uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name" (2018-09-25 13:28:58 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/virtio-ccw-20180926 for you to fetch changes up to
2019 Apr 26
0
[PATCH 09/10] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...to out_free; @@ -880,8 +903,8 @@ static void virtio_ccw_get_config(struct virtio_device *vdev, memcpy(buf, config_area + offset, len); out_free: - kfree(config_area); - kfree(ccw); + __vc_dma_free(vdev, VIRTIO_CCW_CONFIG_SIZE, config_area); + vc_dma_free_struct(vdev, ccw); } static void virtio_ccw_set_config(struct virtio_device *vdev, @@ -893,11 +916,11 @@ static void virtio_ccw_set_config(struct virtio_device *vdev, void *config_area; unsigned long flags; - ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); + vc_dma_alloc_struct(vdev, ccw); if (!ccw) return; - config_area = kzalloc(VIRTI...
2019 May 23
0
[PATCH v2 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...to out_free; @@ -881,8 +904,8 @@ static void virtio_ccw_get_config(struct virtio_device *vdev, memcpy(buf, config_area + offset, len); out_free: - kfree(config_area); - kfree(ccw); + __vc_dma_free(vdev, VIRTIO_CCW_CONFIG_SIZE, config_area); + vc_dma_free_struct(vdev, ccw); } static void virtio_ccw_set_config(struct virtio_device *vdev, @@ -894,11 +917,11 @@ static void virtio_ccw_set_config(struct virtio_device *vdev, void *config_area; unsigned long flags; - ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); + vc_dma_alloc_struct(vdev, ccw); if (!ccw) return; - config_area = kzalloc(VIRTI...
2019 May 29
0
[PATCH v3 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...to out_free; @@ -881,8 +904,8 @@ static void virtio_ccw_get_config(struct virtio_device *vdev, memcpy(buf, config_area + offset, len); out_free: - kfree(config_area); - kfree(ccw); + __vc_dma_free(vdev, VIRTIO_CCW_CONFIG_SIZE, config_area); + vc_dma_free_struct(vdev, ccw); } static void virtio_ccw_set_config(struct virtio_device *vdev, @@ -894,11 +917,11 @@ static void virtio_ccw_set_config(struct virtio_device *vdev, void *config_area; unsigned long flags; - ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); + vc_dma_alloc_struct(vdev, ccw); if (!ccw) return; - config_area = kzalloc(VIRTI...
2019 Jun 06
0
[PATCH v4 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...void virtio_ccw_get_config(struct virtio_device *vdev, memcpy(buf, config_area + offset, len); out_free: - kfree(config_area); - kfree(ccw); + ccw_device_dma_free(vcdev->cdev, config_area, VIRTIO_CCW_CONFIG_SIZE); + ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); } static void virtio_ccw_set_config(struct virtio_device *vdev, @@ -894,11 +907,12 @@ static void virtio_ccw_set_config(struct virtio_device *vdev, void *config_area; unsigned long flags; - ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); + ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); if (!ccw) return; -...
2019 Jun 12
0
[PATCH v5 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...void virtio_ccw_get_config(struct virtio_device *vdev, memcpy(buf, config_area + offset, len); out_free: - kfree(config_area); - kfree(ccw); + ccw_device_dma_free(vcdev->cdev, config_area, VIRTIO_CCW_CONFIG_SIZE); + ccw_device_dma_free(vcdev->cdev, ccw, sizeof(*ccw)); } static void virtio_ccw_set_config(struct virtio_device *vdev, @@ -894,11 +907,12 @@ static void virtio_ccw_set_config(struct virtio_device *vdev, void *config_area; unsigned long flags; - ccw = kzalloc(sizeof(*ccw), GFP_DMA | GFP_KERNEL); + ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw)); if (!ccw) return; -...
2017 Jan 16
0
[PULL 3/5] virtio/s390: support READ_STATUS command for virtio-ccw
...VIRTIO_CCW_DOING_SET_IND_ADAPTER 0x08000000 #define VIRTIO_CCW_DOING_SET_VIRTIO_REV 0x10000000 +#define VIRTIO_CCW_DOING_READ_STATUS 0x20000000 #define VIRTIO_CCW_INTPARM_MASK 0xffff0000 static struct virtio_ccw_device *to_vc_device(struct virtio_device *vdev) @@ -892,6 +894,28 @@ static void virtio_ccw_set_config(struct virtio_device *vdev, static u8 virtio_ccw_get_status(struct virtio_device *vdev) { struct virtio_ccw_device *vcdev = to_vc_device(vdev); + u8 old_status = *vcdev->status; + struct ccw1 *ccw; + + if (vcdev->revision < 1) + return *vcdev->status; + + ccw = kzalloc(sizeof(*ccw)...
2023 Mar 05
0
[PATCH AUTOSEL 6.2 05/16] s390/virtio: sort out physical vs virtual pointers usage
...CCW_CMD_READ_CONF; ccw->flags = 0; ccw->count = offset + len; - ccw->cda = (__u32)(unsigned long)config_area; + ccw->cda = (__u32)virt_to_phys(config_area); ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_CONFIG); if (ret) goto out_free; @@ -922,7 +924,7 @@ static void virtio_ccw_set_config(struct virtio_device *vdev, ccw->cmd_code = CCW_CMD_WRITE_CONF; ccw->flags = 0; ccw->count = offset + len; - ccw->cda = (__u32)(unsigned long)config_area; + ccw->cda = (__u32)virt_to_phys(config_area); ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_CONFIG); out_free: @@...
2023 Mar 05
0
[PATCH AUTOSEL 6.1 05/15] s390/virtio: sort out physical vs virtual pointers usage
...CCW_CMD_READ_CONF; ccw->flags = 0; ccw->count = offset + len; - ccw->cda = (__u32)(unsigned long)config_area; + ccw->cda = (__u32)virt_to_phys(config_area); ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_CONFIG); if (ret) goto out_free; @@ -922,7 +924,7 @@ static void virtio_ccw_set_config(struct virtio_device *vdev, ccw->cmd_code = CCW_CMD_WRITE_CONF; ccw->flags = 0; ccw->count = offset + len; - ccw->cda = (__u32)(unsigned long)config_area; + ccw->cda = (__u32)virt_to_phys(config_area); ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_CONFIG); out_free: @@...
2017 Jan 16
7
[PULL 0/5] virtio/s390 patches for -next
Michael, the following patches have all been posted in the past. I've collected them on top of your vhost branch -- please let me know whether this works for you. The following changes since commit 6bdf1e0efb04a1716373646cb6f35b73addca492: Makefile: drop -D__CHECK_ENDIAN__ from cflags (2016-12-16 00:13:43 +0200) are available in the git repository at:
2017 Jan 16
7
[PULL 0/5] virtio/s390 patches for -next
Michael, the following patches have all been posted in the past. I've collected them on top of your vhost branch -- please let me know whether this works for you. The following changes since commit 6bdf1e0efb04a1716373646cb6f35b73addca492: Makefile: drop -D__CHECK_ENDIAN__ from cflags (2016-12-16 00:13:43 +0200) are available in the git repository at:
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
2019 Jun 12
21
[PATCH v5 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2019 Jun 12
21
[PATCH v5 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2019 Jun 06
15
[PATCH v4 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2019 Jun 06
15
[PATCH v4 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2019 May 29
16
[PATCH v3 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV