Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-05-02 Thread Balbir Singh
On Wed, May 2, 2018 at 6:57 AM, Dan Williams wrote: > On Thu, Apr 5, 2018 at 8:00 AM, Dan Williams wrote: >> On Wed, Apr 4, 2018 at 11:45 PM, Nicholas Piggin wrote: > [,,] >>> What's the problem with just counting bytes

RE: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-06 Thread Luck, Tony
> I thought the cache-aligned might make sense, since usually we'd expect the > failure to be at a cache-line level, but our copy_tofrom_user does accurate > accounting That's one of the wrinkles in the current x86 memcpy_mcsafe(). It starts by checking alignment of the source address, and moves

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-06 Thread Balbir Singh
On Fri, Apr 6, 2018 at 11:26 AM, Nicholas Piggin wrote: > On Thu, 05 Apr 2018 16:40:26 -0400 > Jeff Moyer wrote: > >> Nicholas Piggin writes: >> >> > On Thu, 5 Apr 2018 15:53:07 +1000 >> > Balbir Singh wrote: >> >>

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-05 Thread Nicholas Piggin
On Thu, 05 Apr 2018 16:40:26 -0400 Jeff Moyer wrote: > Nicholas Piggin writes: > > > On Thu, 5 Apr 2018 15:53:07 +1000 > > Balbir Singh wrote: > >> I'm thinking about it, I wonder what "bytes remaining" mean in pmem context > >>

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-05 Thread Jeff Moyer
Nicholas Piggin writes: > On Thu, 5 Apr 2018 15:53:07 +1000 > Balbir Singh wrote: >> I'm thinking about it, I wonder what "bytes remaining" mean in pmem context >> in the context of a machine check exception. Also, do we want to be byte >> accurate or

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-05 Thread Dan Williams
On Wed, Apr 4, 2018 at 11:45 PM, Nicholas Piggin wrote: > On Thu, 5 Apr 2018 15:53:07 +1000 > Balbir Singh wrote: > >> On Thu, 5 Apr 2018 15:04:05 +1000 >> Nicholas Piggin wrote: >> >> > On Wed, 4 Apr 2018 20:00:52 -0700 >> > Dan

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-05 Thread Nicholas Piggin
On Thu, 5 Apr 2018 15:53:07 +1000 Balbir Singh wrote: > On Thu, 5 Apr 2018 15:04:05 +1000 > Nicholas Piggin wrote: > > > On Wed, 4 Apr 2018 20:00:52 -0700 > > Dan Williams wrote: > > > > > [ adding Matthew, Christoph, and

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-04 Thread Balbir Singh
On Thu, 5 Apr 2018 15:04:05 +1000 Nicholas Piggin wrote: > On Wed, 4 Apr 2018 20:00:52 -0700 > Dan Williams wrote: > > > [ adding Matthew, Christoph, and Tony ] > > > > On Wed, Apr 4, 2018 at 4:57 PM, Nicholas Piggin wrote: >

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-04 Thread Dan Williams
[ adding Matthew, Christoph, and Tony ] On Wed, Apr 4, 2018 at 4:57 PM, Nicholas Piggin wrote: > On Thu, 5 Apr 2018 09:19:42 +1000 > Balbir Singh wrote: > >> The pmem infrastructure uses memcpy_mcsafe in the pmem >> layer so as to convert machine

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-04 Thread Nicholas Piggin
On Thu, 5 Apr 2018 09:19:42 +1000 Balbir Singh wrote: > The pmem infrastructure uses memcpy_mcsafe in the pmem > layer so as to convert machine check excpetions into > a return value on failure in case a machine check > exception is encoutered during the memcpy. > > This

[RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-04 Thread Balbir Singh
The pmem infrastructure uses memcpy_mcsafe in the pmem layer so as to convert machine check excpetions into a return value on failure in case a machine check exception is encoutered during the memcpy. This patch largely borrows from the copyuser_power7 logic and does not add the VMX