avatartwo / avatar2

Python core of avatar²
Apache License 2.0
518 stars 98 forks source link

Qemu cpu_model not propagated #89

Closed mariusmue closed 3 years ago

mariusmue commented 3 years ago

The QemuTarget allows overriding of the cpu_model, via a kwarg: https://github.com/avatartwo/avatar2/blob/main/avatar2/targets/qemu_target.py#L21

However, by now, on init(), qemu target retrieves the cpu_model via avatar.generate_config(), which in turn takes the CPU model from the avatar object:

https://github.com/avatartwo/avatar2/blob/4d772f72a06a16a7d80e2edcf8544727d0755704/avatar2/avatar2.py#L149

Hence, the cpu_model kwarg of the qemu-target is essentially useless at the moment.

Suggested fix: Override cpu-model in the generate_qemu_config() function. https://github.com/avatartwo/avatar2/blob/main/avatar2/targets/qemu_target.py#L162