From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [kvm-unit-tests v2 3/6] x86: vmx: Named constant: EPT_ADDR_MASK Date: Wed, 2 Mar 2016 09:47:19 +0100 Message-ID: <56D6A897.7090201@redhat.com> References: <1456860622-31251-1-git-send-email-pfeiner@google.com> <1456871694-23042-1-git-send-email-pfeiner@google.com> <1456871694-23042-4-git-send-email-pfeiner@google.com> <56D68713.1000104@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit To: Jan Kiszka , Peter Feiner , kvm@vger.kernel.org, drjones@redhat.com Return-path: Received: from mail-wm0-f42.google.com ([74.125.82.42]:37416 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751144AbcCBIrX (ORCPT ); Wed, 2 Mar 2016 03:47:23 -0500 Received: by mail-wm0-f42.google.com with SMTP id p65so67491655wmp.0 for ; Wed, 02 Mar 2016 00:47:22 -0800 (PST) In-Reply-To: <56D68713.1000104@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/03/2016 07:24, Jan Kiszka wrote: > The kernel macro looks different from mine, but I think it gives the > same result... yes: this must be really GENMASK(51, 12) (bits 51..12). While at it, it should probably be GENMASK_ULL(51, 12), even though right now the test case is only 64-bit. Which in turn would show that BITS_PER_LONG_LONG is not defined anywhere: $ git grep PER_LONG_LONG lib/bitops.h:#define BIT_ULL_MASK(nr) (1ULL << ((nr) % BITS_PER_LONG_LONG)) lib/bitops.h:#define BIT_ULL_WORD(nr) ((nr) / BITS_PER_LONG_LONG) lib/bitops.h: (((~0ULL) << (l)) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h)))) Paolo