Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3379080pxj; Mon, 24 May 2021 05:30:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYS4+ZVBbAvMcdWyW6QR763iZZr83JpIhL59qxfIMXjeFk6R9CHpt5Ec4YSsClm9wZ6YDi X-Received: by 2002:a17:906:1f54:: with SMTP id d20mr22644939ejk.94.1621859434375; Mon, 24 May 2021 05:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621859434; cv=none; d=google.com; s=arc-20160816; b=irwa5RQxfT4C1HsesStR21fxkPpSsq3MAohCXU4H16f1onRXBJMGI7ousgjKi2cbLt 9bYHuRAa083RJWQrnnOkotzlzRPh+qVaXdDepXuOYSmGd/gQWwZQ6S9X1vKoMSpEPAZ1 rPajL4vbvYEWwg80t226hXf0SNnkz1lQAQt6FeC3D8otHvWBUhP/MAlNG9dCCkjs1V1T P2gTyWnjLYqKED7nihf3Qjpqf72mpO9VqTAAzuYaWQl7lizpeFrczX4X0XB9BOm4gw2Q ZUbQUHj0bprKbyIJ6s+qCqbGjRUez5wf42pf38KA78QabFkjcDEtN19BCrIbAinT6Po4 Wj2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=P4X7Q6cOoCe0hTVDV5ljv+76y3e0rtVo1k13v34nVV8=; b=fKGuD73ntrfLX8x2d3bndDS5zaT9EeyyP8bz6rQqC7ca37C4izYDfrLjxnjOXuvNkg SUHsE6qRpkFSe+SCpw7BBe/cTBkqtj+/nN5ous7UJrvR5GMo+uLvVXCGtUieL/PKX4Ai Iil2cNnnSpRRfVQmigtrhNkST+Yj/woyWhwKWfEftDX6UMOhiHi3BN+UDJ8EW7YDqT2U mr8HPw0wE7e9zW0wrVd6ozaG35bQceWut7OqTQX9ueXFcTLI8c//tZcpc7k0C8DbILuU HdlrgUuejMkdCObLjneqJ0p1ZocEX46aVTsyCUjeycj7aodSxM3t5ZhDYQ8aKNAEAOEf rHOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Kd6M9als; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de13si10222278edb.343.2021.05.24.05.30.10; Mon, 24 May 2021 05:30:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Kd6M9als; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232692AbhEXMaU (ORCPT + 99 others); Mon, 24 May 2021 08:30:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:42214 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232543AbhEXMaU (ORCPT ); Mon, 24 May 2021 08:30:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621859332; 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=P4X7Q6cOoCe0hTVDV5ljv+76y3e0rtVo1k13v34nVV8=; b=Kd6M9alsezLbMQXgm0tRcOlY2PjmM1vGez3SplbHjDy7W/ASjkTCmsryVHUyEC78IglyYQ 9pYWctN909w+KlBbjhC7nIoVnQjdBPJE7M/d986xM+PzAe7BLcRURoi8J9z4tyoIkjEVeW 30si4/kwsUtvESDAbozZoL1xbNa3dls= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-488-F9HlAYbFNvqDZ1V71t38cg-1; Mon, 24 May 2021 08:28:48 -0400 X-MC-Unique: F9HlAYbFNvqDZ1V71t38cg-1 Received: by mail-ed1-f71.google.com with SMTP id u6-20020aa7d0c60000b029038d7337e633so9324373edo.4 for ; Mon, 24 May 2021 05:28:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=P4X7Q6cOoCe0hTVDV5ljv+76y3e0rtVo1k13v34nVV8=; b=KelCDjLkD9xBl6LFvrhyZu+kZCZlsjT3bxWXmwpRQ6DflA/sHFqG6BqbxtSkWw1pw8 AIPY5vV7YnqHkjwgaxNGxYwrRe58RNKN3d7tLIZ+HB/wnzXnyvTFtDfhjvYgk5anF3J3 bTGxlwL1ahVlU7vp1DszI43lmhsQ4F7HUsgPsq7QxYAIdlPmFGVzNnEFWeSGAeRN1lhJ kkgbIxVEvwKYFnG+8HsTrVedgao819yuv0INZ/pBFr3fpkSWwK9r0/02VznOyQyiFw+y NkJ2C6Wi4fdZz571Kz/7ytmPzgOi9TJ5D2nClwHaDPqgwagS5b1mCnMpwpT5ao2ZlhMV AsOg== X-Gm-Message-State: AOAM532Wm5+neMZIoNvGrPBVHSc4UsCXlR2J6tJu698n5dEixVe+t2pj klD4Sptz/DeASS5M98TJH+DDIuZ79beVXksOevfjb62DKLHkdGzWPguks9AGz9Vxfb0pUU/udVF iiIaPGc+w3XUwwFsulzHnYko6 X-Received: by 2002:a17:906:6b96:: with SMTP id l22mr22720212ejr.456.1621859327375; Mon, 24 May 2021 05:28:47 -0700 (PDT) X-Received: by 2002:a17:906:6b96:: with SMTP id l22mr22720186ejr.456.1621859327222; Mon, 24 May 2021 05:28:47 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id k11sm7899534ejc.94.2021.05.24.05.28.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 May 2021 05:28:46 -0700 (PDT) Subject: Re: [PATCH v2 2/7] KVM: X86: Use _BITUL() macro in UAPI headers To: Joe Richey , trivial@kernel.org Cc: Joe Richey , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Mark Rutland , Lorenzo Pieralisi , Mauro Carvalho Chehab , Zhangfei Gao , Zhou Wang , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , Andi Kleen , "Chang S. Bae" , Sasha Levin , Peter Xu , Lei Cao , Daniel Lezcano , "Rafael J. Wysocki" , Ulf Hansson , Jean-Philippe Brucker , Zaibo Xu , Kenneth Lee , Jonathan Cameron , Hans Verkuil , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-accelerators@lists.ozlabs.org References: <20210520104343.317119-1-joerichey94@gmail.com> <20210521085849.37676-1-joerichey94@gmail.com> <20210521085849.37676-3-joerichey94@gmail.com> From: Paolo Bonzini Message-ID: <59754ef1-c49d-11a6-30ba-8b938a6bb45d@redhat.com> Date: Mon, 24 May 2021 14:28:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210521085849.37676-3-joerichey94@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/05/21 10:58, Joe Richey wrote: > From: Joe Richey > > Replace BIT() in KVM's UPAI header with _BITUL(). BIT() is not defined > in the UAPI headers and its usage may cause userspace build errors. > > Fixes: fb04a1eddb1a ("KVM: X86: Implement ring-based dirty memory tracking") > Signed-off-by: Joe Richey > --- > include/uapi/linux/kvm.h | 5 +++-- > tools/include/uapi/linux/kvm.h | 5 +++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h > index 3fd9a7e9d90c..79d9c44d1ad7 100644 > --- a/include/uapi/linux/kvm.h > +++ b/include/uapi/linux/kvm.h > @@ -8,6 +8,7 @@ > * Note: you must update KVM_API_VERSION if you change this interface. > */ > > +#include > #include > #include > #include > @@ -1879,8 +1880,8 @@ struct kvm_hyperv_eventfd { > * conversion after harvesting an entry. Also, it must not skip any > * dirty bits, so that dirty bits are always harvested in sequence. > */ > -#define KVM_DIRTY_GFN_F_DIRTY BIT(0) > -#define KVM_DIRTY_GFN_F_RESET BIT(1) > +#define KVM_DIRTY_GFN_F_DIRTY _BITUL(0) > +#define KVM_DIRTY_GFN_F_RESET _BITUL(1) > #define KVM_DIRTY_GFN_F_MASK 0x3 > > /* > diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h > index 3fd9a7e9d90c..79d9c44d1ad7 100644 > --- a/tools/include/uapi/linux/kvm.h > +++ b/tools/include/uapi/linux/kvm.h > @@ -8,6 +8,7 @@ > * Note: you must update KVM_API_VERSION if you change this interface. > */ > > +#include > #include > #include > #include > @@ -1879,8 +1880,8 @@ struct kvm_hyperv_eventfd { > * conversion after harvesting an entry. Also, it must not skip any > * dirty bits, so that dirty bits are always harvested in sequence. > */ > -#define KVM_DIRTY_GFN_F_DIRTY BIT(0) > -#define KVM_DIRTY_GFN_F_RESET BIT(1) > +#define KVM_DIRTY_GFN_F_DIRTY _BITUL(0) > +#define KVM_DIRTY_GFN_F_RESET _BITUL(1) > #define KVM_DIRTY_GFN_F_MASK 0x3 > > /* > Queued thi sone, thanks. Paolo