public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: gengdongjiu <gengdongjiu@huawei.com>, Achin Gupta <achin.gupta@arm.com>
Cc: ard.biesheuvel@linaro.org, edk2-devel@lists.01.org,
	qemu-devel@nongnu.org, zhaoshenglong@huawei.com,
	James Morse <james.morse@arm.com>,
	Christoffer Dall <cdall@linaro.org>,
	xiexiuqi@huawei.com, Marc Zyngier <marc.zyngier@arm.com>,
	catalin.marinas@arm.com, will.deacon@arm.com,
	christoffer.dall@linaro.org, rkrcmar@redhat.com,
	suzuki.poulose@arm.com, andre.przywara@arm.com,
	mark.rutland@arm.com, vladimir.murzin@arm.com,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, wangxiongfeng2@huawei.com,
	wuquanming@huawei.com, huangshaoyu@huawei.com,
	Leif.Lindholm@linaro.com, nd@arm.com,
	Michael Tsirkin <mtsirkin@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [PATCH] kvm: pass the virtual SEI syndrome to guest OS
Date: Fri, 7 Apr 2017 11:21:41 +0200	[thread overview]
Message-ID: <09c64b28-5eb5-4efd-6cb8-035b69313a99@redhat.com> (raw)
In-Reply-To: <55546a4b-c33b-37b9-dafe-15ce75bc1b62@huawei.com>

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


  reply	other threads:[~2017-04-07  9:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <76795e20-2f20-1e54-cfa5-7444f28b18ee@huawei.com>
     [not found] ` <20170321113428.GC15920@cbox>
     [not found]   ` <58D17AF0.2010802@arm.com>
     [not found]     ` <20170321193933.GB31111@cbox>
     [not found]       ` <58DA3F68.6090901@arm.com>
     [not found]         ` <20170328112328.GA31156@cbox>
     [not found]           ` <20170328115413.GJ23682@e104320-lin>
     [not found]             ` <b1c6e747-2fa7-b7a1-60d5-4a9c480b9dc9@huawei.com>
     [not found]               ` <58DA67BA.8070404@arm.com>
     [not found]                 ` <5b7352f4-4965-3ed5-3879-db871797be47@huawei.com>
2017-03-29 10:36                   ` [PATCH] kvm: pass the virtual SEI syndrome to guest OS Achin Gupta
2017-03-29 11:58                     ` Laszlo Ersek
     [not found]                       ` <20170329154539-mutt-send-email-mst@kernel.org>
2017-03-29 13:36                         ` Laszlo Ersek
2017-04-06 12:35                       ` gengdongjiu
2017-04-06 18:55                         ` Laszlo Ersek
2017-04-07  2:52                           ` gengdongjiu
2017-04-07  9:21                             ` Laszlo Ersek [this message]
2017-04-21 13:27                           ` gengdongjiu
2017-04-24 11:27                             ` Laszlo Ersek
     [not found]                     ` <CAMj-D2BT3ByY-iFrRVVK7y=G7zhRBtM031VgLn6JzwUE-WCdWQ@mail.gmail.com>
     [not found]                       ` <20170329144822.GA1020@cbox>
2017-03-29 15:37                         ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09c64b28-5eb5-4efd-6cb8-035b69313a99@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox