Displaying 20 results from an estimated 35 matches for "get_airq_ind".
2019 Jul 23
3
[PATCH 1/1] virtio/s390: fix race on airq_areas
...cw.c
@@ -145,6 +145,8 @@ struct airq_info {
struct airq_iv *aiv;
};
static struct airq_info *airq_areas[MAX_AIRQ_AREAS];
+DEFINE_MUTEX(airq_areas_lock);
+
static u8 *summary_indicators;
static inline u8 *get_summary_indicator(struct airq_info *info)
@@ -265,9 +267,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])
airq_areas[i] = new_airq_info(i);
info = airq_areas[i];
+ mutex_unlock(&airq_areas_lo...
2019 Jul 23
3
[PATCH 1/1] virtio/s390: fix race on airq_areas
...cw.c
@@ -145,6 +145,8 @@ struct airq_info {
struct airq_iv *aiv;
};
static struct airq_info *airq_areas[MAX_AIRQ_AREAS];
+DEFINE_MUTEX(airq_areas_lock);
+
static u8 *summary_indicators;
static inline u8 *get_summary_indicator(struct airq_info *info)
@@ -265,9 +267,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])
airq_areas[i] = new_airq_info(i);
info = airq_areas[i];
+ mutex_unlock(&airq_areas_lo...
2019 May 08
2
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...;
> + info->summary_indicator_idx = index;
> + info->airq.lsi_ptr = get_summary_indicator(info);
> info->airq.lsi_mask = 0xff;
> info->airq.isc = VIRTIO_AIRQ_ISC;
> rc = register_adapter_interrupt(&info->airq);
> @@ -273,8 +281,9 @@ 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++) {
> + /* TODO: this seems to be racy */
yes, my opinions too, was already racy, in my opinion, we need another
patch in another series...
2019 May 08
2
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...;
> + info->summary_indicator_idx = index;
> + info->airq.lsi_ptr = get_summary_indicator(info);
> info->airq.lsi_mask = 0xff;
> info->airq.isc = VIRTIO_AIRQ_ISC;
> rc = register_adapter_interrupt(&info->airq);
> @@ -273,8 +281,9 @@ 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++) {
> + /* TODO: this seems to be racy */
yes, my opinions too, was already racy, in my opinion, we need another
patch in another series...
2019 Jul 24
2
[PATCH 1/1] virtio/s390: fix race on airq_areas
...> > static struct airq_info *airq_areas[MAX_AIRQ_AREAS];
> > +DEFINE_MUTEX(airq_areas_lock);
> > +
> > static u8 *summary_indicators;
> >
> > static inline u8 *get_summary_indicator(struct airq_info *info)
> > @@ -265,9 +267,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])
> > airq_areas[i] = new_airq_info(i);...
2019 Jul 24
2
[PATCH 1/1] virtio/s390: fix race on airq_areas
...> > static struct airq_info *airq_areas[MAX_AIRQ_AREAS];
> > +DEFINE_MUTEX(airq_areas_lock);
> > +
> > static u8 *summary_indicators;
> >
> > static inline u8 *get_summary_indicator(struct airq_info *info)
> > @@ -265,9 +267,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])
> > airq_areas[i] = new_airq_info(i);...
2019 May 13
3
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
On Fri, 26 Apr 2019 20:32:45 +0200
Halil Pasic <pasic at linux.ibm.com> wrote:
> Hypervisor needs to interact with the summary indicators, so these
> need to be DMA memory as well (at least for protected virtualization
> guests).
>
> Signed-off-by: Halil Pasic <pasic at linux.ibm.com>
> ---
> drivers/s390/virtio/virtio_ccw.c | 24 +++++++++++++++++-------
> 1
2019 May 13
3
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
On Fri, 26 Apr 2019 20:32:45 +0200
Halil Pasic <pasic at linux.ibm.com> wrote:
> Hypervisor needs to interact with the summary indicators, so these
> need to be DMA memory as well (at least for protected virtualization
> guests).
>
> Signed-off-by: Halil Pasic <pasic at linux.ibm.com>
> ---
> drivers/s390/virtio/virtio_ccw.c | 24 +++++++++++++++++-------
> 1
2023 Mar 05
0
[PATCH AUTOSEL 6.2 05/16] s390/virtio: sort out physical vs virtual pointers usage
...NULL;
+ unsigned long indicator_addr;
struct airq_info *info;
thinint_area = ccw_device_dma_zalloc(vcdev->cdev,
@@ -599,21 +600,22 @@ static int virtio_ccw_register_adapter_ind(struct virtio_ccw_device *vcdev,
goto out;
}
/* Try to get an indicator. */
- thinint_area->indicator = get_airq_indicator(vqs, nvqs,
- &thinint_area->bit_nr,
- &vcdev->airq_info);
- if (!thinint_area->indicator) {
+ indicator_addr = get_airq_indicator(vqs, nvqs,
+ &thinint_area->bit_nr,
+ &vcdev->airq_info);
+ if (!indicator_addr) {
ret = -ENO...
2023 Mar 05
0
[PATCH AUTOSEL 6.1 05/15] s390/virtio: sort out physical vs virtual pointers usage
...NULL;
+ unsigned long indicator_addr;
struct airq_info *info;
thinint_area = ccw_device_dma_zalloc(vcdev->cdev,
@@ -599,21 +600,22 @@ static int virtio_ccw_register_adapter_ind(struct virtio_ccw_device *vcdev,
goto out;
}
/* Try to get an indicator. */
- thinint_area->indicator = get_airq_indicator(vqs, nvqs,
- &thinint_area->bit_nr,
- &vcdev->airq_info);
- if (!thinint_area->indicator) {
+ indicator_addr = get_airq_indicator(vqs, nvqs,
+ &thinint_area->bit_nr,
+ &vcdev->airq_info);
+ if (!indicator_addr) {
ret = -ENO...
2019 May 15
0
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...e of
> > the previous patches, I have missed it.
>
> There is no airq_areas_lock defined currently. My assumption is that
> this will be used in context with the likely race condition this
> part of the patch is talking about.
>
> @@ -273,8 +281,9 @@ 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++) {
> + /* TODO: this seems to be racy */
> if (!airq_areas[i])
> - airq_areas[i] = new_airq_info();
> + airq_areas[i]...
2019 May 15
0
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
On Wed, 15 May 2019 15:33:02 +0200
Michael Mueller <mimu at linux.ibm.com> wrote:
> >> @@ -273,8 +281,9 @@ 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++) {
> >> +??????? /* TODO: this seems to be racy */
> >
> > yes, my opinions too, was al...
2019 Jul 24
0
[PATCH 1/1] virtio/s390: fix race on airq_areas
...gt; struct airq_iv *aiv;
> };
> static struct airq_info *airq_areas[MAX_AIRQ_AREAS];
> +DEFINE_MUTEX(airq_areas_lock);
> +
> static u8 *summary_indicators;
>
> static inline u8 *get_summary_indicator(struct airq_info *info)
> @@ -265,9 +267,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])
> airq_areas[i] = new_airq_info(i);
> info = airq_areas[i];...
2019 Sep 03
0
[PATCH AUTOSEL 5.2 18/23] virtio/s390: fix race on airq_areas
...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])
airq_areas[i] = new_airq_info();
info = airq_areas[i];
+ mutex_unlock(&airq_areas_loc...
2019 Sep 03
0
[PATCH AUTOSEL 4.19 162/167] virtio/s390: fix race on airq_areas
...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])
airq_areas[i] = new_airq_info();
info = airq_areas[i];
+ mutex_unlock(&airq_areas_loc...
2019 May 15
0
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...k defined? If it was introduced in one of
> the previous patches, I have missed it.
There is no airq_areas_lock defined currently. My assumption is that
this will be used in context with the likely race condition this
part of the patch is talking about.
@@ -273,8 +281,9 @@ 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++) {
+ /* TODO: this seems to be racy */
if (!airq_areas[i])
- airq_areas[i] = new_airq_info();
+ airq_areas[i] = new_airq_info(i);
As this shall be...
2019 Jul 24
0
[PATCH 1/1] virtio/s390: fix race on airq_areas
...struct airq_info *airq_areas[MAX_AIRQ_AREAS];
>>> +DEFINE_MUTEX(airq_areas_lock);
>>> +
>>> static u8 *summary_indicators;
>>>
>>> static inline u8 *get_summary_indicator(struct airq_info *info)
>>> @@ -265,9 +267,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])
>>> airq_areas[i] =...
2019 Apr 26
0
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...= &info->summary_indicator;
+ info->summary_indicator_idx = index;
+ info->airq.lsi_ptr = get_summary_indicator(info);
info->airq.lsi_mask = 0xff;
info->airq.isc = VIRTIO_AIRQ_ISC;
rc = register_adapter_interrupt(&info->airq);
@@ -273,8 +281,9 @@ 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++) {
+ /* TODO: this seems to be racy */
if (!airq_areas[i])
- airq_areas[i] = new_airq_info();
+ airq_areas[i] = new_airq_info(i);
info = airq_areas[i...
2019 May 23
0
[PATCH v2 8/8] virtio/s390: make airq summary indicators DMA
...= &info->summary_indicator;
+ info->summary_indicator_idx = index;
+ info->airq.lsi_ptr = get_summary_indicator(info);
info->airq.lsi_mask = 0xff;
info->airq.isc = VIRTIO_AIRQ_ISC;
rc = register_adapter_interrupt(&info->airq);
@@ -275,7 +282,7 @@ static unsigned long get_airq_indicator(struct virtqueue *vqs[], int nvqs,
for (i = 0; i < MAX_AIRQ_AREAS && !indicator_addr; i++) {
if (!airq_areas[i])
- airq_areas[i] = new_airq_info();
+ airq_areas[i] = new_airq_info(i);
info = airq_areas[i];
if (!info)
return 0;
@@ -360,7 +367,7 @@ static void vi...
2019 May 29
0
[PATCH v3 8/8] virtio/s390: make airq summary indicators DMA
...= &info->summary_indicator;
+ info->summary_indicator_idx = index;
+ info->airq.lsi_ptr = get_summary_indicator(info);
info->airq.lsi_mask = 0xff;
info->airq.isc = VIRTIO_AIRQ_ISC;
rc = register_adapter_interrupt(&info->airq);
@@ -275,7 +282,7 @@ static unsigned long get_airq_indicator(struct virtqueue *vqs[], int nvqs,
for (i = 0; i < MAX_AIRQ_AREAS && !indicator_addr; i++) {
if (!airq_areas[i])
- airq_areas[i] = new_airq_info();
+ airq_areas[i] = new_airq_info(i);
info = airq_areas[i];
if (!info)
return 0;
@@ -360,7 +367,7 @@ static void vi...