[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 04/15] x86: implement data structure and CPU init flow for MBA

>>> On 30.08.17 at 09:55, <roger.pau@xxxxxxxxxx> wrote:
> On Wed, Aug 30, 2017 at 01:31:51PM +0800, Yi Sun wrote:
>> On 17-08-29 14:44:32, Roger Pau Monn wrote:
>> > On Thu, Aug 24, 2017 at 09:14:38AM +0800, Yi Sun wrote:
>> > > +#define MBA_LINEAR         (1u << 2)
>> > 
>> > Why is this shifted by 2?
>> > 
>> This is used to mask ECX register to know if MBA linear mode is set or not.
> Shouldn't this be in asm-x86/psr.h since it's part of the hardware
> interface?

No, asm-x86/psr.h should have things consumers of the functionality
provided by psr.c need, nothing else. psr.c itself acts as the interface
to the hardware, so any parts of the hardware interface not needing
further exposure should be declared locally to that file.

That said, I think the chosen name here is not descriptive of its
purpose (i.e. this is an example where the name is actually too
short; I'm mentioning this because we had the opposite example
elsewhere in the series).


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.