From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [kvm-unit-tests 2/5] x86: vmx: Named constant: EPT_ADDR_MASK Date: Tue, 1 Mar 2016 22:36:26 +0100 Message-ID: <56D60B5A.1010106@redhat.com> References: <1456860622-31251-1-git-send-email-pfeiner@google.com> <1456860622-31251-3-git-send-email-pfeiner@google.com> <56D605CB.3050408@redhat.com> <56D60946.9000504@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Jan Kiszka , Peter Feiner Return-path: Received: from mail-wm0-f42.google.com ([74.125.82.42]:35312 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbcCAVg3 (ORCPT ); Tue, 1 Mar 2016 16:36:29 -0500 Received: by mail-wm0-f42.google.com with SMTP id l68so57582900wml.0 for ; Tue, 01 Mar 2016 13:36:28 -0800 (PST) In-Reply-To: <56D60946.9000504@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/03/2016 22:27, Jan Kiszka wrote: > > It's not precisely the same thing since PAGE_MASK sets the upper > > reserved bits :-) Aha! :) Jan's suggestion is obviously a good one, please adopt it for v2. Paolo > > I'll send v2. > > Consider defining the constant as GENMASK(51, 12) (from linux/bitops.h). > > A while back, I re-invented this macro for Jailhouse, and I just > realized that the kernel has the very same thing. It makes such bitmasks > much more readable (and verifiable when looking at specs).