[PATCH v6] x86/mce: retrieve poison range from hardware

2022-08-01 Thread Jane Chu
With Commit 7917f9cdb503 ("acpi/nfit: rely on mce->misc to determine poison granularity") that changed nfit_handle_mce() callback to report badrange according to 1ULL << MCI_MISC_ADDR_LSB(mce->misc), it's been discovered that the mce->misc LSB field is 0x1000 bytes, hence injecting 2 back-to-back p

Re: [PATCH v5] x86/mce: retrieve poison range from hardware

2022-08-01 Thread Jane Chu
On 8/1/2022 2:20 PM, Dan Williams wrote: > Jane Chu wrote: >> On 8/1/2022 9:44 AM, Dan Williams wrote: >>> Jane Chu wrote: With Commit 7917f9cdb503 ("acpi/nfit: rely on mce->misc to determine poison granularity") that changed nfit_handle_mce() callback to report badrange according to

Re: [PATCH v5] x86/mce: retrieve poison range from hardware

2022-08-01 Thread Dan Williams
Jane Chu wrote: > On 8/1/2022 9:44 AM, Dan Williams wrote: > > Jane Chu wrote: > >> With Commit 7917f9cdb503 ("acpi/nfit: rely on mce->misc to determine > >> poison granularity") that changed nfit_handle_mce() callback to report > >> badrange according to 1ULL << MCI_MISC_ADDR_LSB(mce->misc), it's

Re: [PATCH v5] x86/mce: retrieve poison range from hardware

2022-08-01 Thread Jane Chu
On 8/1/2022 9:44 AM, Dan Williams wrote: > Jane Chu wrote: >> With Commit 7917f9cdb503 ("acpi/nfit: rely on mce->misc to determine >> poison granularity") that changed nfit_handle_mce() callback to report >> badrange according to 1ULL << MCI_MISC_ADDR_LSB(mce->misc), it's been >> discovered that th

Re: [PATCH v5] x86/mce: retrieve poison range from hardware

2022-08-01 Thread Jane Chu
On 8/1/2022 8:58 AM, Luck, Tony wrote: >> struct mce m; >> +int lsb = PAGE_SHIFT; > > Some maintainers like to order local declaration lines from longest to > shortest > >> + /* >> + * Even if the ->validation_bits are set for address mask, >> + * to be extra safe, check

RE: [PATCH v5] x86/mce: retrieve poison range from hardware

2022-08-01 Thread Dan Williams
Jane Chu wrote: > With Commit 7917f9cdb503 ("acpi/nfit: rely on mce->misc to determine > poison granularity") that changed nfit_handle_mce() callback to report > badrange according to 1ULL << MCI_MISC_ADDR_LSB(mce->misc), it's been > discovered that the mce->misc LSB field is 0x1000 bytes, hence in

RE: [PATCH v5] x86/mce: retrieve poison range from hardware

2022-08-01 Thread Luck, Tony
> struct mce m; > + int lsb = PAGE_SHIFT; Some maintainers like to order local declaration lines from longest to shortest > + /* > + * Even if the ->validation_bits are set for address mask, > + * to be extra safe, check and reject an error radius '0', > + * and fall