]> git.ipfire.org Git - thirdparty/libvirt.git/commit
cpu-data: Pretend to always run on logical processor #0
authorTim Wiederhake <twiederh@redhat.com>
Fri, 8 Jan 2021 14:43:02 +0000 (15:43 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 8 Jan 2021 17:07:00 +0000 (18:07 +0100)
commit10b5e789c569312371c1cb0d4cbf54e0ac4f9ba2
treecaaef3c4ea0a216596265deab1f95ff960db8543
parent05e73a87471c02f917d8265a58d4022548de5ea0
cpu-data: Pretend to always run on logical processor #0

The output of cpuid depends on the logical processor id the process
runs on, as reflected by the "local apic id" present in cpuid leaves
(eax=1,ebx=0), (eax=11,ebx=0), and (eax=11,ebx=1). This produces
arbitrary changes in the output files that complicate comparisons.

This patch masks the occurences of the local apic id with 0x00, so
that two consecutive runs of "./cpu-data.py gather" produce identical
results.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
tests/cputestdata/cpu-data.py