[PATCH 3/4] ACPI / APEI: Drop uninformative messages during boot

2017-07-20 Thread Punit Agrawal
kernel command line parameter. Drop this message. While we are touching this code, also drop similar message when GHES is disabled using the module parameter. Signed-off-by: Punit Agrawal Cc: "Rafael J. Wysocki" Cc: Borislav Petkov --- drivers/acpi/apei/ghes.c | 9 + 1 file

[PATCH 2/4] mailbox: pcc: Drop uninformative output during boot

2017-07-20 Thread Punit Agrawal
seful information. Drop this message. Signed-off-by: Punit Agrawal Cc: Jassi Brar --- drivers/mailbox/pcc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index ac91fd0d62c6..3d83cdc11ab5 100644 --- a/drivers/mailbox/pcc.c +++ b/dr

[PATCH 4/4] xen: Drop un-informative message during boot

2017-07-20 Thread Punit Agrawal
-off-by: Punit Agrawal Cc: Boris Ostrovsky Cc: Juergen Gross --- drivers/xen/xenfs/super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/xen/xenfs/super.c b/drivers/xen/xenfs/super.c index 967f069385d0..71ddfb4cf61c 100644 --- a/drivers/xen/xenfs/super.c +++ b/drivers/xen/xenfs

Re: [PATCH 3/4] ACPI / APEI: Drop uninformative messages during boot

2017-07-20 Thread Punit Agrawal
Hi Borislav, Borislav Petkov writes: > On Thu, Jul 20, 2017 at 12:04:01PM +0100, Punit Agrawal wrote: >> When booting an ACPI enabled system that does not provide the hardware >> error source table (HEST), the ghes driver prints the following message >> in the kernel log -

Re: [PATCH 3/4] ACPI / APEI: Drop uninformative messages during boot

2017-07-20 Thread Punit Agrawal
Borislav Petkov writes: > On Thu, Jul 20, 2017 at 01:29:17PM +0100, Punit Agrawal wrote: >> I agree that where there is a genuine problem, relevant messages can >> help to diagnose the problem. But what's printed now doesn't fit the >> criteria. > > So make

Re: [PATCH] mm/hugetlb: __get_user_pages ignores certain follow_hugetlb_page errors

2017-07-21 Thread Punit Agrawal
b_fault in follow_hugetlb_page. > > Fixes: 9a291a7c9428 ("mm/hugetlb: report -EHWPOISON not -EFAULT when > FOLL_HWPOISON is specified") > Signed-off-by: Daniel Jordan > Cc: Andrea Arcangeli > Cc: Andrew Morton > Cc: "Aneesh Kumar K.V" >

Re: [Xen-devel] [PATCH 4/4] xen: Drop un-informative message during boot

2017-07-21 Thread Punit Agrawal
Boris Ostrovsky writes: > On 07/20/2017 07:04 AM, Punit Agrawal wrote: >> On systems that are not booted as a Xen domain, the xenfs driver prints >> the following message during boot. >> >> [3.460595] xenfs: not registering filesystem on non-xen platform >> &

Re: [Xen-devel] [PATCH 4/4] xen: Drop un-informative message during boot

2017-07-21 Thread Punit Agrawal
Juergen Gross writes: > On 21/07/17 12:12, Punit Agrawal wrote: >> Boris Ostrovsky writes: >> >>> On 07/20/2017 07:04 AM, Punit Agrawal wrote: >>>> On systems that are not booted as a Xen domain, the xenfs driver prints >>>> the following mes

Re: [PATCH v2] mm: hwpoison: disable memory error handling on 1GB hugepage

2018-02-08 Thread Punit Agrawal
Horiguchi-san, Naoya Horiguchi writes: > Hi Punit, > > On Mon, Feb 05, 2018 at 03:05:43PM +0000, Punit Agrawal wrote: >> Naoya Horiguchi writes: >> [...] >> > >> > You can easily reproduce this by calling madvise(MADV_HWPOISON) twice on &g

Re: [PATCH v2] mm: hwpoison: disable memory error handling on 1GB hugepage

2018-02-05 Thread Punit Agrawal
Naoya Horiguchi writes: > Recently the following BUG was reported: > > Injecting memory failure for pfn 0x3c at process virtual address > 0x7fe3 > Memory failure: 0x3c: recovery action for huge page: Recovered > BUG: unable to handle kernel paging request at 8dfcc

Re: [RFC 4/4] KVM: arm64: Add support for PUD hugepages at stage 2

2018-02-06 Thread Punit Agrawal
Christoffer Dall writes: > On Wed, Jan 10, 2018 at 07:07:29PM +0000, Punit Agrawal wrote: >> KVM only supports PMD hugepages at stage 2. Extend the stage 2 fault >> handling to add support for PUD hugepages. >> >> Addition of PUD hugpage support enables ad

Re: [RFC 2/4] KVM: arm64: Support dirty page tracking for PUD hugepages

2018-02-06 Thread Punit Agrawal
Christoffer Dall writes: > On Wed, Jan 10, 2018 at 07:07:27PM +0000, Punit Agrawal wrote: >> In preparation for creating PUD hugepages at stage 2, add support for >> write protecting PUD hugepages when they are encountered. Write >> protecting guest tables is used to t

Re: [PATCH 4/4] cpu_cooling: Drop static-power related stuff

2017-11-17 Thread Punit Agrawal
Hi Eduardo, Eduardo Valentin writes: > Hello, > > On Fri, Nov 17, 2017 at 12:31:41AM +0100, Rafael J. Wysocki wrote: >> On Thursday, November 16, 2017 4:20:58 PM CET Viresh Kumar wrote: >> > On 16-11-17, 15:02, Ionela Voinescu wrote: >> > > When it was added in lsk 3.18 in what was then a therma

Re: [PATCH v2] ACPI / APEI: Suppress message if HEST not present

2017-08-29 Thread Punit Agrawal
Punit Agrawal writes: > According to the ACPI specification, firmware is not required to provide > the Hardware Error Source Table (HEST). When HEST is not present, the > following superfluous message is printed to the kernel boot log - > > [3.460067] GHES: HEST is not enab

Re: [PATCH v2] ACPI / APEI: Suppress message if HEST not present

2017-08-29 Thread Punit Agrawal
Borislav Petkov writes: > On Wed, Aug 16, 2017 at 12:27:53PM +0100, Punit Agrawal wrote: >> According to the ACPI specification, firmware is not required to provide >> the Hardware Error Source Table (HEST). When HEST is not present, the >> following superfluous message is

[PATCH v3] ACPI / APEI: Suppress message if HEST not present

2017-08-29 Thread Punit Agrawal
the firmware provides this table and if it is not present skip any log output. The existing behaviour is preserved in all other cases. Suggested-by: Borislav Petkov Signed-off-by: Punit Agrawal Cc: Borislav Petkov Cc: James Morse --- Changes in v3: * Grouped hest_disable status checking into

Re: [PATCH v3] ACPI / APEI: Suppress message if HEST not present

2017-08-30 Thread Punit Agrawal
Borislav Petkov writes: > On Tue, Aug 29, 2017 at 02:20:20PM +0100, Punit Agrawal wrote: >> According to the ACPI specification, firmware is not required to provide >> the Hardware Error Source Table (HEST). When HEST is not present, the >> following superfluous message is

Re: [PATCH v3] ACPI / APEI: Suppress message if HEST not present

2017-08-30 Thread Punit Agrawal
"Rafael J. Wysocki" writes: > On Wednesday, August 30, 2017 12:34:55 PM CEST Punit Agrawal wrote: >> Borislav Petkov writes: >> >> > On Tue, Aug 29, 2017 at 02:20:20PM +0100, Punit Agrawal wrote: >> >> According to the ACPI specification, firmware

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-22 Thread Punit Agrawal
Hi Mike, Mike Kravetz writes: > On 08/21/2017 11:07 AM, Catalin Marinas wrote: >> On Fri, Aug 18, 2017 at 02:29:18PM -0700, Mike Kravetz wrote: >>> On 08/18/2017 07:54 AM, Punit Agrawal wrote: >>>> When walking the page tables to resolve an address that point

[PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-18 Thread Punit Agrawal
ffset(). Signed-off-by: Punit Agrawal Cc: Catalin Marinas Cc: Naoya Horiguchi Cc: Steve Capper Cc: Will Deacon Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Mike Kravetz --- Hi Andrew, >From discussions on the arm64 implementation of huge_pte_offset()[0] we realised that there is bene

Re: [PATCH] ACPI / sysfs: Extend ACPI sysfs to provide access to boot error region

2017-08-18 Thread Punit Agrawal
tory /sys/firmware/acpi/tables/data/BERT > > Cc: Len Brown > Cc: Boris Petkov > Cc: Tyler Baicar > Cc: Punit Agrawal > Cc: linux-a...@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Tony Luck > > v4: (suggested by Punit Agrawal) extend the /sy

[PATCH v2 0/3] arm64: Add support for handling memory corruption

2017-05-17 Thread Punit Agrawal
nux-kernel@vger.kernel.org/msg1376052.html [1] https://lkml.org/lkml/2017/4/7/486 [2] https://lkml.org/lkml/2017/4/5/402 Jonathan (Zhixiong) Zhang (2): arm64: hwpoison: add VM_FAULT_HWPOISON[_LARGE] handling arm64: kconfig: allow support for memory failure handling Punit Agrawal (1): arm64: hu

[PATCH v2 1/3] arm64: hugetlb: Fix huge_pte_offset to return poisoned page table entries

2017-05-17 Thread Punit Agrawal
. [ 344.165544] mm/pgtable-generic.c:33: bad pmd 00083af00074. Fix huge_pte_offset() to return the poisoned pte which is then appropriately handled by the generic layer code. Signed-off-by: Punit Agrawal Acked-by: Steve Capper Cc: Catalin Marinas Cc: David Woods --- arch/arm64/include/asm

[PATCH v2 2/3] arm64: hwpoison: add VM_FAULT_HWPOISON[_LARGE] handling

2017-05-17 Thread Punit Agrawal
b field is initialized. Signed-off-by: Jonathan (Zhixiong) Zhang Signed-off-by: Tyler Baicar (fix new __do_user_fault call-site) Signed-off-by: Punit Agrawal Acked-by: Steve Capper --- arch/arm64/mm/fault.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/

[PATCH v2 3/3] arm64: kconfig: allow support for memory failure handling

2017-05-17 Thread Punit Agrawal
From: "Jonathan (Zhixiong) Zhang" Declare ARCH_SUPPORTS_MEMORY_FAILURE, as arm64 does support memory failure recovery attempt. Signed-off-by: Jonathan (Zhixiong) Zhang Signed-off-by: Tyler Baicar (Dropped changes to ACPI APEI Kconfig and updated commit log) Signed-off-by: Punit Agra

Re: [PATCH 1/3] arm64: hugetlb: Fix huge_pte_offset to return poisoned page table entries

2017-05-17 Thread Punit Agrawal
Timur Tabi writes: > On Thu, May 4, 2017 at 10:55 AM, Punit Agrawal wrote: >> Indeed - I was avoiding changing the function to drop contiguous >> hugepage support which follows this hunk. >> >> I've made changes locally based on your suggestion and will post a &g

[PATCH v3 0/6] Support for contiguous pte hugepages

2017-05-22 Thread Punit Agrawal
clear() and set_huge_pte_at() RFC -> v1 * Fixed a missing conversion of huge_pte_offset() prototype to add hstate parameter. Reported by 0-day. [0] https://lkml.org/lkml/2017/3/23/293 [1] https://lkml.org/lkml/2017/3/30/770 [2] http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1370686.html Pu

[PATCH v3 1/6] mm, gup: Remove broken VM_BUG_ON_PAGE compound check for hugepages

2017-05-22 Thread Punit Agrawal
ot; Cc: Aneesh Kumar K.V Signed-off-by: Will Deacon Acked-by: Steve Capper Signed-off-by: Punit Agrawal --- mm/gup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index d9e6fddcc51f..ccf8cb38234f 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1361,7 +1361,6 @@ static int gup

[PATCH v3 2/6] mm, gup: Ensure real head page is ref-counted when using hugepages

2017-05-22 Thread Punit Agrawal
with page_cache_get_speculative() where users already pass the appropriate page, i.e., the de-referenced head. Apply the same logic to fix gup_huge_[pud|pgd]() as well. Signed-off-by: Punit Agrawal Acked-by: Steve Capper Cc: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Aneesh Kumar K.V ---

[PATCH v3 3/6] mm/hugetlb: add size parameter to huge_pte_offset()

2017-05-22 Thread Punit Agrawal
encountered. Let's remove the ambiguity by adding a size parameter to convey additional information about the requested address. Also fixup the definition/usage of huge_pte_offset() throughout the tree. Signed-off-by: Punit Agrawal Acked-by: Steve Capper Cc: Catalin Marinas Cc: Will Deaco

[PATCH v3 6/6] mm: rmap: Use correct helper when poisoning hugepages

2017-05-22 Thread Punit Agrawal
Using set_pte_at() does not do the right thing when putting down HWPOISON swap entries for hugepages on architectures that support contiguous ptes. Fix this problem by using set_huge_swap_pte_at() which was introduced to fix exactly this problem. Signed-off-by: Punit Agrawal Acked-by: Steve

[PATCH v3 5/6] mm/hugetlb: Introduce set_huge_swap_pte_at() helper

2017-05-22 Thread Punit Agrawal
overridable helper that is called when populating the page tables with swap entries. The size of the targeted region is provided to the helper to help determine the number of entries to be updated. Provide a default implementation that maintains the current behaviour. Signed-off-by: Punit Agrawal

[PATCH v3 4/6] mm/hugetlb: Allow architectures to override huge_pte_clear()

2017-05-22 Thread Punit Agrawal
d any change. Signed-off-by: Punit Agrawal Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Arnd Bergmann Cc: "Aneesh Kumar K.V" Cc: Mike Kravetz --- arch/s390/include/asm/hugetlb.h | 10 ++ arch/s390/mm/hugetlbpage.c | 9 + include/asm-generic/hugetlb.h |

Re: [PATCH v3 4/6] mm/hugetlb: Allow architectures to override huge_pte_clear()

2017-05-22 Thread Punit Agrawal
Arnd Bergmann writes: > On Mon, May 22, 2017 at 3:36 PM, Punit Agrawal wrote: >> diff --git a/include/asm-generic/hugetlb.h b/include/asm-generic/hugetlb.h >> index 99b490b4d05a..3138e126f43b 100644 >> --- a/include/asm-generic/hugetlb.h >> +++ b/include/asm-generic/h

[PATCH v3.1 4/6] mm/hugetlb: Allow architectures to override huge_pte_clear()

2017-05-22 Thread Punit Agrawal
ff-by: Punit Agrawal Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Arnd Bergmann Cc: "Aneesh Kumar K.V" Cc: Mike Kravetz --- Changes since v3 * Drop weak function and use #ifndef block to allow architecture override * Drop unnecessary move of s390 function definition arch/s390/includ

[PATCH v3.1 5/6] mm/hugetlb: Introduce set_huge_swap_pte_at() helper

2017-05-22 Thread Punit Agrawal
current behaviour. Signed-off-by: Punit Agrawal Acked-by: Steve Capper Cc: Mike Kravetz Cc: "Aneesh Kumar K.V" --- Changes since v3: * Use #ifndef block instead of weak function include/linux/hugetlb.h | 8 mm/hugetlb.c| 8 +--- 2 files changed, 13 insert

Re: [PATCH v3.1 4/6] mm/hugetlb: Allow architectures to override huge_pte_clear()

2017-05-23 Thread Punit Agrawal
Arnd Bergmann writes: > On Mon, May 22, 2017 at 6:25 PM, Punit Agrawal wrote: >> When unmapping a hugepage range, huge_pte_clear() is used to clear the >> page table entries that are marked as not present. huge_pte_clear() >> internally just ends up calling pte_clear() whi

Re: [PATCH v3.1 4/6] mm/hugetlb: Allow architectures to override huge_pte_clear()

2017-05-23 Thread Punit Agrawal
Martin Schwidefsky writes: > On Mon, 22 May 2017 17:25:55 +0100 > Punit Agrawal wrote: > >> When unmapping a hugepage range, huge_pte_clear() is used to clear the >> page table entries that are marked as not present. huge_pte_clear() >> internally just ends up calling

Re: [PATCH v3 2/6] mm, gup: Ensure real head page is ref-counted when using hugepages

2017-05-23 Thread Punit Agrawal
"Kirill A. Shutemov" writes: > On Mon, May 22, 2017 at 02:36:00PM +0100, Punit Agrawal wrote: >> When speculatively taking references to a hugepage using >> page_cache_add_speculative() in gup_huge_pmd(), it is assumed that the >> page returned by pmd_page() is t

Re: [PATCH v2 1/3] arm64: hugetlb: Fix huge_pte_offset to return poisoned page table entries

2017-06-07 Thread Punit Agrawal
Will Deacon writes: > On Wed, Jun 07, 2017 at 03:30:37PM +0100, Catalin Marinas wrote: >> On Wed, Jun 07, 2017 at 02:47:32PM +0100, Will Deacon wrote: >> > On Wed, May 17, 2017 at 04:23:34PM +0100, Punit Agrawal wrote: >> > > --- a/arch/arm64/mm/hugetlbpag

Re: [PATCH v4.1 4/8] mm, gup: Ensure real head page is ref-counted when using hugepages

2017-06-12 Thread Punit Agrawal
Punit Agrawal writes: > When speculatively taking references to a hugepage using > page_cache_add_speculative() in gup_huge_pmd(), it is assumed that the > page returned by pmd_page() is the head page. Although normally true, > this assumption doesn't hold when the huge

Re: [PATCH 1/3] arm64: hugetlb: Fix huge_pte_offset to return poisoned page table entries

2017-05-04 Thread Punit Agrawal
Catalin Marinas writes: > On Wed, Apr 12, 2017 at 03:04:57PM +0100, Punit Agrawal wrote: >> When memory failure is enabled, a poisoned hugepage pte is marked as a >> swap entry. huge_pte_offset() does not return the poisoned page table >> entries when it encounters PUD/PMD h

[PATCH 0/3] GICv3: Bounds check redistributor accesses

2017-10-11 Thread Punit Agrawal
board bring-up. Patch 3 is where the bulk of the checking is introduced. The patch is a bit invasive but there doesn't seem to be a nicer way to isolate the change given layout of the redistributor. Feedback welcome. Thanks, Punit Punit Agrawal (3): irqchip/gic-v3: Use resource structur

[PATCH 2/3] irqchip/gic-v3: Report firmwware provided address in case of error

2017-10-11 Thread Punit Agrawal
When a redistributor is not found at the address provided by the firmware, report the firmware provided address to help user identify the offending firmware data. Signed-off-by: Punit Agrawal Cc: Marc Zyngier --- drivers/irqchip/irq-gic-v3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH 3/3] irqchip/gic-v3: Bounds check redistributor accesses

2017-10-11 Thread Punit Agrawal
egion size. Signed-off-by: Punit Agrawal Cc: Marc Zyngier --- drivers/irqchip/irq-gic-v3.c | 48 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 881d327c53fa..754d936

[PATCH 1/3] irqchip/gic-v3: Use resource structure to store redistributor regions

2017-10-11 Thread Punit Agrawal
quent commits to add bounds checking to redistributor region accesses. Signed-off-by: Punit Agrawal Cc: Marc Zyngier --- drivers/irqchip/irq-gic-v3.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchi

Re: [PATCH v2 2/3] arm64: hwpoison: add VM_FAULT_HWPOISON[_LARGE] handling

2017-06-07 Thread Punit Agrawal
Will Deacon writes: > On Wed, May 17, 2017 at 04:23:35PM +0100, Punit Agrawal wrote: >> From: "Jonathan (Zhixiong) Zhang" >> >> Add VM_FAULT_HWPOISON[_LARGE] handling to the arm64 page fault >> handler. Handling of VM_FAULT_HWPOISON[_LARGE] is very

Re: [PATCH v2 1/3] arm64: hugetlb: Fix huge_pte_offset to return poisoned page table entries

2017-06-08 Thread Punit Agrawal
Will Deacon writes: > On Wed, Jun 07, 2017 at 04:32:28PM +0100, Punit Agrawal wrote: >> Will Deacon writes: >> >> > On Wed, Jun 07, 2017 at 03:30:37PM +0100, Catalin Marinas wrote: >> >> On Wed, Jun 07, 2017 at 02:47:32PM +0100, Will Deacon wrote: >&g

[PATCH v3 0/4] arm64: Add support for handling memory corruption

2017-06-08 Thread Punit Agrawal
sg581657.html [1] https://lkml.org/lkml/2017/4/7/486 [2] https://lkml.org/lkml/2017/4/5/402 Jonathan (Zhixiong) Zhang (2): arm64: hwpoison: add VM_FAULT_HWPOISON[_LARGE] handling arm64: kconfig: allow support for memory failure handling Punit Agrawal (2): arm64: hugetlb: Fix huge_pte_

[PATCH v3 1/4] arm64: hugetlb: Fix huge_pte_offset to return poisoned page table entries

2017-06-08 Thread Punit Agrawal
. [ 344.165544] mm/pgtable-generic.c:33: bad pmd 00083af00074. Fix huge_pte_offset() to return the poisoned pte which is then appropriately handled by the generic layer code. Signed-off-by: Punit Agrawal Acked-by: Steve Capper Reviewed-by: Catalin Marinas Cc: David Woods Tested-by: Manoj

[PATCH v3 3/4] arm64: mm: Update perf accounting to handle poison faults

2017-06-08 Thread Punit Agrawal
PERF_COUNT_SW_PAGE_FAULTS * Doesn't report anything else for VM_FAULT_ERROR (which includes hwpoison faults) * Reports PERF_COUNT_SW_PAGE_FAULTS_MAJ if it's a major fault (indicated by VM_FAULT_MAJOR) * Otherwise, reports PERF_COUNT_SW_PAGE_FAULTS_MIN Signed-off-by: Punit Agrawal --- arc

[PATCH v3 2/4] arm64: hwpoison: add VM_FAULT_HWPOISON[_LARGE] handling

2017-06-08 Thread Punit Agrawal
b field is initialized. Signed-off-by: Jonathan (Zhixiong) Zhang Signed-off-by: Tyler Baicar (fix new __do_user_fault call-site) Signed-off-by: Punit Agrawal Acked-by: Steve Capper Tested-by: Manoj Iyer --- arch/arm64/mm/fault.c | 22 +++--- 1 file changed, 19 insertions(+), 3

[PATCH v3 4/4] arm64: kconfig: allow support for memory failure handling

2017-06-08 Thread Punit Agrawal
From: "Jonathan (Zhixiong) Zhang" Declare ARCH_SUPPORTS_MEMORY_FAILURE, as arm64 does support memory failure recovery attempt. Signed-off-by: Jonathan (Zhixiong) Zhang Signed-off-by: Tyler Baicar (Dropped changes to ACPI APEI Kconfig and updated commit log) Signed-off-by: Punit Agra

Re: arm64: segfaults on next-20170602 with LTP tests

2017-06-05 Thread Punit Agrawal
Will Deacon writes: > On Fri, Jun 02, 2017 at 05:42:04PM +0300, Yury Norov wrote: >> On Fri, Jun 02, 2017 at 03:37:51PM +0300, Yury Norov wrote: >> > On Fri, Jun 02, 2017 at 01:19:18PM +0100, Will Deacon wrote: >> > > Hi Yury, >> > > >> > > [adding Steve and Punit] >> > > >> > > On Fri, Jun 02,

Re: arm64: segfaults on next-20170602 with LTP tests

2017-06-05 Thread Punit Agrawal
Punit Agrawal writes: > Will Deacon writes: > >> On Fri, Jun 02, 2017 at 05:42:04PM +0300, Yury Norov wrote: >>> On Fri, Jun 02, 2017 at 03:37:51PM +0300, Yury Norov wrote: >>> > On Fri, Jun 02, 2017 at 01:19:18PM +0100, Will Deacon wrote: >>> >

[PATCH v4.1 4/8] mm, gup: Ensure real head page is ref-counted when using hugepages

2017-06-05 Thread Punit Agrawal
with page_cache_get_speculative() where users already pass the appropriate page, i.e., the de-referenced head. Apply the same logic to fix gup_huge_[pud|pgd]() as well. Signed-off-by: Punit Agrawal Cc: Steve Capper Cc: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Aneesh Kumar K.V --- Hi Andrew, Pl

[RFC PATCH 0/2] Clarify huge_pte_offset() semantics

2017-07-24 Thread Punit Agrawal
most importantly, documents the expected behaviour of huge_pte_offset() All feedback welcome. Thanks, Punit [0] Punit Agrawal (2): mm/hugetlb: Make huge_pte_offset() consistent between PUD and PMD entries mm/hugetlb: Support swap entries in huge_pte_offset() mm/hugetlb.c | 22

[RFC PATCH 2/2] mm/hugetlb: Support swap entries in huge_pte_offset()

2017-07-24 Thread Punit Agrawal
documentation to explicitly state this behaviour. This is to help clarify expectations for architecture specific implementations of huge_pte_offset(). Signed-off-by: Punit Agrawal --- mm/hugetlb.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mm/hugetlb.c b/mm

[RFC PATCH 1/2] mm/hugetlb: Make huge_pte_offset() consistent between PUD and PMD entries

2017-07-24 Thread Punit Agrawal
table entry. Make huge_pte_offset() consistent by always returning NULL on encountering a !present_p*d() entry. Document the behaviour to clarify the expected semantics of this function. Signed-off-by: Punit Agrawal --- mm/hugetlb.c | 16 +++- 1 file changed, 15 insertions(+), 1

Re: [RFC PATCH 1/2] mm/hugetlb: Make huge_pte_offset() consistent between PUD and PMD entries

2017-07-25 Thread Punit Agrawal
Catalin Marinas writes: > Hi Punit, > > On Mon, Jul 24, 2017 at 06:33:17PM +0100, Punit Agrawal wrote: >> When walking the page tables to resolve an address that points to >> !present_p*d() entry, huge_pte_offset() returns inconsistent values >> depending on the leve

[PATCH 1/1] mm/hugetlb: Make huge_pte_offset() consistent and document behaviour

2017-07-25 Thread Punit Agrawal
swap entries. Document the behaviour to clarify the expected behaviour of this function. This is to set clear semantics for architecture specific implementations of huge_pte_offset(). Signed-off-by: Punit Agrawal --- mm/hugetlb.c | 22 +++--- 1 file changed, 19 insertions(+), 3

[PATCH 0/1] Clarify huge_pte_offset() semantics

2017-07-25 Thread Punit Agrawal
of huge_pte_offset() All feedback welcome. Thanks, Punit [0] https://lkml.org/lkml/2017/7/24/514 [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f02ab08afbe76ee7b0b2a34a9970e7dd200d8b01 Punit Agrawal (1): mm/hugetlb: Make huge_pte_offset() consistent and

Re: [PATCH 0/3] Refactor GHES to better support non-APEI systems

2017-08-09 Thread Punit Agrawal
Punit Agrawal writes: > Hi, > > The small series re-factors the GHES driver initialisation to move > memory allocation and checks from driver init to device probe. The net > effect is to improve the situation for systems that do not support > APEI. > > The patches are or

Re: [PATCH 2/3] GHES: Move memory initialisation to ghes_probe()

2017-08-15 Thread Punit Agrawal
Hi Boris, Borislav Petkov writes: > On Tue, Aug 01, 2017 at 02:36:07PM +0100, Punit Agrawal wrote: >> During the driver init, the ghes driver initialises some data structures > > Let's stick to "GHES" in capital letters everywhere. > >> which are only u

Re: [PATCH] ACPI/APEI: Add BERT data driver

2017-08-15 Thread Punit Agrawal
Hi Tony, "Luck, Tony" writes: > From: Tony Luck > > The ACPI Boot Error Record Table provides a method for platform > firmware to give information to the operating system about error > that occurred prior to boot (of particular interest are problems > that caused the previous OS instance to cra

Re: [PATCH 2/3] GHES: Move memory initialisation to ghes_probe()

2017-08-15 Thread Punit Agrawal
[ thanks for dropping the bad email! ] Borislav Petkov writes: > On Tue, Aug 15, 2017 at 11:10:05AM +0100, Punit Agrawal wrote: >> In the absence of any GHES entries these are wasted. > > I know. This whole APEI init code would need a proper cleanup, like > acpi_pci

Re: [PATCH 2/4] mailbox: pcc: Drop uninformative output during boot

2017-08-01 Thread Punit Agrawal
"Rafael J. Wysocki" writes: > On 7/31/2017 7:47 PM, Alexey Klimov wrote: >> (keeping Rafael in c/c per Jassi suggestion) >> >> On Thu, Jul 20, 2017 at 12:04 PM, Punit Agrawal >> wrote: >>> When booting on an ACPI enabled system that does not p

[PATCH RESEND] mailbox: pcc: Drop uninformative output during boot

2017-08-01 Thread Punit Agrawal
seful information. Drop this message. Signed-off-by: Punit Agrawal Cc: Jassi Brar Acked-by: Alexey Klimov --- Hi Rafael, Re-sending the patch with linux-acpi on cc and tags applied as requested. If there are no objections please consider merging. Thanks, Punit drivers/mailbox/pcc.c | 4 +--- 1 file ch

[PATCH 0/3] Refactor GHES to better support non-APEI systems

2017-08-01 Thread Punit Agrawal
discussion. They patches are based on v4.13-rc3 and have been tested on a system that does not support APEI. Further testing on systems that support APEI to ensure that the changes do not break expected behaviour will be greatly appreciated. Thanks, Punit [0] https://lkml.org/lkml/2017/7/20/430 Punit

[PATCH 1/3] GHES: Expand the estatus pool in ghes_estatus_pool_init()

2017-08-01 Thread Punit Agrawal
pool by calling ghes_estatus_pool_expand(). The change is in preparation for moving the pool creation out of driver initialisation to when a platform device is being probed. Signed-off-by: Punit Agrawal Cc: Borislav Petkov Cc: James Morse --- drivers/acpi/apei/ghes.c | 55

[PATCH 2/3] GHES: Move memory initialisation to ghes_probe()

2017-08-01 Thread Punit Agrawal
are currently performed on driver init. The function is called when the GHES device is probed. Delaying initialisation and checks until probe has the added benefit of reducing driver prints on systems that do not support ACPI APEI. Signed-off-by: Punit Agrawal Cc: Borislav Petkov Cc: James Morse

[PATCH 3/3] ACPI / APEI: HEST: Don't set hest_disable if table not found

2017-08-01 Thread Punit Agrawal
that do not have the HEST table or APEI support. Update the initialisation to skip setting hest_disable when the HEST table is not found. Signed-off-by: Punit Agrawal Cc: Borislav Petkov --- drivers/acpi/apei/hest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH 2/3] GHES: Move memory initialisation to ghes_probe()

2017-08-01 Thread Punit Agrawal
Punit Agrawal writes: > During the driver init, the ghes driver initialises some data structures > which are only used if a GHES platform device is probed. Similarly, the > init function also checks for support for firmware first mode. > > Create a function, ghes_common_init(), th

[PATCH v5 0/8] Support for contiguous pte hugepages

2017-06-19 Thread Punit Agrawal
/2017/6/5/332 Punit Agrawal (5): mm, gup: Ensure real head page is ref-counted when using hugepages mm/hugetlb: add size parameter to huge_pte_offset() mm/hugetlb: Allow architectures to override huge_pte_clear() mm/hugetlb: Introduce set_huge_swap_pte_at() helper mm: rmap: Use correct

[PATCH v5 2/8] arm64: hugetlb: Remove spurious calls to huge_ptep_offset

2017-06-19 Thread Punit Agrawal
From: Steve Capper We don't need to call huge_ptep_offset as our accessors are already supplied with the pte_t *. This patch removes those spurious calls. Cc: David Woods Signed-off-by: Steve Capper [ Resolved rebase conflicts due to patch re-ordering ] Signed-off-by: Punit Agrawal ---

[PATCH v5 4/8] mm, gup: Ensure real head page is ref-counted when using hugepages

2017-06-19 Thread Punit Agrawal
with page_cache_get_speculative() where users already pass the appropriate page, i.e., the de-referenced head. Apply the same logic to fix gup_huge_[pud|pgd]() as well. Signed-off-by: Punit Agrawal Cc: Steve Capper Cc: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Aneesh Kumar K.V --- mm/gup.c | 12

[PATCH v5 5/8] mm/hugetlb: add size parameter to huge_pte_offset()

2017-06-19 Thread Punit Agrawal
encountered. Let's remove the ambiguity by adding a size parameter to convey additional information about the requested address. Also fixup the definition/usage of huge_pte_offset() throughout the tree. Signed-off-by: Punit Agrawal Acked-by: Steve Capper Cc: Catalin Marinas Cc: Will Deaco

[PATCH v5 6/8] mm/hugetlb: Allow architectures to override huge_pte_clear()

2017-06-19 Thread Punit Agrawal
ff-by: Punit Agrawal Acked-by: Arnd Bergmann Acked-by: Martin Schwidefsky Cc: Heiko Carstens Cc: "Aneesh Kumar K.V" Cc: Mike Kravetz --- arch/s390/include/asm/hugetlb.h | 2 +- include/asm-generic/hugetlb.h | 4 +++- mm/hugetlb.c| 2 +- 3 files changed, 5 insertions(

[PATCH v5 3/8] mm, gup: Remove broken VM_BUG_ON_PAGE compound check for hugepages

2017-06-19 Thread Punit Agrawal
ed-by: Steve Capper Signed-off-by: Punit Agrawal Acked-by: "Kirill A. Shutemov" Cc: Aneesh Kumar K.V --- mm/gup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index b3c7214d710d..e74e0b5a0c7c 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1357,7 +1357,6 @@ static i

[PATCH v5 7/8] mm/hugetlb: Introduce set_huge_swap_pte_at() helper

2017-06-19 Thread Punit Agrawal
current behaviour. Signed-off-by: Punit Agrawal Acked-by: Steve Capper Cc: Mike Kravetz Cc: "Aneesh Kumar K.V" --- include/linux/hugetlb.h | 13 + mm/hugetlb.c| 8 +--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/include/linux/hugetlb.h

[PATCH v5 8/8] mm: rmap: Use correct helper when poisoning hugepages

2017-06-19 Thread Punit Agrawal
Using set_pte_at() does not do the right thing when putting down HWPOISON swap entries for hugepages on architectures that support contiguous ptes. Fix this problem by using set_huge_swap_pte_at() which was introduced to fix exactly this problem. Signed-off-by: Punit Agrawal Acked-by: Steve

[PATCH v5 1/8] arm64: hugetlb: Refactor find_num_contig

2017-06-19 Thread Punit Agrawal
From: Steve Capper As we regularly check for contiguous pte's in the huge accessors, remove this extra check from find_num_contig. Cc: David Woods Signed-off-by: Steve Capper [ Resolved rebase conflicts due to patch re-ordering ] Signed-off-by: Punit Agrawal --- arch/arm64/mm/hugetlbp

Re: [PATCH 1/1] mm/hugetlb: Make huge_pte_offset() consistent and document behaviour

2017-07-26 Thread Punit Agrawal
Hi Michal, Michal Hocko writes: > On Wed 26-07-17 10:50:38, Michal Hocko wrote: >> On Tue 25-07-17 16:41:14, Punit Agrawal wrote: >> > When walking the page tables to resolve an address that points to >> > !p*d_present() entry, huge_pte_offset() returns inconsistent v

Re: [PATCH 1/1] mm/hugetlb: Make huge_pte_offset() consistent and document behaviour

2017-07-26 Thread Punit Agrawal
Michal Hocko writes: > On Wed 26-07-17 14:33:57, Michal Hocko wrote: >> On Wed 26-07-17 13:11:46, Punit Agrawal wrote: > [...] >> > I've been running tests from mce-test suite and libhugetlbfs for similar >> > changes we did on arm64. There could be assumptio

Re: [PATCH 3/4] ACPI / APEI: Drop uninformative messages during boot

2017-07-27 Thread Punit Agrawal
Hi Boris, Apologies for the delayed response. I somehow managed to lose updates on this thread. Borislav Petkov writes: > On Thu, Jul 20, 2017 at 06:50:51PM +0100, Punit Agrawal wrote: >> "Firmware does not support APEI firmware first mode" >> >> Thoughts? >

Re: [PATCH 3/4] ACPI / APEI: Drop uninformative messages during boot

2017-07-27 Thread Punit Agrawal
Borislav Petkov writes: > On Thu, Jul 27, 2017 at 10:35:45AM +0100, Punit Agrawal wrote: >> ... would you be open to a patch re-working the ghes driver >> initialisation to only do the platform driver registration. The the rest >> of the initialisation (including the apei_

Re: [PATCH 1/1] mm/hugetlb: Make huge_pte_offset() consistent and document behaviour

2017-07-27 Thread Punit Agrawal
Mike Kravetz writes: > On 07/26/2017 06:34 AM, Punit Agrawal wrote: >> Michal Hocko writes: >> >>> On Wed 26-07-17 14:33:57, Michal Hocko wrote: >>>> On Wed 26-07-17 13:11:46, Punit Agrawal wrote: >>> [...] >>>>> I've be

Re: [PATCH V3 05/10] acpi: apei: handle SEA notification type for ARMv8

2016-10-14 Thread Punit Agrawal
"Baicar, Tyler" writes: > Hello Punit, > > > On 10/12/2016 12:00 PM, Punit Agrawal wrote: >> Tyler Baicar writes: >> >>> ARM APEI extension proposal added SEA (Synchrounous External >>> Abort) notification type for ARMv8. >>> Add a

Re: [PATCH V3 10/10] arm64: KVM: add guest SEA support

2016-10-14 Thread Punit Agrawal
"Baicar, Tyler" writes: > Hello Punit, > > On 10/13/2016 7:14 AM, Punit Agrawal wrote: >> Hi Tyler, >> >> I know I've had my last comment already ;), but I thought I'd rather >> raise the question than stay confused... >> >> Tyler

Re: [PATCH v14 04/16] iommu/dma: MSI doorbell alloc/free

2016-10-14 Thread Punit Agrawal
Hi Eric, One query and a comment below. Eric Auger writes: > We introduce the capability to (un)register MSI doorbells. > > A doorbell region is characterized by its physical address base, size, > and whether it its safe (ie. it implements IRQ remapping). A doorbell > can be per-cpu or global.

Re: [PATCH v14 00/16] KVM PCIe/MSI passthrough on ARM/ARM64

2016-10-14 Thread Punit Agrawal
Hi Eric, I am a bit late in joining, but I've tried to familiarise myself with earlier discussions on the series. Eric Auger writes: > This is the second respin on top of Robin's series [1], addressing Alex' > comments. > > Major changes are: > - MSI-doorbell API now is moved to DMA IOMMU API

Re: [PATCH v14 00/16] KVM PCIe/MSI passthrough on ARM/ARM64

2016-10-17 Thread Punit Agrawal
Auger Eric writes: > Hi Punit, > > On 14/10/2016 13:24, Punit Agrawal wrote: >> Hi Eric, >> >> I am a bit late in joining, but I've tried to familiarise >> myself with earlier discussions on the series. >> >> Eric Auger writes: >> &

[PATCH] Documentation: DMA-API: Clarify semantics of dma_set_mask_and_coherent

2016-10-17 Thread Punit Agrawal
. Signed-off-by: Punit Agrawal Cc: Jonathan Corbet --- Documentation/DMA-API-HOWTO.txt | 39 +++ 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt index 979228b..240d1ee 100644 --- a

[PATCH] acpi/apei: Fix in-correct return value

2016-10-18 Thread Punit Agrawal
Although ghes_proc tests for error while reading the error status, it always return success (0). Fix this by propagating the return value. Fixes: d334a49113a4a33 ("ACPI, APEI, Generic Hardware Error Source memory error support") Signed-of-by: Punit Agrawal Cc: "Rafael J. Wysocki&

[RFC v2 PATCH 0/7] Add support for monitoring guest TLB operations

2016-09-05 Thread Punit Agrawal
: add __tlbi() macro arm64/kvm: hyp: tlb: use __tlbi() helper Punit Agrawal (5): perf/trace: Add notification for perf trace events KVM: Track the pid of the VM process KVM: arm/arm64: Register perf trace event notifier arm64: KVM: Handle trappable TLB instructions arm64: KVM: Enabl

[RFC v2 PATCH 2/7] KVM: Track the pid of the VM process

2016-09-05 Thread Punit Agrawal
: Punit Agrawal Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Christoffer Dall Cc: Marc Zyngier --- include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 9c28b4d..7c42c94 10

[RFC v2 PATCH 1/7] perf/trace: Add notification for perf trace events

2016-09-05 Thread Punit Agrawal
specific contexts (e.g., virtual machines). Signed-off-by: Punit Agrawal Cc: Steven Rostedt Cc: Ingo Molnar --- include/linux/trace_events.h| 3 +++ kernel/trace/trace_event_perf.c | 24 2 files changed, 27 insertions(+) diff --git a/include/linux/trace_events.h b

[RFC v2 PATCH 7/7] arm64: KVM: Enable selective trapping of TLB instructions

2016-09-05 Thread Punit Agrawal
for a specific virtual machine. Signed-off-by: Punit Agrawal Cc: Christoffer Dall Cc: Marc Zyngier --- arch/arm64/kvm/perf_trace.c | 32 1 file changed, 32 insertions(+) diff --git a/arch/arm64/kvm/perf_trace.c b/arch/arm64/kvm/perf_trace.c index 8bacd18

[RFC v2 PATCH 3/7] KVM: arm/arm64: Register perf trace event notifier

2016-09-05 Thread Punit Agrawal
Register a notifier to track state changes of perf trace events. The notifier will enable taking appropriate action for trace events targeting VM. Signed-off-by: Punit Agrawal Cc: Christoffer Dall Cc: Marc Zyngier --- arch/arm/include/asm/kvm_host.h | 3 + arch/arm/kvm/arm.c

[RFC v2 PATCH 6/7] arm64: KVM: Handle trappable TLB instructions

2016-09-05 Thread Punit Agrawal
The ARMv8 architecture allows trapping of TLB maintenane instructions from EL0/EL1 to higher exception levels. On encountering a trappable TLB instruction in a guest, an exception is taken to EL2. Add functionality to handle emulating the TLB instructions. Signed-off-by: Punit Agrawal Cc

<    1   2   3   4   5   6   >