Subject: Re: [RFC PATCH v5 1/9] fadump: Add documentation for firmware-assisted dump.

From: Mahesh Jagannath Salgaonkar <[email-masked]>
Date: Sat, 10 Dec 2011 10:32:37 +0530

On 11/25/2011 04:04 AM, Paul Mackerras wrote:
>> + /sys/kernel/debug/powerpc/fadump_region
>> +
>> +    This file shows the reserved memory regions if fadump is
>> +    enabled otherwise this file is empty. The output format
>> +    is:
>> +    <region>: [<start>-<end>] <reserved-size> bytes, Dumped: <dump-size>
>> +
>> +    e.g.
>> +    Contents when fadump is registered during first kernel
>> +
>> +    # cat /sys/kernel/debug/powerpc/fadump_region
>> +    CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x0
>> +    HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x0
>> +    DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x0
> 
> How come the HPTE region is only 0x1000 (4k) bytes?  The hashed page
> table (HPT) will be much bigger than this.  Is this our way of telling
> the hypervisor that we don't care about the HPT?  If so, is it
> possible to make this region 0 bytes instead of 0x1000?
> 

The firmware assisted dump registration fails with "Hardware
error (-1)" when called with HPTE dump section with size 0.

According to PAPR the size returned by ibm,configure-kernel-dump-sizes
node for HPTE dump section is a minimum size for HPTE dump section.

Though PAPR dose not mention this, but after sevaral trial and error, it
looks like the HPTE dump section is one of the mandatory
argument that needs to be passed (with non-zero size) while making
ibm,configure-kernel-dump rtas call.

Thanks,
-Mahesh.