Displaying 20 results from an estimated 35 matches for "indicator_addr".
2023 Mar 05
0
[PATCH AUTOSEL 6.2 05/16] s390/virtio: sort out physical vs virtual pointers usage
...ev, ccw, VIRTIO_CCW_DOING_SET_VQ | i);
if (err) {
dev_warn(&vcdev->cdev->dev, "SET_VQ failed\n");
@@ -590,6 +590,7 @@ static int virtio_ccw_register_adapter_ind(struct virtio_ccw_device *vcdev,
{
int ret;
struct virtio_thinint_area *thinint_area = 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,
-...
2023 Mar 05
0
[PATCH AUTOSEL 6.1 05/15] s390/virtio: sort out physical vs virtual pointers usage
...ev, ccw, VIRTIO_CCW_DOING_SET_VQ | i);
if (err) {
dev_warn(&vcdev->cdev->dev, "SET_VQ failed\n");
@@ -590,6 +590,7 @@ static int virtio_ccw_register_adapter_ind(struct virtio_ccw_device *vcdev,
{
int ret;
struct virtio_thinint_area *thinint_area = 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,
-...
2019 Jul 23
3
[PATCH 1/1] virtio/s390: fix race on airq_areas
..._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_lock);
if (!info)
return 0;
write_lock_irqsave(&info->lock, flags);
--
2.17.1
2019 Jul 23
3
[PATCH 1/1] virtio/s390: fix race on airq_areas
..._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_lock);
if (!info)
return 0;
write_lock_irqsave(&info->lock, flags);
--
2.17.1
2019 May 08
2
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...t; 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 to fix this.
However, not sure about the comment.
> if (!airq_areas[i])
> - airq_areas[i] = new_airq_info();
> + airq_areas[i] = new_...
2019 May 08
2
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...t; 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 to fix this.
However, not sure about the comment.
> if (!airq_areas[i])
> - airq_areas[i] = new_airq_info();
> + airq_areas[i] = new_...
2019 Jul 24
2
[PATCH 1/1] virtio/s390: fix race on airq_areas
...gt; >
> > 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_lock);
> > if (!info)
> > return 0;
> > write_lock_irqsave...
2019 Jul 24
2
[PATCH 1/1] virtio/s390: fix race on airq_areas
...gt; >
> > 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_lock);
> > if (!info)
> > return 0;
> > write_lock_irqsave...
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
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
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
2019 May 15
0
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...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 handled by a separate patch I will drop the comment
> in regard to airq_areas_lock from this patch...
2019 May 15
0
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...: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 already racy, in my opinion, we need another
> > patch in another series to fix this.
> >
> > However, not sure about the comment.
>
> I will drop this comm...
2019 Jul 24
0
[PATCH 1/1] virtio/s390: fix race on airq_areas
...atic 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_lock);
> if (!info)
> return 0;
> write_lock_irqsave(&info->lock, flags);
>
2019 Sep 03
0
[PATCH AUTOSEL 5.2 18/23] virtio/s390: fix race on airq_areas
...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_lock);
if (!info)
return 0;
write_lock_irqsave(&info->lock, flags);
--
2.20.1
2019 Sep 03
0
[PATCH AUTOSEL 4.19 162/167] virtio/s390: fix race on airq_areas
...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_lock);
if (!info)
return 0;
write_lock_irqsave(&info->lock, flags);
--
2.20.1
2019 May 15
0
[PATCH 10/10] virtio/s390: make airq summary indicators DMA
...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 handled by a separate patch I will drop the comment
in regard to airq_areas_lock from this patch as well for v2.
Michael
>
>>...