All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Andrew Jones <andrew.jones@linux.dev>
Cc: kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu,
	kvm@vger.kernel.org, Nadav Amit <nadav.amit@gmail.com>
Subject: [kvm-unit-tests PATCH] arm64: timer: ignore ISTATUS with disabled timer
Date: Wed, 14 Jun 2023 17:38:32 -0700	[thread overview]
Message-ID: <20230615003832.161134-1-namit@vmware.com> (raw)

From: Nadav Amit <nadav.amit@gmail.com>

According to ARM specifications for the vtimer (CNTV_CTL_EL0): "When the
value of the ENABLE bit is 0, the ISTATUS field is UNKNOWN."

Currently the test, however, does check that ISTATUS is cleared when the
ENABLE bit is zero. Remove this check as the value is unknown.

Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
---
 arm/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arm/timer.c b/arm/timer.c
index 2cb8051..0b976a7 100644
--- a/arm/timer.c
+++ b/arm/timer.c
@@ -256,7 +256,7 @@ static void test_timer_pending(struct timer_info *info)
 	set_timer_irq_enabled(info, true);
 
 	report(!info->irq_received, "no interrupt when timer is disabled");
-	report(!timer_pending(info) && gic_timer_check_state(info, GIC_IRQ_STATE_INACTIVE),
+	report(gic_timer_check_state(info, GIC_IRQ_STATE_INACTIVE),
 			"interrupt signal no longer pending");
 
 	info->write_cval(now - 1);
-- 
2.34.1


             reply	other threads:[~2023-06-15  0:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15  0:38 Nadav Amit [this message]
2023-06-28 11:40 ` [kvm-unit-tests PATCH] arm64: timer: ignore ISTATUS with disabled timer Andrew Jones
2023-07-01 17:26   ` Nadav Amit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230615003832.161134-1-namit@vmware.com \
    --to=nadav.amit@gmail.com \
    --cc=andrew.jones@linux.dev \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=kvmarm@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.