Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1958290rdb; Wed, 31 Jan 2024 14:51:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGNk7vULiY/RV4PtG9dfowurXyWPtOFuBdPaxmXqy6evN1Me6baswblqoZA6IaG4sJCJ301 X-Received: by 2002:ac8:5a84:0:b0:42a:4350:64c7 with SMTP id c4-20020ac85a84000000b0042a435064c7mr3352508qtc.68.1706741465041; Wed, 31 Jan 2024 14:51:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706741465; cv=pass; d=google.com; s=arc-20160816; b=I7MTerG7hOkuy3F+ZRt5G95yPgk4r4Y+/PflHo0DKh73MId63ky3tuzHxYjBy9oi7C +4sJfAjKb8IfQkXTy6ko2XDinTLbBeztuaNUer3X7XyXrmRZo/jo4RyZs66hKewANLtM dmIjZ5ris3Yctg2lEszFkPPMD7fYjWFi2ufP6woLm++XnoYy3kmuDObY1NLo9DReTUhV rYWAQ9BdbjdvuIVnBwUq+Obccc5qfczpzVTuTxsUZ/pRURT++cKBYAQXMai44V1plxJx sZ+I0vOtiAuuJh1fzLoSUxDUlwlsgRcOHNNYrwwsv+FMU+m4sDIBR/bvxysd7RvNA/+c NSBw== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=pvCHdlS/17NOGeP+h3aQQiZmVhEUhvCy/DRXsIIS27s=; fh=vndYC92YRcQVz9TSDOFO2SMYD2AFMdZFyymio/MiieE=; b=I45mQ5VE/9EQ0Gj8d6FSvccvfUEVW2Dr4iKUAag0RHDIEI0MFVlRTazLnRjoxhlXeL usOP48C7BHCAF0cxVWcyWK3QNB6H0pSfD4nZsa+IH21oUNljVF0SKqmiNEmFjyukd5fZ qB464PBc8a/PlWeOgGjA0wjfiutIuMirb0DGb25w4Krbt3bJ38/3ajhQiX3nvtlByUM5 8V5iNayTkvnO6hj0L1oOMCy3nRC8kum1Qg8O85+lv6CUwSpNe8jPyQkvOqqaU4kFe1pz OduqLN4wtUjpnybsLDa5KSiojtxPHlIm13ldTok7ApHaX1kWeFdgr01QrGfEluH86AB1 Y3QQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cGKUiRhq; 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-47276-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47276-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; AJvYcCVe19ju5jH97XVv0+BRIuLz2usP/YXPiy12DWOVOklLDK7QkJ6so/TW2iyrEqLnf9rbHwUHZ5jSqBO2Pp58Gx1GaGi4OyhWuY1NXwymog== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c6-20020ac87d86000000b0042bf41509b3si40316qtd.53.2024.01.31.14.51.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:51:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47276-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cGKUiRhq; 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-47276-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47276-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DAE071C24604 for ; Wed, 31 Jan 2024 22:51:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1CF23B287; Wed, 31 Jan 2024 22:50:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cGKUiRhq" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 613A43A8DA for ; Wed, 31 Jan 2024 22:50:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706741420; cv=none; b=Dh25vohqIs/on6xX5ldNtsuOFZaeYmqR9VXDpJ/sTw3BuLfAtcx7HORGksJBW6DTU9fr76XCZSeyeTBlQTaJuzXIedUodwwdJ18V99OJhAPyx+4Fm8gnprsKJUvMYN4eb/qe06HX1efBzc2fNETffNx/ot755rehYtlPVcngKN0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706741420; c=relaxed/simple; bh=tyhKQEGxoc+5LKT2qa+NyC+5aGWDrPkCzeF83mjdXcs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=Vo0axW7S46N0XOxhgVv2rPgVMpyYktWPADXmIyoI7Phti+mVA1iEl3tEJ7cMglY6Dd+0lh/Q/Jj1s7SP7EgvUjN4H7ighYk1RrVGvyzhZclkeN10zMtfssFcFPRnsJg1/DyMsRHoLWy/smlOPFZrMRudVxND1HdqMgVyTJjplQQ= 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=cGKUiRhq; arc=none smtp.client-ip=170.10.129.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=1706741418; 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; bh=pvCHdlS/17NOGeP+h3aQQiZmVhEUhvCy/DRXsIIS27s=; b=cGKUiRhq89xdP3EM0mk7sTKv67HS38hqUDEKks4VuD2ibEgMXcW+venAWAbjerJbmp0zXH nkbubm4Z9tp4UqNG5FmF3UxQRh1JeeDifCdtUGYpAwcjdKhq6uCoqW5T5iXWVAOcvlCAkf drPHUYq1ODblOWlKE6ywbGdDMiKSFLU= 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-563-Z0eXEX_7P7-_-D6qfxh7Pw-1; Wed, 31 Jan 2024 17:50:11 -0500 X-MC-Unique: Z0eXEX_7P7-_-D6qfxh7Pw-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 07FE6101A526; 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 D841E2166B31; Wed, 31 Jan 2024 22:50:10 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: dionnaglaze@google.com, seanjc@google.com Subject: [PATCH 0/3] kvm: x86: fix macros that are not usable from userspace Date: Wed, 31 Jan 2024 17:50:07 -0500 Message-Id: <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 uapi headers cannot use BIT or GENMASK (or the corresponding long long versions), since those macros are not defined in uapi headers. Instead, it is possible to use _BITUL/_BITULL, or the __GENMASK and __GENMASK_ULL introduced at the beginning of this series. Paolo Dionna Glaze (1): kvm: x86: use a uapi-friendly macro for BIT Paolo Bonzini (2): uapi: introduce uapi-friendly macros for GENMASK kvm: x86: use a uapi-friendly macro for GENMASK arch/arm64/include/uapi/asm/kvm.h | 8 ++++---- arch/x86/include/uapi/asm/kvm.h | 14 ++++++++------ arch/x86/include/uapi/asm/kvm_para.h | 2 +- include/linux/bits.h | 8 +------- include/uapi/asm-generic/bitsperlong.h | 4 ++++ include/uapi/linux/bits.h | 15 +++++++++++++++ 6 files changed, 33 insertions(+), 18 deletions(-) create mode 100644 include/uapi/linux/bits.h -- 2.39.0