From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PART1 V5 07/13] KVM: x86: Detect and Initialize AVIC support Date: Tue, 10 May 2016 16:43:05 +0200 Message-ID: <5731F379.9080309@redhat.com> References: <1462388992-25242-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1462388992-25242-8-git-send-email-Suravee.Suthikulpanit@amd.com> <20160510091447.GA16752@pd.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: rkrcmar@redhat.com, joro@8bytes.org, gleb@kernel.org, alex.williamson@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, wei@redhat.com, sherry.hurwitz@amd.com To: Borislav Petkov , Suravee Suthikulpanit Return-path: In-Reply-To: <20160510091447.GA16752@pd.tnic> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 10/05/2016 11:14, Borislav Petkov wrote: >> > +#define AVIC_LOGICAL_ID_ENTRY_GUEST_PHYSICAL_ID_MASK (0xFF) >> > +#define AVIC_LOGICAL_ID_ENTRY_VALID_MASK (1 << 31) >> > + >> > +#define AVIC_PHYSICAL_ID_ENTRY_HOST_PHYSICAL_ID_MASK (0xFFULL) >> > +#define AVIC_PHYSICAL_ID_ENTRY_BACKING_PAGE_MASK (0xFFFFFFFFFFULL << 12) >> > +#define AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK (1ULL << 62) >> > +#define AVIC_PHYSICAL_ID_ENTRY_VALID_MASK (1ULL << 63) > Those defines could be shortened a little. Maybe > > #define AVIC_PHYSID_HOST_PHYS_MASK > #define AVIC_PHYSID_BACKING_PG_MASK That was actually our suggestion. Despite the long names, the lines do not come out too long because the masks are only used for writing fields, not very much for reading them (e.g. in complex "if" conditions). Paolo