From patchwork Tue Nov 21 22:56:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168019 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp964274vqb; Tue, 21 Nov 2023 14:59:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjSof8xJ7CU+3eZRtLcjErmY6JpQgDiEpdbWtvyKeJRgKIkphc7+E07NLa4z3F2ONmD0br X-Received: by 2002:a05:6a20:e104:b0:18a:e455:a3ae with SMTP id kr4-20020a056a20e10400b0018ae455a3aemr606266pzb.40.1700607540629; Tue, 21 Nov 2023 14:59:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607540; cv=none; d=google.com; s=arc-20160816; b=lZeqdZmQlGzOtOsyejtNdRfYbLVmt7BlFbJRV3+4y56yhLuagm4a42F9qMrOtG1lJw SxQynZPA2d4k2SiZj4GwvJc+xSMIvf26HSKaGVckbaUTF2fx3wDJcUNKrIriBTaqn89p gXHy5lXf1Vj4QqowOMNGTNnEdrtwewFJz/5Z8o3C0MMattYHfMkURj5CksWOSFekQFeI 0ta3QzUXafZmr4AJBdOeK327wic7ednZhG7dgqBlAh/0ogW2MitHAL5BOD6ksyKuPSZi qYsnYy5RQfqaYB5b8Yte5DQsICAwSMEyqqntekKhmllTkppMnW35a7ufd2HeNmlyz8Wv D7ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=VvsEAsvFJCAuzTkOhawjNcVDzfJqg2jxoNzCw1vuYxM=; fh=qpsc1fMcxzVQxdyRIIW5VnLFfXF59qPjVU/NuZ8M8BM=; b=r5d/LkJSbI5KB/GkHoa34JRoMorqcQAGcwzZWjcl+5l1MHsWSVljvD3SACITqS+HVf 13kAt+2oEg+4GkBK/maG2ZshLIQSfWY4h7uceM4RVbLBCdxZPt4e1kEJwb7IUAadhQoS Mg/0oNBFNMF5YG8mNtfIwdcy7Xv+YmuYBYaMZUgsU4UVdl84GV7jQfkQh7+Bhnb+FSr8 Ea+OREZbjvGDGT/CI8Febrl5wIo5jI+NaOBMqoFFoc39rDPTipNUwx61ecO/EbD7MXZ9 6dHI2zM7HKBuSxUVWQ22G2PwIJE9DAn9tv1q5orZQekgGRHtN+85fv0sEzUDaUpLIbYx a8Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Yp9JIov+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id pf14-20020a17090b1d8e00b002802d12083fsi118706pjb.54.2023.11.21.14.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:59:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Yp9JIov+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A55E8805F955; Tue, 21 Nov 2023 14:57:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234767AbjKUW5C (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229707AbjKUW47 (ORCPT ); Tue, 21 Nov 2023 17:56:59 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F4CFBB; Tue, 21 Nov 2023 14:56:53 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1cc29f39e7aso40274025ad.0; Tue, 21 Nov 2023 14:56:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607413; x=1701212213; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=VvsEAsvFJCAuzTkOhawjNcVDzfJqg2jxoNzCw1vuYxM=; b=Yp9JIov+wo0DTDXoobNFWkySiptxCV3/DkKvymOHb/eK6z6/I5CB6en5pHK3b4G6pm xRunPR/DDdojptiJz5F1r2OyrhmOIG1hB/uSfPGyySZhphmtrOpzByjwpsiznR4cSKX5 zf1LR910qlKxYv2fG3k7aWNG302y0xH3ZC7M6oatdtQm7FQA24VyrVQAAay3ALIVVbE/ ivS82PbhCpc5Rrft5W7SC3TVj9I+lNWx5b9ywoDc7xXj8DBvQIvfhOp53YMSWbo7bMNI aKfK0+N3cIq4Pny7xnfznm3j0PiywWAXHYaz/OOy+FWwslRj7dNEz74hP4h9euWM2IpK YDPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607413; x=1701212213; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VvsEAsvFJCAuzTkOhawjNcVDzfJqg2jxoNzCw1vuYxM=; b=EZZ+vQFdtvMuAfpLGQ+PiLGwO7rF8TJ4I6+GoOAtsbcc0B7Jy6fPCxljTnND2PEcgr WnygRDpYLZcw8KUhtSQ8XMFoctyTOwdx7J+fdM/Q2y0r7ii9ZgeBodijfhh8XDNi397A dAkDfvZ7PVgYeIcz34QADZXyC3XAEpaN1wiqBS2DiiRyUemLss52yRIkbcVjMahz1+Na 6WAWr41T8jk9U4Smu2sh6qBJfVj5JCwOddjl05SvhwCioq3/5OGDAh3StFSU1cxCWu2b N5yYBXmNhS16pNPCFQSlw7KeukX4oDq1bUSKOijD3XXrmLLycKsSFF6tuorTjYKF/Ca8 7kDQ== X-Gm-Message-State: AOJu0YwFpLGEnvY01HBQk8MTTjRuldcxVG8XEkccbnkkPneFK9JRr13Q 3v639ajHIChQv0mKs4T/TxfIBWfeqPI= X-Received: by 2002:a17:902:d346:b0:1cc:3932:4a87 with SMTP id l6-20020a170902d34600b001cc39324a87mr588713plk.56.1700607412734; Tue, 21 Nov 2023 14:56:52 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:56:51 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH 01/14] tools headers UAPI: Update tools's copy of drm headers Date: Tue, 21 Nov 2023 14:56:36 -0800 Message-ID: <20231121225650.390246-1-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:04 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216252436178323 X-GMAIL-MSGID: 1783216252436178323 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Signed-off-by: Namhyung Kim --- tools/include/uapi/drm/drm.h | 20 ++++++++++++++++++++ tools/include/uapi/drm/i915_drm.h | 8 ++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/tools/include/uapi/drm/drm.h b/tools/include/uapi/drm/drm.h index 794c1d857677..de723566c5ae 100644 --- a/tools/include/uapi/drm/drm.h +++ b/tools/include/uapi/drm/drm.h @@ -1134,6 +1134,26 @@ extern "C" { #define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) #define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) +/** + * DRM_IOCTL_MODE_CREATE_DUMB - Create a new dumb buffer object. + * + * KMS dumb buffers provide a very primitive way to allocate a buffer object + * suitable for scanout and map it for software rendering. KMS dumb buffers are + * not suitable for hardware-accelerated rendering nor video decoding. KMS dumb + * buffers are not suitable to be displayed on any other device than the KMS + * device where they were allocated from. Also see + * :ref:`kms_dumb_buffer_objects`. + * + * The IOCTL argument is a struct drm_mode_create_dumb. + * + * User-space is expected to create a KMS dumb buffer via this IOCTL, then add + * it as a KMS framebuffer via &DRM_IOCTL_MODE_ADDFB and map it via + * &DRM_IOCTL_MODE_MAP_DUMB. + * + * &DRM_CAP_DUMB_BUFFER indicates whether this IOCTL is supported. + * &DRM_CAP_DUMB_PREFERRED_DEPTH and &DRM_CAP_DUMB_PREFER_SHADOW indicate + * driver preferences for dumb buffers. + */ #define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) #define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) #define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h index 7000e5910a1d..218edb0a96f8 100644 --- a/tools/include/uapi/drm/i915_drm.h +++ b/tools/include/uapi/drm/i915_drm.h @@ -38,13 +38,13 @@ extern "C" { */ /** - * DOC: uevents generated by i915 on it's device node + * DOC: uevents generated by i915 on its device node * * I915_L3_PARITY_UEVENT - Generated when the driver receives a parity mismatch - * event from the gpu l3 cache. Additional information supplied is ROW, + * event from the GPU L3 cache. Additional information supplied is ROW, * BANK, SUBBANK, SLICE of the affected cacheline. Userspace should keep - * track of these events and if a specific cache-line seems to have a - * persistent error remap it with the l3 remapping tool supplied in + * track of these events, and if a specific cache-line seems to have a + * persistent error, remap it with the L3 remapping tool supplied in * intel-gpu-tools. The value supplied with the event is always 1. * * I915_ERROR_UEVENT - Generated upon error detection, currently only via From patchwork Tue Nov 21 22:56:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168013 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp963625vqb; Tue, 21 Nov 2023 14:57:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGalTK0k+/oRSMlHxNLi12FV+39H+l8jLz0VT0LsGrdcvnoIOyXVVARAj8YRmJuScBpzmeY X-Received: by 2002:a17:90b:2247:b0:27d:5cca:9b69 with SMTP id hk7-20020a17090b224700b0027d5cca9b69mr711740pjb.45.1700607428200; Tue, 21 Nov 2023 14:57:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607428; cv=none; d=google.com; s=arc-20160816; b=OG6/UkpKfM3FHpSdFTywOvpxUKJ6KO8kYthOpnrcO2FXAZ5rbWyFDCPL4YZIWeFkNx gl/XZ0gHcFZjsrMWJ+E0gjOFzdNWBA7xx8PHXTb5l37CLaLD/K5UBt6xvC4i0QsfZLSY ol5BYr3oUpDR0JmftOqB68ulxyJztr/y/SK1jKm43GtHA77Vi74JNEpz1AXcm/V08KSL t/QMFWJaCQZiY2ElWFliHc0x2/y5KOkPFAWX1/gxpftiJyWhEV6cA9aNcaEeeMvw7hA7 vgyLwnOZEPboKc7WZExoY/D4d9GqgyQ6YvAlyTemWR8+bSdyFy0rpmN4TtHbDJ4Neqfk EGMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=wo5dqey6I8QbyZ6Fam9wAbARY07XFw/XeE4bQ28EgY0=; fh=K8YYoykv+IuveK/CFEqNgeuzOGHswitntDrG6c10cJk=; b=qrElXcgTVO5Q7bJVFbPxOBt8sLKXtmq1mVC5YlUNnKezMVBK2fQz3gXwzFo9V6ouSd 9MsyLxKbh3jKynkU7vvMcEycjUlmaJvavjEY3qiR7XvMTc/3VliTQozDkPMu/rJrKkLD k+v1J35zfO6LqVuOedNdIMd4FClj783T2/j2S8KroEuKtt3G4wJH22Y2QNDqznMBCeIt 9S+wR9i0dmeW8YJHm9dYOu+eB3QKyFgoBqgIOAaSO1F7Le9Ceh6cZ+YdcQJ+sOh8zbjE 3jvxaW5f1QNr5IiGo6MYMOPP1DunhkU+o0I0/nZMWFRs7BNvE9Zx94kFrdjE4i2ABdgk UPDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JEu6w1af; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id nm23-20020a17090b19d700b002850f6e3ac5si94926pjb.158.2023.11.21.14.57.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:57:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JEu6w1af; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 871CC802988B; Tue, 21 Nov 2023 14:57:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234739AbjKUW5B (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjKUW47 (ORCPT ); Tue, 21 Nov 2023 17:56:59 -0500 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D52719E; Tue, 21 Nov 2023 14:56:54 -0800 (PST) Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1cc938f9612so40361575ad.1; Tue, 21 Nov 2023 14:56:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607414; x=1701212214; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=wo5dqey6I8QbyZ6Fam9wAbARY07XFw/XeE4bQ28EgY0=; b=JEu6w1afdz8Hu27VUzP9Khj5RCJ7GpOn5dgugyME5UtqgJd2CWujQuZ+EBBOuckNKF QvgxGntVtrFXpj6dJYcGudmkYF7SJtSqrGw14OZDUaA+9Etc5ULDYPgb8IEOcM51TbZy XPJeL6dwoJ544kri/7bWwEvT3aGTz4rgGh4/BRKH+3cHkReS/uLoiGWtY8ko6PRrQDTg gqqKDQd8dvJF+vSKQ9aL31kQ0VcZAVnYOE7Od0bbi7u7eZ+u8LaM5QYecIWcToNcfDeX /MmOj9MYiLbkT9jUGoEfA/DTAqhL3LYuL4GvPZ0c6dFLsqz2nA/SJyb51h4+p/um4jSa 23zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607414; x=1701212214; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wo5dqey6I8QbyZ6Fam9wAbARY07XFw/XeE4bQ28EgY0=; b=SrDFeAc14cxHFbXaGUWCGLXAMpztgZuzzyJdt9jQtxGHdE1d8Lizobg5GoEmomvHO2 gPxXsR5jYNI/ciVB/ojyem6x+WKeSIdZSKNrHqaHD9JJkFsuCTkgUR+e9sdGU2j1JkeD HZXSGgkrGVu1RLphm+CPBhLHWAkQnxLKLtKAB0uf48c9v0ViCm4UFKHetqIDnRENLMqL 6y9qJVkQ3ipHjxkglK0Lu6Oc+DCeWeYETZCo8aKi9NDK6KHvkz99Wj+bimbmt9mOzuIc 7OuBDCQt1xiJWZHaH0ZIfgjwyWCyugRBvrQDSHVaNda3B7dsNTeBeI7TsQmIVSa3qt6Y zzAQ== X-Gm-Message-State: AOJu0Yx5n0ujhgIBcOtY/lKFIZbQ4n9GyIyi0rvvLV19gZ9GKzj6i6wG +oWEE2WdOD4e+MOOMlTCZstkm7X/now= X-Received: by 2002:a17:903:11ce:b0:1cf:66a3:16c with SMTP id q14-20020a17090311ce00b001cf66a3016cmr649997plh.21.1700607413955; Tue, 21 Nov 2023 14:56:53 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.56.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:56:53 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Eric Biggers , "Theodore Y. Ts'o" , Jaegeuk Kim , linux-fscrypt@vger.kernel.org Subject: [PATCH 02/14] tools headers UAPI: Update tools's copy of fscrypt.h header Date: Tue, 21 Nov 2023 14:56:37 -0800 Message-ID: <20231121225650.390246-2-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:00 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216134975032789 X-GMAIL-MSGID: 1783216134975032789 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: Eric Biggers Cc: "Theodore Y. Ts'o" Cc: Jaegeuk Kim Cc: linux-fscrypt@vger.kernel.org Signed-off-by: Namhyung Kim --- tools/include/uapi/linux/fscrypt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/fscrypt.h b/tools/include/uapi/linux/fscrypt.h index fd1fb0d5389d..7a8f4c290187 100644 --- a/tools/include/uapi/linux/fscrypt.h +++ b/tools/include/uapi/linux/fscrypt.h @@ -71,7 +71,8 @@ struct fscrypt_policy_v2 { __u8 contents_encryption_mode; __u8 filenames_encryption_mode; __u8 flags; - __u8 __reserved[4]; + __u8 log2_data_unit_size; + __u8 __reserved[3]; __u8 master_key_identifier[FSCRYPT_KEY_IDENTIFIER_SIZE]; }; From patchwork Tue Nov 21 22:56:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168020 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp964285vqb; Tue, 21 Nov 2023 14:59:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGlXH8gnWwM0QR6MmPdeQL1javXHa/OssrJ2jZj1L21GSxOOgizp5tQDrZjcQ4wVKu/uhk X-Received: by 2002:a9d:5e86:0:b0:6d3:127b:6fba with SMTP id f6-20020a9d5e86000000b006d3127b6fbamr847352otl.9.1700607542027; Tue, 21 Nov 2023 14:59:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607541; cv=none; d=google.com; s=arc-20160816; b=yX03lr4nFoNT89cgB6/NzBTB0h2KTKgnrd0CK29Ull5KY9GwfVqP+IwOtMsQhoUK/3 yy1ZMkl0BRpObUlPO2ifaYxMVNHHdxFU+fE5jw6uzGom2uZaHmRGpegfmPJgZa+Gg1Ve iwC5Uqy7FXWEeRdEVM7TXGemPLbALzBDarkRAt5kwqtNUyhbQidDWulHlCqf5djX2cA5 zAg+aLpleRrvfPJY+Iy7QuzfUhqet7g30DYngOwuTzH+es17Y/blToqLs6DZR9aWTjp1 6NsVDexJKHEltVWSDhfhyDlxic9Bf7ODHqoBP7Ku+Qbn4g56JYby+2vn1XkzHpC0Gliw zVpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=JxF1JBOvpbEkbZ2xcwyAv8zJQ1WR68j2h9WNm5DzsV8=; fh=nprRjH5MzB60zhox7Bk0zsIktq66DGEk1bgWAB1jkxE=; b=ZUqXZdK3yfTEs/LD5md2BeYZxrxnHOjG34zJgUSe/5fiMktgXZjnLfpR1IMBY6f9FD dRhyss5R9b5ZzS+ANc/L6QGs0k1CLjDr6+26TRITHHnqX9oHwSarwa61s6hTcBAQoHpu 5C/UwsjOjK8zfMyB8Ryft12JJA4NI5scmKwXioNm4qL34ZZ4e8PJLGuXSQM5v3zQQY2F YA48+yAakTRjxnb/MN/6JxI3VmfPnT+JXYvdUWyloIclclK14d+HM2ZH0pjpc9rLubqE CmSXYAmFQrgRwgZfbpZt6YaUO2GV3OwpApA4VxwWd6siYJ9B51qoJnJXjqq2a5vl6iez V0OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ffnhW4Ze; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id 15-20020a63154f000000b0057d7cff25besi11077739pgv.829.2023.11.21.14.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:59:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ffnhW4Ze; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D9C7C80A186F; Tue, 21 Nov 2023 14:57:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234801AbjKUW5F (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234703AbjKUW47 (ORCPT ); Tue, 21 Nov 2023 17:56:59 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B90771A3; Tue, 21 Nov 2023 14:56:55 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1cf6a67e290so17786575ad.1; Tue, 21 Nov 2023 14:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607415; x=1701212215; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=JxF1JBOvpbEkbZ2xcwyAv8zJQ1WR68j2h9WNm5DzsV8=; b=ffnhW4ZeHX7vb7c5PrFy5srl5TF2CCKXV5Mx2yaW4Aqj1gy7j+GEdcpsxa9zW0p550 jHwfUnpGaGMB4s5yGqn+1BmBKbURywxlXqnQyLoulGL0UmI4F3mJV1IFuAyqDdtrIBAB e9CmWFDw+4eKXu7eBTVklbtuW5KFBIYrBehd+iufNVxcvai93utoZMhjaztha9MWhRdI 3Ds5CK03YF/iYQiUX7Fux6SclUPybdMqdf7GqsZpFa9Zkk4rEdcEnr5wF95zqD4YZz1i bp0E9nHLeZJ56GfzjrHzHMPGFRa0r91Yp3JQGyLuKJCugKOe0V0WrrlMxxYTr3lVSRnO uHwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607415; x=1701212215; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=JxF1JBOvpbEkbZ2xcwyAv8zJQ1WR68j2h9WNm5DzsV8=; b=jQi+UGj9uCgotj6zK0q0Wjo1qx1DDHgtrLJiRrb2BEeDY2KHBaC7lGOUUey4LV2iaO JGOA0HX/H0w3Hfik6Weh3/7PBt7vcTIcypE+uX1QZ+JalZkfxAPQtRrlfbVbEVaAbe7I la4uubJvrkpWMTk02wmYueBkVoA4/KG7p8FYqrrd1/egxewOxOHZPYovpAGr+lpN3P/i pQPXYTLTbYf8OSbZW6XSLveYpEVv0v+462+MSI/twuxsa0v9IBbaMTsGyQl33RtuiRmb 1qspTiYLoSoPzc8NlsLOvXYtLwnAav6JJq/+33X6hnYX4AxCfKUpz0otMBYQnCR0yrOn 8HVw== X-Gm-Message-State: AOJu0Yy/zEIPf4zpNHe0nD7SIqQrpwypNSIMTy82eroFWGY31jI/xLCY GGxatK2Sc87wXn6gLG6IqR4= X-Received: by 2002:a17:903:41c1:b0:1cc:665d:f818 with SMTP id u1-20020a17090341c100b001cc665df818mr526789ple.68.1700607415108; Tue, 21 Nov 2023 14:56:55 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.56.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:56:54 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Paolo Bonzini , kvm@vger.kernel.org Subject: [PATCH 03/14] tools headers UAPI: Update tools's copy of kvm.h header Date: Tue, 21 Nov 2023 14:56:38 -0800 Message-ID: <20231121225650.390246-3-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:13 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216253841104551 X-GMAIL-MSGID: 1783216253841104551 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: Paolo Bonzini Cc: kvm@vger.kernel.org Signed-off-by: Namhyung Kim --- tools/include/uapi/linux/kvm.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h index f089ab290978..211b86de35ac 100644 --- a/tools/include/uapi/linux/kvm.h +++ b/tools/include/uapi/linux/kvm.h @@ -264,6 +264,7 @@ struct kvm_xen_exit { #define KVM_EXIT_RISCV_SBI 35 #define KVM_EXIT_RISCV_CSR 36 #define KVM_EXIT_NOTIFY 37 +#define KVM_EXIT_LOONGARCH_IOCSR 38 /* For KVM_EXIT_INTERNAL_ERROR */ /* Emulate instruction failed. */ @@ -336,6 +337,13 @@ struct kvm_run { __u32 len; __u8 is_write; } mmio; + /* KVM_EXIT_LOONGARCH_IOCSR */ + struct { + __u64 phys_addr; + __u8 data[8]; + __u32 len; + __u8 is_write; + } iocsr_io; /* KVM_EXIT_HYPERCALL */ struct { __u64 nr; @@ -1192,6 +1200,7 @@ struct kvm_ppc_resize_hpt { #define KVM_CAP_COUNTER_OFFSET 227 #define KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE 228 #define KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES 229 +#define KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES 230 #ifdef KVM_CAP_IRQ_ROUTING @@ -1362,6 +1371,7 @@ struct kvm_dirty_tlb { #define KVM_REG_ARM64 0x6000000000000000ULL #define KVM_REG_MIPS 0x7000000000000000ULL #define KVM_REG_RISCV 0x8000000000000000ULL +#define KVM_REG_LOONGARCH 0x9000000000000000ULL #define KVM_REG_SIZE_SHIFT 52 #define KVM_REG_SIZE_MASK 0x00f0000000000000ULL @@ -1418,9 +1428,16 @@ struct kvm_device_attr { __u64 addr; /* userspace address of attr data */ }; -#define KVM_DEV_VFIO_GROUP 1 -#define KVM_DEV_VFIO_GROUP_ADD 1 -#define KVM_DEV_VFIO_GROUP_DEL 2 +#define KVM_DEV_VFIO_FILE 1 + +#define KVM_DEV_VFIO_FILE_ADD 1 +#define KVM_DEV_VFIO_FILE_DEL 2 + +/* KVM_DEV_VFIO_GROUP aliases are for compile time uapi compatibility */ +#define KVM_DEV_VFIO_GROUP KVM_DEV_VFIO_FILE + +#define KVM_DEV_VFIO_GROUP_ADD KVM_DEV_VFIO_FILE_ADD +#define KVM_DEV_VFIO_GROUP_DEL KVM_DEV_VFIO_FILE_DEL #define KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE 3 enum kvm_device_type { @@ -1555,6 +1572,7 @@ struct kvm_s390_ucas_mapping { #define KVM_ARM_MTE_COPY_TAGS _IOR(KVMIO, 0xb4, struct kvm_arm_copy_mte_tags) /* Available with KVM_CAP_COUNTER_OFFSET */ #define KVM_ARM_SET_COUNTER_OFFSET _IOW(KVMIO, 0xb5, struct kvm_arm_counter_offset) +#define KVM_ARM_GET_REG_WRITABLE_MASKS _IOR(KVMIO, 0xb6, struct reg_mask_range) /* ioctl for vm fd */ #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device) From patchwork Tue Nov 21 22:56:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168018 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp964219vqb; Tue, 21 Nov 2023 14:58:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPYDp4smscvwvqqwUmnrJvaDajpkn+2NO0zsBCFSXcbfhXch104hwuArUQcIYeL04IINpE X-Received: by 2002:a05:6870:e86:b0:1f9:4b2c:4d02 with SMTP id mm6-20020a0568700e8600b001f94b2c4d02mr923381oab.54.1700607529907; Tue, 21 Nov 2023 14:58:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607529; cv=none; d=google.com; s=arc-20160816; b=cbU7+fZzFjO0T7FTdSmXY1YbdJkIl5itHxJIgaEZ9ggu/yX1GV/tuNueg1CoIF9Vez nKB4AqhYyoTbFlDWgbSrTlvTCR5JxHiPsL/CPczwIRqGXQcnLdavOSmecYY4uQN5/TRl xxhxhB67F7TAic1Q1s/G3qZyva68XM/dbkBg9yeK1Lu9ShaUmL10UAHvFjolEy4bIUrr ERZk0PnSNNPff399yB3ShiJ8+Lnx/EBBcGATrQQd5KTVTAcvlhyjSm00P3Ahr7V8bWtR eU+MKpCWdKfx1LauCyzmtfNswIIUIcczsvAQcEh/QYsFW7VPxMFSF6ObJDPmq+tIodg2 OXjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=D8ZZgvmAXPhmKzJU9UhObSbddp4HrtBDtV0ojPM1K/w=; fh=SDcUE4mNvwXHdAd0beS5XTlo00mGe1ADugk4D8GSSxo=; b=xi4rIYub9poKl3v8ATkG/lD82h7bX/rtpETOH3g65aD0uk5WFBh5sHrFfUSrk/gFei rJawm/S8eQfuROShpC7dQ9A9EORcw6ClKypydhCMeXDlZwq7b/TEKz/uIGJTRUIVhJbu 9jMuTrX20Cd+yupmRvEem0ISyiBeUe5PbrdbDhBur1dV21z9W9moXB/Oseg71ifxwYeb klqntjN5K7ykgwGIlZ7Kd20EfDQfDuy/5Wc4t5fvNuAkeP0uv1/c04Q17KnmCK/q2rif 6fEKN4Jq5CRhGi7K6P7pFOYi2eaOgVdWyrJfe+gliSzlU1rU4KzwTourRmqY/0w7/SgW N9/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Jo1eK27d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id b7-20020a056a00114700b006bd360e70edsi11546543pfm.103.2023.11.21.14.58.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:58:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Jo1eK27d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id C7C858021EF6; Tue, 21 Nov 2023 14:58:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235004AbjKUW6N (ORCPT + 99 others); Tue, 21 Nov 2023 17:58:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234747AbjKUW57 (ORCPT ); Tue, 21 Nov 2023 17:57:59 -0500 Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D892C19B5; Tue, 21 Nov 2023 14:57:21 -0800 (PST) Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-1eb6c559ab4so3660540fac.0; Tue, 21 Nov 2023 14:57:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607437; x=1701212237; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=D8ZZgvmAXPhmKzJU9UhObSbddp4HrtBDtV0ojPM1K/w=; b=Jo1eK27dcXMPNedOfNH9AG8n7aBtJ3uKMq994iRaYs+FvIRWrRRl1+XUGSwhzbw5oD 4MEt06OOhIL8COpC9IJJKOfpi9alktwEmupP8b1/JloPQ1JoMW6XvKd+0E9MFuVzK0rS t2eVfnzzMEX+Fa7ErV+C7hxbQg/6fws2D2LqHyMGrb0hJHs4liK6eMNuD4Ipk4WHR9L0 gIch9saDt3eV+PGOPSIn9bUZcnei8GAcx8jtjnFI1SsIfT4v7g5n3s6MmJmNXd3DWM3k G4Ll4YLpArveEXdvj30UmLrhSiEZd6UC9wS27XVqxzw37LTfTtNMzYPyexQpQHQnoEp8 FLyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607437; x=1701212237; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=D8ZZgvmAXPhmKzJU9UhObSbddp4HrtBDtV0ojPM1K/w=; b=RDqDJixmnSchGJkfIkuY3bg+qt7DdbnEq+crhQAd2nPYd++AZt1Z/SL/ZOO/NG8nJp UWhKOcN/lVxRHsHSA+KjZwS/OdBGAQadklkSsvdThGLCQw6bY95zigbY8SGDjb/OV734 8Abq9U93/o5rIMi/GaZ2hsYbrEh3KaK6M+fL/mfVrpKLq0kryDhYTDYDr0M8LFMyTBzP RB9Hw/QpaHwnbE6hdNhMGxpUoTcoaKP8zdpw9OAo7qXyo+G9na59lhYe8NDdyoq4vRAm PLPak8LMJ62E3kUa15/Fxkw30AZZQxCCWHHg0JmDMIGklzXbyhjwOl9CuOjOyqN4g53d rE/w== X-Gm-Message-State: AOJu0YwDreePlrM3hwg1MeXFYeKcnlDJSJQ/t3d8uDKqaokH6pjHBS+l 8Ux+lq2E7QYAQpu+ChZL1GZ2cJfuRRI= X-Received: by 2002:a17:902:cec8:b0:1cf:6969:581 with SMTP id d8-20020a170902cec800b001cf69690581mr689443plg.49.1700607416739; Tue, 21 Nov 2023 14:56:56 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:56:56 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org Subject: [PATCH 04/14] tools headers UAPI: Update tools's copy of mount.h header Date: Tue, 21 Nov 2023 14:56:39 -0800 Message-ID: <20231121225650.390246-4-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:58:40 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216241119816729 X-GMAIL-MSGID: 1783216241119816729 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: Alexander Viro Cc: Christian Brauner Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Namhyung Kim --- tools/include/uapi/linux/mount.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/mount.h b/tools/include/uapi/linux/mount.h index 8eb0d7b758d2..bb242fdcfe6b 100644 --- a/tools/include/uapi/linux/mount.h +++ b/tools/include/uapi/linux/mount.h @@ -100,8 +100,9 @@ enum fsconfig_command { FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */ FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */ FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */ - FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */ + FSCONFIG_CMD_CREATE = 6, /* Create new or reuse existing superblock */ FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */ + FSCONFIG_CMD_CREATE_EXCL = 8, /* Create new superblock, fail if reusing existing superblock */ }; /* From patchwork Tue Nov 21 22:56:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168021 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp964289vqb; Tue, 21 Nov 2023 14:59:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtXqpmCSzCM1afqB5Ppk+OJSM24c0rkKXi2fzQ7rkPOjsUNBwVWXavPk/RZ1KtHtlU9vwC X-Received: by 2002:aa7:930e:0:b0:68f:c078:b0c9 with SMTP id cz14-20020aa7930e000000b0068fc078b0c9mr999661pfb.11.1700607542523; Tue, 21 Nov 2023 14:59:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607542; cv=none; d=google.com; s=arc-20160816; b=yRuepHvUKEeJgBUWk9H33zI8mpTKJ/IxWE4VolQSCC5UkHR5HQ8d1YO3M0VLq8/6hl 709ROLAT+dc/d58b5eXzgs4QptTrLb17eHpFnxsbkWaTc66gtdETCxp/KcagjyZK01Tt HZM6q7DFdykHYHqIH9K88GCUitni/EqRgGh32uZmViXwctWHoiE0PgXPXOaXS/Pk8OEQ REIRjtke3Yivjn4htd6VCROcY0tfVsAjo7IQOpbYsbzWtAci9NQT9jaYd9i39apX3yym MYTQQtZujO00WCxanRuiRhRKiwC57pL2BIMDOD9DUcoN0/WwfvKwaoqA8FLqb2WXpT1Y 9lhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=pHi5YlXCcsX/D19JuU9Nw7CLS9+F6yhOBOO+wjnP29E=; fh=z3aN0IjSb6oRSgrvRqJwK1N0UiI597AvkFNwWdSPkeM=; b=uFnba74yl+OXMW+70aH3pDqGBqwy2eL5X5ErkDORHjCjXdeNaxu7tzd98U7UAsInCK IQ57B//S2vcoVm1MjPI1oGzAOmeJzyG0LB842H2yw+eSjsI+kR7PTmI/oxsU/sdUAgfF n9yiBVwQzYwAEPJ+XoVNkLHg+SnZArPlKCFK3Fv8QzZWNdowIFNGtXoc8kq4y45agt9T zLnvCr/2yqK9gITjurj/Bmbfo2L/XcrhyaggHC+ztMq9q9FrITdrqhPtch+4YRAesRNl sYMcyGwn/QfckyYFwd4fZOXmUErfPOEgMiPBGqIl3f+FdyAmjJSxTKuQG7Zi3MoYs/ou EI9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MtmmtrEV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w188-20020a6262c5000000b006cb8ea1f1besi5781816pfb.65.2023.11.21.14.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:59:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MtmmtrEV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 240A6804E785; Tue, 21 Nov 2023 14:57:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234827AbjKUW5J (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234747AbjKUW5C (ORCPT ); Tue, 21 Nov 2023 17:57:02 -0500 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D684DD; Tue, 21 Nov 2023 14:56:58 -0800 (PST) Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1cf6373ce31so2154975ad.0; Tue, 21 Nov 2023 14:56:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607418; x=1701212218; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=pHi5YlXCcsX/D19JuU9Nw7CLS9+F6yhOBOO+wjnP29E=; b=MtmmtrEVs8W0K7YmHL0aSsy4KlgbCiR/rzEoaxxd5xgwo6yySKIEcftF7a0eDvv5mW sV3En1IQR2ITwWxA/VZvWTgYismKndDmu2SujOe6djQOnmzzw5WjZIG/jUf796bR1aMh sh2pdnh1tpajr+3Mlca7eIzXmCJhVnnRAJ5DMHZO7Bmzhxs7oS0pe/9DI9kug2oTyeG/ JsF+ACBz/WxwiOu+PrN2SA/V4/lqhfbljF9Z19dghmlWxf/C2IstNvmhoPhbOF6VKUXI dF+6V4pyoJoO00MS6/Yg4floS8gsSbgACoGnjkfmWA5weSVC/ixWDm+VfRESce3FI7d3 JoUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607418; x=1701212218; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pHi5YlXCcsX/D19JuU9Nw7CLS9+F6yhOBOO+wjnP29E=; b=iVwc9nEIheyTCs/+WJ+947PMVdO1zTldADUa5yo0JnccNN5/TOHzAd6HE5iwvqj6ih QQuMihy4cGfbENu6+YvjKsWx5L9OUHt5L8jdzbukHqb/vcOszYzqT+iw6wz1JNEAFIsm Xnr5JLAlqWhIcfoS6axPBhzgNsGE0oEENFztz6fIBzEglrJBg8jY78riOA/E8IbapcYb Dc9/YcZ2XQd1hRBlBSgZ/YOXSrUZG4ecHIFrNp5yJFp2zRFKz2buE/VvGExSACXA+CCz bntL2SVz7ABcJ3mywbqw9w2mdh5fJA4RadkIysAYFcK6PRR5fPhDJdhrKtFD3GvhXNaf iq8g== X-Gm-Message-State: AOJu0YzMiCcI1hT2KwER33RCOLOmXYkzq2T7h6/cD4Yy6i7iHYd6jqxN k5Jtk/ju2MK5utyvZoFCzXg= X-Received: by 2002:a17:902:c94b:b0:1c5:cf7c:4d50 with SMTP id i11-20020a170902c94b00b001c5cf7c4d50mr1008200pla.18.1700607418027; Tue, 21 Nov 2023 14:56:58 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:56:57 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, "Michael S. Tsirkin" , Jason Wang , kvm@vger.kernel.org, virtualization@lists.linux.dev, netdev@vger.kernel.org Subject: [PATCH 05/14] tools headers UAPI: Update tools's copy of vhost.h header Date: Tue, 21 Nov 2023 14:56:40 -0800 Message-ID: <20231121225650.390246-5-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:17 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216254660674530 X-GMAIL-MSGID: 1783216254660674530 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: kvm@vger.kernel.org Cc: virtualization@lists.linux.dev Cc: netdev@vger.kernel.org Signed-off-by: Namhyung Kim --- tools/include/uapi/linux/vhost.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/include/uapi/linux/vhost.h b/tools/include/uapi/linux/vhost.h index f5c48b61ab62..649560c685f1 100644 --- a/tools/include/uapi/linux/vhost.h +++ b/tools/include/uapi/linux/vhost.h @@ -219,4 +219,12 @@ */ #define VHOST_VDPA_RESUME _IO(VHOST_VIRTIO, 0x7E) +/* Get the group for the descriptor table including driver & device areas + * of a virtqueue: read index, write group in num. + * The virtqueue index is stored in the index field of vhost_vring_state. + * The group ID of the descriptor table for this specific virtqueue + * is returned via num field of vhost_vring_state. + */ +#define VHOST_VDPA_GET_VRING_DESC_GROUP _IOWR(VHOST_VIRTIO, 0x7F, \ + struct vhost_vring_state) #endif From patchwork Tue Nov 21 22:56:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168022 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp964297vqb; Tue, 21 Nov 2023 14:59:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFuWDS5MQwJt9Q7VWdjlAYrTtI1kqcAyyJZORF7sNLfM66baqd0FY+LZvIIdbDCVGRSrcGB X-Received: by 2002:a05:6a21:6da0:b0:187:4e8c:ac5c with SMTP id wl32-20020a056a216da000b001874e8cac5cmr1257921pzb.1.1700607544087; Tue, 21 Nov 2023 14:59:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607544; cv=none; d=google.com; s=arc-20160816; b=CtwbSyjKy59594q2OgNtzTVYHddY0sqthjqaPEDDcrfRLdn3wgDQIBkpTeHgEj0WSU dsMzJqvDOABjbhes3X+zcOeIvVzUCaHPvor6PVHIhiqktUCuu9tpmj+Tc+Apn6hmU7OY R3l3OWi33SC4U6NX+rBEw0DTaa1GYM0MJnVBU5vEJwQMQmDwQNkywcLQxQZgOWLiHHkT /JNEjDDd57ZGSBDWFk//U8qZ9GHNoZw+UAIy331bisSubPocNxKea0+i+5TiG+sz86Ys FlEy1gLjYtCZNI+3ONIYbFJFr4bJ1Biog/wshc6RbuNuJ5BaTpBIIuV74SfP/nPrvyt9 sXeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=Joh8uuUk19mBxNee66MMAzQ/m9SU9DPYEeo2rbFlN7I=; fh=5Ez3Kjgle7UN/YBUEFH/GrXI4aMytfXLdaUqLTIuTcE=; b=AqvAHlha35ycGeSQztbwpQAsji1teU9P1GXjqyec9obfZDWnWEqWWkjhljGjupbl3u U3TvtiHBfIAowEDDl8w/AQ5S3Q4Z9Hx7cItpGkR5Ld5JneS8BXv1Wb5BlDZRwN1ZaDRj 8JMPi3m/pYYq91qFXIGGNOMI86L/znWsk+cPuiFkAapZNbSFmSX7r2IaT9O6Kphn4Ga5 Ez+3eQjN5XxICJNFe6tNsjeLEjIIp02KKw07AcxiyzlHXJK3kMRRmHLYi2sWVHHOqByB VpSMD5t4qurcF8THFaMz0VHT57UR7Arqbj5Vru/cgfSM3PMd+ipHzBWXznO/iwqqBzQ4 5amQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jd9pvD4E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id f13-20020aa79d8d000000b006be0e90200dsi10891412pfq.374.2023.11.21.14.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:59:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jd9pvD4E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4B6AA80A30D1; Tue, 21 Nov 2023 14:57:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234853AbjKUW5M (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234775AbjKUW5D (ORCPT ); Tue, 21 Nov 2023 17:57:03 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2AC5191; Tue, 21 Nov 2023 14:56:59 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1cf6373ce31so2155055ad.0; Tue, 21 Nov 2023 14:56:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607419; x=1701212219; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=Joh8uuUk19mBxNee66MMAzQ/m9SU9DPYEeo2rbFlN7I=; b=jd9pvD4EsjHTio0o0qDAXju7073NsXRmfaOX2MLIhCGGAHELj4coEMtmG1HMyU2ag1 9FSstQ9cE+ZsM5tD35F4d6gIFIeqymUueUQaxJTVqFEZOStF7TJBvXUCu8o4H6VPd4tA Pe8afH74n9uR8zuMTyJxAKkwtJRx1JQyckIvZhSQ8du565h/T/SmQCqWiR6OUtgSLASc Xah+8ggptcoufzPz0fX6eTn/ulzqBK6XoH4p7YRK0+ol2H2w5oBgXvrufzmuXmnjR5ds 3UQoulKg3vYzLNpCp9dHnuW3x6tMsl/ypeewMDJ7rkhNa1qZ2UGQ5XUHr+u5MFnxF4uD KNBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607419; x=1701212219; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Joh8uuUk19mBxNee66MMAzQ/m9SU9DPYEeo2rbFlN7I=; b=AqSXn+tTmkDzL6TwF+g1orMouTinMfjmR6+dd6ztXwX+8t5ZDo13kaCjwrHvBTB0Af vHAMAg/N+msXuy17mCsKoYPSJedoYpxZv+KbNnhcOjUJPKBJ0SeGwkNUfwFLbfquSjrE H0Mi3o50dkqqz/gWwQ4irMAcPFQOkXGz2jQQ3qqdzT7dQqnllBtXgosq6x7dIQmCte7j SBoXYRWEtG8nlFITRs7721AY6yMqxom81KA7xUnV67ttKAeB2T3zYUHXg931e1cHFxJu UOf9FnzgqioNPF/b9lEz8BKAWfy6iAuoIu+x38gwLVSp0L1EwdegM6IPdLXd4FlVzrdX lyKw== X-Gm-Message-State: AOJu0Yy8/eEFQXwZLEmxx9+TuUGVdTilSJCZYRfoRHiBsLbZkkoGyADO ObR2AyYO/Y3tA+fAczdF6NY= X-Received: by 2002:a17:902:da91:b0:1ce:5ca7:1070 with SMTP id j17-20020a170902da9100b001ce5ca71070mr1173646plx.16.1700607419173; Tue, 21 Nov 2023 14:56:59 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:56:58 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Arnd Bergmann , linux-arch@vger.kernel.org Subject: [PATCH 06/14] tools headers UAPI: Update tools's copy of unistd.h header Date: Tue, 21 Nov 2023 14:56:41 -0800 Message-ID: <20231121225650.390246-6-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216256293352208 X-GMAIL-MSGID: 1783216256293352208 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: Arnd Bergmann Cc: linux-arch@vger.kernel.org Signed-off-by: Namhyung Kim --- tools/include/uapi/asm-generic/unistd.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/asm-generic/unistd.h index 76d946445391..756b013fb832 100644 --- a/tools/include/uapi/asm-generic/unistd.h +++ b/tools/include/uapi/asm-generic/unistd.h @@ -816,15 +816,21 @@ __SYSCALL(__NR_process_mrelease, sys_process_mrelease) __SYSCALL(__NR_futex_waitv, sys_futex_waitv) #define __NR_set_mempolicy_home_node 450 __SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node) - #define __NR_cachestat 451 __SYSCALL(__NR_cachestat, sys_cachestat) - #define __NR_fchmodat2 452 __SYSCALL(__NR_fchmodat2, sys_fchmodat2) +#define __NR_map_shadow_stack 453 +__SYSCALL(__NR_map_shadow_stack, sys_map_shadow_stack) +#define __NR_futex_wake 454 +__SYSCALL(__NR_futex_wake, sys_futex_wake) +#define __NR_futex_wait 455 +__SYSCALL(__NR_futex_wait, sys_futex_wait) +#define __NR_futex_requeue 456 +__SYSCALL(__NR_futex_requeue, sys_futex_requeue) #undef __NR_syscalls -#define __NR_syscalls 453 +#define __NR_syscalls 457 /* * 32 bit systems traditionally used different From patchwork Tue Nov 21 22:56:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168023 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp964308vqb; Tue, 21 Nov 2023 14:59:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpnarEXqva3674TEj8UUCpiM2mExIY/qduUaBdOwqX0PAYLJPkKfYJmMDC9tHa1b3c+Zjl X-Received: by 2002:a17:902:9a84:b0:1ce:9a59:da29 with SMTP id w4-20020a1709029a8400b001ce9a59da29mr607726plp.5.1700607545481; Tue, 21 Nov 2023 14:59:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607545; cv=none; d=google.com; s=arc-20160816; b=cpYVB5XiUmHyb0qJLNhMWcXVmiy866LCv+tPwLf2r5Qb5tM7eRBakw5icJdgi8BJwc jF6W3wVlseWjhcQb3xBHJqTJFNySUboGVcfPKONPkd4KbHU4zui004wl67Nt4PIY/jL5 iWAgqeNQ1XQA+7Be1179R7FpSZCTunPWltiOfOF/YDd59KD6Kj7oTrb6El7ITUxQTj4C ih9uk26JQbmDSRNy/NaYUXGI40YBTmWoec8/RVOzxrbVChh+Zo039Ii+J7jS5MnKyOyJ ORBQf/TyXNnjmQ/ofXyBcl2OYW81/hoc0/dgrIE3a12iT8xLHnaAZzw3ii6NAK+A6n+/ +/8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=cqLalMyfqwS29Jo7Kjmw4Rvhj33ZYdkwQdVPnwcenNQ=; fh=zr1KrnRveKNh5EaOSN5/3Ppd9oh4bEw9nOE0xxEMIgQ=; b=WJsVcxvVlCL1Be7b3uLvh5bhy6sXzpxHzISxzBANosFxkEKmLpIbXvgilYNB0DbZ3e prVOOHqrpiCLbCLLtjtULLFGnqILG3FFzmkCrMm10+0XIqtz3vK0XQ6HlJyVqXti5qSp zqeJ9Vor6YLv1K8Qp9FHDB52iVfq1RBwqoyLj37rONam9z2HZ3WWtIX2Ey7f8OyoHkM8 jNYVs0QjlRA9JvqawaWbtlP8FOUWqxOsk6cpPgh+9H4qcA5Kh6mqCZ337CGbXG0cSdXJ Bd6AieNT0WkaNN6dAOEzy7+IIbCUEMDytqyQS7jn+GtmPSI/TTUaZvu0TXWU1b/DarMs kToA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ePGd6Jnz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id k7-20020a170902c40700b001bc079974dbsi12195729plk.355.2023.11.21.14.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:59:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ePGd6Jnz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E38CC80477AC; Tue, 21 Nov 2023 14:57:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234838AbjKUW5P (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234776AbjKUW5E (ORCPT ); Tue, 21 Nov 2023 17:57:04 -0500 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E89601A3; Tue, 21 Nov 2023 14:57:00 -0800 (PST) Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-5bdf5a025c1so4041565a12.0; Tue, 21 Nov 2023 14:57:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607420; x=1701212220; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=cqLalMyfqwS29Jo7Kjmw4Rvhj33ZYdkwQdVPnwcenNQ=; b=ePGd6JnzpW3f8uRv183MWvBJkUk+RgKO2sEbagig7aE9qnKr1GcjpFNF/G1PhYY1na MRbyu8AynI2IB06OksyNIety/loS10aWCgYpNSBDjZNz3J8iJGC+iwXCt0TlgZd7mHKd s/JneKM6BHRsGHgGaRtP/aNxkcpkzj5cU6BWfXijSVyyO1LXA8ySjsLMNNZq3dVckebh 4sPC46RxVW7dgX/IOMQTORrmmwl2SUVBrkP3ZiLPJfxOBRSt/dKYy9zdyuun21EVVEd4 a2YUD2Zsf6F6riW9LlNPfKwXTulAOnu6mGp0CYZqOcTkNZlT7P9wskkNlJOSfqls1Occ lIMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607420; x=1701212220; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cqLalMyfqwS29Jo7Kjmw4Rvhj33ZYdkwQdVPnwcenNQ=; b=T09oBqJe92K6xIzdJPZYCl+k+KwVW0cWWdok4TpBupW30eqPtF/dDYGuHKNgUfhlQq kSS8cKV6iLRt6Ss3nHB5erSsEaJBV/GGaPm+kxOnTZzemsUcD1h/3stoUTdo05nCIfZH xtJ25MK2AS+ltUSOqVT+iJ/25ftKGfQ2h/ou7+FwqWQFwSA9ttFyu6yTg2r+h2/bTPJd dUoTGQzk+6qqkEBTjUX5QxFaaqa7CKxTKCN9M40MtM5K+1UukJrJN+fcxFN0CnvSj4A0 yGZ0/LvmJNJmoSzRMn6vXyCfLd+D/6EOq3SaXvXNmF0nsw7eaIuOMlRKsISi0UgJV7iZ YGQA== X-Gm-Message-State: AOJu0YxggkA0J2TxgjHbbXbvO9l0dKEHro4vJYUvyMUHjsAhdH2qSLeL ZhJmbBfOM8b3Yhv2De6k0F4= X-Received: by 2002:a05:6a20:e11d:b0:187:d18a:3163 with SMTP id kr29-20020a056a20e11d00b00187d18a3163mr545061pzb.48.1700607420334; Tue, 21 Nov 2023 14:57:00 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.56.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:56:59 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 07/14] tools headers: Update tools's copy of socket.h header Date: Tue, 21 Nov 2023 14:56:42 -0800 Message-ID: <20231121225650.390246-7-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:29 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216257842676372 X-GMAIL-MSGID: 1783216257842676372 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: netdev@vger.kernel.org Signed-off-by: Namhyung Kim --- tools/perf/trace/beauty/include/linux/socket.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/trace/beauty/include/linux/socket.h b/tools/perf/trace/beauty/include/linux/socket.h index 39b74d83c7c4..cfcb7e2c3813 100644 --- a/tools/perf/trace/beauty/include/linux/socket.h +++ b/tools/perf/trace/beauty/include/linux/socket.h @@ -383,6 +383,7 @@ struct ucred { #define SOL_MPTCP 284 #define SOL_MCTP 285 #define SOL_SMC 286 +#define SOL_VSOCK 287 /* IPX options */ #define IPX_TYPE 1 From patchwork Tue Nov 21 22:56:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168024 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp964317vqb; Tue, 21 Nov 2023 14:59:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0ALCxQe9HdRHXfw7/c8Q9TJ8oZpEyYyQhZ11XYj/mlSRtiSn2QaM3/r7DZxC2l9bGmTEj X-Received: by 2002:a17:903:230c:b0:1cc:7adb:16a5 with SMTP id d12-20020a170903230c00b001cc7adb16a5mr593865plh.13.1700607546365; Tue, 21 Nov 2023 14:59:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607546; cv=none; d=google.com; s=arc-20160816; b=I8bD/qQv+6hAopPaOItaf0NO/eiKoeCb8zVrcG/u2P1/IbnfC/IqL03E90BbWHoJ9r YeewPY5HiIxkc52JbjMo8Keii+qGWcUCjuvMsVlOEBldD4tWMT9p/uLUAutEmDf/KiE/ ARKpf7yhWtKV254zgMAIbFBrZAETtw+qePBkb+N2z9QBNo99R+v5WjYgd4uRKqnNcP6E 6Qsdqsno60yOGaudZJdTQOSVRt8rRdeM6mHip+8dctN/niQ321hqEilWzX7fVe6Je95w unhqzSJmNcm+BC7gnoqlw01EnwV3F1RdUTQwbVHlg+IbKQElOx4cvnCH8meO/Vcv1nlh 6HKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=UTiSv4614QfvHycZpd52gCdqFKXktKwWKjDA0Ir2qUY=; fh=WzTP9ACCkvIKh+P5weDUTg9elL4nAzu/kg+UEE3EdSc=; b=MQOHaySYwJusB1S5i+5sVCBeF8J9xIkSvgJrB7JRnA6PORjpXLkCmAaJmypsOVPCHZ MBtfNowVZudOnGqze0+NS3BanD+WQcWOX2mA0cv6Gmv1FYESJfbWUuHBB/C0Ot/93IuT oFbw2PwxAMhZUYmo04gnHKtYHfTsv1fbeioWWZnlwf5L/ftH47y6e2DfHRYzNxWWlTJU rKtwn8OkjzIT+lhaKKpPwl5gNpDtjsWYOg0i/dh/m9UcATkM5lM9hJf0OF3OpvnkBFOR lz7MbdMNHZcMSco0MoW/naO+tKuc5+URjVW23SctHdGIK8VqrnGNWZEvnwxhcSaDo0XD t8Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RYLCjvHU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id jj4-20020a170903048400b001b69ede5b79si10537769plb.470.2023.11.21.14.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:59:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RYLCjvHU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D0669804C51A; Tue, 21 Nov 2023 14:57:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234879AbjKUW5R (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234812AbjKUW5G (ORCPT ); Tue, 21 Nov 2023 17:57:06 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C0C8DD; Tue, 21 Nov 2023 14:57:02 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5aa7172bafdso4031614a12.1; Tue, 21 Nov 2023 14:57:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607422; x=1701212222; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=UTiSv4614QfvHycZpd52gCdqFKXktKwWKjDA0Ir2qUY=; b=RYLCjvHUmPvWJxWPe9cgyb26N/9N+uRyiKFquYEr6mzBvDuos7nYd4Hr2iV/bH6M+m gyd8N0Xj79qPkA338lV3cRkiElxPSUWqhMnVbBmZzzt4oaoAwkk5BR+1xsLRgCNtewab 4bUV5Rv859+iVLI7PujwkSuV4tnDwsIxbSO4F4K/ISMszbXA01kEV5/P1ia7fuGPOLJ5 mK+uxeaA/FzBIwow9B2vpxgA9UWolZ6wwikEHB/aF9vwzDrjVTBrLE/3MuLBg01VSdzZ v/hm0AWpkRKCp0/iz5JNLwj/2B/BTMbXPQT8UJCLabNPtD/5R5PUphIU7PMk4oEzMI+H eiTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607422; x=1701212222; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=UTiSv4614QfvHycZpd52gCdqFKXktKwWKjDA0Ir2qUY=; b=vE4tiniw5MynNdtkxYfG0xN72a3q/0z4viSDLD7ZEqp6f4W4dop3Xju5QNW8T2mm7D VWBdXvFHzfd8JRneL+PPfUFVvHUJE2nUKavGlew4ydlPMUINMDbdaXXfosg++ccNCYLN iaSa+784jBHFE8xk1xE1iGAgNTfuzrft6ISECSuJTy6tWXAwiSCzhIhaH1nUzpWgkfD2 H7LZE8yQ3/qIuZXeQrEzkVlvI55hNop/ItMBHx28TK35gLr/XOz175myMzbFKApq5dOQ gN6KQs2z1WEyndyruIikgCxe/JCYmCe0TLy+JvCx8FFJDLo2lL5BBUrFhdxyGfnnkoyF Vbnw== X-Gm-Message-State: AOJu0Yw0NkFJ8p2Dc5luDfX7U89jA1825Jl1qdQpjc8RMtrKqRLI67KW fsWQlDEP16qDIJwGXxxRvG4= X-Received: by 2002:a05:6a20:2695:b0:188:1df7:9afe with SMTP id h21-20020a056a20269500b001881df79afemr354538pze.30.1700607421733; Tue, 21 Nov 2023 14:57:01 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.57.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:57:01 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH 08/14] tools headers: Update tools's copy of x86/asm headers Date: Tue, 21 Nov 2023 14:56:43 -0800 Message-ID: <20231121225650.390246-8-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:32 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216258444340246 X-GMAIL-MSGID: 1783216258444340246 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Namhyung Kim --- tools/arch/x86/include/asm/cpufeatures.h | 16 ++++++++++++- .../arch/x86/include/asm/disabled-features.h | 16 +++++++++++-- tools/arch/x86/include/asm/msr-index.h | 23 +++++++++++++++---- tools/arch/x86/include/uapi/asm/prctl.h | 12 ++++++++++ 4 files changed, 60 insertions(+), 7 deletions(-) diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/include/asm/cpufeatures.h index 798e60b5454b..4af140cf5719 100644 --- a/tools/arch/x86/include/asm/cpufeatures.h +++ b/tools/arch/x86/include/asm/cpufeatures.h @@ -198,7 +198,6 @@ #define X86_FEATURE_CAT_L3 ( 7*32+ 4) /* Cache Allocation Technology L3 */ #define X86_FEATURE_CAT_L2 ( 7*32+ 5) /* Cache Allocation Technology L2 */ #define X86_FEATURE_CDP_L3 ( 7*32+ 6) /* Code and Data Prioritization L3 */ -#define X86_FEATURE_INVPCID_SINGLE ( 7*32+ 7) /* Effectively INVPCID && CR4.PCIDE=1 */ #define X86_FEATURE_HW_PSTATE ( 7*32+ 8) /* AMD HW-PState */ #define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */ #define X86_FEATURE_XCOMPACTED ( 7*32+10) /* "" Use compacted XSTATE (XSAVES or XSAVEC) */ @@ -308,6 +307,11 @@ #define X86_FEATURE_MSR_TSX_CTRL (11*32+20) /* "" MSR IA32_TSX_CTRL (Intel) implemented */ #define X86_FEATURE_SMBA (11*32+21) /* "" Slow Memory Bandwidth Allocation */ #define X86_FEATURE_BMEC (11*32+22) /* "" Bandwidth Monitoring Event Configuration */ +#define X86_FEATURE_USER_SHSTK (11*32+23) /* Shadow stack support for user mode applications */ + +#define X86_FEATURE_SRSO (11*32+24) /* "" AMD BTB untrain RETs */ +#define X86_FEATURE_SRSO_ALIAS (11*32+25) /* "" AMD BTB untrain RETs through aliasing */ +#define X86_FEATURE_IBPB_ON_VMEXIT (11*32+26) /* "" Issue an IBPB only on VMEXIT */ /* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */ #define X86_FEATURE_AVX_VNNI (12*32+ 4) /* AVX VNNI instructions */ @@ -380,6 +384,7 @@ #define X86_FEATURE_OSPKE (16*32+ 4) /* OS Protection Keys Enable */ #define X86_FEATURE_WAITPKG (16*32+ 5) /* UMONITOR/UMWAIT/TPAUSE Instructions */ #define X86_FEATURE_AVX512_VBMI2 (16*32+ 6) /* Additional AVX512 Vector Bit Manipulation Instructions */ +#define X86_FEATURE_SHSTK (16*32+ 7) /* "" Shadow stack */ #define X86_FEATURE_GFNI (16*32+ 8) /* Galois Field New Instructions */ #define X86_FEATURE_VAES (16*32+ 9) /* Vector AES */ #define X86_FEATURE_VPCLMULQDQ (16*32+10) /* Carry-Less Multiplication Double Quadword */ @@ -438,11 +443,16 @@ /* AMD-defined Extended Feature 2 EAX, CPUID level 0x80000021 (EAX), word 20 */ #define X86_FEATURE_NO_NESTED_DATA_BP (20*32+ 0) /* "" No Nested Data Breakpoints */ +#define X86_FEATURE_WRMSR_XX_BASE_NS (20*32+ 1) /* "" WRMSR to {FS,GS,KERNEL_GS}_BASE is non-serializing */ #define X86_FEATURE_LFENCE_RDTSC (20*32+ 2) /* "" LFENCE always serializing / synchronizes RDTSC */ #define X86_FEATURE_NULL_SEL_CLR_BASE (20*32+ 6) /* "" Null Selector Clears Base */ #define X86_FEATURE_AUTOIBRS (20*32+ 8) /* "" Automatic IBRS */ #define X86_FEATURE_NO_SMM_CTL_MSR (20*32+ 9) /* "" SMM_CTL MSR is not present */ +#define X86_FEATURE_SBPB (20*32+27) /* "" Selective Branch Prediction Barrier */ +#define X86_FEATURE_IBPB_BRTYPE (20*32+28) /* "" MSR_PRED_CMD[IBPB] flushes all branch type predictions */ +#define X86_FEATURE_SRSO_NO (20*32+29) /* "" CPU is not affected by SRSO */ + /* * BUG word(s) */ @@ -484,5 +494,9 @@ #define X86_BUG_RETBLEED X86_BUG(27) /* CPU is affected by RETBleed */ #define X86_BUG_EIBRS_PBRSB X86_BUG(28) /* EIBRS is vulnerable to Post Barrier RSB Predictions */ #define X86_BUG_SMT_RSB X86_BUG(29) /* CPU is vulnerable to Cross-Thread Return Address Predictions */ +#define X86_BUG_GDS X86_BUG(30) /* CPU is affected by Gather Data Sampling */ +/* BUG word 2 */ +#define X86_BUG_SRSO X86_BUG(1*32 + 0) /* AMD SRSO bug */ +#define X86_BUG_DIV0 X86_BUG(1*32 + 1) /* AMD DIV0 speculation bug */ #endif /* _ASM_X86_CPUFEATURES_H */ diff --git a/tools/arch/x86/include/asm/disabled-features.h b/tools/arch/x86/include/asm/disabled-features.h index fafe9be7a6f4..702d93fdd10e 100644 --- a/tools/arch/x86/include/asm/disabled-features.h +++ b/tools/arch/x86/include/asm/disabled-features.h @@ -105,6 +105,18 @@ # define DISABLE_TDX_GUEST (1 << (X86_FEATURE_TDX_GUEST & 31)) #endif +#ifdef CONFIG_X86_USER_SHADOW_STACK +#define DISABLE_USER_SHSTK 0 +#else +#define DISABLE_USER_SHSTK (1 << (X86_FEATURE_USER_SHSTK & 31)) +#endif + +#ifdef CONFIG_X86_KERNEL_IBT +#define DISABLE_IBT 0 +#else +#define DISABLE_IBT (1 << (X86_FEATURE_IBT & 31)) +#endif + /* * Make sure to add features to the correct mask */ @@ -120,7 +132,7 @@ #define DISABLED_MASK9 (DISABLE_SGX) #define DISABLED_MASK10 0 #define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ - DISABLE_CALL_DEPTH_TRACKING) + DISABLE_CALL_DEPTH_TRACKING|DISABLE_USER_SHSTK) #define DISABLED_MASK12 (DISABLE_LAM) #define DISABLED_MASK13 0 #define DISABLED_MASK14 0 @@ -128,7 +140,7 @@ #define DISABLED_MASK16 (DISABLE_PKU|DISABLE_OSPKE|DISABLE_LA57|DISABLE_UMIP| \ DISABLE_ENQCMD) #define DISABLED_MASK17 0 -#define DISABLED_MASK18 0 +#define DISABLED_MASK18 (DISABLE_IBT) #define DISABLED_MASK19 0 #define DISABLED_MASK20 0 #define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 21) diff --git a/tools/arch/x86/include/asm/msr-index.h b/tools/arch/x86/include/asm/msr-index.h index 1d111350197f..1d51e1850ed0 100644 --- a/tools/arch/x86/include/asm/msr-index.h +++ b/tools/arch/x86/include/asm/msr-index.h @@ -222,6 +222,7 @@ #define MSR_INTEGRITY_CAPS_ARRAY_BIST BIT(MSR_INTEGRITY_CAPS_ARRAY_BIST_BIT) #define MSR_INTEGRITY_CAPS_PERIODIC_BIST_BIT 4 #define MSR_INTEGRITY_CAPS_PERIODIC_BIST BIT(MSR_INTEGRITY_CAPS_PERIODIC_BIST_BIT) +#define MSR_INTEGRITY_CAPS_SAF_GEN_MASK GENMASK_ULL(10, 9) #define MSR_LBR_NHM_FROM 0x00000680 #define MSR_LBR_NHM_TO 0x000006c0 @@ -553,6 +554,7 @@ #define MSR_AMD64_CPUID_FN_1 0xc0011004 #define MSR_AMD64_LS_CFG 0xc0011020 #define MSR_AMD64_DC_CFG 0xc0011022 +#define MSR_AMD64_TW_CFG 0xc0011023 #define MSR_AMD64_DE_CFG 0xc0011029 #define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1 @@ -637,12 +639,21 @@ /* AMD Last Branch Record MSRs */ #define MSR_AMD64_LBR_SELECT 0xc000010e +/* Zen4 */ +#define MSR_ZEN4_BP_CFG 0xc001102e +#define MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT 5 + +/* Fam 19h MSRs */ +#define MSR_F19H_UMC_PERF_CTL 0xc0010800 +#define MSR_F19H_UMC_PERF_CTR 0xc0010801 + +/* Zen 2 */ +#define MSR_ZEN2_SPECTRAL_CHICKEN 0xc00110e3 +#define MSR_ZEN2_SPECTRAL_CHICKEN_BIT BIT_ULL(1) + /* Fam 17h MSRs */ #define MSR_F17H_IRPERF 0xc00000e9 -#define MSR_ZEN2_SPECTRAL_CHICKEN 0xc00110e3 -#define MSR_ZEN2_SPECTRAL_CHICKEN_BIT BIT_ULL(1) - /* Fam 16h MSRs */ #define MSR_F16H_L2I_PERF_CTL 0xc0010230 #define MSR_F16H_L2I_PERF_CTR 0xc0010231 @@ -1112,12 +1123,16 @@ #define MSR_IA32_VMX_MISC_INTEL_PT (1ULL << 14) #define MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS (1ULL << 29) #define MSR_IA32_VMX_MISC_PREEMPTION_TIMER_SCALE 0x1F -/* AMD-V MSRs */ +/* AMD-V MSRs */ #define MSR_VM_CR 0xc0010114 #define MSR_VM_IGNNE 0xc0010115 #define MSR_VM_HSAVE_PA 0xc0010117 +#define SVM_VM_CR_VALID_MASK 0x001fULL +#define SVM_VM_CR_SVM_LOCK_MASK 0x0008ULL +#define SVM_VM_CR_SVM_DIS_MASK 0x0010ULL + /* Hardware Feedback Interface */ #define MSR_IA32_HW_FEEDBACK_PTR 0x17d0 #define MSR_IA32_HW_FEEDBACK_CONFIG 0x17d1 diff --git a/tools/arch/x86/include/uapi/asm/prctl.h b/tools/arch/x86/include/uapi/asm/prctl.h index e8d7ebbca1a4..384e2cc6ac19 100644 --- a/tools/arch/x86/include/uapi/asm/prctl.h +++ b/tools/arch/x86/include/uapi/asm/prctl.h @@ -23,9 +23,21 @@ #define ARCH_MAP_VDSO_32 0x2002 #define ARCH_MAP_VDSO_64 0x2003 +/* Don't use 0x3001-0x3004 because of old glibcs */ + #define ARCH_GET_UNTAG_MASK 0x4001 #define ARCH_ENABLE_TAGGED_ADDR 0x4002 #define ARCH_GET_MAX_TAG_BITS 0x4003 #define ARCH_FORCE_TAGGED_SVA 0x4004 +#define ARCH_SHSTK_ENABLE 0x5001 +#define ARCH_SHSTK_DISABLE 0x5002 +#define ARCH_SHSTK_LOCK 0x5003 +#define ARCH_SHSTK_UNLOCK 0x5004 +#define ARCH_SHSTK_STATUS 0x5005 + +/* ARCH_SHSTK_ features bits */ +#define ARCH_SHSTK_SHSTK (1ULL << 0) +#define ARCH_SHSTK_WRSS (1ULL << 1) + #endif /* _ASM_X86_PRCTL_H */ From patchwork Tue Nov 21 22:56:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168016 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp964090vqb; Tue, 21 Nov 2023 14:58:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFoXhyXfKnEQ7uWRjhkq22IyKJlEjmKGU53x9LDHilHtt8/+thQ1Q6gQCpLueUXm9TpzwC X-Received: by 2002:a17:902:64d6:b0:1cc:87f8:96b6 with SMTP id y22-20020a17090264d600b001cc87f896b6mr577608pli.66.1700607506331; Tue, 21 Nov 2023 14:58:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607506; cv=none; d=google.com; s=arc-20160816; b=FXKaEbJsSMVVDMkwn87yjfiaurflcODNe8KS4t3CkoEglANj/sQMIjhYlQwGxdxzt2 z61YGx3HWJex8LBN56Sne+rP8aRIy+4WrmmZFq+SJz7Y4otOxswk5FtO6xohjpL5O5eC cbdgDMSXe9znJ4yYj8LaJOzclP41p+mDRYhwFHh/3vzG4Me9uEx3HM6Pg/kO3tUlbcR9 tcao4y5Ibu8v7V6XeYv33pZ1Fl7/orWqZvuEPieGg9waZh0P+cjdQ4btN11DtsbWvkUr LdQhyPkWV3UJJNwdER1t8S5rFxZdEmdf+KQTh8V3oRZyW105ZyN2RifoDSQ35Rx7UyGQ z4hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=FdcERJimN0aFkwFBjeCuGYBCdP/KZCZ/nHY+2sAtfHI=; fh=T4qncUS1Tb/KauJyoC7h8o4siNBgnYdUd8AD+jfKdrM=; b=A0wX4Jdluc53MaUgie9qORkPTbVLFYgnYO6K6rg1dcGe35hPCZuVkmIgeM8/6nCYZw HSkGUlY4T5u4XZyfLXZkgOK1lmqflNwi6VVtsa4Dexk9oTUF4MBaav08snE4+/shinld 3pjLuYUW09bmp5oHagldhGvx17mzyxi9NUtqn+rYjEZv8AHDfeAV2D1ZLAc7mjoWi4Qf ZrKsgYqrEhLq3pi5uWnPlomqIfN//4b1kxZEQV7lnKSYO7hNA8TfKeqwgT43X/6PcpSY 8RugRr5hlaKEb8nCtt+Y653UsrYjNh14akHIIny2/fQlnkY6YNorbsd3yFsL87R7hrlD 1QNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="VP62qRG/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id s7-20020a170902ea0700b001ce64a096dfsi10448696plg.502.2023.11.21.14.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:58:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="VP62qRG/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 7473B8029C73; Tue, 21 Nov 2023 14:57:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234834AbjKUW5W (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234860AbjKUW5P (ORCPT ); Tue, 21 Nov 2023 17:57:15 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D623D54; Tue, 21 Nov 2023 14:57:03 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1cf6a67e290so17791685ad.1; Tue, 21 Nov 2023 14:57:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607423; x=1701212223; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=FdcERJimN0aFkwFBjeCuGYBCdP/KZCZ/nHY+2sAtfHI=; b=VP62qRG/cgY5aW7Qfvd61YcYheRlSx1hG8yVBA8EsTqupF6Ee2CpS8o1bA02/w376r 2cEdSIA49SGU1RXNUgHD6BHSnXcnkQwj8/rOOeCxl3k/yIyMqng/ELuVD1x+O/17wik6 IQca4uQjCEihCaYxnV58/f3Ifp0YczUln3NC/gtQ+VVwNJK6uV4AjWme4LLG836kYB2O QPjbUwkcDcEjhzYrYnwd6xmpOUuwv/k9yQZjw6GaaRhfETJsKLU9k0B2X4G1ZlfcdJoF 8kKj60CeTtej/3sYlvmUDT+v7TvMeR4XcrmnSjjlriHHQUwJFtMTfnTctz9n8a1ATDRX wI3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607423; x=1701212223; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=FdcERJimN0aFkwFBjeCuGYBCdP/KZCZ/nHY+2sAtfHI=; b=Lwr7M8pm8cFYED7mHMYk+sLrgwTqwREYG3orZBIZLsGmQGvBPxl8J6qVfRUSfDNPmR nNzt6HnZI4vltclFMrt67ImqDatGzvHk69xZCNmbxKGXT47YoNpKMcHPvRJltyC+WkdD 1oj3b6l66hOJ5qv/cTUvB+aqBePicu0TkWLbulkT1Y3lgZ/L6o3gScLTYridsHxF3dR1 NbnZomup6rV02WAumDfFtEGv5WPnC/6bCp3EylewVLmbhLYkBtHN7e8iMVzPno16KNP/ OycF3jVYkkGr/ybcw8hF8K7JenyeS6ur+miTYYzoFGS9KROccAxRXDPuxLf0gfsg0+Ih u5mQ== X-Gm-Message-State: AOJu0YwPPDpUbYEw8z4oa81jKpCnUMDguYNf8UC0XWVjZx9BedAzKrYX QOI83gYToJK+w00DfxItWNY= X-Received: by 2002:a17:902:f811:b0:1cc:6dd4:5955 with SMTP id ix17-20020a170902f81100b001cc6dd45955mr663004plb.19.1700607422906; Tue, 21 Nov 2023 14:57:02 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.57.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:57:02 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: [PATCH 09/14] tools headers: Update tools's copy of arm64/asm headers Date: Tue, 21 Nov 2023 14:56:44 -0800 Message-ID: <20231121225650.390246-9-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:58 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216216261576243 X-GMAIL-MSGID: 1783216216261576243 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Namhyung Kim --- tools/arch/arm64/include/asm/cputype.h | 5 ++- tools/arch/arm64/include/uapi/asm/kvm.h | 32 +++++++++++++++++++ tools/arch/arm64/include/uapi/asm/perf_regs.h | 10 +++--- 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/tools/arch/arm64/include/asm/cputype.h b/tools/arch/arm64/include/asm/cputype.h index 5f6f84837a49..7c7493cb571f 100644 --- a/tools/arch/arm64/include/asm/cputype.h +++ b/tools/arch/arm64/include/asm/cputype.h @@ -79,13 +79,15 @@ #define ARM_CPU_PART_CORTEX_A78AE 0xD42 #define ARM_CPU_PART_CORTEX_X1 0xD44 #define ARM_CPU_PART_CORTEX_A510 0xD46 +#define ARM_CPU_PART_CORTEX_A520 0xD80 #define ARM_CPU_PART_CORTEX_A710 0xD47 #define ARM_CPU_PART_CORTEX_A715 0xD4D #define ARM_CPU_PART_CORTEX_X2 0xD48 #define ARM_CPU_PART_NEOVERSE_N2 0xD49 #define ARM_CPU_PART_CORTEX_A78C 0xD4B -#define APM_CPU_PART_POTENZA 0x000 +#define APM_CPU_PART_XGENE 0x000 +#define APM_CPU_VAR_POTENZA 0x00 #define CAVIUM_CPU_PART_THUNDERX 0x0A1 #define CAVIUM_CPU_PART_THUNDERX_81XX 0x0A2 @@ -148,6 +150,7 @@ #define MIDR_CORTEX_A78AE MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78AE) #define MIDR_CORTEX_X1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X1) #define MIDR_CORTEX_A510 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A510) +#define MIDR_CORTEX_A520 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A520) #define MIDR_CORTEX_A710 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A710) #define MIDR_CORTEX_A715 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A715) #define MIDR_CORTEX_X2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X2) diff --git a/tools/arch/arm64/include/uapi/asm/kvm.h b/tools/arch/arm64/include/uapi/asm/kvm.h index f7ddd73a8c0f..89d2fc872d9f 100644 --- a/tools/arch/arm64/include/uapi/asm/kvm.h +++ b/tools/arch/arm64/include/uapi/asm/kvm.h @@ -505,6 +505,38 @@ struct kvm_smccc_filter { #define KVM_HYPERCALL_EXIT_SMC (1U << 0) #define KVM_HYPERCALL_EXIT_16BIT (1U << 1) +/* + * Get feature ID registers userspace writable mask. + * + * From DDI0487J.a, D19.2.66 ("ID_AA64MMFR2_EL1, AArch64 Memory Model + * Feature Register 2"): + * + * "The Feature ID space is defined as the System register space in + * AArch64 with op0==3, op1=={0, 1, 3}, CRn==0, CRm=={0-7}, + * op2=={0-7}." + * + * This covers all currently known R/O registers that indicate + * anything useful feature wise, including the ID registers. + * + * If we ever need to introduce a new range, it will be described as + * such in the range field. + */ +#define KVM_ARM_FEATURE_ID_RANGE_IDX(op0, op1, crn, crm, op2) \ + ({ \ + __u64 __op1 = (op1) & 3; \ + __op1 -= (__op1 == 3); \ + (__op1 << 6 | ((crm) & 7) << 3 | (op2)); \ + }) + +#define KVM_ARM_FEATURE_ID_RANGE 0 +#define KVM_ARM_FEATURE_ID_RANGE_SIZE (3 * 8 * 8) + +struct reg_mask_range { + __u64 addr; /* Pointer to mask array */ + __u32 range; /* Requested range */ + __u32 reserved[13]; +}; + #endif #endif /* __ARM_KVM_H__ */ diff --git a/tools/arch/arm64/include/uapi/asm/perf_regs.h b/tools/arch/arm64/include/uapi/asm/perf_regs.h index fd157f46727e..86e556429e0e 100644 --- a/tools/arch/arm64/include/uapi/asm/perf_regs.h +++ b/tools/arch/arm64/include/uapi/asm/perf_regs.h @@ -36,11 +36,13 @@ enum perf_event_arm_regs { PERF_REG_ARM64_LR, PERF_REG_ARM64_SP, PERF_REG_ARM64_PC, + PERF_REG_ARM64_MAX, /* Extended/pseudo registers */ - PERF_REG_ARM64_VG = 46, // SVE Vector Granule - - PERF_REG_ARM64_MAX = PERF_REG_ARM64_PC + 1, - PERF_REG_ARM64_EXTENDED_MAX = PERF_REG_ARM64_VG + 1 + PERF_REG_ARM64_VG = 46, /* SVE Vector Granule */ + PERF_REG_ARM64_EXTENDED_MAX }; + +#define PERF_REG_EXTENDED_MASK (1ULL << PERF_REG_ARM64_VG) + #endif /* _ASM_ARM64_PERF_REGS_H */ From patchwork Tue Nov 21 22:56:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168025 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp964337vqb; Tue, 21 Nov 2023 14:59:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGxY/L++ddrohaFcUlJg7XPgx//3c6LO70369L9hsHibzAywvpvt9rNJvSQljHayPXTKxu X-Received: by 2002:a05:6830:1e8b:b0:6b9:9bcd:32fe with SMTP id n11-20020a0568301e8b00b006b99bcd32femr866720otr.17.1700607549467; Tue, 21 Nov 2023 14:59:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607549; cv=none; d=google.com; s=arc-20160816; b=Ey5VXdsTelQhI/WvFkR3/ORUB/w0tkZSwGgXxuGEy4fsZgWeY0GHRo8qgU6ixcR+xH /r5NnyuJxQVUQMlXXvfIDoK/lUl6pcCLqI7y8eYAXdE1H2oJL8lKwXkGi8MwLW5KKMRg 2ibBcXXk2EDoJ79EiEqL2I+kWRTUITnvyOo4IC+RKO0F6GgHnmPAl7aYqfuNorL9eRxR BCjGkwYtbwpXfl1zrd8+vDOhw/xxzn1zWsobp+dmVRijsCnx64Z9VD6T73q6gKBV+YXw o1jV1VkwwUQjRFpzS0njENhMCYo3XAJZks3gbTqbbcl4KSOa1c2vPl1p2L2pzKWbBZy/ GV6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=I57gFn6zue+8kkqtl3RkaJdXFKQmQ2JzNCRbeVy0Nms=; fh=8laUW2lKXPZPkSCSoRktf/yqRUorVNp+viEpWXz17ws=; b=wPEJaPfonQcktmWlQJHVh6l5xWk17NG+KAuOafH/0gYLrPynSvO/W1c8dwVu7ME/C3 Ps46Ro9aHIXw8sBZmGdjO9MLYhqRnj3FoH8ubEtIwpRr4KtuC9XlOf90e66aUPim+dTq E44QnfGPJVglRLFWCH5dWT4fm/ZgX1Qw6YeicCogfAFlJrZbvQvPnEdm9laNH3bB+Bff cRc29cc9+MBCpHxYaeuprmd2NMXxTfg1X3CDo6TU9khBCa4/lMrOaT0c9MdUauJLuSXi 7RkDAaYf3D4ATHSdqN9Bb5/sFKywH1AUvHoaA7ZJ9jMufVCK13D+0Ct+zStPrfDpQB0o VFLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="AsI6Y/xq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id 9-20020a630b09000000b005b91192c628si11564732pgl.369.2023.11.21.14.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:59:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="AsI6Y/xq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D84AA802C7F6; Tue, 21 Nov 2023 14:57:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234853AbjKUW5c (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234870AbjKUW5P (ORCPT ); Tue, 21 Nov 2023 17:57:15 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFBD6D66; Tue, 21 Nov 2023 14:57:04 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1cf61eed213so21970015ad.2; Tue, 21 Nov 2023 14:57:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607424; x=1701212224; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=I57gFn6zue+8kkqtl3RkaJdXFKQmQ2JzNCRbeVy0Nms=; b=AsI6Y/xq1hApC5U573N785n6W1i92im6qE3TjL7pSEH1H5Df2psoWQk/D5LWLZV09M vSkDA51P06XneK4V3eUOlkDW/I8cVBdVQKdD/f6en8Po73y6z4ZdhP6uKrlaTq00VqGn i8rCqJX9GnWhW7o9OuRlr50LClbGr+SFWg/q04rtch+XWRCVUg+pwIODX7yJmpNerIwx YMFS9cKjetyg9IAx+zLnSKd3uQx9zgLVL0fgfTn6jwyl+7ncZmoVLCJsqBV5IcF6CvYM LkZfH9x7mD+K5hE/4wpte4oZ9tAYyQKvp8yPPzRC7Xx7KP4aJceMTWShirTt7NaM9EzD lEAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607424; x=1701212224; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=I57gFn6zue+8kkqtl3RkaJdXFKQmQ2JzNCRbeVy0Nms=; b=TXwL9tL33RYRU/l8tDhvQ8mQpEzFQbZG5gL6gxe0Qdld0u7dseWzLvYa1hnoMRsgbs tGH2mCp7s+5Fnl/c1A084E2HEfD1eUW3m/tUkpZLBYS/MhMUZsg//luOovBMqn+dPzSZ f2hVTTVO4EBtvbL5Iy13SbAWb3+58EARurd7eiqWt+z8yJ+1QZNWMuZdlienmb22jR3Z o6dbhZ2PFf/vs6NyI8/Jd2EHD2F/Vp4nvDok7T/d412NEwc6gvmIJq2AjxjJpvLY+JwN ybUpR/DcDj4+arvCWNIDYq/QUh/lXmT8tfgJVbXb+sncyYw4f7tHzGK3rvwyzCCxK/MS 5ZzQ== X-Gm-Message-State: AOJu0YwOh4yxa/QnxNeLEwrTNOXCdOgYTYcgdyYoYcyW4r51TASSkUTR orRXEiXvf2E/k8Cb4n/8a9NSXXgmUSo= X-Received: by 2002:a17:902:dac1:b0:1cc:4e46:3e45 with SMTP id q1-20020a170902dac100b001cc4e463e45mr708746plx.49.1700607424390; Tue, 21 Nov 2023 14:57:04 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.57.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:57:03 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org Subject: [PATCH 10/14] tools headers: Update tools's copy of s390/asm headers Date: Tue, 21 Nov 2023 14:56:45 -0800 Message-ID: <20231121225650.390246-10-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:48 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216261584203843 X-GMAIL-MSGID: 1783216261584203843 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: linux-s390@vger.kernel.org Signed-off-by: Namhyung Kim --- tools/arch/s390/include/uapi/asm/kvm.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/arch/s390/include/uapi/asm/kvm.h b/tools/arch/s390/include/uapi/asm/kvm.h index a73cf01a1606..abe926d43cbe 100644 --- a/tools/arch/s390/include/uapi/asm/kvm.h +++ b/tools/arch/s390/include/uapi/asm/kvm.h @@ -159,6 +159,22 @@ struct kvm_s390_vm_cpu_subfunc { __u8 reserved[1728]; }; +#define KVM_S390_VM_CPU_PROCESSOR_UV_FEAT_GUEST 6 +#define KVM_S390_VM_CPU_MACHINE_UV_FEAT_GUEST 7 + +#define KVM_S390_VM_CPU_UV_FEAT_NR_BITS 64 +struct kvm_s390_vm_cpu_uv_feat { + union { + struct { + __u64 : 4; + __u64 ap : 1; /* bit 4 */ + __u64 ap_intr : 1; /* bit 5 */ + __u64 : 58; + }; + __u64 feat; + }; +}; + /* kvm attributes for crypto */ #define KVM_S390_VM_CRYPTO_ENABLE_AES_KW 0 #define KVM_S390_VM_CRYPTO_ENABLE_DEA_KW 1 From patchwork Tue Nov 21 22:56:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168017 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp964129vqb; Tue, 21 Nov 2023 14:58:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IH7/XD3SSuiqOMKkPlvrBSAyyyuND8qBKRc/A+MZRz1nFg3sJTGlXEPu1BJ8u1aLi+7h9w9 X-Received: by 2002:a05:6808:1453:b0:3b2:dd7d:fc5e with SMTP id x19-20020a056808145300b003b2dd7dfc5emr953351oiv.10.1700607512301; Tue, 21 Nov 2023 14:58:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607512; cv=none; d=google.com; s=arc-20160816; b=QYvYdXIX0gEdZ8OKo7p0Qj0lebBwlWcufBvqJZ3kVwGDGXPpoRwOgT+jzxtiK8/jsD 5t57hBperw/FTXhWi0hH8a7YRKbyaWe2bfRbPxfsXh/tJKKKkMSmAZGWho2MSpJNuBbx KNiIokALDs/J/WWJdc9qA67rSiqcnW4nPC6JtiEdhl9XvMHkxfyCEBoQPpHz/tQsnZCe oM+zQ60ox0Q0g4qApdv35tT7JXnDfaty2trfgP049+9ngwXNl+TcJq/vnx8kgjgYJiSI 00msA/GOHteeNqllLV19EghRgLAM7x9XY1lVQ9LFXPRGCPs67l+ovtPly130lLC34w+m mOGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=pUB8aiMyKPdcNoGbVDTIzMhhz2GFj5TGi/+7tX7WmTs=; fh=WzTP9ACCkvIKh+P5weDUTg9elL4nAzu/kg+UEE3EdSc=; b=MbmoMNrArEoFC981uqUimn3+3+iT5ctRB8OMBERF4d9ekLfbpn3/r6RFJNHY6jA/GL Hy+qRBHOqfARSjvez1eFUX/82jcZQZ3pb6Or/SbyuUFbuFk4QNA1GQtM1kqS5J7qpfYw h0dVNmc8ZEOY8t3zssb87shSICSPEaGAps4KXR3tgmQTtQ6USQoUziVhe+tp8loeVpbl M5W8FhNPeI9gUNPIZe5cYAe4RTLZ8niT2kY6th/yPDmszTdWRfyMYpLkXdXyNXBsuIId igPmodARugWP/qAoTIIHStW3lHN5LVbyzlg6CFRzc/lB8FrWh939sTOhneNq07HtnoP0 CW4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gMtgFjnd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id b7-20020a056a00114700b006bd360e70edsi11546136pfm.103.2023.11.21.14.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:58:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gMtgFjnd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 2CCB780E9E98; Tue, 21 Nov 2023 14:58:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234947AbjKUW5h (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234801AbjKUW5U (ORCPT ); Tue, 21 Nov 2023 17:57:20 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DF5FD79; Tue, 21 Nov 2023 14:57:06 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-5c19a328797so4134139a12.3; Tue, 21 Nov 2023 14:57:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607426; x=1701212226; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=pUB8aiMyKPdcNoGbVDTIzMhhz2GFj5TGi/+7tX7WmTs=; b=gMtgFjndQKrbuWk+cdt612u0wgegfbby+5+WhsNvo2LUFQwnOp0lUQPs2JAUPe2iSm i8oq2Vi+sslnQlabivkhKO12kZ2a2WkmotbsuV5wBoMZTr9sSn/d1Js4w6oQDiSYIngo eqbqUonWPMGNs3+b4WJolNR/DPEsG3eZm9qY6N739TKISHz0DLo+0jVTcPjY81+EKsZu dX8H7nykmIXB0MRz97Jk6oGgNNBan/rWmYsTCEoaIDA1HU78lSQLvOyHIwoaAWTNblh6 ERlhbsAKjybI/TQcDyfZh5Xo+BkjIjucOuFWeSNQx+nPEduXqZZeSqXV84NcVG7fYqgS OYWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607426; x=1701212226; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pUB8aiMyKPdcNoGbVDTIzMhhz2GFj5TGi/+7tX7WmTs=; b=LKaLBphJ0Ow+6rLaliJfxNL4yq3/i5YRQ8Bt/AqqrnkszN/q6dm9gPOfZzlUWrHrpJ K/Ct+VNpKrx4RHqg8KrynlRrgqeJ/HF/H82O7Dj/m6FKnccOFMXSst2HTuc+9vpbh1Ak WywP3axm87c3dOz+oG5/5C3tQzmGaBkfq3fszXRSBmaH4kFUB0juXSjclyvN/UXk3Ijy 7oXGosUTdviIuVOlbcUuLwlKC+BLbv6WK64fOnF6+7HYdmVWQjXUEArGkcNhlXvzJSNL kJ/7wDVhwOIisz/klvbbxreiXjDGV08YhtBXjEWhKGsL3GaqyYQMCKQCPp+1PKv2Q3rw AGfA== X-Gm-Message-State: AOJu0YwElfQDwWlMmKasSlbHRyvjSScC14WefRaGSGSB7IoryweaACKG 8uH0ZqL9LQ4ihX6YX+3aH1w= X-Received: by 2002:a05:6a20:a129:b0:18a:e262:d15 with SMTP id q41-20020a056a20a12900b0018ae2620d15mr579453pzk.54.1700607425835; Tue, 21 Nov 2023 14:57:05 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.57.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:57:05 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH 11/14] tools/perf: Update tools's copy of x86 syscall table Date: Tue, 21 Nov 2023 14:56:46 -0800 Message-ID: <20231121225650.390246-11-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:58:25 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216222589766932 X-GMAIL-MSGID: 1783216222589766932 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Namhyung Kim --- tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl index 2a62eaf30d69..8cb8bf68721c 100644 --- a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +++ b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl @@ -375,6 +375,9 @@ 451 common cachestat sys_cachestat 452 common fchmodat2 sys_fchmodat2 453 64 map_shadow_stack sys_map_shadow_stack +454 common futex_wake sys_futex_wake +455 common futex_wait sys_futex_wait +456 common futex_requeue sys_futex_requeue # # Due to a historical design error, certain syscalls are numbered differently From patchwork Tue Nov 21 22:56:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168015 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp963992vqb; Tue, 21 Nov 2023 14:58:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCU7dNEOUZQSSl8iyTdwY0EwOTtF7Kii2NeMk+NQM/NxsLvU0+ssSGHFCsefZJcqOa0X+T X-Received: by 2002:a17:902:ea03:b0:1cc:474d:bdf9 with SMTP id s3-20020a170902ea0300b001cc474dbdf9mr549653plg.36.1700607487513; Tue, 21 Nov 2023 14:58:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607487; cv=none; d=google.com; s=arc-20160816; b=VtxsOPziTQSv1Z08F/iNhKGbp1aX1zXI0S+uUyg2Sjik23Nt6pnc9KMeAozHv8gnJL 5wFnjcSMmYvFVqfft/YwtelvkN8ydxFWXZqnh7i/4Y8ms7jVujpcPZC6NUYngK3eZFcN xHKSO/2RkSPspolGHjeSR1xx0WHH1dZyJQ1J8bYLouUNR+c62cVVeu6xabSDYRS0uB7P BnEbD3btATiMBUpz/lGfPr+bMjIoWhochpccuiXfmqFOldNFIZm8i5u0oTeFAA8mOWDZ zwWzmqQDOcp2+E5Y0Q7HTg6QNQTkNJrWXOtg35bnapzYzIpcWwfLkpXjk0Sp6jmFlXBZ +0Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=8cHNQWLeaX3Eaeqr4KDeKVPWKASKTSj+iTYazvJzg+8=; fh=l9kJVLk4WyFgUEv9OXiz7Xi87pR6718TOC48dH41Ceo=; b=xZFlmHX4s188hY4t3YTYEXrvyJ5OeUovi3dLjlnSlzkImt6i+UKhxXaoKzGnXKjZLY A1otyPfEOIxd80vzQy7bTSBaubqHVtZDrVZ3wfxTGnXGVwaFtnfleSB0pyRnLftrqwkE 5YcXT6hQXeQRsxur3RCtvvnFPlCioE6UTUAEzzxHEdY0v72liK9amQLQKl72n4Q5djkH Gb7BfNzRqBO1ov0jEkH3AKCXVkkD67Ov7zRzj26uA2OBqnwbtvzV3RFCD5swiFQde7wh 0P7sJMOulctmMmJGnDJPZ6JT37AP+1Z6RmDWYvPbSUO7JAd8FJsmjOSkosrEZSPZB8az mjUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=C1tKX3Hf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id z16-20020a170902d55000b001cc5420241bsi12162349plf.413.2023.11.21.14.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:58:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=C1tKX3Hf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3F68A801B98F; Tue, 21 Nov 2023 14:57:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234828AbjKUW5k (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234900AbjKUW5V (ORCPT ); Tue, 21 Nov 2023 17:57:21 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDA6DD7F; Tue, 21 Nov 2023 14:57:07 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1cc938f9612so40362495ad.1; Tue, 21 Nov 2023 14:57:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607427; x=1701212227; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=8cHNQWLeaX3Eaeqr4KDeKVPWKASKTSj+iTYazvJzg+8=; b=C1tKX3HfiozZ9T8Nlb5pgQB7+Ek4qzbmxiUg4WsZNy6giyRpzhMCTgM5E/TJ2cxHor Y+nweJUKS9zEIXEUU/iL+SWhbuYUyglXfy2PmgWfofJV+zlcyKUqNsqERGQvpNzbGSXc hWZRgtuh4ZRrzW7rJVi1EtD/A0IxrFll+PdScUTksVp/HmDp4FQmjbQk6Z+nQM6Ko1Rr opWK6pVrD6Jrnkb68okaRkbUaMmuzT7GAozmiHan1FYpljxQgTRzXZAoP+acxdBaaCEL qRg92B1ylE8cWkeIm9bDWoAzd5XhK9ZM37z8czWf1crlr3TkElLeZJgw2M436k1GC/mo K51Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607427; x=1701212227; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8cHNQWLeaX3Eaeqr4KDeKVPWKASKTSj+iTYazvJzg+8=; b=TWC6Vt72/5lXAApJM57Ak/otyP6bPlsow7ZWw/LAR/1dl2CWkCx/CGsblzEVyNnTLP obPQVSERc6tjF3dL9VOGEu4o61yKyp3U1fcGgDQpNV2Mfu77Kcfqb2el33XcPTKhIF8V kixSsvecSDYZ3hJ7aLrcw8Tm5Q4bC7FsjER8rf8zMLwHdYl2MteDtrbRNo1CyNs3B3+4 NfQh/6X6Ko9MOC14VvI9l1ttxT6xKC3Kt+l+uHWhlNi4EHx7F9ALM2DVZcKtO8ciGoln yeXXckSBnCKi4UiHce56C2y0LGC2ICUDB/nw0IG3u33DGcl4KvOnrADhhHueMSQX3mec 0yMw== X-Gm-Message-State: AOJu0Yykf9ULKAm5LmV5NoR5i0MVIFTq9zZVFzhYrfj7LlLe+4GdFMPz kbyrUevuYbl5Eb1EjsWsmfc= X-Received: by 2002:a17:903:188:b0:1cf:5782:7c74 with SMTP id z8-20020a170903018800b001cf57827c74mr805479plg.7.1700607427036; Tue, 21 Nov 2023 14:57:07 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.57.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:57:06 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Michael Ellerman , Nicholas Piggin , Christophe Leroy , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 12/14] tools/perf: Update tools's copy of powerpc syscall table Date: Tue, 21 Nov 2023 14:56:47 -0800 Message-ID: <20231121225650.390246-12-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:55 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216197182125679 X-GMAIL-MSGID: 1783216197182125679 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Namhyung Kim --- tools/perf/arch/powerpc/entry/syscalls/syscall.tbl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl b/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl index e1412519b4ad..7fab411378f2 100644 --- a/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl +++ b/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl @@ -539,3 +539,7 @@ 450 nospu set_mempolicy_home_node sys_set_mempolicy_home_node 451 common cachestat sys_cachestat 452 common fchmodat2 sys_fchmodat2 +453 common map_shadow_stack sys_ni_syscall +454 common futex_wake sys_futex_wake +455 common futex_wait sys_futex_wait +456 common futex_requeue sys_futex_requeue From patchwork Tue Nov 21 22:56:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168014 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp963988vqb; Tue, 21 Nov 2023 14:58:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IFab2PJocYEHZAxp8mD/Bo46Aoj1xpox62FNYr0IzmYHtV0Rr1g2lV+IeMvU2URZI/7jOVS X-Received: by 2002:a05:6a00:2e8d:b0:6be:5a1a:3bb8 with SMTP id fd13-20020a056a002e8d00b006be5a1a3bb8mr687591pfb.28.1700607487017; Tue, 21 Nov 2023 14:58:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607487; cv=none; d=google.com; s=arc-20160816; b=EBWyzfa1U9qa5jOaksBUYBIHFVOLODDY8OvAFAkOfybJwwz0Ce8qVubXuOgQwG8mr8 2aDFhpUtn8e5dUQLVsryJhsF8Ua1mN0F6S8/77Z5bgVFZlS7GVKUrMjpYkz6VE1BECLK caYFWHqvx/Q90Ljs7gWjQoII8MgOxgCVTGl2LHWPamERjkzBtsYGvivJ7ibfdikZ5RMA GjfW3A5fsdObjtarPA/MnDWdblSPU5lZyia6fkNjN0Wlp7c0Q5GG1dppSyC5G5HH+3iD qoaMa1TcsmasfZRFm0gm+nJvQ46Q2Qgi02uc9ItjKcrMo1Va1g2JfqxjQpmq2LIedF+c SIMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=imksGNoTkLOSWGxbTUx5c7bQ0SJEukVr1ISidEGWUC0=; fh=8laUW2lKXPZPkSCSoRktf/yqRUorVNp+viEpWXz17ws=; b=EfDQ88XY4wH6wwB96XptRICx9pPVvmkS6uEPXP5Rri3Rtb4CrFPtgsqNRttjzyARU6 qZtwBxCIHpwgP5NK3RiRkkFJayd+JYQ/QHztyLra1kw8JWXKWHt5oc1LvJpS8RpQA4iv IS8G8idwenf1z0huHwEtJoe7ySy3B6ZIkKheOz1CthbSg27L3X+kOVt+Is6/U8+SncVR 51oxn88q8oN/rQI+uKw7FTUGkuL0NFAsAizhw0QLeHStrwMJ3sZbv3IPoWbYIBaFfmHq ytby0qOsZF147PjMGSGKp7+Rur2HfPWTI4w+wLnCYmjf4dUvVca4nmnoWeNfpjRGzaPq f+aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FE5odhD+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id h3-20020a056a00170300b006cb8cf06613si5984472pfc.2.2023.11.21.14.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:58:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FE5odhD+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id AC249817C1C0; Tue, 21 Nov 2023 14:57:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234917AbjKUW5o (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234918AbjKUW53 (ORCPT ); Tue, 21 Nov 2023 17:57:29 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CD4910D5; Tue, 21 Nov 2023 14:57:09 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1cc5b705769so54214585ad.0; Tue, 21 Nov 2023 14:57:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607428; x=1701212228; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=imksGNoTkLOSWGxbTUx5c7bQ0SJEukVr1ISidEGWUC0=; b=FE5odhD+YNeYH/tP0IYFCDdRpF2jypuO8HoXkzP+quD4/FffvX3jLVcrTcnEorvRgL 08ikyRUV8E+LOtooi7raES817D2PuhKgLP+aP0AfC70rD+AFI4k4+EOdiJzYLOhfChiv ld9DYKKiWW577wGI9pW9T+aqgLzZAumo2PevwfzJISd+yHxCOrWGFe186fWHC68pvHYi MricszYYXc6pwRT+KecHe5nk2AjZQrK1OPGzZj9EgWJCnuMmIPW8E9groxuB5IH1Nmg3 9kS950i7BSWzr0ON9C4Cel1ORNonVO6cy86jUSuAbaLHaJulZ+6oSg1IVzTS1z4CGP/u 96vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607428; x=1701212228; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=imksGNoTkLOSWGxbTUx5c7bQ0SJEukVr1ISidEGWUC0=; b=Yybu0d0SSCgFemFWy3wO1KxdfMknJy5J0KU4xiAnzJ2+IyDMXtMQnsD7v3EBO5oUP8 kzb6d/W+6cezBmiQv64J1hec6xkSBjcqOb2EJ3CSikSAVGVhiJRzEdICvMNszJaNpjM1 Btlxyq8oFzS6krKsFIybR/KuKK548UNcmrH2pZqtCsiGJ5vZqJWXOugHuuZnFPc1hdo1 h7QU6gc/14gcX6SQAEX1HvUFJ0jsw8JmwfVXx+xW6U+AxdybfNSeNwk7XTmkHzcM4oxa bCMNN8ZM/EKiFjdiucB7TyahfPRfsRNC9cnW6u0QvzqZ60EEGSwLvshpP9GIByaN9zy4 zuLg== X-Gm-Message-State: AOJu0YzhvXFgTQEC2evHNOCujbAjUnDa5X79WvumFLmj98e2NTaB6UGF 3BoAgq77jXoQEIXT2o/HQqM= X-Received: by 2002:a17:902:e546:b0:1cc:5db8:7eb1 with SMTP id n6-20020a170902e54600b001cc5db87eb1mr686024plf.51.1700607428389; Tue, 21 Nov 2023 14:57:08 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.57.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:57:08 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org Subject: [PATCH 13/14] tools/perf: Update tools's copy of s390 syscall table Date: Tue, 21 Nov 2023 14:56:48 -0800 Message-ID: <20231121225650.390246-13-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:56 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216196299333720 X-GMAIL-MSGID: 1783216196299333720 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: linux-s390@vger.kernel.org Signed-off-by: Namhyung Kim --- tools/perf/arch/s390/entry/syscalls/syscall.tbl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/arch/s390/entry/syscalls/syscall.tbl b/tools/perf/arch/s390/entry/syscalls/syscall.tbl index cc0bc144b661..86fec9b080f6 100644 --- a/tools/perf/arch/s390/entry/syscalls/syscall.tbl +++ b/tools/perf/arch/s390/entry/syscalls/syscall.tbl @@ -455,3 +455,7 @@ 450 common set_mempolicy_home_node sys_set_mempolicy_home_node sys_set_mempolicy_home_node 451 common cachestat sys_cachestat sys_cachestat 452 common fchmodat2 sys_fchmodat2 sys_fchmodat2 +453 common map_shadow_stack sys_map_shadow_stack sys_map_shadow_stack +454 common futex_wake sys_futex_wake sys_futex_wake +455 common futex_wait sys_futex_wait sys_futex_wait +456 common futex_requeue sys_futex_requeue sys_futex_requeue From patchwork Tue Nov 21 22:56:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 168026 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp964361vqb; Tue, 21 Nov 2023 14:59:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEypW0t0Nd7KD9s8vzxvd0yQmeIjO63AHKxbnvc1o+hUkq4zGKswaIZxIxLQDPCXO/MHeuj X-Received: by 2002:a17:90b:3008:b0:285:34a5:1889 with SMTP id hg8-20020a17090b300800b0028534a51889mr737694pjb.15.1700607555537; Tue, 21 Nov 2023 14:59:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607555; cv=none; d=google.com; s=arc-20160816; b=brSoBqC787oCbuDdsItINFYvcsTLUUIXBo2unqJ2IklrhcI1nN9bZLZCpvdTk3o83n Z8t1mxg4AmsOEkTLmPnPdxyu+7rZ8OH2y/DjxpYJXUq0LM7AHDdT9yNjyvZTxbAa3jqq scOQTmhJXHIXYFkMsd7/4TnTAmG6a0bU7i9o8LloELAc1Y5H4EPXXznpn4lXyOmSYYQo Z9mlCwlMB5USmGexQRgzcIcvHdAqoTzwiKsxroGWZWC3AfLLPwupHQJyd6mhPDXWoXH2 Y0hXnBFI65iIleiIDOnXAYtZnwu5jSyzDWhTKMt+A/yKerEFrJGnF7VC50HnKsPjo0pD GD5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=b+EFg98kTfCiA5bJ0hLVEAxGuf511Fc6FKmEpnkyoH0=; fh=WYGch7tQPpos4RdjpRDtgMme+YkmTdvJ+UzardgrhIs=; b=L/w40nGiw/GV03etKgsYxjjm+e1gA8n7lEAt9CVpwc5e4yckElcm1WLqSEasdDKc2+ vfV7YEOH0KRfBN51uynEBAM8Ant3qdqDDa92puzm4UYYpAHmLNQN1nVzo+lVvpbgjVFL 5LxGAIJPmuyIDr2YCc6ZtXTgv9aSehUxHgktTQwnnuItftJ7+hxfNJOOPCMoqc3eDlrh zOzA0sIYFXiKpMHMScTXV8MI4jxUhxiMMJr7Yq+voA2PLLrFkzTQg7oGHg70lkwkbMG2 UumlpEOQA6+yiU/5aoNm3Xl6IziRzUG4XiQqzyd47MF/RcIwRwHr4e3R/4G9krQdcNrx xZzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="L2/RI8eu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id b13-20020a170903228d00b001cf57467ab2si7801234plh.340.2023.11.21.14.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:59:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="L2/RI8eu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 19F48801D4A9; Tue, 21 Nov 2023 14:58:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235001AbjKUW5y (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234936AbjKUW5e (ORCPT ); Tue, 21 Nov 2023 17:57:34 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F37F10EB; Tue, 21 Nov 2023 14:57:10 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-28014fed9efso4839522a91.0; Tue, 21 Nov 2023 14:57:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607429; x=1701212229; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=b+EFg98kTfCiA5bJ0hLVEAxGuf511Fc6FKmEpnkyoH0=; b=L2/RI8eud8oCzmcYHwdKZeb84WHnS+jTdlkfVv5EWu5iKAGwJpn5u62uuLjiZUSlTx EUU8yhwGcIVN4jsds3uo40iADvgcw1RndSu6dtBByu58jmW9S+U0XGvuhNcioycV+kxm V7Y349RWPC62d8wl/et5tFdUfucRx5O+OlYjdqnlOeo0zFK6g04klTYRKyW+r7tJJhnI mN21S8s2bKCr6z/KAQ3I4LcdVIDpsF/0DciH+EkaqQ6zrX3K93f5zof41x1UynDzC6xu ND4rJNTjs8TpqmppcrFqxsJ5qEn7g6NJrqkN5svizWW/uxvQGx9sAZ9VVA5JNvbB+A93 pflg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607429; x=1701212229; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=b+EFg98kTfCiA5bJ0hLVEAxGuf511Fc6FKmEpnkyoH0=; b=eOYs5kUbOmro6+9aJ3p3pwSthlHBWBfMnSZjJ68vdXwMz/I+bA0qjO5+mTpYY+H2re r6M5bzy9sw6i6iWRNp+8zeFuU+h9UB0lCEJwHwQLcQ4GcuANQvDO08afyzWwp8WlmHxR 9bXArAAZIBobsoKiJVVukzpjc7ZiWYAfZgro3iKCiEzvyqg7ehUE7kT7zllu1/mm+djG p7/U5JD+CmmETvHO9xfZK6riVvU7wSfolAaqzGR4ktZLRnMUEHUIR3nAASdB+vlfpRqT N3NiTbK3yrovEZyAIC+v8bXY1syz44SDqbGNctT4usYXS7XlSSW1n7OcyNhhxs6JiHpC kP/Q== X-Gm-Message-State: AOJu0Yzct+6vi7xRJTdZV9BpDxLfBCj+4evK8gmFJydTG3brtngH4cQn j/n4AfCgQTHhKISYpzEbb20= X-Received: by 2002:a17:90b:4ace:b0:27f:f260:ceaf with SMTP id mh14-20020a17090b4ace00b0027ff260ceafmr679899pjb.10.1700607429547; Tue, 21 Nov 2023 14:57:09 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.57.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:57:09 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Thomas Bogendoerfer , linux-mips@vger.kernel.org Subject: [PATCH 14/14] tools/perf: Update tools's copy of mips syscall table Date: Tue, 21 Nov 2023 14:56:49 -0800 Message-ID: <20231121225650.390246-14-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:58:03 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783216267702528760 X-GMAIL-MSGID: 1783216267702528760 tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Namhyung Kim --- tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl b/tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl index 80be0e98ea0c..116ff501bf92 100644 --- a/tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl +++ b/tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl @@ -367,3 +367,7 @@ 450 common set_mempolicy_home_node sys_set_mempolicy_home_node 451 n64 cachestat sys_cachestat 452 n64 fchmodat2 sys_fchmodat2 +453 n64 map_shadow_stack sys_map_shadow_stack +454 n64 futex_wake sys_futex_wake +455 n64 futex_wait sys_futex_wait +456 n64 futex_requeue sys_futex_requeue