On Tue, Oct 6, 2026 at 12:25 AM Pierrick Bouvier <[email protected]> wrote: > > I guess there is a (good or bad) reason for which sub variants of > targets are not reflected in SYS_EMU_TARGET enum. We should double check > that before doing any change, as it might have other consequences.
Just for record, I found the original reason doing this is here https://lore.kernel.org/qemu-devel/[email protected]/ target_arch() function would reparse target_name() every time if it was not set to a proper SYS_EMU_TARGET_* value (when using target-info-stub.c), which is not efficient. This was found when doing changes to virtio_access_is_big_endian() function, having an overhead of 50% after switching to runtime checks. With this, overhead left is around 3%, due to indirect function calls. > > > > >> > >>> "target-info: Statically initialize target_arch" > >>> > >>>> > >>>> Regards, > >>>> Pierrick > >>> > >>> > >>> > >> > > > > -- > > 此致 > > 礼 > > 罗勇刚 > > Yours > > sincerely, > > Yonggang Luo > -- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo
