[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49FF5545.6090205@redhat.com>
Date: Mon, 04 May 2009 17:51:17 -0300
From: Mauro Carvalho Chehab <mchehab@...hat.com>
To: Borislav Petkov <borislav.petkov@....com>
CC: "H. Peter Anvin" <hpa@...or.com>, akpm@...ux-foundation.org,
greg@...ah.com, mingo@...e.hu, tglx@...utronix.de,
dougthompson@...ssion.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/21] x86: add methods for writing of an MSR on several
CPUs
Borislav Petkov escreveu:
> On Mon, May 04, 2009 at 10:25:12AM -0700, H. Peter Anvin wrote:
>
>> Borislav Petkov wrote:
>>
>>>> Please, for the love of God, no!
>>>>
>>>> Make it an array of u64s or (equivalently!) an array of (l,h)
>>>> structures, not separate arrays for the halves of the register.
>>>>
>>> how about something like the following then? If there's agreement I could
>>> convert all users to struct msr later.
>>>
>>>
>> I personally would prefer if you just used an array of u64s. The whole
>> l/h split for MSRs was a mistake in the first place.
>>
>
> ... on the other hand, the two u32s kinda resemble more the EDX:EAX
> register pair of rdmsr/wrmsr, hm...
>
> [..]
>
>
>> Or fancier, using gcc's anonymous structs/unions:
>>
>> struct msr {
>> union {
>> struct {
>> u32 l, h;
>> };
>> u64 q;
>> };
>> };
>>
>
> yeah, that sounds good:
>
> --
> From: Borislav Petkov <borislav.petkov@....com>
> Date: Wed, 29 Apr 2009 15:20:11 +0200
> Subject: [PATCH 1/2] x86: add methods for writing of an MSR on several CPUs
>
> Add a struct representing a 64bit MSR pair consisting of a low and high
> register part.
>
> Also, rename msr-on-cpu.c to msr.c accordingly.
>
> Signed-off-by: Borislav Petkov <borislav.petkov@....com>
>
>
That sounds good also to me.
Reviewed-by: Mauro Carvalho Chehab <mchehab@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists