From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A4B653858D32 for ; Mon, 2 Jan 2023 17:59:25 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672682365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G+4/kTn2tXthIE8elFNaSTGSgfRWVyCVr5B7in1nGK0=; b=DaRCfnDp0M2KGhTv7emd3SXe0568y/Ae3/tfgmsFIs8jz6Id1eufruqx8a0LTKtlox7a18 D7F3pwPojmUZDX2opsU4+ehKULFsgAmV2OSbrzzmVxI8iy5wPIvxQvZlXiSAg3JpGarLdv RnNLgFgsmcBHF5z/hggY1I4dY3ivBgc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-602-FMN9O-T7N8atFxAwg1rFAQ-1; Mon, 02 Jan 2023 12:59:22 -0500 X-MC-Unique: FMN9O-T7N8atFxAwg1rFAQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D43343C0E447; Mon, 2 Jan 2023 17:59:21 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CE2E6440E0; Mon, 2 Jan 2023 17:59:20 +0000 (UTC) From: Florian Weimer To: Andrew Pinski Cc: gdb@sourceware.org, Dmitry Belyavskiy Subject: Re: Hardware watchpoints on GNU/Linux AArch64 References: <87tu18naqq.fsf@oldenburg.str.redhat.com> <87zgb0ltlm.fsf@oldenburg.str.redhat.com> Date: Mon, 02 Jan 2023 18:59:19 +0100 In-Reply-To: <87zgb0ltlm.fsf@oldenburg.str.redhat.com> (Florian Weimer's message of "Mon, 02 Jan 2023 18:44:05 +0100") Message-ID: <87v8lolsw8.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Florian Weimer: > * Andrew Pinski: > >> On Mon, Jan 2, 2023 at 8:49 AM Florian Weimer via Gdb >> wrote: >>> >>> Running >>> >>> gdb-12.1-10.fc38.aarch64 >>> kernel-6.2.0-0.rc1.20221230gitbff687b3dad6.15.fc38.aarch64 >>> >>> I do not seem to be able to use hardware watchpoints. GDB just logs >>> warnings: >>> >>> warning: Unable to determine the number of hardware watchpoints available. >>> warning: Unable to determine the number of hardware breakpoints available. >> >> This shows up when the ptrace either fails or ptrace returns an >> unknown value for AARCH64_DEBUG_ARCH value. >> In the boot log there should be a message saying how many HW >> breakpoint and watchpoints there are and what version of the debug >> arch is there. > > I only see this in the kernel log: > > hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. > > Nothing else in the vicinity. GDB on bare-metal (on a different machine, not the hypervisor) has hardware watchpoint support, as expected. Probably the next step is to figure out what software is running on the hypervisor. Thanks, Florian