From: "Michael S. Tsirkin" <mst@redhat.com>
To: Dongjiu Geng <gengdongjiu@huawei.com>
Cc: lersek@redhat.com, imammedo@redhat.com, famz@redhat.com,
qemu-devel@nongnu.org, zhaoshenglong@huawei.com,
peter.maydell@linaro.org, qemu-arm@nongnu.org,
james.morse@arm.com, zhengqiang10@huawei.com,
huangshaoyu@huawei.com, wuquanming@huawei.com
Subject: Re: [Qemu-devel] [PATCH v5 0/3] Generate APEI GHES table and dynamically record CPER
Date: Thu, 13 Jul 2017 20:36:56 +0300 [thread overview]
Message-ID: <20170713203512-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1499825297-20335-1-git-send-email-gengdongjiu@huawei.com>
On Wed, Jul 12, 2017 at 10:08:14AM +0800, Dongjiu Geng wrote:
> 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
This is in a decent shape. I would prefer some cod cleanups
before this goes in. Mostly I would like the amount of
pointer math trickery to go down, drop a bunch of
unused code and fix up comments that point to ACPI spec.
I pointed out some instances but pls find all instances and try
to clean up some more.
Thanks!
> how to test:
> 1. In the guest OS, use this command to dump the APEI table:
> "iasl -p ./HEST -d /sys/firmware/acpi/tables/HEST"
> 2. And find the address for the generic error status block
> according to the notification type
> 3. then find the CPER record through the generic error status block.
>
> For example(notification type is SEA):
>
> (1) root@genericarmv8:~# iasl -p ./HEST -d /sys/firmware/acpi/tables/HEST
> (2) root@genericarmv8:~# cat HEST.dsl
> /*
> * Intel ACPI Component Architecture
> * AML/ASL+ Disassembler version 20170303 (64-bit version)
> * Copyright (c) 2000 - 2017 Intel Corporation
> *
> * Disassembly of /sys/firmware/acpi/tables/HEST, Mon Dec 12 07:19:43 2016
> *
> * ACPI Data Table [HEST]
> *
> * Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue
> */
> ..................................................................................
> [228h 0552 2] Subtable Type : 0009 [Generic Hardware Error Source]
> [22Ah 0554 2] Source Id : 0008
> [22Ch 0556 2] Related Source Id : FFFF
> [22Eh 0558 1] Reserved : 00
> [22Fh 0559 1] Enabled : 01
> [230h 0560 4] Records To Preallocate : 00000001
> [234h 0564 4] Max Sections Per Record : 00000001
> [238h 0568 4] Max Raw Data Length : 00001000
>
> [23Ch 0572 12] Error Status Address : [Generic Address Structure]
> [23Ch 0572 1] Space ID : 00 [SystemMemory]
> [23Dh 0573 1] Bit Width : 40
> [23Eh 0574 1] Bit Offset : 00
> [23Fh 0575 1] Encoded Access Width : 04 [QWord Access:64]
> [240h 0576 8] Address : 00000000785D0040
>
> [248h 0584 28] Notify : [Hardware Error Notification Structure]
> [248h 0584 1] Notify Type : 08 [SEA]
> [249h 0585 1] Notify Length : 1C
> [24Ah 0586 2] Configuration Write Enable : 0000
> [24Ch 0588 4] PollInterval : 00000000
> [250h 0592 4] Vector : 00000000
> [254h 0596 4] Polling Threshold Value : 00000000
> [258h 0600 4] Polling Threshold Window : 00000000
> [25Ch 0604 4] Error Threshold Value : 00000000
> [260h 0608 4] Error Threshold Window : 00000000
>
> [264h 0612 4] Error Status Block Length : 00001000
> .....................................................................................
> (3) according to above table, the address that contains the physical address of a block
> of memory that holds the error status data for SEA notification error source is 0x00000000785D0040
> (4) the address for SEA notification error source is 0x785d8058
> (qemu) xp /2x 0x00000000785D0040
> 00000000785d0040: 0x785d8058 0x00000000
> (5) check the content of generic error status block and generic error data entry
> (qemu) xp /100x 0x785d8058
> 00000000785d8058: 0x00000001 0x00000000 0x00000000 0x00000098
> 00000000785d8068: 0x00000001 0xa5bc1114 0x4ede6f64 0x833e63b8
> 00000000785d8078: 0xb1837ced 0x00000000 0x00000000 0x00000050
> 00000000785d8088: 0x00000000 0x00000000 0x00000000 0x00000000
> 00000000785d8098: 0x00000000 0x00000000 0x00000000 0x00000000
> 00000000785d80a8: 0x00000000 0x00000000 0x00000000 0x00004002
> 00000000785d80b8: 0x00000000 0x00000000 0x00000000 0x00001111
> 00000000785d80c8: 0x00000000 0x00000000 0x00000000 0x00000000
> 00000000785d80d8: 0x00000000 0x00000000 0x00000000 0x00000000
> 00000000785d80e8: 0x00000000 0x00000000 0x00000000 0x00000000
> 00000000785d80f8: 0x00000000 0x00000003 0x00000000 0x00000000
> 00000000785d8108: 0x00000000 0x00000000 0x00000000 0x00000000
> 00000000785d8118: 0x00000000 0x00000000 0x00000000 0x00000000
> 00000000785d8128: 0x00000000 0x00000000 0x00000000 0x00000000
> 00000000785d8138: 0x00000000 0x00000000 0x00000000 0x00000000
>
> Dongjiu Geng (3):
> ACPI: Add new ACPI structures and macros
> ACPI: Add APEI GHES Table Generation support
> ACPI: build and enable APEI GHES in the Makefile and configuration
>
> default-configs/arm-softmmu.mak | 1 +
> hw/acpi/Makefile.objs | 1 +
> hw/acpi/aml-build.c | 2 +
> hw/acpi/hest_ghes.c | 219 ++++++++++++++++++++++++++++++++++++++++
> hw/arm/virt-acpi-build.c | 6 ++
> include/hw/acpi/acpi-defs.h | 194 +++++++++++++++++++++++++++++++++++
> include/hw/acpi/aml-build.h | 1 +
> include/hw/acpi/hest_ghes.h | 47 +++++++++
> include/qemu/uuid.h | 11 ++
> 9 files changed, 482 insertions(+)
> create mode 100644 hw/acpi/hest_ghes.c
> create mode 100644 include/hw/acpi/hest_ghes.h
>
> --
> 2.10.1
prev parent reply other threads:[~2017-07-13 17:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 2:08 [Qemu-devel] [PATCH v5 0/3] Generate APEI GHES table and dynamically record CPER Dongjiu Geng
2017-07-12 2:08 ` [Qemu-devel] [PATCH v5 1/3] ACPI: Add new ACPI structures and macros Dongjiu Geng
2017-07-13 10:33 ` Laszlo Ersek
2017-07-13 12:00 ` gengdongjiu
2017-07-13 15:33 ` Laszlo Ersek
2017-07-13 17:13 ` Michael S. Tsirkin
2017-07-14 8:25 ` gengdongjiu
2017-07-13 17:35 ` Michael S. Tsirkin
2017-07-13 17:01 ` Michael S. Tsirkin
2017-07-14 5:51 ` gengdongjiu
2017-07-13 17:11 ` Michael S. Tsirkin
2017-07-14 8:22 ` gengdongjiu
2017-07-12 2:08 ` [Qemu-devel] [PATCH v5 2/3] ACPI: Add APEI GHES Table Generation support Dongjiu Geng
2017-07-13 17:32 ` Michael S. Tsirkin
2017-07-13 19:41 ` Laszlo Ersek
2017-07-13 22:31 ` Michael S. Tsirkin
2017-07-17 4:43 ` gengdongjiu
2017-07-12 2:08 ` [Qemu-devel] [PATCH v5 3/3] ACPI: build and enable APEI GHES in the Makefile and configuration Dongjiu Geng
2017-07-13 17:36 ` Michael S. Tsirkin [this message]
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-all 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=20170713203512-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=famz@redhat.com \
--cc=gengdongjiu@huawei.com \
--cc=huangshaoyu@huawei.com \
--cc=imammedo@redhat.com \
--cc=james.morse@arm.com \
--cc=lersek@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=wuquanming@huawei.com \
--cc=zhaoshenglong@huawei.com \
--cc=zhengqiang10@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).