Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1958423rdb; Wed, 31 Jan 2024 14:51:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHx1FhFc3O8UeIZHgxn1+E1XrJ+a3vQeuGZXyTbcWMXE+r32wIxeE3EA1XLZ4RDEPGRQ7Qc X-Received: by 2002:a05:6a20:e48c:b0:19a:4935:458 with SMTP id ni12-20020a056a20e48c00b0019a49350458mr2673750pzb.35.1706741484175; Wed, 31 Jan 2024 14:51:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706741484; cv=pass; d=google.com; s=arc-20160816; b=DWRw9tumGQxFGDV3mZctwIxKxDC7s3GP9H2FRKd3oGB2CV/jobb6FS9pvyGZjl9yLz XejnjDkz7UBxapBbNXmuukymjZsIhi9kKyZIv14FP0pLevxs5fxCECylFFSWoYYOqYsu c/vnCyg5/q+W+S4cuGRaUVtvUDX5EbHV8rSLKi/wU+b6WyyE6Fa3FRcq65np33gInDjC gxZ1c+m7tfeUxBYXgRdM244JAxWWEkg2+9rbaA5K49nD7zLtHc/f73POR/4y1fGyhXGu FzuCj5Bdwcmzc8BKzxud4X7tTbqZYEVx3fzteovWd70qC6BtQuIlr1Rxq9gdRj2yyt0B c4RQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=FcW4aA4QUlOADw+pKX0iGEX+H00vP76wOtrVID4JVvo=; fh=mGXww9bTGwFT/hjhCkHFTfbW90C9wFQRs95d83loX/E=; b=B4QwmWID8kRe2HX39+Dn4aahMtO92Ve34rXI5hlOQFK8mfljfgNmpnxxW15Rb/NCwS 3bPambpDbiicG3JEhGa2zIcWt6m0VW8MzfiD9y9pRd9UefMF98ldt0bjwQC/BXc8aVBP IDs+kKyuzlLkXMv4rCQAcmabM6Af5b3XDETuw3mjjB3W7dQSQG+k30SiV7xAtGmZ30fg u5kkO82Q3gCqgUuNatlf3fT9bxt5SAOIbiQTSBMxQ7U975ETVz+M+3D3pRJ/bRQpxMeM Q630SDaoraI/S2ucUkD1Gtn1RN5WlZp+yYq1xxAn087EfEJPy81lZM5yQwb+u/Tm9tI4 W85g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SveXXnsB; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-47277-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47277-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCWaUVhXqRq1Pqeoj9VEtPldkypQ9GKiLX9v68M2xw8lurBx0RlrEbrYToBmhjsjNudjElsCfSMVgzoWq0SroF4EUQddrUMK0u6oRxPT1Q== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e23-20020a637457000000b005d91365dee2si4266955pgn.646.2024.01.31.14.51.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:51:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47277-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SveXXnsB; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-47277-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47277-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BFE6F2937B4 for ; Wed, 31 Jan 2024 22:51:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D817B3BB26; Wed, 31 Jan 2024 22:50:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SveXXnsB" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73BA03B797 for ; Wed, 31 Jan 2024 22:50:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706741425; cv=none; b=kdJKIkSgjCUpucu0BeLWXOlXWuRjg4QvLykreb/GARQbDXHOof6J3VnqYWoEd704p2MFFjYbYvRT0gDXZHFKf5CS0ne25cpTilwh3UuBwA3AP0pYmbsP+jgHs934A94967xwzLLi2Pxs0z+ZvUTC/v1zK+tOio4KZVNj/P6oMvw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706741425; c=relaxed/simple; bh=AYdMEWZrrFVOE5/Y3TiS+Iapcw8zW/FHFD57cTayr5Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=Qaw65lZcz5S8p4oraaEfz4sKer74xtghQJkd4MI+OWkqMeyOdJtgkI74aMycRma6Z2+gbQC3e6WiIqEorY0w+PaeCt0JAc0/MXEL0X5SWascDv0YIW0ABZEQK8u2T52tskN+F2bBZTBcs1JxmqTb0a7BkxJUffLciIhdCsUmBOA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SveXXnsB; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706741422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FcW4aA4QUlOADw+pKX0iGEX+H00vP76wOtrVID4JVvo=; b=SveXXnsBu5hYvZ5clmg3TN6vUaNje4HL10VCW4dcW0xn9gbFKeupEfQFAnx07AI5kidcUn PscGN7S2mbGKmUSfhXM5bzgeUxLc9nK6yTaLAPGtsStoSafrzvn+8FpJ9/mIAhNUP1mgWM Pd4OUH9ga8BY84PZYhXSnCwBk8XZ2rY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-370-PhiVAquEOmSRTXpoEibaxg-1; Wed, 31 Jan 2024 17:50:11 -0500 X-MC-Unique: PhiVAquEOmSRTXpoEibaxg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 85444185A787; Wed, 31 Jan 2024 22:50:11 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 63A5D2166B31; Wed, 31 Jan 2024 22:50:11 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: dionnaglaze@google.com, seanjc@google.com Subject: [PATCH 3/3] kvm: x86: use a uapi-friendly macro for GENMASK Date: Wed, 31 Jan 2024 17:50:10 -0500 Message-Id: <20240131225010.2872733-4-pbonzini@redhat.com> In-Reply-To: <20240131225010.2872733-1-pbonzini@redhat.com> References: <20240131225010.2872733-1-pbonzini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 Change uapi header uses of GENMASK to instead use the uapi/linux/bits.h bit macros, since GENMASK is not defined in uapi headers. Signed-off-by: Paolo Bonzini --- arch/arm64/include/uapi/asm/kvm.h | 8 ++++---- arch/x86/include/uapi/asm/kvm.h | 7 ++++--- arch/x86/include/uapi/asm/kvm_para.h | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h index 89d2fc872d9f..6b8b57b97228 100644 --- a/arch/arm64/include/uapi/asm/kvm.h +++ b/arch/arm64/include/uapi/asm/kvm.h @@ -76,11 +76,11 @@ struct kvm_regs { /* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */ #define KVM_ARM_DEVICE_TYPE_SHIFT 0 -#define KVM_ARM_DEVICE_TYPE_MASK GENMASK(KVM_ARM_DEVICE_TYPE_SHIFT + 15, \ - KVM_ARM_DEVICE_TYPE_SHIFT) +#define KVM_ARM_DEVICE_TYPE_MASK __GENMASK(KVM_ARM_DEVICE_TYPE_SHIFT + 15, \ + KVM_ARM_DEVICE_TYPE_SHIFT) #define KVM_ARM_DEVICE_ID_SHIFT 16 -#define KVM_ARM_DEVICE_ID_MASK GENMASK(KVM_ARM_DEVICE_ID_SHIFT + 15, \ - KVM_ARM_DEVICE_ID_SHIFT) +#define KVM_ARM_DEVICE_ID_MASK __GENMASK(KVM_ARM_DEVICE_ID_SHIFT + 15, \ + KVM_ARM_DEVICE_ID_SHIFT) /* Supported device IDs */ #define KVM_ARM_DEVICE_VGIC_V2 0 diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include/uapi/asm/kvm.h index 9ae91a21ffea..bd36d74b593b 100644 --- a/arch/x86/include/uapi/asm/kvm.h +++ b/arch/x86/include/uapi/asm/kvm.h @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -550,9 +551,9 @@ struct kvm_pmu_event_filter { ((__u64)(!!(exclude)) << 55)) #define KVM_PMU_MASKED_ENTRY_EVENT_SELECT \ - (GENMASK_ULL(7, 0) | GENMASK_ULL(35, 32)) -#define KVM_PMU_MASKED_ENTRY_UMASK_MASK (GENMASK_ULL(63, 56)) -#define KVM_PMU_MASKED_ENTRY_UMASK_MATCH (GENMASK_ULL(15, 8)) + (__GENMASK_ULL(7, 0) | __GENMASK_ULL(35, 32)) +#define KVM_PMU_MASKED_ENTRY_UMASK_MASK (__GENMASK_ULL(63, 56)) +#define KVM_PMU_MASKED_ENTRY_UMASK_MATCH (__GENMASK_ULL(15, 8)) #define KVM_PMU_MASKED_ENTRY_EXCLUDE (_BITULL(55)) #define KVM_PMU_MASKED_ENTRY_UMASK_MASK_SHIFT (56) diff --git a/arch/x86/include/uapi/asm/kvm_para.h b/arch/x86/include/uapi/asm/kvm_para.h index 6e64b27b2c1e..6bc3456a8ebf 100644 --- a/arch/x86/include/uapi/asm/kvm_para.h +++ b/arch/x86/include/uapi/asm/kvm_para.h @@ -92,7 +92,7 @@ struct kvm_clock_pairing { #define KVM_ASYNC_PF_DELIVERY_AS_INT (1 << 3) /* MSR_KVM_ASYNC_PF_INT */ -#define KVM_ASYNC_PF_VEC_MASK GENMASK(7, 0) +#define KVM_ASYNC_PF_VEC_MASK __GENMASK(7, 0) /* MSR_KVM_MIGRATION_CONTROL */ #define KVM_MIGRATION_READY (1 << 0) -- 2.39.0