From: Wei Xu <xuwei5@hisilicon.com>
To: peter.maydell@linaro.org, pbonzini@redhat.com
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
Linuxarm <linuxarm@huawei.com>,
Rob Herring <rob.herring@linaro.org>,
Daode Huang <huangdaode@hisilicon.com>,
"Chenxin (Charles)" <charles.chenxin@huawei.com>,
Zhangyi ac <zhangyi.ac@huawei.com>,
"Liguozhu (Kenneth)" <liguozhu@hisilicon.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>,
"Liuxinliang (Matthew Liu)" <z.liuxinliang@hisilicon.com>,
tiantao6@huawei.com
Subject: [Qemu-devel] [Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interruption
Date: Fri, 26 Jan 2018 16:00:17 +0000 [thread overview]
Message-ID: <5A6B5091.8030601@hisilicon.com> (raw)
If the user pressed some keys in the console during the guest booting,
the console will be hanged after entering the shell.
Because in the above case the pl011_can_receive will return 0 that
the pl011_receive will not be called. That means no interruption will
be injected in to the kernel and the pl011 state could not be driven
further.
This patch fixed that issue by checking the interruption is enabled or
not before putting into the fifo.
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
---
hw/char/pl011.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/char/pl011.c b/hw/char/pl011.c
index 2aa277fc4f..6296de9527 100644
--- a/hw/char/pl011.c
+++ b/hw/char/pl011.c
@@ -229,6 +229,8 @@ static int pl011_can_receive(void *opaque)
PL011State *s = (PL011State *)opaque;
int r;
+ if (!s->int_enabled)
+ return 0;
if (s->lcr & 0x10) {
r = s->read_count < 16;
} else {
--
2.11.0
next reply other threads:[~2018-01-26 17:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 16:00 Wei Xu [this message]
2018-01-26 16:36 ` [Qemu-devel] [Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interruption Peter Maydell
2018-01-26 17:05 ` Wei Xu
2018-01-26 17:15 ` Peter Maydell
2018-01-26 17:33 ` Wei Xu
2018-01-26 18:01 ` Peter Maydell
2018-01-29 10:29 ` Andrew Jones
2018-01-29 11:10 ` Peter Maydell
2018-01-29 11:37 ` Wei Xu
2018-01-29 12:57 ` Andrew Jones
2018-01-29 12:18 ` Wei Xu
2018-01-29 13:36 ` Peter Maydell
2018-01-26 18:14 ` no-reply
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=5A6B5091.8030601@hisilicon.com \
--to=xuwei5@hisilicon.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=charles.chenxin@huawei.com \
--cc=huangdaode@hisilicon.com \
--cc=liguozhu@hisilicon.com \
--cc=linuxarm@huawei.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rob.herring@linaro.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=tiantao6@huawei.com \
--cc=z.liuxinliang@hisilicon.com \
--cc=zhangyi.ac@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).