[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] cpu_map: Add EPYC-Rome model



On Thu, Sep 24, 2020 at 12:25:23 +0200, Markus Schade wrote:
> Hi everyone,
> 
> I'd like to add support for the EPYC-Rome CPU model from qemu.
> 
> The following patch adds the model to cpu_map. While this allows to use
> the model, I am aware that some tests are required as well.
> 
> However I am not certain what exactly is needed. I am happy to provide
> CPU flags or any required information from an EPYC 7502 system

Great. First, make sure you have cpuid and current qemu installed. Then
go to tests/cputestdata and run ./cpu-gather.sh script there. It should
print CPUID dump followed by a lot of JSON from QEMU. If that works, you
can pipe it to another script:

    ./cpu-gather.sh | ./cpu-parse.sh

This will create new data files for cputest. They will be called
x86_64-cpuid-*{.xml,.json,-disabled.xml,-enabled.xml}. Got back to the
top source directory, edit tests/cputest.c and add a new test case:

    DO_TEST_CPUID(VIR_ARCH_X86_64, <NAME>, JSON_MODELS);

where <NAME> is the part between "x86_64-cpuid-" and ".json" from the
new data file. If you rebuild libvirt and run tests now, cputest should
fail complaining about missing files. Run

    VIR_TEST_REGENERATE_OUTPUT=1 tests/cputest

from the build directory to create those files. Running "meson test"
should succeed now. If it does, you can just add all the new files and
tests/cputest changes to git and send it for review.

Jirka


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]