From: Zhu Lingshan <lingshan.zhu@intel.com>
To: jasowang@redhat.com, mst@redhat.com, maz@kernel.org,
alex.williamson@redhat.com
Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu, cohuck@redhat.com,
stable@vger.kernel.org, Zhu Lingshan <lingshan.zhu@intel.com>
Subject: [PATCH] Revert "irqbypass: do not start cons/prod when failed connect"
Date: Sat, 8 May 2021 15:11:52 +0800 [thread overview]
Message-ID: <20210508071152.722425-1-lingshan.zhu@intel.com> (raw)
This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.
The reverted commit may cause VM freeze on arm64 platform.
Because on arm64 platform, stop a consumer will suspend the VM,
the VM will freeze without a start consumer
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
---
virt/lib/irqbypass.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/virt/lib/irqbypass.c b/virt/lib/irqbypass.c
index c9bb3957f58a..28fda42e471b 100644
--- a/virt/lib/irqbypass.c
+++ b/virt/lib/irqbypass.c
@@ -40,21 +40,17 @@ static int __connect(struct irq_bypass_producer *prod,
if (prod->add_consumer)
ret = prod->add_consumer(prod, cons);
- if (ret)
- goto err_add_consumer;
-
- ret = cons->add_producer(cons, prod);
- if (ret)
- goto err_add_producer;
+ if (!ret) {
+ ret = cons->add_producer(cons, prod);
+ if (ret && prod->del_consumer)
+ prod->del_consumer(prod, cons);
+ }
if (cons->start)
cons->start(cons);
if (prod->start)
prod->start(prod);
-err_add_producer:
- if (prod->del_consumer)
- prod->del_consumer(prod, cons);
-err_add_consumer:
+
return ret;
}
--
2.27.0
WARNING: multiple messages have this Message-ID (diff)
From: Zhu Lingshan <lingshan.zhu@intel.com>
To: jasowang@redhat.com, mst@redhat.com, maz@kernel.org,
alex.williamson@redhat.com
Cc: kvm@vger.kernel.org, cohuck@redhat.com, stable@vger.kernel.org,
Zhu Lingshan <lingshan.zhu@intel.com>,
kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Revert "irqbypass: do not start cons/prod when failed connect"
Date: Sat, 8 May 2021 15:11:52 +0800 [thread overview]
Message-ID: <20210508071152.722425-1-lingshan.zhu@intel.com> (raw)
This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.
The reverted commit may cause VM freeze on arm64 platform.
Because on arm64 platform, stop a consumer will suspend the VM,
the VM will freeze without a start consumer
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
---
virt/lib/irqbypass.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/virt/lib/irqbypass.c b/virt/lib/irqbypass.c
index c9bb3957f58a..28fda42e471b 100644
--- a/virt/lib/irqbypass.c
+++ b/virt/lib/irqbypass.c
@@ -40,21 +40,17 @@ static int __connect(struct irq_bypass_producer *prod,
if (prod->add_consumer)
ret = prod->add_consumer(prod, cons);
- if (ret)
- goto err_add_consumer;
-
- ret = cons->add_producer(cons, prod);
- if (ret)
- goto err_add_producer;
+ if (!ret) {
+ ret = cons->add_producer(cons, prod);
+ if (ret && prod->del_consumer)
+ prod->del_consumer(prod, cons);
+ }
if (cons->start)
cons->start(cons);
if (prod->start)
prod->start(prod);
-err_add_producer:
- if (prod->del_consumer)
- prod->del_consumer(prod, cons);
-err_add_consumer:
+
return ret;
}
--
2.27.0
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: Zhu Lingshan <lingshan.zhu@intel.com>
To: jasowang@redhat.com, mst@redhat.com, maz@kernel.org,
alex.williamson@redhat.com
Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu, cohuck@redhat.com,
stable@vger.kernel.org, Zhu Lingshan <lingshan.zhu@intel.com>
Subject: [PATCH] Revert "irqbypass: do not start cons/prod when failed connect"
Date: Sat, 8 May 2021 15:11:52 +0800 [thread overview]
Message-ID: <20210508071152.722425-1-lingshan.zhu@intel.com> (raw)
This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88.
The reverted commit may cause VM freeze on arm64 platform.
Because on arm64 platform, stop a consumer will suspend the VM,
the VM will freeze without a start consumer
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
---
virt/lib/irqbypass.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/virt/lib/irqbypass.c b/virt/lib/irqbypass.c
index c9bb3957f58a..28fda42e471b 100644
--- a/virt/lib/irqbypass.c
+++ b/virt/lib/irqbypass.c
@@ -40,21 +40,17 @@ static int __connect(struct irq_bypass_producer *prod,
if (prod->add_consumer)
ret = prod->add_consumer(prod, cons);
- if (ret)
- goto err_add_consumer;
-
- ret = cons->add_producer(cons, prod);
- if (ret)
- goto err_add_producer;
+ if (!ret) {
+ ret = cons->add_producer(cons, prod);
+ if (ret && prod->del_consumer)
+ prod->del_consumer(prod, cons);
+ }
if (cons->start)
cons->start(cons);
if (prod->start)
prod->start(prod);
-err_add_producer:
- if (prod->del_consumer)
- prod->del_consumer(prod, cons);
-err_add_consumer:
+
return ret;
}
--
2.27.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-05-08 7:17 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-08 7:11 Zhu Lingshan [this message]
2021-05-08 7:11 ` [PATCH] Revert "irqbypass: do not start cons/prod when failed connect" Zhu Lingshan
2021-05-08 7:11 ` Zhu Lingshan
2021-05-08 7:22 ` Greg KH
2021-05-08 7:22 ` Greg KH
2021-05-08 7:22 ` Greg KH
2021-05-08 9:29 ` Marc Zyngier
2021-05-08 9:29 ` Marc Zyngier
2021-05-08 9:29 ` Marc Zyngier
2021-05-09 17:04 ` Auger Eric
2021-05-09 17:04 ` Auger Eric
2021-05-09 17:04 ` Auger Eric
2021-05-10 1:12 ` Shaokun Zhang
2021-05-10 1:12 ` Shaokun Zhang
2021-05-10 1:12 ` Shaokun Zhang
2021-05-10 7:39 ` Marc Zyngier
2021-05-10 7:39 ` Marc Zyngier
2021-05-10 7:39 ` Marc Zyngier
2021-05-10 2:43 ` Jason Wang
2021-05-10 2:43 ` Jason Wang
2021-05-10 2:43 ` Jason Wang
2021-05-10 3:00 ` Zhu, Lingshan
2021-05-10 3:00 ` Zhu, Lingshan
2021-05-10 3:00 ` Zhu, Lingshan
2021-05-10 4:34 ` Jason Wang
2021-05-10 4:34 ` Jason Wang
2021-05-10 4:34 ` Jason Wang
2021-05-10 7:09 ` Zhu, Lingshan
2021-05-10 7:09 ` Zhu, Lingshan
2021-05-10 7:09 ` Zhu, Lingshan
2021-05-10 8:32 ` Zhu, Lingshan
2021-05-10 8:32 ` Zhu, Lingshan
2021-05-10 8:32 ` Zhu, Lingshan
2021-05-10 10:00 ` Marc Zyngier
2021-05-10 10:00 ` Marc Zyngier
2021-05-10 10:00 ` Marc Zyngier
2021-05-10 10:37 ` Zhu, Lingshan
2021-05-10 10:37 ` Zhu, Lingshan
2021-05-10 10:37 ` Zhu, Lingshan
2021-05-10 11:01 ` Marc Zyngier
2021-05-10 11:01 ` Marc Zyngier
2021-05-10 11:01 ` Marc Zyngier
2021-05-11 8:48 ` Michael S. Tsirkin
2021-05-11 8:48 ` Michael S. Tsirkin
2021-05-11 8:48 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210508071152.722425-1-lingshan.zhu@intel.com \
--to=lingshan.zhu@intel.com \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=mst@redhat.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.