From patchwork Thu Aug 25 05:08:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reiji Watanabe X-Patchwork-Id: 12954190 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0544C04AA5 for ; Thu, 25 Aug 2022 05:10:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Mime-Version: Message-Id:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=v3MV2S8CQEe71tsTalcgU+5iT1ATYnJUIDi0xSHePbY=; b=rVK ee0ozwcSzax5HmhsRFlTkwxr8FxNEPeg12/Oxtc8HYY4S4J7shJ4Jq60G/iWIV0eaPUkEJD1H6sL6 ZMJV4EwCaBcSM3Ez/LNJsMq6jt87PaDT+nkQuaQrhcHy4lRzMqn99jf7qvpSdookD1jt0BCRO6RVn 6LLbqctlu7XIYbAe4mkRMV2NHKdkXUrVQhSIGI1OTvx+sH0+pxBsHb6oC68yIxBxT5wQ3q84E+RpH tkcSYaSUszLFaMWkyVhSzgRMh3/XSNhiNlYYqXZH1h9BXUlr96EV21EeKNM24xKKR+XIPy7VwDuYM QWqN2f107g4+6AnaQIWA2/iQ3bbXkBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oR57C-007DCY-5Y; Thu, 25 Aug 2022 05:09:14 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oR579-007DBW-6J for linux-arm-kernel@lists.infradead.org; Thu, 25 Aug 2022 05:09:12 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-3345ad926f2so326845557b3.12 for ; Wed, 24 Aug 2022 22:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:mime-version:message-id:date:from:to:cc; bh=A7tujPj3gCcslYboIVJEpUnfbTygKXV5SjxwsoVRgPU=; b=RA1O0inPqFeLIGQY94aBQVZ8guQpSivAkXorCz90PUXbN9cTieKHfJ1TDbwOg/8TB0 eP/znMpGKvABSMGtpONSl7cKa3FFjJ5Yns3lEND+didHb0J58sOo35iln4zklcV7iMmA KJ36X/BPnhE1PXM0ySnr81ivez7ZW3k/8tJ/5EBFE6tpvVgM5UvRZPBpsFtMT+JDwDP4 pLDKQNtuNcJGBPrG4f+lV4mlOEv4I26SP+aP7NKGLZ71I/PI/rxuOwju1KeCJy6dlKCN 5a5g2uSvPR7tID72BJvRohdWoQScMpHW8XTHUNMEjtmnRAy+MbrLA5hI/cIlNA2j7qeY a2rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc; bh=A7tujPj3gCcslYboIVJEpUnfbTygKXV5SjxwsoVRgPU=; b=On9dN7ZsAU0GsBG7pGhVf7KNjcqaeU9fSKUzgIIDN5uHD/ToTeKxr1kYeU1xTUjQ83 W3sZAi54lilXhcp4HL60tRMt1obg/EjCZft9PT5U/oIe6x9ENpXlhVW2xaAPzxJ/vbh6 WWdb4gBS1HQBxcxyVuAVGylDySNQfgQ5DRDdIfkSR0RBzQbTaAHrbD5rq1NbZ2eS2jxL gD67FeHef/aKb1d/XJB5f0q2dsPktSN08/byHjlPkpEhb6SwVqJCcr57gjHhJ9KWL/e0 nQuypj4MUgGLyVVxXaQ8/nPhkBEhpPfN2YZ2HeovbKq/3u0FbCJFOAl9K7g9dsL0RyE0 91LQ== X-Gm-Message-State: ACgBeo0Zb8/PTUjZrVJOGUxIGcO79ff+13ro1wp/TbLDJ/iIzLf2LrX0 bh4wIvDsWGLQckxMTOYFWoXBoKSz2go= X-Google-Smtp-Source: AA6agR6mA/YLJIHg107zS6XG+THNR8WdRCDmQxkfaR1R/eAzKUfb6FtOdr5p90shIKZNaqWdlGvutxoDXpk= X-Received: from reijiw-west4.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:aa1]) (user=reijiw job=sendgmr) by 2002:a25:aa81:0:b0:695:88e0:caa1 with SMTP id t1-20020a25aa81000000b0069588e0caa1mr1924184ybi.448.1661404146792; Wed, 24 Aug 2022 22:09:06 -0700 (PDT) Date: Wed, 24 Aug 2022 22:08:37 -0700 Message-Id: <20220825050846.3418868-1-reijiw@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog Subject: [PATCH 0/9] KVM: arm64: selftests: Test linked {break,watch}points From: Reiji Watanabe To: Marc Zyngier , kvmarm@lists.cs.columbia.edu Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse , Alexandru Elisei , Suzuki K Poulose , Paolo Bonzini , Andrew Jones , Ricardo Koller , Oliver Upton , Jing Zhang , Raghavendra Rao Anata , Reiji Watanabe X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220824_220911_257103_B723DB53 X-CRM114-Status: UNSURE ( 9.12 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series adds test cases for linked {break,watch}points to the debug-exceptions test, and expands {break,watch}point tests to use non-zero {break,watch}points (the current test always uses {break,watch}point#0). Patches 1-6 add some helpers or do minor refactoring for preparation of adding test cases in subsequent patches. Patches 7-8 add test cases for a linked {break,watch}point. Patch 9 expands {break,watch}point test cases to use non-zero {break,watch}points. Reiji Watanabe (9): KVM: arm64: selftests: Add helpers to extract a field of an ID register KVM: arm64: selftests: Add write_dbg{b,w}{c,v}r helpers in debug-exceptions KVM: arm64: selftests: Remove the hard-coded {b,w}pn#0 from debug-exceptions KVM: arm64: selftests: Add helpers to enable debug exceptions KVM: arm64: selftests: Have debug_version() use cpuid_get_ufield() helper KVM: arm64: selftests: Change debug_version() to take ID_AA64DFR0_EL1 KVM: arm64: selftests: Add a test case for a linked breakpoint KVM: arm64: selftests: Add a test case for a linked watchpoint KVM: arm64: selftests: Test with every breakpoint/watchpoint .../selftests/kvm/aarch64/debug-exceptions.c | 281 +++++++++++++++--- .../selftests/kvm/include/aarch64/processor.h | 2 + .../selftests/kvm/lib/aarch64/processor.c | 15 + 3 files changed, 262 insertions(+), 36 deletions(-) base-commit: 1c23f9e627a7b412978b4e852793c5e3c3efc555