From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 886B33858426 for ; Mon, 2 Jan 2023 17:28:34 +0000 (GMT) Received: by mail-pf1-x431.google.com with SMTP id a184so8252546pfa.9 for ; Mon, 02 Jan 2023 09:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tOBxSGotXA1J2KcoScqoONtSZiI/lPoNyn+U/Jvzy3c=; b=e4sWP/aOCdtgedCyKRBg45KvEMvFm3Xm/Z9PPuR3x037gKktV84S3wQB8UWtmOiEdb hpEVbcGjNHkmUJw0xh2KSgunhhTqJwONmxkFsYGcKdt713reHcp9Tn06VYzPiQd9CYDQ QJ/mCi7905fJqyhPoVMQS2HjOJ0pofpOiWz9mU2BiMmtx5v4HDioeqHctxIFjhIG0hfy yaZTfE0s1df9qKz81VI6VXNIg4shQCDW1gJUxvj1SjVe9AKhY2J9Us13o3DkfY/bKViS cRyPjy0T0+5LuIMWmlaPAxFTSeYLcN/gneKh73+itF+/NLPr5B5mW1fyqys8gOE/zHyX Q7pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tOBxSGotXA1J2KcoScqoONtSZiI/lPoNyn+U/Jvzy3c=; b=pPajVjj1F1Oc0pwAXoL68ViA5fnouvcW5BCBDJyEpPSnMteFTA6tFPsRV3bybmI1Mk Q6hv/33NEFnEy5EmDEnQQi2YDr9JeB+oEqMeacaM/X9g4rfCimtZvRnUnSqkiKWei399 9kmFZNJEP7cW5oktqDvBQGYqCIOGQ/fET1GjcaiT33tTKahavbR52w/4vyFet+1bU4K8 0fXyPxexxB/GkBQjdpKpHmW6JZPoeXL+eOYtVgvrehrRHh9/QStA2muatPP9L3cPrjPz I95qeixAsZCAfuDYb1JS7svj9mq7AsIAW70yDV9JlxCUuecglynx/ftQfmRwL56N3yKf lwhg== X-Gm-Message-State: AFqh2koCO2yukMtbss5NcXulpdDvqYj2WD2ccaJHwlPw3a/d4FGE0H6F gTuFnd+wbseuJu8AOmhIJ9b9h/o0ZzfdcyTkTTE= X-Google-Smtp-Source: AMrXdXtPP5JLEovVgSwShkd9SN3QMb6K+Ja+cm28/vRAxTD93kFtXQdciPhhKs2R63fJ3ko74zcR23R97S3G1wlNUKk= X-Received: by 2002:a63:db11:0:b0:478:d4ce:5d3f with SMTP id e17-20020a63db11000000b00478d4ce5d3fmr2610585pgg.277.1672680513363; Mon, 02 Jan 2023 09:28:33 -0800 (PST) MIME-Version: 1.0 References: <87tu18naqq.fsf@oldenburg.str.redhat.com> In-Reply-To: <87tu18naqq.fsf@oldenburg.str.redhat.com> From: Andrew Pinski Date: Mon, 2 Jan 2023 09:28:21 -0800 Message-ID: Subject: Re: Hardware watchpoints on GNU/Linux AArch64 To: Florian Weimer Cc: gdb@sourceware.org, Dmitry Belyavskiy Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: 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. The supported values for debug arch are: #define AARCH64_DEBUG_ARCH_V8 0x6 #define AARCH64_DEBUG_ARCH_V8_1 0x7 #define AARCH64_DEBUG_ARCH_V8_2 0x8 #define AARCH64_DEBUG_ARCH_V8_4 0x9 I don't know of any other values that can be reported, especially for Neoverse-N1 (which should be 8_2). Neoverse-N2 is 8_4. Thanks, Andrew Pinski > > I see AArch64-specific code in GDB, so this is a bit of a surprise to > me. > > The machine uses virtualization: > > Architecture: aarch64 > CPU op-mode(s): 32-bit, 64-bit > Byte Order: Little Endian > CPU(s): 3 > On-line CPU(s) list: 0-2 > Vendor ID: ARM > BIOS Vendor ID: QEMU > Model name: Neoverse-N1 > BIOS Model name: virt-rhel8.6.0 CPU @ 2.0GHz > BIOS CPU family: 1 > Model: 1 > Thread(s) per core: 1 > Core(s) per socket: 1 > Socket(s): 3 > Stepping: r3p1 > BogoMIPS: 50.00 > Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp > asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs > > Is this actually expected to work? Would we have more luck on a > bare-metal system? > > Thanks, > Florian >