Message ID | 20240131225010.2872733-1-pbonzini@redhat.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-47276-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp82547dyc; Wed, 31 Jan 2024 15:12:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6eO7FxVuhORqDF94+PYZDbzmi360cN1T8AwprVjhIUbt2Pam1+AebhC37iwPAKeIR1TWj X-Received: by 2002:a17:903:2342:b0:1d9:451e:4365 with SMTP id c2-20020a170903234200b001d9451e4365mr1149552plh.48.1706742752139; Wed, 31 Jan 2024 15:12:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706742752; cv=pass; d=google.com; s=arc-20160816; b=uCxH8uWcLUVhirICbDbH0J8uK5HIuaAv17VbOaGdMDUC1kYaKR4WfvbeHBszNgj7y0 LEtp6GufEAA0BP4orzLRDeUnX6xtLH3HEWXyxIinLODIW1po39epCuls2gfbYh8Fu+L1 cI3UcWUzp9LiKN0yfip2PG23R9rjJ3SOWtZmxwf6YBnIaj1ELCmnsUImxoO9oq54TsS5 QiUxOFyJHVYiEx9BPFx3oYN9C92Hgm+Ao8nH6CIFuAlZavWrFQgbnONMIQ+pdqxZ1Fsb gdx3K7Y4YNgkQWYcu/Y/08SEXnOeQ3+IjCCeXmmHdjRjLUd1RZZWkrXtZ18sKt17ysFS Vf+Q== 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=WJEi04ZWDqeMtOSeF0kMNUlUZmPR3SwwI9rn4qHTPgM=; b=ERnMoYkAm5ckukp2tfkHJUHwM7G66XVhj5DphswKmVcUVlmD8vJNh3KVNkc8Id59GF S8VSVLjdk5ag2Ol/intr/FIGPPlU//xkAxXwf5utVCJToAyPTQGpQGjgRRDrX4eJXE0k sjii+RIqHJ6WwB20qdfowwid4OC6azyVUlJRQs6ZrB+05yQ5Mbl+Sl6i/LgiRqTNGFD6 pQLht5zswZvscqnfGxa97wHW/5MEfAmr4zKzaPY4Qg6m31ruv6vjncnjC7/O//srC2rt ZN1EV5oRxRCxFL70b2lRnJrM2SLx6ID3f71u8gblb2E+QG3bqYfY9E+AshFilA+e0Cdy XWtQ==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47276-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCWipKMrah0Pzbqqy/Gadz3+4YoyO2MM5oLpBfU2RL90VJ4lumPjoRn/dy//Z7O8myICo7d3qR16FjzjFmdkw+kzmr7N0w== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u16-20020a170902e81000b001d9259b5713si3194254plg.38.2024.01.31.15.12.31 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 15:12:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47276-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47276-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DEE77B25193 for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 22:51:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91E3B3B79E; Wed, 31 Jan 2024 22:50:23 +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 <linux-kernel@vger.kernel.org>; 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 <pbonzini@redhat.com> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789649488054194630 X-GMAIL-MSGID: 1789649488054194630 |
Series |
kvm: x86: fix macros that are not usable from userspace
|
|
Message
Paolo Bonzini
Jan. 31, 2024, 10:50 p.m. UTC
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