[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v17 02/10] ACPI: add some GHES structures and ma
From: |
gengdongjiu |
Subject: |
Re: [Qemu-devel] [PATCH v17 02/10] ACPI: add some GHES structures and macros definition |
Date: |
Thu, 30 May 2019 22:58:23 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 2019/5/29 11:40, Michael S. Tsirkin wrote:
> On Tue, May 14, 2019 at 04:18:15AM -0700, Dongjiu Geng wrote:
>> Add Generic Error Status Block structures and some macros
>> definitions, which is referred to the ACPI 4.0 or ACPI 6.2. The
>> HEST table generation and CPER record will use them.
>>
>> Signed-off-by: Dongjiu Geng <address@hidden>
>
> Are these all still used? I'd rather you moved stuff to
> where it's used.
Ok, I will move them, thanks
>
>
>
>> ---
>> include/hw/acpi/acpi-defs.h | 52
>> +++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 52 insertions(+)
>>
>> diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h
>> index f9aa4bd..d1996fb 100644
>> --- a/include/hw/acpi/acpi-defs.h
>> +++ b/include/hw/acpi/acpi-defs.h
>> @@ -224,6 +224,25 @@ typedef struct AcpiMultipleApicTable
>> AcpiMultipleApicTable;
>> #define ACPI_APIC_RESERVED 16 /* 16 and greater are reserved
>> */
>>
>> /*
>> + * Values for Hardware Error Notification Type field
>> + */
>> +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: 18.3.2.7, Table 18-290 */
>> + ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0: 18.3.2.7, Table 18-290 */
>> + ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0: 18.3.2.7, Table 18-332 */
>> + ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1: 18.3.2.9, Table 18-345 */
>> + ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1: 18.3.2.9, Table 18-345 */
>> + ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1: 18.3.2.9, Table 18-345 */
>> + ACPI_HEST_NOTIFY_SDEI = 11, /* ACPI 6.2: 18.3.2.9, Table 18-383 */
>> + ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */
>> +};
>> +
>
> If there's a single user, the best thing to do
> is just to open-code with a comment that matches
> spec names. It's hard to find stuff like ACPI_HEST_NOTIFY_GSIV
> in a spec.
ok, I will do it, thanks
>
>> +/*
>> * MADT sub-structures (Follow MULTIPLE_APIC_DESCRIPTION_TABLE)
>> */
>> #define ACPI_SUB_HEADER_DEF /* Common ACPI sub-structure header */\
>> @@ -400,6 +419,39 @@ struct AcpiSystemResourceAffinityTable {
>> } QEMU_PACKED;
>> typedef struct AcpiSystemResourceAffinityTable
>> AcpiSystemResourceAffinityTable;
>>
>> +/*
>> + * Generic Error Status Block
>> + */
>> +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;
>> +
>> +/*
>> + * Masks for block_status flags above
>> + */
>> +#define ACPI_GEBS_UNCORRECTABLE 1
>> +
>> +/*
>> + * Values for error_severity field above
>> + */
>> +enum AcpiGenericErrorSeverity {
>> + ACPI_CPER_SEV_RECOVERABLE,
>> + ACPI_CPER_SEV_FATAL,
>> + ACPI_CPER_SEV_CORRECTED,
>> + ACPI_CPER_SEV_NONE,
>> +};
>> +
>> +/*
>> + * Generic Hardware Error Source version 2
>> + */
>> +#define ACPI_HEST_SOURCE_GENERIC_ERROR_V2 10
>> +
>> #define ACPI_SRAT_PROCESSOR_APIC 0
>> #define ACPI_SRAT_MEMORY 1
>> #define ACPI_SRAT_PROCESSOR_x2APIC 2
>> --
>> 1.8.3.1
> .
>
- [Qemu-devel] [PATCH v17 00/10] Add ARMv8 RAS virtualization support in QEMU, Dongjiu Geng, 2019/05/14
- [Qemu-devel] [PATCH v17 01/10] hw/arm/virt: Add RAS platform version for migration, Dongjiu Geng, 2019/05/14
- [Qemu-devel] [PATCH v17 02/10] ACPI: add some GHES structures and macros definition, Dongjiu Geng, 2019/05/14
- [Qemu-devel] [PATCH v17 03/10] acpi: add build_append_ghes_notify() helper for Hardware Error Notification, Dongjiu Geng, 2019/05/14
- [Qemu-devel] [PATCH v17 05/10] acpi: add build_append_ghes_generic_status() helper for Generic Error Status Block, Dongjiu Geng, 2019/05/14
- [Qemu-devel] [PATCH v17 04/10] acpi: add build_append_ghes_generic_data() helper for Generic Error Data Entry, Dongjiu Geng, 2019/05/14
- [Qemu-devel] [PATCH v17 09/10] target-arm: kvm64: inject synchronous External Abort, Dongjiu Geng, 2019/05/14
- [Qemu-devel] [PATCH v17 10/10] target-arm: kvm64: handle SIGBUS signal from kernel or KVM, Dongjiu Geng, 2019/05/14
- [Qemu-devel] [PATCH v17 06/10] docs: APEI GHES generation and CPER record description, Dongjiu Geng, 2019/05/14
- [Qemu-devel] [PATCH v17 08/10] KVM: Move related hwpoison page functions to accel/kvm/ folder, Dongjiu Geng, 2019/05/14
- [Qemu-devel] [PATCH v17 07/10] ACPI: Add APEI GHES table generation support, Dongjiu Geng, 2019/05/14