From patchwork Tue Jul 11 15:36:26 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: 118622 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp587591vqm; Tue, 11 Jul 2023 09:07:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlGkg8xh3ejJjRPmEe/8Oz6tmOJ8Ko+W8FdlTbYt3RX71C14NfsyfXGUlDUGSGV1xaAZGaEa X-Received: by 2002:a05:6a00:84a:b0:67b:a681:4ab2 with SMTP id q10-20020a056a00084a00b0067ba6814ab2mr17419152pfk.25.1689091621468; Tue, 11 Jul 2023 09:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689091621; cv=none; d=google.com; s=arc-20160816; b=sNb/iCdA4OoDY8x0dx+DKKQd7tjG2jbkDT91WHHe3nLkI8DLqjM195ABHoJW8IZR2S IxvQNgAv031firGuUnv+0cq0bIp73mKOopaoI7sEfdDEc20JWfd5FjDb6JEv7Iqn9Vio fmcxFWilBP4RIhKX7UXoOvONPC1oToCGnbatMpTnCPKpGSiLEZdwHGWw6litO03B7v6H 6JY4OuY0xE73wCiIJtvcoRTOjS6N8M0nf6+GASlm+Yn4XQe8efxFKZhr7kRCpAWu6bXl NdIrR6ZuxnjDVlKNnEhkuGES5joHJ5LeR3loBMpWFmoFSgs1pqIdUhXqwQt7zVTvnnzP wdcg== 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=zGMx896KFMGB4pKuyHIjwoEgk6AbrI6Gxm3bVqOdhJw=; fh=eF4Qo9GfGOGJVc+UeNF1iWrokrI1akZiCLxk7R8Wq+s=; b=oU1YGeKT4cm40+in2T+s+2buihp8XD/WRMrqU59Zg/h5z+CbE84QCjQCINLKEGhXTX Sn28Pso/cGbLHroIf5FkxwpGAraWcH67qW1JR81f43V5wKRsBcv+GHxdVvwYBkqtcHoF W4kV1peyxDSsbGbTP+bwHiVidBbLdmuuk7EJhpD2CLxH/h5yf071WMFpiYjv2NEc83KL 8FCxJBO1HyzhBsq9oto0yzAUwED84fmifBiU/4pfgYHBrs694Dy5X6iPgFm/4rwkfxGf t0vwHeAernoC91vNRGytwXcb1STC1GgCc0AVero1EjpJqcOnCwUZh+uVIEO6gH4DVOaK cosA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="UFAoX/Ko"; 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 28-20020a63175c000000b00553828de1cbsi1567639pgx.791.2023.07.11.09.06.48; Tue, 11 Jul 2023 09:07:01 -0700 (PDT) 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="UFAoX/Ko"; 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 S232646AbjGKPh1 (ORCPT + 99 others); Tue, 11 Jul 2023 11:37:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232606AbjGKPg5 (ORCPT ); Tue, 11 Jul 2023 11:36:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1188619BD for ; Tue, 11 Jul 2023 08:36:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9D488614DC for ; Tue, 11 Jul 2023 15:36:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDF09C433CC; Tue, 11 Jul 2023 15:36:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689089790; bh=fpzblsPSQYpoP86N5Eq39fYdejh6sSoZdOdfkJkZF2s=; h=Date:From:To:Cc:Subject:From; b=UFAoX/KoJ4MTJqDW16Qy4ZewD6kIoJ/icPvg1Mnrvdy+bJeQzgK72oVPkqfGq54Yt PpU+l6XQAlWbCFQtsi1qah2V7H1C/r2GMZdlH2+KSD6vabNFqKsY+yGm5Joni/4U5l HSnIBUYIhhk82nWgWBtKnm1YDvsCKK5mMlkQeHejr2K0TUfPkSz8vh8y7Kn8t9WZNg zpck6twrEeunHRLtmZazsZgiX4bQCL91dg90JNkROibTGTQDv2BuKWMmcLg/2E25k9 SDk4mpfTaNZkGqJprGziLk1a9rz0arezvKYGsV9WFtHWSOokbUbEjkhxmfGhyL//pb IjInw3D2oG2dA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 02AC540516; Tue, 11 Jul 2023 12:36:26 -0300 (-03) Date: Tue, 11 Jul 2023 12:36:26 -0300 From: Arnaldo Carvalho de Melo To: linux-kernel@vger.kernel.org Cc: Adrian Hunter , Anup Patel , Binbin Wu , Ian Rogers , Jiri Olsa , Namhyung Kim , Oliver Upton , Ricardo Koller , Sean Christopherson 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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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: INBOX X-GMAIL-THRID: 1771140936432226941 X-GMAIL-MSGID: 1771140936432226941 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: 89d01306e34d6ace ("RISC-V: KVM: Implement device interface for AIA irqchip") 22725266bdf95bdd ("KVM: Fix comment for KVM_ENABLE_CAP") 2f440b72e852be42 ("KVM: arm64: Add KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE") 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 addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Cc: Adrian Hunter Cc: Anup Patel Cc: Binbin Wu Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Oliver Upton Cc: Ricardo Koller Cc: Sean Christopherson Link: https://lore.kernel.org/lkml/ Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/uapi/linux/kvm.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h index 737318b1c1d9a163..f089ab290978450e 100644 --- a/tools/include/uapi/linux/kvm.h +++ b/tools/include/uapi/linux/kvm.h @@ -1190,6 +1190,8 @@ struct kvm_ppc_resize_hpt { #define KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP 225 #define KVM_CAP_PMU_EVENT_MASKED_EVENTS 226 #define KVM_CAP_COUNTER_OFFSET 227 +#define KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE 228 +#define KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES 229 #ifdef KVM_CAP_IRQ_ROUTING @@ -1442,6 +1444,8 @@ enum kvm_device_type { #define KVM_DEV_TYPE_XIVE KVM_DEV_TYPE_XIVE KVM_DEV_TYPE_ARM_PV_TIME, #define KVM_DEV_TYPE_ARM_PV_TIME KVM_DEV_TYPE_ARM_PV_TIME + KVM_DEV_TYPE_RISCV_AIA, +#define KVM_DEV_TYPE_RISCV_AIA KVM_DEV_TYPE_RISCV_AIA KVM_DEV_TYPE_MAX, }; @@ -1613,7 +1617,7 @@ struct kvm_s390_ucas_mapping { #define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs) #define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs) /* - * vcpu version available with KVM_ENABLE_CAP + * vcpu version available with KVM_CAP_ENABLE_CAP * vm version available with KVM_CAP_ENABLE_CAP_VM */ #define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap)