[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5731F379.9080309@redhat.com>
Date: Tue, 10 May 2016 16:43:05 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Borislav Petkov <bp@...en8.de>,
Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>
Cc: rkrcmar@...hat.com, joro@...tes.org, gleb@...nel.org,
alex.williamson@...hat.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, wei@...hat.com,
sherry.hurwitz@....com
Subject: Re: [PART1 V5 07/13] KVM: x86: Detect and Initialize AVIC support
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
Powered by blists - more mailing lists