Re: [PATCH 05/32] x86/mtrr: Stop using 32-bit MSR interfaces

From: Ingo Molnar

Date: Thu Jul 02 2026 - 05:30:52 EST



* Jürgen Groß <jgross@xxxxxxxx> wrote:

> > > alternative I could use struct msr by doing:
> > >
> > > rdmsrq(MSR_K6_UWCCR, msr.q);
> > > regs[0] = msr.l;
> > > regs[1] = msr.h;
> > >
> > > ...
> > >
> > > msr.l = regs[0];
> > > msr.h = regs[1];
> > > wrmsrq(MSR_K6_UWCCR, msr.q);
>
> I think it would be easier to just use that initially. I can change the
> patch accordingly.
>
> > Or just move regs[] over to a struct msr variable use?
>
> That would be nasty, as the index used for addressing the correct regs[]
> member is _calculated_, so for each access there would need to be an "if".

Ok, fair enough.

Thanks,

Ingo