> On Aug 4, 2017, at 1:22 AM, qemu-devel-requ...@nongnu.org wrote: > > Date: Fri, 4 Aug 2017 12:37:52 +0800 > From: Dongjiu Geng <gengdong...@huawei.com> > To: <ler...@redhat.com>, <m...@redhat.com>, <imamm...@redhat.com>, > <zhaoshengl...@huawei.com>, <peter.mayd...@linaro.org>, > <qemu-devel@nongnu.org>, <qemu-...@nongnu.org> > Cc: <gengdong...@huawei.com>, <huangsha...@huawei.com>, > <wuquanm...@huawei.com> > Subject: [Qemu-devel] [PATCH v6 0/3] Generate APEI GHES table and > dynamically record CPER > Message-ID: <1501821475-14647-1-git-send-email-gengdong...@huawei.com> > Content-Type: text/plain > > In the armv8 platform, the mainly hardware error source are ARMv8 > SEA/SEI/GSIV. For the ARMv8 SEA/SEI, the KVM or host kernel will signal SIGBUS > or use other interface to notify user space, such as Qemu. After Qemu gets > the notification, it will record the CPER and inject the SEA/SEI to KVM. this > series of patches will generate APEI table when guest OS boot up, and > dynamically > record CPER for the guest OS about the generic hardware errors, currently the > userspace only handle the memory section hardware errors. Before Qemu record > the > CPER, it needs to check the ACK value written by the guest OS to avoid > read-write > race condition. > > Below is the APEI/GHESV2/CPER table layout, the max number of error soure is > 11, > which is classified by notification type, now only enable the SEA/SEI > notification type > error source. > > etc/acpi/tables etc/hardware_errors > ==================== > ========================================== > +------------------+ > +----------------------------+ | address | > +--------------+ > | HEST + | registers | | > Error Status | > + +--------------------------+ | +----------------+ | > Data Block 0 | > | | GHES0 | +--------->| |status_address0 |------------->| > +------------+ > +--------------------------+ | | +----------------+ | | > CPER | > | | ................. | | +------->| |status_address1 |----------+ | > | CPER | > | | error_status_address | | | | +----------------+ | | > | .... | > | | ................. | | | | ............. | | | > | CPER | > | | error_status_address-----+-+ | +------------------+ | | > +-+------------+ > | | ................. | | +----->| |status_address10|--------+ | | > Error Status | > | | read_ack_register--------+-+ | | | +----------------+ | | | > Data Block 1 | > | | read_ack_preserve | +-+-+----->| |ack_address0 |--+ | +-->| > +------------+ > | | read_ack_write | | | | +----------------+ | | | > | CPER | > + +--------------------------+ | | +--->| |ack_address1 |--+-+ | | > | CPER | > | | GHES1 | | | | | +----------------+ | | | | > | .... | > + +--------------------------+ | | | | | ............. | | | | | > | CPER | > | | ................. | | | | | +----------------+ | | | > +-+------------+ > | | error_status_address-----+---+ | | +->| |ack_address10 |--+-+-+ | | > |.......... | > | | ................. | | | | | +----------------+ | | | | | > +------------+ > | | read_ack_register--------+-----+-+ | | | ack0 |<-+ | | | | > Error Status | > | | read_ack_preserve | | | | +----------------+ | | | | > Data Block 10| > | | read_ack_write | | | | | ack1 |<---+ | +---->| > +------------+ > + +--------------------------+ | | | +----------------+ | | > | CPER | > | | ............... | | | | | .... | | | > | CPER | > + +--------------------------+ | | | +--------------+ | | | > | .... | > | | GHES10 | | | | | ack10 |<---- + | > | CPER | > + +--------------------------+ | | | +----------------+ > +-+------------+ > | | ................. | | | > | | error_status_address-----+-----+ | > | | ................. | | > | | read_ack_register--------+---------+ > | | read_ack_preserve | > | | read_ack_write | > + +--------------------------+
Excellent job with the ASCII drawing.