From: Claudio Fontana <cfontana@suse.de>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, dinechin@redhat.com,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH 2/3] module: add Error arguments to module_load_one and module_load_qom_one
Date: Wed, 7 Sep 2022 11:31:51 +0200 [thread overview]
Message-ID: <762f48d2-9c28-c34f-a51b-710e34ddca95@suse.de> (raw)
In-Reply-To: <20220907073657.d4c27abnctjlxviw@sirius.home.kraxel.org>
On 9/7/22 09:36, Gerd Hoffmann wrote:
> Hi,
>
>> For this module_load_qom_all() maybe Gerd has a bit more context on
>> was should be the error reporting here?
>
> Use case for module_load_qom_all() is someone enumerating the qom
> objects available. So we load all modules known to have all object
> types registered and can return a complete list.
>
> It could be that some of the known modules are not there. Consider a
> distro packaging modules which depend on shared libraries into optional
> sub-rpms, to reduce the dependency chain of core qemu. So, with core
> qemu installed and (some of) the sub-rpms not installed
> module_load_qom_all() will obviously fail to load some modules.
>
> But I don't think those errors should be reported. The object types
> implemented by the missing modules will also be missing from the object
> type list ...
>
> Example: hw-usb-host.so is not installed.
>
> => 'qemu -device help' should IMHO not report the module load error
> and just not list the 'usb-host' device.
> => 'qemu -device usb-host' should report the module load error.
>
> take care,
> Gerd
>
Hi Gerd,
the thing is, we can distinguish between a module not being present (ENOENT, ENOTDIR),
from a module being present, but failing to load.
So the "module not there" thing does not need to be treated separately, because no warning/error will be emitted if the module is not there.
It is up to the user/caller to decide what to do with the condition "module not there", error out and quit, continue on, etc.
Thanks this helped,
Claudio
next prev parent reply other threads:[~2022-09-07 9:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 11:54 [PATCH 0/3] improve error handling for module load Claudio Fontana
2022-09-06 11:54 ` [PATCH 1/3] module: removed unused function argument "mayfail" Claudio Fontana
2022-09-06 11:55 ` [PATCH 2/3] module: add Error arguments to module_load_one and module_load_qom_one Claudio Fontana
2022-09-06 12:32 ` Claudio Fontana
2022-09-06 14:21 ` Philippe Mathieu-Daudé via
2022-09-07 7:36 ` Gerd Hoffmann
2022-09-07 9:31 ` Claudio Fontana [this message]
2022-09-07 9:42 ` Claudio Fontana
2022-09-08 8:11 ` Richard Henderson
2022-09-08 8:28 ` Claudio Fontana
2022-09-08 13:58 ` Claudio Fontana
2022-09-06 11:55 ` [PATCH 3/3] accel: abort if we fail to load the accelerator plugin Claudio Fontana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=762f48d2-9c28-c34f-a51b-710e34ddca95@suse.de \
--to=cfontana@suse.de \
--cc=berrange@redhat.com \
--cc=dinechin@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).