Received: from eggs.gnu.org ([2001:4830:134:3::10]:39504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZKJz-0004ZK-VO for qemu-devel@nongnu.org; Fri, 26 Feb 2016 10:28:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZKJx-000833-9e for qemu-devel@nongnu.org; Fri, 26 Feb 2016 10:28:47 -0500 References: <1454005340-15682-1-git-send-email-wei@redhat.com> <56B1A90E.3000506@msgid.tls.msk.ru> <56B22469.7040308@redhat.com> <56B2AD13.6030504@huawei.com> <56B2EB3E.2000908@redhat.com> <56B2F4E3.6010807@huawei.com> <56BA6F6C.5000301@redhat.com> <56C845B1.3080000@huawei.com> <56CE2D33.7020005@redhat.com> <56D04596.7010205@huawei.com> <56D06712.2030607@linaro.org> From: Wei Huang Message-ID: <56D06F29.7040106@redhat.com> Date: Fri, 26 Feb 2016 09:28:41 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/1] arm: virt: change GPIO trigger interrupt to pulse List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Shannon Zhao Cc: QEMU Trivial , Michael Tokarev , QEMU Developers , Shannon Zhao 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 >> button. What's your suggestion? > > I would prefer to avoid the pain of having a timer whose state > needs to be migrated. It's unclear to me why a 500ms pulse > will solve anything that an instantaneous pulse does not, > so I'd like to better understand the problem first. The problem we found with pulse was: only the last state change in GPIO is received by guest VM. In other words, with 0(L)->1(H)->0(L) or 1(H)->0(L)->1(0), PL061 only sees the last state (0 and 1). I guess this is because QEMU is non-preemptive. The solution is to have the following steps: * qemu_set_irq(gpio_in, 1) * yeild to guest VM * qemu_set_irq(gpio_in, 0) Is there any way to do so in QEMU without using timer? > > thanks > -- PMM >