From patchwork Mon Jan 2 14:22:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 38127 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4186072wrt; Mon, 2 Jan 2023 06:40:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXsDi/BAtqBJnbLHR35c5zz2w5Yr9KU6FmbG185OK5OWA/Gav0dD4W3Wkci5GjUZZQR74x0Q X-Received: by 2002:a05:6402:5cf:b0:48d:3975:2d98 with SMTP id n15-20020a05640205cf00b0048d39752d98mr1434641edx.2.1672670436615; Mon, 02 Jan 2023 06:40:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672670436; cv=none; d=google.com; s=arc-20160816; b=cu1FGA55EQLN3P6e8MvBiGHj8E9RSody9OxgGimLlfrLnKe7yP+Ot7CcIyVZlgvOGm Fphtm1omg3vg/+nIgOsq1JnOlS4aO+Aerb5h2rCDDwnTqdcE8tuk50Os4jwovnXiOpqC xKUJHlmZ7LhWcZ3op+VFmat3n/hjjxl0HHg750y7y2eAzONRqUm8sVpOXyRYb0JwfB/I 7lAtewJGA71HXjq/sUj93BK+HcXp9v6FvXV4jKAGfWSu2pzOFG4nOY0a+yh3kKBOkExD BP6chXO0MSBV3NvH1VlLUMTFfBpk+T9OyZtjOtufN3OMiJ48IUvzJOYU+7EzC+c9mysJ 5N6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=iaZfNLFhmpbpKVJO0OmtZ0VPm6kPsdoajaN14ButeJU=; b=R9wznDVrWhO0nuI+tOn7Yu+C7FFrrs6a1dsry27yY0xl2TiLINiTSJSOR2PcOr/4f2 467fzxATi/5koX23zcpQLDitc8l0l3rIiXZvWgkuhMbTho/kdNMPDvNTr6k4zRj7Cz2x 2s94iMopP8rGVoiQkD6X3VVeLfnW4fdX4XrfbYy3RHmsMFay/IPsDABNN2Z7cj/cpAhR A6Z5Xcj3mReyhtSu5PcHWEPcvlk9lPiZq5PKEz2e/emGi4MvF7JsowEMS3F3CFVoMTs2 A/Roz9lgKwzWpLe8jU4xlSwAaPvTTMpHkrHUkvHoETSifYIjeLfy50dsLRhMpOTypOkB pPPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dz4fb4lS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b1-20020a50ccc1000000b0046cc4440fbasi24215718edj.434.2023.01.02.06.40.11; Mon, 02 Jan 2023 06:40:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dz4fb4lS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236098AbjABOWO (ORCPT + 99 others); Mon, 2 Jan 2023 09:22:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230133AbjABOWN (ORCPT ); Mon, 2 Jan 2023 09:22:13 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C06566430 for ; Mon, 2 Jan 2023 06:22:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3058960FCC for ; Mon, 2 Jan 2023 14:22:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61165C433D2; Mon, 2 Jan 2023 14:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672669331; bh=VfMD8RDW2VxniDqFWHUmTDlVNvUxpQS/SZfN7ZYTQ1g=; h=Date:From:To:Cc:Subject:From; b=Dz4fb4lSOFbAJZ3oPmkJqNmf73uHi+hYArktB9+dYcJS6cWvVaheI/3Md1CGmA/AY fa7QhxAQ6tRZ2JeWuop1BmRGS1WqQidq40QlBqYLdUD/eEEcMU7mZ1ufFQ1rCU0Fb1 XHvty0uZfMmV5y4j5CCTLqWT4BtLbMKxXMX2tdH7jJKBsD31OO7Dfr8RV35jnWIw5T 2ipg9bLl7Hr9mYwu0d5LlRjU6bPBH2E6buSw0/zBaVzOlszvtbl0+HZ0f8l+Py/SQq vVTGis5s1RLJidrFk3UrNyeY0ADw1j3ALyzNnW0njNnk2OXW5lbgswbK9XBsx6SY+h 1V8O98JaAgCLw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id B577640468; Mon, 2 Jan 2023 11:22:07 -0300 (-03) Date: Mon, 2 Jan 2023 11:22:07 -0300 From: Arnaldo Carvalho de Melo To: linux-kernel@vger.kernel.org Cc: David Woodhouse , Paolo Bonzini , Adrian Hunter , Ian Rogers , Jiri Olsa , Namhyung Kim Subject: [PATCH 1/1 fyi] tools headers UAPI: Sync linux/kvm.h with the kernel sources Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753922075494941059?= X-GMAIL-MSGID: =?utf-8?q?1753922075494941059?= tldr; Just FYI, I'm carrying this on the perf tools tree. - Arnaldo 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. --- To pick the changes in: b0305c1e0e27ad91 ("KVM: x86/xen: Add KVM_XEN_INVALID_GPA and KVM_XEN_INVALID_GFN to uapi") That just rebuilds perf, as these patches don't add any new KVM ioctl to be harvested for the the 'perf trace' ioctl syscall argument beautifiers. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h' diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Cc: David Woodhouse Cc: Paolo Bonzini Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/ Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/uapi/linux/kvm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h index 20522d4ba1e0d8b0..55155e262646e5fc 100644 --- a/tools/include/uapi/linux/kvm.h +++ b/tools/include/uapi/linux/kvm.h @@ -1767,6 +1767,7 @@ struct kvm_xen_hvm_attr { __u8 runstate_update_flag; struct { __u64 gfn; +#define KVM_XEN_INVALID_GFN ((__u64)-1) } shared_info; struct { __u32 send_port; @@ -1798,6 +1799,7 @@ struct kvm_xen_hvm_attr { } u; }; + /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO */ #define KVM_XEN_ATTR_TYPE_LONG_MODE 0x0 #define KVM_XEN_ATTR_TYPE_SHARED_INFO 0x1 @@ -1823,6 +1825,7 @@ struct kvm_xen_vcpu_attr { __u16 pad[3]; union { __u64 gpa; +#define KVM_XEN_INVALID_GPA ((__u64)-1) __u64 pad[8]; struct { __u64 state;