[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interr
From: |
Wei Xu |
Subject: |
[Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interruption |
Date: |
Fri, 26 Jan 2018 16:00:17 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
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 <address@hidden>
---
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
- [Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interruption,
Wei Xu <=
- Re: [Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interruption, Peter Maydell, 2018/01/26
- Re: [Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interruption, Wei Xu, 2018/01/26
- Re: [Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interruption, Peter Maydell, 2018/01/26
- Re: [Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interruption, Wei Xu, 2018/01/26
- Re: [Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interruption, Peter Maydell, 2018/01/26
- Re: [Qemu-arm] [Qemu-devel] [PATCH] pl011: do not put into fifo before enabled the interruption, Andrew Jones, 2018/01/29
- Re: [Qemu-arm] [Qemu-devel] [PATCH] pl011: do not put into fifo before enabled the interruption, Peter Maydell, 2018/01/29
- Re: [Qemu-arm] [Qemu-devel] [PATCH] pl011: do not put into fifo before enabled the interruption, Wei Xu, 2018/01/29
- Re: [Qemu-arm] [Qemu-devel] [PATCH] pl011: do not put into fifo before enabled the interruption, Andrew Jones, 2018/01/29
- Re: [Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interruption, Wei Xu, 2018/01/29