qemu-s390x
[Top][All Lists]
Advanced

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

Re: [PATCH v3 1/1] hw/s390x: modularize virtio-gpu-ccw


From: Daniel P . Berrangé
Subject: Re: [PATCH v3 1/1] hw/s390x: modularize virtio-gpu-ccw
Date: Tue, 9 Mar 2021 13:21:14 +0000
User-agent: Mutt/2.0.5 (2021-01-21)

On Tue, Mar 09, 2021 at 01:45:12PM +0100, Gerd Hoffmann wrote:
> On Fri, Mar 05, 2021 at 04:46:03PM -0500, Eduardo Habkost wrote:
> > On Tue, Mar 02, 2021 at 06:35:44PM +0100, Halil Pasic wrote:
> > > Since the virtio-gpu-ccw device depends on the hw-display-virtio-gpu
> > > module, which provides the type virtio-gpu-device, packaging the
> > > hw-display-virtio-gpu module as a separate package that may or may not
> > > be installed along with the qemu package leads to problems. Namely if
> > > the hw-display-virtio-gpu is absent, qemu continues to advertise
> > > virtio-gpu-ccw, but it aborts not only when one attempts using
> > > virtio-gpu-ccw, but also when libvirtd's capability probing tries
> > > to instantiate the type to introspect it.
> > > 
> > > Let us thus introduce a module named hw-s390x-virtio-gpu-ccw that
> > > is going to provide the virtio-gpu-ccw device. The hw-s390x prefix
> > > was chosen because it is not a portable device. Because registering
> > > virtio-gpu-ccw would make non-s390x emulator fail due to a missing
> > > parent type, if built as a module, before registering it, we check
> > > if the ancestor types are already registered.
> > 
> > I don't understand what makes it necessary to make the
> > type_register() call conditional.  Calling type_register() before
> > the parent types are registered is perfectly valid.
> 
> Well, yes, in a non-modular world this will work perfectly fine.  We
> only compile objects actually supported into the system emulator.
> 
> With modular builds we have the situation that we have shared modules
> which may or may not work in specific system emulators, for example
> hw-display-virtio-gpu-pci.so or the ccw module added by this patch,
> because the given system emulator doesn't provide the needed support.
> We have some which don't support pci (avr for example).  Likewise ccw
> is supported by s390x only.

We could solve this by having a different location for loading modules
for each target.

  *  /usr/$LIB/qemu/

    All the real .so's go in here as today

  *  /usr/$LIB/qemu/$TARGET

    Populated with symlinks to the .so's in the parent dir,
    but /only/ those which are valid for this $TARGET

Then change QEMU  to load from the second dir.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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