search for: ccw_cmd_set_vq

Displaying 20 results from an estimated 43 matches for "ccw_cmd_set_vq".

2014 Oct 07
0
[PATCH RFC 10/11] KVM: s390: virtio-ccw revision 1 SET_VQ
The CCW_CMD_SET_VQ command has a different format for revision 1+ devices, allowing to specify a more complex virtqueue layout. For now, we stay however with the old layout and simply use the new command format for virtio-1 devices. Signed-off-by: Cornelia Huck <cornelia.huck at de.ibm.com> --- drivers/s390/k...
2014 Dec 11
0
[PATCH RFC v6 11/20] s390x/virtio-ccw: support virtio-1 set_vq format
Support the new CCW_CMD_SET_VQ format for virtio-1 devices. While we're at it, refactor the code a bit and enforce big endian fields (which had always been required, even for legacy). Reviewed-by: Thomas Huth <thuth at linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck at de.ibm.com> --- hw/s390x/...
2014 Dec 11
0
[PATCH RFC v6 11/20] s390x/virtio-ccw: support virtio-1 set_vq format
Support the new CCW_CMD_SET_VQ format for virtio-1 devices. While we're at it, refactor the code a bit and enforce big endian fields (which had always been required, even for legacy). Reviewed-by: Thomas Huth <thuth at linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck at de.ibm.com> --- hw/s390x/...
2023 Mar 05
0
[PATCH AUTOSEL 6.2 05/16] s390/virtio: sort out physical vs virtual pointers usage
...onfig_block); + ccw->cda = (__u32)virt_to_phys(&vcdev->dma_area->config_block); ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_VQ_CONF); if (ret) return ret; @@ -454,7 +454,7 @@ static void virtio_ccw_del_vq(struct virtqueue *vq, struct ccw1 *ccw) } ccw->cmd_code = CCW_CMD_SET_VQ; ccw->flags = 0; - ccw->cda = (__u32)(unsigned long)(info->info_block); + ccw->cda = (__u32)virt_to_phys(info->info_block); ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_VQ | index); /* @@ -556,7 +556,7 @@ static struct virtqueue *virtio_ccw_setup_vq(struct virti...
2023 Mar 05
0
[PATCH AUTOSEL 6.1 05/15] s390/virtio: sort out physical vs virtual pointers usage
...onfig_block); + ccw->cda = (__u32)virt_to_phys(&vcdev->dma_area->config_block); ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_VQ_CONF); if (ret) return ret; @@ -454,7 +454,7 @@ static void virtio_ccw_del_vq(struct virtqueue *vq, struct ccw1 *ccw) } ccw->cmd_code = CCW_CMD_SET_VQ; ccw->flags = 0; - ccw->cda = (__u32)(unsigned long)(info->info_block); + ccw->cda = (__u32)virt_to_phys(info->info_block); ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_VQ | index); /* @@ -556,7 +556,7 @@ static struct virtqueue *virtio_ccw_setup_vq(struct virti...
2019 May 08
2
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
..._iv *aiv; > }; > static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; > +static u8 *summary_indicators; > + > +static inline u8 *get_summary_indicator(struct airq_info *info) > +{ > + return summary_indicators + info->summary_indicator_idx; > +} > > #define CCW_CMD_SET_VQ 0x13 > #define CCW_CMD_VDEV_RESET 0x33 > @@ -225,7 +231,7 @@ static void virtio_airq_handler(struct airq_struct *airq) > break; > vring_interrupt(0, (void *)airq_iv_get_ptr(info->aiv, ai)); > } > - info->summary_indicator = 0; > + *(get_summary_indicator(inf...
2019 May 08
2
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
..._iv *aiv; > }; > static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; > +static u8 *summary_indicators; > + > +static inline u8 *get_summary_indicator(struct airq_info *info) > +{ > + return summary_indicators + info->summary_indicator_idx; > +} > > #define CCW_CMD_SET_VQ 0x13 > #define CCW_CMD_VDEV_RESET 0x33 > @@ -225,7 +231,7 @@ static void virtio_airq_handler(struct airq_struct *airq) > break; > vring_interrupt(0, (void *)airq_iv_get_ptr(info->aiv, ai)); > } > - info->summary_indicator = 0; > + *(get_summary_indicator(inf...
2019 Sep 03
0
[PATCH AUTOSEL 5.2 18/23] virtio/s390: fix race on airq_areas
...tio_ccw.c index 6a30768813219..8d47ad61bac3d 100644 --- a/drivers/s390/virtio/virtio_ccw.c +++ b/drivers/s390/virtio/virtio_ccw.c @@ -132,6 +132,7 @@ struct airq_info { struct airq_iv *aiv; }; static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; +static DEFINE_MUTEX(airq_areas_lock); #define CCW_CMD_SET_VQ 0x13 #define CCW_CMD_VDEV_RESET 0x33 @@ -244,9 +245,11 @@ static unsigned long get_airq_indicator(struct virtqueue *vqs[], int nvqs, unsigned long bit, flags; for (i = 0; i < MAX_AIRQ_AREAS && !indicator_addr; i++) { + mutex_lock(&airq_areas_lock); if (!airq_areas[i])...
2019 Sep 03
0
[PATCH AUTOSEL 4.19 162/167] virtio/s390: fix race on airq_areas
...tio_ccw.c index ec54538f7ae1c..67efdf25657f3 100644 --- a/drivers/s390/virtio/virtio_ccw.c +++ b/drivers/s390/virtio/virtio_ccw.c @@ -132,6 +132,7 @@ struct airq_info { struct airq_iv *aiv; }; static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; +static DEFINE_MUTEX(airq_areas_lock); #define CCW_CMD_SET_VQ 0x13 #define CCW_CMD_VDEV_RESET 0x33 @@ -244,9 +245,11 @@ static unsigned long get_airq_indicator(struct virtqueue *vqs[], int nvqs, unsigned long bit, flags; for (i = 0; i < MAX_AIRQ_AREAS && !indicator_addr; i++) { + mutex_lock(&airq_areas_lock); if (!airq_areas[i])...
2019 Apr 26
0
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...ndicator_idx; struct airq_struct airq; struct airq_iv *aiv; }; static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; +static u8 *summary_indicators; + +static inline u8 *get_summary_indicator(struct airq_info *info) +{ + return summary_indicators + info->summary_indicator_idx; +} #define CCW_CMD_SET_VQ 0x13 #define CCW_CMD_VDEV_RESET 0x33 @@ -225,7 +231,7 @@ static void virtio_airq_handler(struct airq_struct *airq) break; vring_interrupt(0, (void *)airq_iv_get_ptr(info->aiv, ai)); } - info->summary_indicator = 0; + *(get_summary_indicator(info)) = 0; smp_wmb(); /* Walk through...
2019 May 23
0
[PATCH v2 8/8] virtio/s390: make airq summary indicators DMA
...ndicator_idx; struct airq_struct airq; struct airq_iv *aiv; }; static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; +static u8 *summary_indicators; + +static inline u8 *get_summary_indicator(struct airq_info *info) +{ + return summary_indicators + info->summary_indicator_idx; +} #define CCW_CMD_SET_VQ 0x13 #define CCW_CMD_VDEV_RESET 0x33 @@ -225,7 +231,7 @@ static void virtio_airq_handler(struct airq_struct *airq, bool floating) break; vring_interrupt(0, (void *)airq_iv_get_ptr(info->aiv, ai)); } - info->summary_indicator = 0; + *(get_summary_indicator(info)) = 0; smp_wmb();...
2019 May 29
0
[PATCH v3 8/8] virtio/s390: make airq summary indicators DMA
...ndicator_idx; struct airq_struct airq; struct airq_iv *aiv; }; static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; +static u8 *summary_indicators; + +static inline u8 *get_summary_indicator(struct airq_info *info) +{ + return summary_indicators + info->summary_indicator_idx; +} #define CCW_CMD_SET_VQ 0x13 #define CCW_CMD_VDEV_RESET 0x33 @@ -225,7 +231,7 @@ static void virtio_airq_handler(struct airq_struct *airq, bool floating) break; vring_interrupt(0, (void *)airq_iv_get_ptr(info->aiv, ai)); } - info->summary_indicator = 0; + *(get_summary_indicator(info)) = 0; smp_wmb();...
2019 Jun 06
0
[PATCH v4 8/8] virtio/s390: make airq summary indicators DMA
...ndicator_idx; struct airq_struct airq; struct airq_iv *aiv; }; static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; +static u8 *summary_indicators; + +static inline u8 *get_summary_indicator(struct airq_info *info) +{ + return summary_indicators + info->summary_indicator_idx; +} #define CCW_CMD_SET_VQ 0x13 #define CCW_CMD_VDEV_RESET 0x33 @@ -209,7 +215,7 @@ static void virtio_airq_handler(struct airq_struct *airq, bool floating) break; vring_interrupt(0, (void *)airq_iv_get_ptr(info->aiv, ai)); } - info->summary_indicator = 0; + *(get_summary_indicator(info)) = 0; smp_wmb();...
2019 Jun 12
0
[PATCH v5 8/8] virtio/s390: make airq summary indicators DMA
...ndicator_idx; struct airq_struct airq; struct airq_iv *aiv; }; static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; +static u8 *summary_indicators; + +static inline u8 *get_summary_indicator(struct airq_info *info) +{ + return summary_indicators + info->summary_indicator_idx; +} #define CCW_CMD_SET_VQ 0x13 #define CCW_CMD_VDEV_RESET 0x33 @@ -209,7 +215,7 @@ static void virtio_airq_handler(struct airq_struct *airq, bool floating) break; vring_interrupt(0, (void *)airq_iv_get_ptr(info->aiv, ai)); } - info->summary_indicator = 0; + *(get_summary_indicator(info)) = 0; smp_wmb();...
2019 Apr 09
0
[RFC PATCH 02/12] virtio/s390: DMA support for virtio-ccw
...block->s.used = (__u64)virtqueue_get_used(vq); > + info->info_block->s.avail = (__u64)virtqueue_get_avail_addr(vq); > + info->info_block->s.used = (__u64)virtqueue_get_used_addr(vq); > ccw->count = sizeof(info->info_block->s); > } > ccw->cmd_code = CCW_CMD_SET_VQ; > @@ -769,10 +770,8 @@ static u64 virtio_ccw_get_features(struct virtio_device *vdev) > static void ccw_transport_features(struct virtio_device *vdev) > { > /* > - * Packed ring isn't enabled on virtio_ccw for now, > - * because virtio_ccw uses some legacy accessors, &g...
2019 May 15
0
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...; ? static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; >> +static u8 *summary_indicators; >> + >> +static inline u8 *get_summary_indicator(struct airq_info *info) >> +{ >> +??? return summary_indicators + info->summary_indicator_idx; >> +} >> ? #define CCW_CMD_SET_VQ 0x13 >> ? #define CCW_CMD_VDEV_RESET 0x33 >> @@ -225,7 +231,7 @@ static void virtio_airq_handler(struct airq_struct >> *airq) >> ????????????? break; >> ????????? vring_interrupt(0, (void *)airq_iv_get_ptr(info->aiv, ai)); >> ????? } >> -??? info->su...
2019 Apr 26
0
[PATCH 02/10] virtio/s390: DMA support for virtio-ccw
...il(vq); - info->info_block->s.used = (__u64)virtqueue_get_used(vq); + info->info_block->s.avail = (__u64)virtqueue_get_avail_addr(vq); + info->info_block->s.used = (__u64)virtqueue_get_used_addr(vq); ccw->count = sizeof(info->info_block->s); } ccw->cmd_code = CCW_CMD_SET_VQ; @@ -772,10 +773,8 @@ static u64 virtio_ccw_get_features(struct virtio_device *vdev) static void ccw_transport_features(struct virtio_device *vdev) { /* - * Packed ring isn't enabled on virtio_ccw for now, - * because virtio_ccw uses some legacy accessors, - * e.g. virtqueue_get_avail()...
2013 Jun 07
2
[PATCH RFC 0/2] KVM: s390: virtio-ccw adapter interrupts.
Hi, here's the guest driver support for adapter interrupts in virtio-ccw. We use one summary indicator per page of indicators. For each device, we try to find a space in an indicator where all of its virtqueues fit. Locking probably needs some more love, but it seems to work fine so far. Cornelia Huck (2): KVM: s390: virtio-ccw: Handle command rejects. KVM: s390: virtio-ccw adapter
2013 Jun 07
2
[PATCH RFC 0/2] KVM: s390: virtio-ccw adapter interrupts.
Hi, here's the guest driver support for adapter interrupts in virtio-ccw. We use one summary indicator per page of indicators. For each device, we try to find a space in an indicator where all of its virtqueues fit. Locking probably needs some more love, but it seems to work fine so far. Cornelia Huck (2): KVM: s390: virtio-ccw: Handle command rejects. KVM: s390: virtio-ccw adapter
2013 Jul 09
3
[RFC PATCH v2 0/2] KVM: s390: virtio-ccw adapter interrupts.
Hi, next version of the guest exploitation of virtio-ccw adapter interrupts. Changes from the last version: - adapt to latest kvm-next - changed housekeeping for indicator locations: we now use cacheline-sized and aligned areas - minor tweaks Cornelia Huck (2): KVM: s390: virtio-ccw: Handle command rejects. KVM: s390: virtio-ccw adapter interrupt support. arch/s390/include/asm/irq.h