On Fri, Sep 19, 2025 at 04:31:07PM +0200, Peter Krempa wrote: > On Fri, Sep 19, 2025 at 07:26:21 -0700, Andrea Bolognani wrote: > > Yes, this commit is intended to merely factor out the existing code > > into a dedicated helper, without altering the behavior. Then later > > commits perform the modifications we want. > > I was asking for the reason for exporting it since it's used in single > place. Especially since you put it in a different module so it needs to > be exported. > > Extracting is fine, but extracting to a different module is a bit weird > if you don't reuse it.
I moved it next to the other functions that pick default models, namely SCSI controllers and panic devices. Admittedly the helper for network devices is in qemu_postparse.c, so we're not entirely consistent. Big surprise :) I can keep the new helpers in the current file if you prefer, but I think in the long run it would be better to have them all in one place, and since the SCSI one is called outside of qemu_postparse.c too it seems that qemu_domain.c is a better location. But we can have that conversation at a later date. -- Andrea Bolognani / Red Hat / Virtualization