From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH kvm-unit-tests 1/3] arm64: timer: Fix vtimer interrupt test Date: Fri, 14 Jul 2017 16:54:52 +0100 Message-ID: <738c47fa-ba61-b88f-915e-1ab4487f2b51@arm.com> References: <20170713192009.10069-1-cdall@linaro.org> <20170713192009.10069-2-cdall@linaro.org> <20170714154355.GB1535@lvm> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Christoffer Dall , kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Andrew Jones , Alexander Graf , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Jintack Lim To: Christoffer Dall Return-path: Received: from foss.arm.com ([217.140.101.70]:50160 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753446AbdGNPy4 (ORCPT ); Fri, 14 Jul 2017 11:54:56 -0400 In-Reply-To: <20170714154355.GB1535@lvm> Sender: kvm-owner@vger.kernel.org List-ID: On 14/07/17 16:43, Christoffer Dall wrote: > On Fri, Jul 14, 2017 at 08:55:32AM +0100, Marc Zyngier wrote: >> On 13/07/17 20:20, Christoffer Dall wrote: >>> The timer irq_handler is supposed to mask the timer signal, but unfortunately >>> also disables the timer at the same time, even though we loop and wait on >>> ISTATUS to become set. >>> >>> According to the ARM ARM, "When the value of the ENABLE bit is 0, the >>> ISTATUS field is UNKNOWN." This test happens to work on AMD Seattle, but >>> doesn't work on Mustang or on QEMU with TCG. >> >> Note that this wording is a tightening of what was written in previous >> of the ARMv8 ARM. Version DDI0874B.a has the above, while DDI0487A.h >> doesn't, neither has the ARMv7 version. >> >> This may explain why this was initially written this way. >> > > ok, but even so, this patch should test things in a way that should work > on all systems, right? Oh, definitely. I'm not arguing that your fix is wrong, quite the opposite. It is just that the architecture got stricter over time, and SW should certainly take the pessimistic approach that is something can be UNKNOWN, it will. Thanks, M. -- Jazz is not dead. It just smells funny...