Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Borislav Petkov
On Thu, May 17, 2018 at 09:29:23PM +0200, Johannes Hirte wrote: > Works as expected on my Carrizo. Thanks, I'll add your Tested-by. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Borislav Petkov
On Thu, May 17, 2018 at 09:29:23PM +0200, Johannes Hirte wrote: > Works as expected on my Carrizo. Thanks, I'll add your Tested-by. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Johannes Hirte
On 2018 Mai 17, Borislav Petkov wrote: > On Thu, May 17, 2018 at 08:49:31AM +0200, Johannes Hirte wrote: > > Maybe I'm missing something, but those RDMSR IPSs don't happen on > > pre-SMCA systems, right? So the caching should be avoided here, cause > > the whole lookup looks more expensive to me

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Johannes Hirte
On 2018 Mai 17, Borislav Petkov wrote: > On Thu, May 17, 2018 at 08:49:31AM +0200, Johannes Hirte wrote: > > Maybe I'm missing something, but those RDMSR IPSs don't happen on > > pre-SMCA systems, right? So the caching should be avoided here, cause > > the whole lookup looks more expensive to me

RE: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Ghannam, Yazen
kernel.org; tony.l...@intel.com; > x...@kernel.org > Subject: Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized > block > > On Thu, May 17, 2018 at 01:04:19PM +, Ghannam, Yazen wrote: ... > > I check PFEH is enabled how? > If MISC0 is RAZ then you can assu

RE: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Ghannam, Yazen
> -Original Message- > From: Borislav Petkov > Sent: Thursday, May 17, 2018 9:44 AM > To: Ghannam, Yazen > Cc: Johannes Hirte ; linux- > e...@vger.kernel.org; linux-kernel@vger.kernel.org; tony.l...@intel.com; > x...@kernel.org > Subject: Re: [PATCH 3/3] x86/M

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Borislav Petkov
On Thu, May 17, 2018 at 01:04:19PM +, Ghannam, Yazen wrote: > Yes, you're right. I thought using the existing data structures would work, > but it > seems I messed up the implementation. Not only that - your idea wouldn't fly because the per-CPU stuff you were using gets torn down when the

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Borislav Petkov
On Thu, May 17, 2018 at 01:04:19PM +, Ghannam, Yazen wrote: > Yes, you're right. I thought using the existing data structures would work, > but it > seems I messed up the implementation. Not only that - your idea wouldn't fly because the per-CPU stuff you were using gets torn down when the

RE: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Ghannam, Yazen
kernel.org; tony.l...@intel.com; > x...@kernel.org > Subject: Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized > block > > On Thu, May 17, 2018 at 08:49:31AM +0200, Johannes Hirte wrote: > > Maybe I'm missing something, but those RDMSR IPSs don't happen on > >

RE: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Ghannam, Yazen
> -Original Message- > From: Borislav Petkov > Sent: Thursday, May 17, 2018 6:41 AM > To: Johannes Hirte > Cc: Ghannam, Yazen ; linux- > e...@vger.kernel.org; linux-kernel@vger.kernel.org; tony.l...@intel.com; > x...@kernel.org > Subject: Re: [PATCH 3/3] x86/M

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Borislav Petkov
On Thu, May 17, 2018 at 08:49:31AM +0200, Johannes Hirte wrote: > Maybe I'm missing something, but those RDMSR IPSs don't happen on > pre-SMCA systems, right? So the caching should be avoided here, cause > the whole lookup looks more expensive to me than the simple switch-block > in

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Borislav Petkov
On Thu, May 17, 2018 at 08:49:31AM +0200, Johannes Hirte wrote: > Maybe I'm missing something, but those RDMSR IPSs don't happen on > pre-SMCA systems, right? So the caching should be avoided here, cause > the whole lookup looks more expensive to me than the simple switch-block > in

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Johannes Hirte
On 2018 Mai 17, Borislav Petkov wrote: > On Tue, May 15, 2018 at 11:39:54AM +0200, Johannes Hirte wrote: > > The out-of-bound access happens in get_block_address: > > > > if (bankp && bankp->blocks) { > > struct threshold_block *blockp blockp = >blocks[block]; > > > > with

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-17 Thread Johannes Hirte
On 2018 Mai 17, Borislav Petkov wrote: > On Tue, May 15, 2018 at 11:39:54AM +0200, Johannes Hirte wrote: > > The out-of-bound access happens in get_block_address: > > > > if (bankp && bankp->blocks) { > > struct threshold_block *blockp blockp = >blocks[block]; > > > > with

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-16 Thread Borislav Petkov
On Tue, May 15, 2018 at 11:39:54AM +0200, Johannes Hirte wrote: > The out-of-bound access happens in get_block_address: > > if (bankp && bankp->blocks) { > struct threshold_block *blockp blockp = >blocks[block]; > > with block=1. This doesn't exists. I don't even find any

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-16 Thread Borislav Petkov
On Tue, May 15, 2018 at 11:39:54AM +0200, Johannes Hirte wrote: > The out-of-bound access happens in get_block_address: > > if (bankp && bankp->blocks) { > struct threshold_block *blockp blockp = >blocks[block]; > > with block=1. This doesn't exists. I don't even find any

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-15 Thread Johannes Hirte
> Cc: linux-e...@vger.kernel.org; linux-kernel@vger.kernel.org; b...@suse.de; > > tony.l...@intel.com; x...@kernel.org > > Subject: Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized > > block > > > > On 2018 Apr 14, Johannes Hirte wrote: > >

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-05-15 Thread Johannes Hirte
org; linux-kernel@vger.kernel.org; b...@suse.de; > > tony.l...@intel.com; x...@kernel.org > > Subject: Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized > > block > > > > On 2018 Apr 14, Johannes Hirte wrote: > > > On 2018 Feb 01, Yazen Gh

RE: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-04-17 Thread Ghannam, Yazen
; b...@suse.de; > tony.l...@intel.com; x...@kernel.org > Subject: Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized > block > > On 2018 Apr 14, Johannes Hirte wrote: > > On 2018 Feb 01, Yazen Ghannam wrote: > > > From: Yazen Ghannam <yazen.ghan...@amd.co

RE: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-04-17 Thread Ghannam, Yazen
ony.l...@intel.com; x...@kernel.org > Subject: Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized > block > > On 2018 Apr 14, Johannes Hirte wrote: > > On 2018 Feb 01, Yazen Ghannam wrote: > > > From: Yazen Ghannam > > > > > > The block address is sav

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-04-16 Thread Johannes Hirte
On 2018 Apr 14, Johannes Hirte wrote: > On 2018 Feb 01, Yazen Ghannam wrote: > > From: Yazen Ghannam > > > > The block address is saved after the block is initialized when > > threshold_init_device() is called. > > > > Use the saved block address, if available, rather

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-04-16 Thread Johannes Hirte
On 2018 Apr 14, Johannes Hirte wrote: > On 2018 Feb 01, Yazen Ghannam wrote: > > From: Yazen Ghannam > > > > The block address is saved after the block is initialized when > > threshold_init_device() is called. > > > > Use the saved block address, if available, rather than trying to > >

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-04-13 Thread Johannes Hirte
On 2018 Feb 01, Yazen Ghannam wrote: > From: Yazen Ghannam > > The block address is saved after the block is initialized when > threshold_init_device() is called. > > Use the saved block address, if available, rather than trying to > rediscover it. > > We can avoid some

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-04-13 Thread Johannes Hirte
On 2018 Feb 01, Yazen Ghannam wrote: > From: Yazen Ghannam > > The block address is saved after the block is initialized when > threshold_init_device() is called. > > Use the saved block address, if available, rather than trying to > rediscover it. > > We can avoid some *on_cpu() calls in the

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-02-08 Thread Borislav Petkov
On Thu, Feb 01, 2018 at 12:48:13PM -0600, Yazen Ghannam wrote: > From: Yazen Ghannam > > The block address is saved after the block is initialized when > threshold_init_device() is called. > > Use the saved block address, if available, rather than trying to > rediscover

Re: [PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-02-08 Thread Borislav Petkov
On Thu, Feb 01, 2018 at 12:48:13PM -0600, Yazen Ghannam wrote: > From: Yazen Ghannam > > The block address is saved after the block is initialized when > threshold_init_device() is called. > > Use the saved block address, if available, rather than trying to > rediscover it. > > We can avoid

[PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-02-01 Thread Yazen Ghannam
From: Yazen Ghannam The block address is saved after the block is initialized when threshold_init_device() is called. Use the saved block address, if available, rather than trying to rediscover it. We can avoid some *on_cpu() calls in the init path that will cause a call

[PATCH 3/3] x86/MCE/AMD: Get address from already initialized block

2018-02-01 Thread Yazen Ghannam
From: Yazen Ghannam The block address is saved after the block is initialized when threshold_init_device() is called. Use the saved block address, if available, rather than trying to rediscover it. We can avoid some *on_cpu() calls in the init path that will cause a call trace when resuming