On Wed, 5 Jun 2024 16:27:33 +0100
Jonathan Cameron via <[email protected]> wrote:

> On Wed, 5 Jun 2024 07:39:53 -0700
> Richard Henderson <[email protected]> wrote:
> 
> > On 6/4/24 14:08, Michael S. Tsirkin wrote:  
> > > From: Jonathan Cameron <[email protected]>
> > > 
> > > Given this is a new configuration, there are affects on APIC, CEDT
> > > and DSDT, but the key elements are in SRAT (plus related data in
> > > HMAT).  The configuration has node to exercise many different 
> > > combinations.
> > > 
> > > 0) CPUs + Memory
> > > 1) GI only
> > > 2) GP only
> > > 3) CPUS only
> > > 4) Memory only
> > > 5) CPUs + HP memory
> > > 
> > > GI node, GP Node, Memory only node, hotplug memory
> > > only node, latency and bandwidth such that in Linux Access0
> > > (any initiator) and Access1 (CPU initiators only) given different
> > > answers.  Following cropped to remove details of each entry.    
> > 
> > 
> > This fails testing:
> > 
> > https://gitlab.com/qemu-project/qemu/-/jobs/7021105504
> > 
> > acpi-test: Warning! SRAT binary file mismatch. Actual 
> > [aml:/tmp/aml-GHR6O2], Expected 
> > [aml:tests/data/acpi/q35/SRAT.acpihmat-generic-x].
> > See source file tests/qtest/bios-tables-test.c for instructions on how to 
> > update expected 
> > files.
> > to see ASL diff between mismatched files install IASL, rebuild QEMU from 
> > scratch and 
> > re-run tests with V=1 environment variable set**
> > ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion 
> > failed: 
> > (all_tables_match)
> > Bail out! ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: 
> > assertion failed: 
> > (all_tables_match)
> > Aborted (core dumped)
> >   
> 
> s390 and passes on an x86 host, so I guess an endian bug - any chance of a 
> table dump
> from someone with access to an s390 host?
> 
> This test covers some stuff that was previously missing tests
> so may be non trivial to spot.
> 
> I'll play guess in the meantime. So far I'm not seeing anything that differs
> from existing ACPI table building code.

Ok. I think it a bug earlier in this patch set. A table dump would confirm.

One item that looks dodgy is the filling in of the ACPI HID.

It's messy in the ACPI spec as it's defined as both an integer
and a string.
 
Need to take a 4 character string and get it into hid of

struct {
   uint64_t hid;
   uint32_t uid;
}
which id done with an 8 byte memcpy.
that is then written to SRAT wtih
build_append_int_noprefix(table_data, handle->hid, 8);

So I need to byte swap it if host doesn't match guest endian.

I'll put together a patch, but perhaps best plan is if Michael
drops generic ports and we go around again :(

At least I don't have much backed up behind this one.

Jonathan

> 
> Jonathan
> 
> 
> > 
> > r~  
> 
> 


Reply via email to