From: Dongjiu Geng <gengdongjiu@huawei.com> To: <pbonzini@redhat.com>, <mst@redhat.com>, <imammedo@redhat.com>, <zhaoshenglong@huawei.com>, <peter.maydell@linaro.org>, <mtosatti@redhat.com>, <james.morse@arm.com>, <lersek@redhat.com>, <marc.zyngier@arm.com>, <christoffer.dall@linaro.org>, <rth@twiddle.net>, <ehabkost@redhat.com>, <kvm@vger.kernel.org>, <guohanjun@huawei.com>, <lijinyue@huawei.com>, <huangshaoyu@huawei.com>, <wuquanming@huawei.com>, <zhengqiang10@huawei.com>, <linuxarm@huawei.com>, <qemu-devel@nongnu.org>, <qemu-arm@nongnu.org> Subject: [PATCH v13 01/12] ACPI: add related GHES structures and macros definition Date: Tue, 28 Nov 2017 02:49:44 +0800 [thread overview] Message-ID: <1511808595-24158-2-git-send-email-gengdongjiu@huawei.com> (raw) In-Reply-To: <1511808595-24158-1-git-send-email-gengdongjiu@huawei.com> Add Generic Error Status Block structures and some macros definition, which refer to the ACPI 4.0 and ACPI 6.1. The HEST table generation and CPER record will use them. Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com> --- Address Igor's comments to to get rid of most structures and use build_append_int_noprefix() API to compose whole error status block and APEI table in [1] [1]: https://lkml.org/lkml/2017/8/29/187 --- include/hw/acpi/acpi-defs.h | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h index 72be675..f955f1b 100644 --- a/include/hw/acpi/acpi-defs.h +++ b/include/hw/acpi/acpi-defs.h @@ -298,6 +298,25 @@ typedef struct AcpiMultipleApicTable AcpiMultipleApicTable; #define ACPI_APIC_RESERVED 16 /* 16 and greater are reserved */ /* + * ACPI 4.0 spec, "17.3.2.7 Hardware Error Notification" + */ +enum AcpiHestNotifyType { + ACPI_HEST_NOTIFY_POLLED = 0, + ACPI_HEST_NOTIFY_EXTERNAL = 1, + ACPI_HEST_NOTIFY_LOCAL = 2, + ACPI_HEST_NOTIFY_SCI = 3, + ACPI_HEST_NOTIFY_NMI = 4, + ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */ + ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */ + ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */ + ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */ + ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */ + ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */ + ACPI_HEST_NOTIFY_SDEI = 11, /* ACPI 6.2 */ + ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */ +}; + +/* * MADT sub-structures (Follow MULTIPLE_APIC_DESCRIPTION_TABLE) */ #define ACPI_SUB_HEADER_DEF /* Common ACPI sub-structure header */\ @@ -474,6 +493,36 @@ struct AcpiSystemResourceAffinityTable { } QEMU_PACKED; typedef struct AcpiSystemResourceAffinityTable AcpiSystemResourceAffinityTable; +/* + * ACPI 4.0, "17.3.2.6.1 Generic Error Data" + */ +#define ACPI_GEBS_UNCORRECTABLE (1) +/* + * ACPI 6.1, "18.3.2.8 Generic Hardware Error + * Source version 2" + */ +#define ACPI_HEST_SOURCE_GENERIC_ERROR_V2 (10) +/* + * Table 17-12 Generic Error Status Block, ACPI 4.0, + * "17.3.2.6.1 Generic Error Data" + */ +struct AcpiGenericErrorStatus { + /* It is a bitmask composed of ACPI_GEBS_xxx macros */ + uint32_t block_status; + uint32_t raw_data_offset; + uint32_t raw_data_length; + uint32_t data_length; + uint32_t error_severity; +} QEMU_PACKED; +typedef struct AcpiGenericErrorStatus AcpiGenericErrorStatus; + +enum AcpiGenericErrorSeverity { + ACPI_CPER_SEV_RECOVERABLE, + ACPI_CPER_SEV_FATAL, + ACPI_CPER_SEV_CORRECTED, + ACPI_CPER_SEV_NONE, +}; + #define ACPI_SRAT_PROCESSOR_APIC 0 #define ACPI_SRAT_MEMORY 1 #define ACPI_SRAT_PROCESSOR_x2APIC 2 -- 1.8.3.1
WARNING: multiple messages have this Message-ID (diff)
From: Dongjiu Geng <gengdongjiu@huawei.com> To: pbonzini@redhat.com, mst@redhat.com, imammedo@redhat.com, zhaoshenglong@huawei.com, peter.maydell@linaro.org, mtosatti@redhat.com, james.morse@arm.com, lersek@redhat.com, marc.zyngier@arm.com, christoffer.dall@linaro.org, rth@twiddle.net, ehabkost@redhat.com, kvm@vger.kernel.org, guohanjun@huawei.com, lijinyue@huawei.com, huangshaoyu@huawei.com, wuquanming@huawei.com, zhengqiang10@huawei.com, linuxarm@huawei.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org Subject: [Qemu-devel] [PATCH v13 01/12] ACPI: add related GHES structures and macros definition Date: Tue, 28 Nov 2017 02:49:44 +0800 [thread overview] Message-ID: <1511808595-24158-2-git-send-email-gengdongjiu@huawei.com> (raw) In-Reply-To: <1511808595-24158-1-git-send-email-gengdongjiu@huawei.com> Add Generic Error Status Block structures and some macros definition, which refer to the ACPI 4.0 and ACPI 6.1. The HEST table generation and CPER record will use them. Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com> --- Address Igor's comments to to get rid of most structures and use build_append_int_noprefix() API to compose whole error status block and APEI table in [1] [1]: https://lkml.org/lkml/2017/8/29/187 --- include/hw/acpi/acpi-defs.h | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h index 72be675..f955f1b 100644 --- a/include/hw/acpi/acpi-defs.h +++ b/include/hw/acpi/acpi-defs.h @@ -298,6 +298,25 @@ typedef struct AcpiMultipleApicTable AcpiMultipleApicTable; #define ACPI_APIC_RESERVED 16 /* 16 and greater are reserved */ /* + * ACPI 4.0 spec, "17.3.2.7 Hardware Error Notification" + */ +enum AcpiHestNotifyType { + ACPI_HEST_NOTIFY_POLLED = 0, + ACPI_HEST_NOTIFY_EXTERNAL = 1, + ACPI_HEST_NOTIFY_LOCAL = 2, + ACPI_HEST_NOTIFY_SCI = 3, + ACPI_HEST_NOTIFY_NMI = 4, + ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */ + ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */ + ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */ + ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */ + ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */ + ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */ + ACPI_HEST_NOTIFY_SDEI = 11, /* ACPI 6.2 */ + ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */ +}; + +/* * MADT sub-structures (Follow MULTIPLE_APIC_DESCRIPTION_TABLE) */ #define ACPI_SUB_HEADER_DEF /* Common ACPI sub-structure header */\ @@ -474,6 +493,36 @@ struct AcpiSystemResourceAffinityTable { } QEMU_PACKED; typedef struct AcpiSystemResourceAffinityTable AcpiSystemResourceAffinityTable; +/* + * ACPI 4.0, "17.3.2.6.1 Generic Error Data" + */ +#define ACPI_GEBS_UNCORRECTABLE (1) +/* + * ACPI 6.1, "18.3.2.8 Generic Hardware Error + * Source version 2" + */ +#define ACPI_HEST_SOURCE_GENERIC_ERROR_V2 (10) +/* + * Table 17-12 Generic Error Status Block, ACPI 4.0, + * "17.3.2.6.1 Generic Error Data" + */ +struct AcpiGenericErrorStatus { + /* It is a bitmask composed of ACPI_GEBS_xxx macros */ + uint32_t block_status; + uint32_t raw_data_offset; + uint32_t raw_data_length; + uint32_t data_length; + uint32_t error_severity; +} QEMU_PACKED; +typedef struct AcpiGenericErrorStatus AcpiGenericErrorStatus; + +enum AcpiGenericErrorSeverity { + ACPI_CPER_SEV_RECOVERABLE, + ACPI_CPER_SEV_FATAL, + ACPI_CPER_SEV_CORRECTED, + ACPI_CPER_SEV_NONE, +}; + #define ACPI_SRAT_PROCESSOR_APIC 0 #define ACPI_SRAT_MEMORY 1 #define ACPI_SRAT_PROCESSOR_x2APIC 2 -- 1.8.3.1
next prev parent reply other threads:[~2017-11-27 10:44 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-11-27 18:49 [PATCH v13 00/12] Add ARMv8 RAS virtualization support in QEMU Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng 2017-11-27 18:49 ` Dongjiu Geng [this message] 2017-11-27 18:49 ` [Qemu-devel] [PATCH v13 01/12] ACPI: add related GHES structures and macros definition Dongjiu Geng 2017-11-27 18:49 ` [PATCH v13 02/12] ACPI: Add APEI GHES table generation and CPER record support Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng 2017-11-27 18:49 ` [PATCH v13 03/12] docs: APEI GHES generation description Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng 2017-11-27 18:49 ` [PATCH v13 04/12] ACPI: enable APEI GHES in the configure file and build it Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng 2017-11-27 18:49 ` [PATCH v13 05/12] linux-headers: sync against Linux v4.14-rc8 Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng 2017-11-27 18:49 ` [PATCH v13 06/12] target-arm: kvm64: detect whether can set vsesr_el2 Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng 2017-11-27 18:49 ` [PATCH v13 07/12] target-arm: handle SError interrupt exception from the guest OS Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng 2017-11-27 18:49 ` [PATCH v13 08/12] target-arm: kvm64: inject synchronous External Abort Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng 2017-11-27 18:49 ` [PATCH v13 09/12] Move related hwpoison page function to accel/kvm/ folder Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng 2017-11-27 18:49 ` [PATCH v13 10/12] ARM: ACPI: Add _E04 for hardware error device Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng 2017-11-27 18:49 ` [PATCH v13 11/12] hw/arm/virt: Add RAS platform version for migration Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng 2017-11-27 18:49 ` [PATCH v13 12/12] target-arm: kvm64: handle SIGBUS signal from kernel or KVM Dongjiu Geng 2017-11-27 18:49 ` [Qemu-devel] " Dongjiu Geng
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=1511808595-24158-2-git-send-email-gengdongjiu@huawei.com \ --to=gengdongjiu@huawei.com \ --cc=christoffer.dall@linaro.org \ --cc=ehabkost@redhat.com \ --cc=guohanjun@huawei.com \ --cc=huangshaoyu@huawei.com \ --cc=imammedo@redhat.com \ --cc=james.morse@arm.com \ --cc=kvm@vger.kernel.org \ --cc=lersek@redhat.com \ --cc=lijinyue@huawei.com \ --cc=linuxarm@huawei.com \ --cc=marc.zyngier@arm.com \ --cc=mst@redhat.com \ --cc=mtosatti@redhat.com \ --cc=pbonzini@redhat.com \ --cc=peter.maydell@linaro.org \ --cc=qemu-arm@nongnu.org \ --cc=qemu-devel@nongnu.org \ --cc=rth@twiddle.net \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.