[PATCH 1/4] conf: add loader type 'none'

Andrea Bolognani abologna at redhat.com
Wed Mar 22 13:02:00 UTC 2023


On Wed, Mar 22, 2023 at 09:32:21AM -0300, Daniel Henrique Barboza wrote:
> On 3/22/23 06:42, Daniel Henrique Barboza wrote:
> > On 3/22/23 06:25, Daniel P. Berrangé wrote:
> > > On Wed, Mar 22, 2023 at 06:10:18AM -0300, Daniel Henrique Barboza wrote:
> > > > +    if (loader->type != VIR_DOMAIN_LOADER_TYPE_NONE ||
> > > > +        (loader->type == VIR_DOMAIN_LOADER_TYPE_NONE && !loader->path))
> > > >           virBufferAsprintf(&loaderAttrBuf, " type='%s'",
> > > >                             virDomainLoaderTypeToString(loader->type));
> > >
> > > VIR_DOMAIN_LOADER_TYPE_NONE is a constant we're already using internally
> > > to track when the user has not given any <loader> element at all.
> > >
> > > It is not a good idea to overload for this for the user explicitly
> > > requesting a config.
> >
> > Makes sense. Any name suggestions for this new constant?
> >
> > VIR_DOMAIN_LOADER_TYPE_SKIP is the first thing that comes to mind. If we want to
> > keep it consistent we should also change this new type to <loader type='skip'/>
> > as well.
>
> VIR_DOMAIN_LOADER_TYPE_OTHER seems more appropriate to indicate that the firmware
> will be loaded not by QEMU, but other means (e.g. kernel).

I'm not sure we really need a new loader type. Can't we just add
'-bios none' unconditionally on RISC-V when a loader path or a kernel
path have been provided, either manually or via autoselection?

-- 
Andrea Bolognani / Red Hat / Virtualization



More information about the libvir-list mailing list