> -----Original Message----- > From: Borislav Petkov <bp@xxxxxxxxx> > Sent: Tuesday, November 20, 2018 6:05 AM > To: Moger, Babu <Babu.Moger@xxxxxxx> > Cc: tglx@xxxxxxxxxxxxx; mingo@xxxxxxxxxx; corbet@xxxxxxx; > fenghua.yu@xxxxxxxxx; reinette.chatre@xxxxxxxxx; peterz@xxxxxxxxxxxxx; > gregkh@xxxxxxxxxxxxxxxxxxx; davem@xxxxxxxxxxxxx; akpm@linux- > foundation.org; hpa@xxxxxxxxx; x86@xxxxxxxxxx; > mchehab+samsung@xxxxxxxxxx; arnd@xxxxxxxx; > kstewart@xxxxxxxxxxxxxxxxxxx; pombredanne@xxxxxxxx; > rafael@xxxxxxxxxx; kirill.shutemov@xxxxxxxxxxxxxxx; tony.luck@xxxxxxxxx; > qianyue.zj@xxxxxxxxxxxxxxx; xiaochen.shen@xxxxxxxxx; > pbonzini@xxxxxxxxxx; Singh, Brijesh <brijesh.singh@xxxxxxx>; Hurwitz, > Sherry <sherry.hurwitz@xxxxxxx>; dwmw2@xxxxxxxxxxxxx; Lendacky, > Thomas <Thomas.Lendacky@xxxxxxx>; luto@xxxxxxxxxx; joro@xxxxxxxxxx; > jannh@xxxxxxxxxx; vkuznets@xxxxxxxxxx; rian@xxxxxxxxxxxx; > jpoimboe@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux- > doc@xxxxxxxxxxxxxxx > Subject: Re: [PATCH v8 06/13] arch/resctrl: Initialize the resource functions > that are different > > On Tue, Nov 20, 2018 at 10:59:18AM +0100, Borislav Petkov wrote: > > So I'm wondering: instead of having mba_wrmsr_intel() and > > mba_wrmsr_amd() and adding those per-vendor initialization functions, > > why don't you push down the vendor differentiation into mba_wrmsr()? > > > > Then in that function you do > > > > if (vendor == X86_VENDOR_INTEL) > > __mba_wrmsr_intel(); > > else if (vendor == X86_VENDOR_AMD) > > __mba_wrmsr_amd(); > > > > and so on and then you don't have to do any of that initialization dance > > here and the struct rdt_resource assignment for the MBA will remain > > nicely similar to the other ones... > > > > Hmmm? > > Yeah, after having look at the patchset further, that might not be a > good idea as you need to assign more per-vendor stuff than just an MSR > accessor function... Ok. No changes here. Thanks > > -- > Regards/Gruss, > Boris. > > Good mailing practices for 400: avoid top-posting and trim the reply.