[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <09c64b28-5eb5-4efd-6cb8-035b69313a99@redhat.com>
Date: Fri, 7 Apr 2017 11:21:41 +0200
From: Laszlo Ersek <lersek@...hat.com>
To: gengdongjiu <gengdongjiu@...wei.com>,
Achin Gupta <achin.gupta@....com>
Cc: ard.biesheuvel@...aro.org, edk2-devel@...ts.01.org,
qemu-devel@...gnu.org, zhaoshenglong@...wei.com,
James Morse <james.morse@....com>,
Christoffer Dall <cdall@...aro.org>, xiexiuqi@...wei.com,
Marc Zyngier <marc.zyngier@....com>, catalin.marinas@....com,
will.deacon@....com, christoffer.dall@...aro.org,
rkrcmar@...hat.com, suzuki.poulose@....com, andre.przywara@....com,
mark.rutland@....com, vladimir.murzin@....com,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
wangxiongfeng2@...wei.com, wuquanming@...wei.com,
huangshaoyu@...wei.com, Leif.Lindholm@...aro.com, nd@....com,
Michael Tsirkin <mtsirkin@...hat.com>,
Igor Mammedov <imammedo@...hat.com>
Subject: Re: [PATCH] kvm: pass the virtual SEI syndrome to guest OS
On 04/07/17 04:52, gengdongjiu wrote:
>
> On 2017/4/7 2:55, Laszlo Ersek wrote:
>> I'm unsure if, by "not fixed", you are saying
>>
>> the number of CPER entries that fits in Error Status Data Block N is
>> not *uniform* across 0 <= N <= 10 [1]
>>
>> or
>>
>> the number of CPER entries that fits in Error Status Data Block N is
>> not *known* in advance, for all of 0 <= N <= 10 [2]
>>
>> Which one is your point?
>>
>> If [1], that's no problem; you can simply sum the individual error
>> status data block sizes in advance, and allocate "etc/hardware_errors"
>> accordingly, using the total size.
>>
>> (Allocating one shared fw_cfg blob for all status data blocks is more
>> memory efficient, as each ALLOCATE command will allocate whole pages
>> (rounded up from the actual blob size).)
>>
>> If your point is [2], then splitting the error status data blocks to
>> separate fw_cfg blobs makes no difference: regardless of whether we try
>> to place all the error status data blocks in a single fw_cfg blob, or in
>> separate fw_cfg blobs, the individual data block cannot be resized at OS
>> runtime, so there's no way to make it work.
>>
> My Point is [2]. The HEST(Hardware Error Source Table) table format is here:
> https://wiki.linaro.org/LEG/Engineering/Kernel/RAS/APEITables#Hardware_Error_Source_Table_.28HEST.29
>
> Now I understand your thought.
But if you mean [2], then I am confused, with regard to firmware on
physical hardware. Namely, even on physical machines, the firmware has
to estimate, in advance, the area size that will be needed for CPERs,
doesn't it? And once the firmware allocates that memory area, it cannot
be resized at OS runtime. If there are more CPERs at runtime (due to
hardware errors) than the firmware allocated room for, they must surely
wrap around in the preallocated buffer (like in a ring buffer). Isn't
that correct?
On the diagrams that you linked above (great looking diagrams BTW!), I
see CPER in two places (it is helpfully shaded red):
- to the right of BERT; the CPER is part of a box that is captioned
"firmware reserved memory"
- to the right of HEST; again the CPER is part of a box that is
captioned "firmware reserved memory"
So, IMO, when QEMU has to guesstimate the room for CPERs in advance,
that doesn't differ from the physical firmware case. In QEMU maybe you
can let the user specify the area size on the command line, with a
machine type property or similar.
Thanks
Laszlo
Powered by blists - more mailing lists