From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4031CC74A30 for ; Wed, 10 Jul 2019 17:02:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 240AB2086D for ; Wed, 10 Jul 2019 17:02:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727786AbfGJRCk (ORCPT ); Wed, 10 Jul 2019 13:02:40 -0400 Received: from foss.arm.com ([217.140.110.172]:36902 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727291AbfGJRCj (ORCPT ); Wed, 10 Jul 2019 13:02:39 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E0A3A344; Wed, 10 Jul 2019 10:02:38 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1F16C3F246; Wed, 10 Jul 2019 10:02:38 -0700 (PDT) Date: Wed, 10 Jul 2019 18:02:35 +0100 From: Andre Przywara To: Alexander Graf Cc: , Marc Zyngier , Paolo Bonzini , kvmarm@lists.cs.columbia.edu Subject: Re: [PATCH kvm-unit-tests] arm: Add PL031 test Message-ID: <20190710180235.25c54b84@donnerap.cambridge.arm.com> In-Reply-To: <20190710132724.28350-1-graf@amazon.com> References: <20190710132724.28350-1-graf@amazon.com> Organization: ARM X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, 10 Jul 2019 15:27:24 +0200 Alexander Graf wrote: Hi, > This patch adds a unit test for the PL031 RTC that is used in the virt machine. > It just pokes basic functionality. I've mostly written it to familiarize myself > with the device, but I suppose having the test around does not hurt, as it also > exercises the GIC SPI interrupt path. > > Signed-off-by: Alexander Graf > --- > arm/Makefile.common | 1 + > arm/pl031.c | 227 ++++++++++++++++++++++++++++++++++++++++++++ > lib/arm/asm/gic.h | 1 + > 3 files changed, 229 insertions(+) > create mode 100644 arm/pl031.c > > diff --git a/arm/Makefile.common b/arm/Makefile.common > index f0c4b5d..b8988f2 100644 > --- a/arm/Makefile.common > +++ b/arm/Makefile.common > @@ -11,6 +11,7 @@ tests-common += $(TEST_DIR)/pmu.flat > tests-common += $(TEST_DIR)/gic.flat > tests-common += $(TEST_DIR)/psci.flat > tests-common += $(TEST_DIR)/sieve.flat > +tests-common += $(TEST_DIR)/pl031.flat > > tests-all = $(tests-common) $(tests) > all: directories $(tests-all) > diff --git a/arm/pl031.c b/arm/pl031.c > new file mode 100644 > index 0000000..a364a1a > --- /dev/null > +++ b/arm/pl031.c > @@ -0,0 +1,227 @@ > +/* > + * Verify PL031 functionality > + * > + * This test verifies whether the emulated PL031 behaves correctly. ^^^^^^^^ While I appreciate the effort and like the fact that this actually triggers an SPI, I wonder if this actually belongs into kvm-unit-tests. After all this just test a device purely emulated in (QEMU) userland, so it's not really KVM related. What is the general opinion on this? Don't we care about this hair-splitting as long as it helps testing? Do we even want to extend kvm-unit-tests coverage to more emulated devices, for instance virtio? Cheers, Andre.