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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 1B5A6C56202 for ; Wed, 25 Nov 2020 15:50:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6974205CB for ; Wed, 25 Nov 2020 15:50:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731353AbgKYPuD (ORCPT ); Wed, 25 Nov 2020 10:50:03 -0500 Received: from foss.arm.com ([217.140.110.172]:55778 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730318AbgKYPuD (ORCPT ); Wed, 25 Nov 2020 10:50:03 -0500 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 D66CB106F; Wed, 25 Nov 2020 07:50:02 -0800 (PST) Received: from monolith.localdoman (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 119DB3F7BB; Wed, 25 Nov 2020 07:50:01 -0800 (PST) From: Alexandru Elisei To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, drjones@redhat.com Cc: eric.auger@redhat.com, andre.przywara@arm.com Subject: [kvm-unit-tests PATCH 00/10] GIC fixes and improvements Date: Wed, 25 Nov 2020 15:51:03 +0000 Message-Id: <20201125155113.192079-1-alexandru.elisei@arm.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org What started this series is Andre's SPI and group interrupts tests [1], which prompted me to attempt to rewrite check_acked() so it's more flexible and not so complicated to review. When I was doing that I noticed that the message passing pattern for accesses to the acked, bad_irq and bad_sender arrays didn't look quite right, and that turned into the first 7 patches of the series. Even though the diffs are relatively small, they are not trivial and the reviewer can skip them for the more palatable patches that follow. I would still appreciate someone having a look at the memory ordering fixes. Patch #8 ("Split check_acked() into two functions") is where check_acked() is reworked with an eye towards supporting different timeout values or silent reporting without adding too many arguments to check_acked(). After changing the IPI tests, I turned my attention to the LPI tests, which followed the same memory synchronization patterns, but invented their own interrupt handler and testing functions. Instead of redoing the work that I did for the IPI tests, I decided to convert the LPI tests to use the same infrastructure. It turns out that was a good idea, because it uncovered a test inconsistency that was hidden before. I am not familiar with the ITS and I'm not sure that there is even a problem or if the behaviour is expected, details in the last patch. [1] https://lists.cs.columbia.edu/pipermail/kvmarm/2019-November/037853.html Alexandru Elisei (10): lib: arm/arm64: gicv3: Add missing barrier when sending IPIs lib: arm/arm64: gicv2: Add missing barrier when sending IPIs arm/arm64: gic: Remove memory synchronization from ipi_clear_active_handler() arm/arm64: gic: Remove unnecessary synchronization with stats_reset() arm/arm64: gic: Use correct memory ordering for the IPI test arm/arm64: gic: Check spurious and bad_sender in the active test arm/arm64: gic: Wait for writes to acked or spurious to complete arm/arm64: gic: Split check_acked() into two functions arm/arm64: gic: Make check_acked() more generic arm64: gic: Use IPI test checking for the LPI tests lib/arm/gic-v2.c | 4 + lib/arm/gic-v3.c | 3 + arm/gic.c | 334 +++++++++++++++++++++++++---------------------- 3 files changed, 185 insertions(+), 156 deletions(-) -- 2.29.2 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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 E2E58C63798 for ; Wed, 25 Nov 2020 15:50:09 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 322D4205CB for ; Wed, 25 Nov 2020 15:50:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 322D4205CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6F30C4B9C3; Wed, 25 Nov 2020 10:50:08 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dSpKkikFNT9R; Wed, 25 Nov 2020 10:50:07 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 44C0B4B9D4; Wed, 25 Nov 2020 10:50:07 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 44C2A4B9C5 for ; Wed, 25 Nov 2020 10:50:05 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wbhmQmDFN7Mt for ; Wed, 25 Nov 2020 10:50:03 -0500 (EST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 671ED4B9C1 for ; Wed, 25 Nov 2020 10:50:03 -0500 (EST) 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 D66CB106F; Wed, 25 Nov 2020 07:50:02 -0800 (PST) Received: from monolith.localdoman (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 119DB3F7BB; Wed, 25 Nov 2020 07:50:01 -0800 (PST) From: Alexandru Elisei To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, drjones@redhat.com Subject: [kvm-unit-tests PATCH 00/10] GIC fixes and improvements Date: Wed, 25 Nov 2020 15:51:03 +0000 Message-Id: <20201125155113.192079-1-alexandru.elisei@arm.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Cc: andre.przywara@arm.com X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu What started this series is Andre's SPI and group interrupts tests [1], which prompted me to attempt to rewrite check_acked() so it's more flexible and not so complicated to review. When I was doing that I noticed that the message passing pattern for accesses to the acked, bad_irq and bad_sender arrays didn't look quite right, and that turned into the first 7 patches of the series. Even though the diffs are relatively small, they are not trivial and the reviewer can skip them for the more palatable patches that follow. I would still appreciate someone having a look at the memory ordering fixes. Patch #8 ("Split check_acked() into two functions") is where check_acked() is reworked with an eye towards supporting different timeout values or silent reporting without adding too many arguments to check_acked(). After changing the IPI tests, I turned my attention to the LPI tests, which followed the same memory synchronization patterns, but invented their own interrupt handler and testing functions. Instead of redoing the work that I did for the IPI tests, I decided to convert the LPI tests to use the same infrastructure. It turns out that was a good idea, because it uncovered a test inconsistency that was hidden before. I am not familiar with the ITS and I'm not sure that there is even a problem or if the behaviour is expected, details in the last patch. [1] https://lists.cs.columbia.edu/pipermail/kvmarm/2019-November/037853.html Alexandru Elisei (10): lib: arm/arm64: gicv3: Add missing barrier when sending IPIs lib: arm/arm64: gicv2: Add missing barrier when sending IPIs arm/arm64: gic: Remove memory synchronization from ipi_clear_active_handler() arm/arm64: gic: Remove unnecessary synchronization with stats_reset() arm/arm64: gic: Use correct memory ordering for the IPI test arm/arm64: gic: Check spurious and bad_sender in the active test arm/arm64: gic: Wait for writes to acked or spurious to complete arm/arm64: gic: Split check_acked() into two functions arm/arm64: gic: Make check_acked() more generic arm64: gic: Use IPI test checking for the LPI tests lib/arm/gic-v2.c | 4 + lib/arm/gic-v3.c | 3 + arm/gic.c | 334 +++++++++++++++++++++++++---------------------- 3 files changed, 185 insertions(+), 156 deletions(-) -- 2.29.2 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm