|
From: | Shannon Zhao |
Subject: | Re: [Qemu-trivial] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse |
Date: | Fri, 29 Jan 2016 23:22:35 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 2016/1/29 22:50, Wei Huang wrote:
On 01/29/2016 08:46 AM, Shannon Zhao wrote:> > >On 2016/1/29 22:35, Wei Huang wrote:>> >> >>On 01/29/2016 04:10 AM, Shannon Zhao wrote:>>>Hi, >>> >>>This makes ACPI work well but makes DT not work. The reason is >>>systemd or >>>acpid open /dev/input/event0 failed. So the interrupt could be >>>injected and >>>could see under /proc/interrupts but guest doesn't have any action. I'll >>>investigate why it opens failed later.>> >>That is interesting. Could you try it with the following? This reverses >>the order to down-up and worked on ACPI case. >>>Yeah, that's very weird. >>>qemu_set_irq(qdev_get_gpio_in(pl061_dev, 3), 0); >>qemu_set_irq(qdev_get_gpio_in(pl061_dev, 3), 1); >>>I'll try this tomorrow. But even if this works, it's still weird.To reproduce this case, do the following steps using current upstream qemu: create vm => reboot vm (succeed) => reboot or shutdown vm (fail). Apparently the last interrupt wasn't received correctly.
Yes, I reproduce this today. Let's clarify current state.Firstly, for ACPI it should use qemu_irq_pulse since we make the GPIO pin edge-triggered. And for DT, it uses gpio-key which is also edge-triggered that we could get from output of guest /proc/interrupts.
Secondly, current upstream qemu with your patch makes second reboot works when using ACPI. But first shutdown/reboot doesn't works when using DT since the systemd or acpid open /dev/input/event0 failed. This is what I'm surprised.
Wei, what userspace program your guest uses? systemd or acpid? Could you please try to use DT to test your patch? And see if there is a same result with me.(I know Redhat kernel uses ACPI by default, so you could append acpi=off to switch to DT)
Thanks, -- Shannon
[Prev in Thread] | Current Thread | [Next in Thread] |