[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/7] spice: Move all the spice-related code in spice-app.so

From: Gerd Hoffmann
Subject: Re: [PATCH 5/7] spice: Move all the spice-related code in spice-app.so
Date: Tue, 4 Aug 2020 12:05:16 +0200

On Thu, Jul 23, 2020 at 07:46:13PM +0200, Christophe de Dinechin wrote:
> If we want to build spice as a separately loadable module, we need to
> put all the spice code in one loadable module, because the build
> system does not know how to deal with dependencies yet.

I'd tend to think teaching qemu about module dependencies will work

I've digged around in g_module_open() docs a bit.  There seems to be no
way to set a shared library search path, which makes it tricky to simply
depend on the dynamic linker because features like loading modules from
the build directory when qemu is started from the build directory will
not work as expected then.

So qemu has do deal with it, in the simplest case just a static
dependency list compiled in which is checked on every module load.
Symbols from other modules are available if they are loaded without

That will make module autoloading work better.  Right now it works fine
with -display spice-app.  It doesn't work with a plain -spice.  And
"-audiodev spice,id=test" will not load the spice module either.

I think we should have:

  (1) A audio-spice.so module (autoload will work, by naming
      convention for audio modules).
  (2) A chardev-spice.so module (autoload needs two lines in qom_modules
      in util/module.c, one for each chardev).
  (3) A ui/spice-app.so module (autoload works by naming convention).
  (4) A ui/spice-core.so module which all other spice modules depend on.
      qemu must explicitly load that one in case it finds -spice on the
      command line.

take care,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]