Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-26 Thread Shannon Zhao
On 2016/2/26 23:42, Peter Maydell wrote: > On 26 February 2016 at 15:28, Wei Huang wrote: >> >> >> On 02/26/2016 09:06 AM, Peter Maydell wrote: >>> On 26 February 2016 at 14:54, Shannon Zhao wrote: On 2016/2/26 20:53, Peter Maydell wrote: > I don't understand why a 500ms pulse is bette

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-26 Thread Peter Maydell
On 26 February 2016 at 15:28, Wei Huang wrote: > > > On 02/26/2016 09:06 AM, Peter Maydell wrote: >> On 26 February 2016 at 14:54, Shannon Zhao wrote: >>> On 2016/2/26 20:53, Peter Maydell wrote: I don't understand why a 500ms pulse is better than a short one. >>> Oh, I just pick a valu

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-26 Thread Wei Huang
On 02/26/2016 09:06 AM, Peter Maydell wrote: > On 26 February 2016 at 14:54, Shannon Zhao wrote: >> On 2016/2/26 20:53, Peter Maydell wrote: >>> I don't understand why a 500ms pulse is better than a short one. >>> >> Oh, I just pick a value which seems like a real latency for pressing a >> butto

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-26 Thread Peter Maydell
On 26 February 2016 at 14:54, Shannon Zhao wrote: > On 2016/2/26 20:53, Peter Maydell wrote: >> I don't understand why a 500ms pulse is better than a short one. >> > Oh, I just pick a value which seems like a real latency for pressing a > button. What's your suggestion? I would prefer to avoid th

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-26 Thread Shannon Zhao
On 2016/2/26 20:53, Peter Maydell wrote: On 26 February 2016 at 12:31, Shannon Zhao wrote: So how about below patch? I've tested it and it works both for ACPI and DT. Could you help verify if it works for you? Thanks. diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 15658f4..4d45ea2 100644 -

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-26 Thread Peter Maydell
On 26 February 2016 at 12:31, Shannon Zhao wrote: > So how about below patch? I've tested it and it works both for ACPI and > DT. Could you help verify if it works for you? Thanks. > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index 15658f4..4d45ea2 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/v

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-26 Thread Shannon Zhao
On 2016/2/25 6:22, Wei Huang wrote: > > > On 02/20/2016 04:53 AM, Shannon Zhao wrote: >> Hi Wei, >> >> On 2016/2/10 6:59, Wei Huang wrote: >>> >>> On 02/04/2016 12:51 AM, Shannon Zhao wrote: On 2016/2/4 14:10, Wei Huang wrote: > > On 02/03/2016 07:44 PM, Shannon Zhao wrot

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-24 Thread Wei Huang
On 02/20/2016 04:53 AM, Shannon Zhao wrote: > Hi Wei, > > On 2016/2/10 6:59, Wei Huang wrote: >> >> On 02/04/2016 12:51 AM, Shannon Zhao wrote: >>> >>> >>> On 2016/2/4 14:10, Wei Huang wrote: On 02/03/2016 07:44 PM, Shannon Zhao wrote: >> >> >> I reversed the order of edge pullin

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-20 Thread Shannon Zhao
Hi Wei, On 2016/2/10 6:59, Wei Huang wrote: > > On 02/04/2016 12:51 AM, Shannon Zhao wrote: >> >> >> On 2016/2/4 14:10, Wei Huang wrote: >>> >>> On 02/03/2016 07:44 PM, Shannon Zhao wrote: > > > >>> I reversed the order of edge pulling. The state is 1 according to printk >>> inside gpio_keys d

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-09 Thread Wei Huang
On 02/04/2016 12:51 AM, Shannon Zhao wrote: > > > On 2016/2/4 14:10, Wei Huang wrote: >> >> On 02/03/2016 07:44 PM, Shannon Zhao wrote: >> I reversed the order of edge pulling. The state is 1 according to printk >> inside gpio_keys driver. However the reboot still failed with two >> reboots (

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-03 Thread Shannon Zhao
On 2016/2/4 14:10, Wei Huang wrote: > > On 02/03/2016 07:44 PM, Shannon Zhao wrote: >> > >> > >> > On 2016/2/4 0:01, Wei Huang wrote: >>> >> >>> >> On 2/3/16 04:46, Peter Maydell wrote: > On 3 February 2016 at 07:15, Michael Tokarev wrote: >>> >> 28.01.2016 21:22, Wei Huang w

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-03 Thread Wei Huang
On 02/03/2016 07:44 PM, Shannon Zhao wrote: > > > On 2016/2/4 0:01, Wei Huang wrote: >> >> On 2/3/16 04:46, Peter Maydell wrote: On 3 February 2016 at 07:15, Michael Tokarev wrote: >> 28.01.2016 21:22, Wei Huang wrote: When QEMU is hook'ed up with libvirt/virsh, the first ACP

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-03 Thread Shannon Zhao
On 2016/2/4 0:01, Wei Huang wrote: > > On 2/3/16 04:46, Peter Maydell wrote: >> > On 3 February 2016 at 07:15, Michael Tokarev wrote: >>> >> 28.01.2016 21:22, Wei Huang wrote: >>> When QEMU is hook'ed up with libvirt/virsh, the first ACPI reboot >>> request will succeed; but the follo

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-03 Thread Wei Huang
On 2/3/16 04:46, Peter Maydell wrote: > On 3 February 2016 at 07:15, Michael Tokarev wrote: >> 28.01.2016 21:22, Wei Huang wrote: >>> When QEMU is hook'ed up with libvirt/virsh, the first ACPI reboot >>> request will succeed; but the following shutdown/reboot requests >>> fail to trigger VMs to

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-03 Thread Peter Maydell
On 3 February 2016 at 07:15, Michael Tokarev wrote: > 28.01.2016 21:22, Wei Huang wrote: >> When QEMU is hook'ed up with libvirt/virsh, the first ACPI reboot >> request will succeed; but the following shutdown/reboot requests >> fail to trigger VMs to react. Notice that in mach-virt machine >> mod

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-02 Thread Michael Tokarev
28.01.2016 21:22, Wei Huang wrote: > When QEMU is hook'ed up with libvirt/virsh, the first ACPI reboot > request will succeed; but the following shutdown/reboot requests > fail to trigger VMs to react. Notice that in mach-virt machine > model GPIO is defined as edge-triggered and active-high in ACP

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-01 Thread Wei Huang
On 02/01/2016 04:17 AM, Igor Mammedov wrote: > On Fri, 29 Jan 2016 09:13:15 -0600 > Wei Huang wrote: > >> On 01/29/2016 08:50 AM, Peter Maydell wrote: >>> On 29 January 2016 at 14:46, Shannon Zhao wrote: On 2016/1/29 22:35, Wei Huang wrote: > On 01/29/2016 04:10 AM, Shannon Zhao w

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-02-01 Thread Igor Mammedov
On Fri, 29 Jan 2016 09:13:15 -0600 Wei Huang wrote: > On 01/29/2016 08:50 AM, Peter Maydell wrote: > > On 29 January 2016 at 14:46, Shannon Zhao wrote: > >> On 2016/1/29 22:35, Wei Huang wrote: > >>> On 01/29/2016 04:10 AM, Shannon Zhao wrote: > This makes ACPI work well but makes DT

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-01-30 Thread Shannon Zhao
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. To correct, systemd or acpid open /dev/input/event0 successfully but it wai

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-01-29 Thread Peter Maydell
On 29 January 2016 at 15:13, Wei Huang wrote: > > > On 01/29/2016 08:50 AM, Peter Maydell wrote: >> I wonder if we should be asserting the GPIO pin in the powerdown-request >> hook and then deasserting it on system reset somewhere... > > This is another possibility. We can try to reset the pl061 s

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-01-29 Thread Shannon Zhao
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/

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-01-29 Thread Wei Huang
On 01/29/2016 08:50 AM, Peter Maydell wrote: > On 29 January 2016 at 14:46, Shannon Zhao wrote: >> On 2016/1/29 22:35, Wei Huang wrote: >>> On 01/29/2016 04:10 AM, Shannon Zhao wrote: This makes ACPI work well but makes DT not work. The reason is systemd or acpid open /dev/input/event0

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-01-29 Thread Peter Maydell
On 29 January 2016 at 14:46, Shannon Zhao wrote: > On 2016/1/29 22:35, Wei Huang wrote: >> On 01/29/2016 04:10 AM, Shannon Zhao wrote: >>> 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 >

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-01-29 Thread Wei Huang
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 cou

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-01-29 Thread Shannon Zhao
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

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-01-29 Thread Wei Huang
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 w

Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-01-29 Thread Shannon Zhao
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. 2016年1月29日星期五,Wei Huang 写道: >

[Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse

2016-01-28 Thread Wei Huang
When QEMU is hook'ed up with libvirt/virsh, the first ACPI reboot request will succeed; but the following shutdown/reboot requests fail to trigger VMs to react. Notice that in mach-virt machine model GPIO is defined as edge-triggered and active-high in ACPI. This patch changes the behavior of power