> On 29 Sep 2026, at 8:30 PM, Philippe Mathieu-Daudé <[email protected]> 
> wrote:
> 
> !-------------------------------------------------------------------|
> CAUTION: External Email
> 
> |-------------------------------------------------------------------!
> 
> On 21/9/26 14:32, Khushit Shah wrote:
>> Add cpu-models-stub.c, which will be required to add QMP support.
>> Signed-off-by: Khushit Shah <[email protected]>
>> ---
>>  target/arm/cpu-models-stub.c | 13 +++++++++++++
>>  target/arm/meson.build       |  1 +
>>  2 files changed, 14 insertions(+)
>>  create mode 100644 target/arm/cpu-models-stub.c
> 
> Shouldn't be needed if guarded in qmp_query_cpu_model_expansion() as:
> 
>    bool named_model = false;
> 
>    if (kvm_enabled()) {
>        named_model = arm_find_model(model->name) != NULL;
>    }

Hi Philippe,

Thank you very much for taking a look!

I tried above on qemu master + series; This results into:

[101/115] Linking target qemu-system-arm
FAILED: qemu-system-arm 
cc @qemu-system-arm.rsp
/usr/bin/ld: libsystem_arm.a.p/target_arm_arm-qmp-cmds.c.o: in function 
`arm_cpu_add_definition':
/home/ahv/qemu-upstream/build/../target/arm/arm-qmp-cmds.c:391:(.text+0xc8): 
undefined reference to `arm_find_model'
/usr/bin/ld: libsystem_arm.a.p/target_arm_arm-qmp-cmds.c.o: in function 
`qmp_query_cpu_model_expansion':
/home/ahv/qemu-upstream/build/../target/arm/arm-qmp-cmds.c:186:(.text+0xa54): 
undefined reference to `arm_find_model'
collect2: error: ld returned 1 exit status

IIUC, kvm_enabled() is expanding to  (kvm_allowed) here so the call is not 
eliminated.

Thanks,
Khushit


Reply via email to