Message ID | 6f427a02c2c20512d5da178b47c64d553851a60e.1733504943.git.mchehab+huawei@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Prepare GHES driver to support error injection | expand |
On Fri, Dec 6, 2024 at 10:51 PM Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote: > > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> > --- > hw/acpi/ghes.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c > index abca351b18de..1fe4c536611a 100644 > --- a/hw/acpi/ghes.c > +++ b/hw/acpi/ghes.c > @@ -534,9 +534,11 @@ void ghes_record_cper_errors(const void *cper, size_t len, > ags = &acpi_ged_state->ghes_state; > > if (!ags->hest_lookup) { > + fprintf(stderr,"Using old GHES lookup\n"); I don't like this. If you must please have them under #ifdef DEBUG or somesuch. See ich9.c > get_hw_error_offsets(le64_to_cpu(ags->hw_error_le), > &cper_addr, &read_ack_register_addr); > } else { > + fprintf(stderr,"Using new HEST lookup\n"); > get_ghes_source_offsets(source_id, le64_to_cpu(ags->hest_addr_le), > &cper_addr, &read_ack_register_addr, errp); > } > -- > 2.47.1 >
Ani Sinha <anisinha@redhat.com> writes: > On Fri, Dec 6, 2024 at 10:51 PM Mauro Carvalho Chehab > <mchehab+huawei@kernel.org> wrote: >> >> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> >> --- >> hw/acpi/ghes.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c >> index abca351b18de..1fe4c536611a 100644 >> --- a/hw/acpi/ghes.c >> +++ b/hw/acpi/ghes.c >> @@ -534,9 +534,11 @@ void ghes_record_cper_errors(const void *cper, size_t len, >> ags = &acpi_ged_state->ghes_state; >> >> if (!ags->hest_lookup) { >> + fprintf(stderr,"Using old GHES lookup\n"); > > I don't like this. If you must please have them under #ifdef DEBUG or > somesuch. See ich9.c Judging from the subject line, it's not meant to be posted, let alone merged :) >> get_hw_error_offsets(le64_to_cpu(ags->hw_error_le), >> &cper_addr, &read_ack_register_addr); >> } else { >> + fprintf(stderr,"Using new HEST lookup\n"); >> get_ghes_source_offsets(source_id, le64_to_cpu(ags->hest_addr_le), >> &cper_addr, &read_ack_register_addr, errp); >> } >> -- >> 2.47.1 >>
Em Sat, 07 Dec 2024 07:16:31 +0100 Markus Armbruster <armbru@redhat.com> escreveu: > Ani Sinha <anisinha@redhat.com> writes: > > > On Fri, Dec 6, 2024 at 10:51 PM Mauro Carvalho Chehab > > <mchehab+huawei@kernel.org> wrote: > >> > >> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> > >> --- > >> hw/acpi/ghes.c | 2 ++ > >> 1 file changed, 2 insertions(+) > >> > >> diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c > >> index abca351b18de..1fe4c536611a 100644 > >> --- a/hw/acpi/ghes.c > >> +++ b/hw/acpi/ghes.c > >> @@ -534,9 +534,11 @@ void ghes_record_cper_errors(const void *cper, size_t len, > >> ags = &acpi_ged_state->ghes_state; > >> > >> if (!ags->hest_lookup) { > >> + fprintf(stderr,"Using old GHES lookup\n"); > > > > I don't like this. If you must please have them under #ifdef DEBUG or > > somesuch. See ich9.c > > Judging from the subject line, it's not meant to be posted, let alone > merged :) Sorry! Yea, this was not meant to be posted. I ended submitting the entire pile of patches I have pending, including some patches I placed at the end to test that what method is used to calculate offsets (the one supported up to current QEMU version, which is limted, and the new one that uses backport logic). I'll submit the right patches again. Please ignore this. Regards, Mauro
diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index abca351b18de..1fe4c536611a 100644 --- a/hw/acpi/ghes.c +++ b/hw/acpi/ghes.c @@ -534,9 +534,11 @@ void ghes_record_cper_errors(const void *cper, size_t len, ags = &acpi_ged_state->ghes_state; if (!ags->hest_lookup) { + fprintf(stderr,"Using old GHES lookup\n"); get_hw_error_offsets(le64_to_cpu(ags->hw_error_le), &cper_addr, &read_ack_register_addr); } else { + fprintf(stderr,"Using new HEST lookup\n"); get_ghes_source_offsets(source_id, le64_to_cpu(ags->hest_addr_le), &cper_addr, &read_ack_register_addr, errp); }
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> --- hw/acpi/ghes.c | 2 ++ 1 file changed, 2 insertions(+)