On Wed, 5 Jun 2024 09:54:16 -0700 Richard Henderson <[email protected]> wrote:
> On 6/5/24 11:11, Jonathan Cameron wrote: > >>> Sure. By what incantation do I produce a dump? > >> > >> If you still have the /mnt/aml-GHR602 above then either upload that > >> somewhere or > >> iasl -d /mnt/aml-GHR602 > >> should generate you a suitable text file. However generic ports are > >> fairly recent > >> so you may need a newer iasl from acpica-tools to decode. > >> It will moan if it doesn't understand the content. > >> > > make check-qtest-x86_64 is how I get the test to run in the first place. > > Ah, I see, the file is not cleaned up on abort. Yes. End up with a lot of those after a while! > For the record, I attach the dump. Thanks! > > > Alternatively, this 'might' be sufficient if my guess for the problem > > is correct. Thanks! > > > > From 956df037f024783f19b6b00e5e280484380227a0 Mon Sep 17 00:00:00 2001 > > From: Jonathan Cameron <[email protected]> > > Date: Wed, 5 Jun 2024 17:01:36 +0100 > > Subject: [PATCH] hw/acpi: Fix big endian host creation of Generic Port > > Affinity Structures > > > > Treating the HID as an integer caused it to get bit reversed > > on big endian hosts running little endian guests. Treat it > > as a character array instead. > > > > Fixes hw/acpi: Generic Port Affinity Structure Support > > Signed-off-by: Jonathan Cameron <[email protected]> > > > > --- > > Maybe this is the only problem? I don't have a setup to test > > so any help would be appreciated. > > --- > > include/hw/acpi/acpi_generic_initiator.h | 2 +- > > hw/acpi/acpi_generic_initiator.c | 6 +++++- > > 2 files changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/include/hw/acpi/acpi_generic_initiator.h > > b/include/hw/acpi/acpi_generic_initiator.h > > index 1a899af30f..5baefda33a 100644 > > --- a/include/hw/acpi/acpi_generic_initiator.h > > +++ b/include/hw/acpi/acpi_generic_initiator.h > > @@ -61,7 +61,7 @@ typedef struct PCIDeviceHandle { > > uint16_t bdf; > > }; > > struct { > > - uint64_t hid; > > + char hid[8]; > > uint32_t uid; > > }; > > }; > > diff --git a/hw/acpi/acpi_generic_initiator.c > > b/hw/acpi/acpi_generic_initiator.c > > index 78b80dcf08..c2fb5ab2ef 100644 > > --- a/hw/acpi/acpi_generic_initiator.c > > +++ b/hw/acpi/acpi_generic_initiator.c > > @@ -150,8 +150,12 @@ build_srat_generic_node_affinity(GArray *table_data, > > int node, > > build_append_int_noprefix(table_data, handle->bdf, 2); > > build_append_int_noprefix(table_data, 0, 12); > > } else { > > + int i; > > + > > /* Device Handle - ACPI */ > > - build_append_int_noprefix(table_data, handle->hid, 8); > > + for (i = 0; i < sizeof(handle->hid); i++) { > > + build_append_int_noprefix(table_data, handle->hid[i], 1); > > + } > > build_append_int_noprefix(table_data, handle->uid, 4); > > build_append_int_noprefix(table_data, 0, 4); > > } > > Yes, this fixes the abort. > Merge the declaration of i into the for loop? sure. Thanks for testing. Seems it's time I tried to get an emulated s390 setup running if that's practical as two of these in the last year :( Jonathan > > > r~
