On Tue, Sep 03, 2019 at 04:37:33PM -0400, Jagannathan Raman wrote: > Defines proxy-link object which forms the communication link between > QEMU & emulation program. > Adds functions to configure members of proxy-link object instance. > Adds functions to send and receive messages over the communication > channel. > Adds GMainLoop to handle events received on the communication channel. > > Signed-off-by: Jagannathan Raman <jag.ra...@oracle.com> > Signed-off-by: John G Johnson <john.g.john...@oracle.com> > Signed-off-by: Elena Ufimtseva <elena.ufimts...@oracle.com> > --- > v1 -> v2: > - Use default context for main loop instead of a new context > > v2 -> v3: > - Enabled multi-channel support in the communication link > > include/glib-compat.h | 4 + > include/io/proxy-link.h | 147 ++++++++++++++++++++++++ > io/Makefile.objs | 2 + > io/proxy-link.c | 292 > ++++++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 445 insertions(+) > create mode 100644 include/io/proxy-link.h > create mode 100644 io/proxy-link.c > > diff --git a/include/glib-compat.h b/include/glib-compat.h > index 1291628..6189b9a 100644 > --- a/include/glib-compat.h > +++ b/include/glib-compat.h > @@ -19,12 +19,16 @@ > /* Ask for warnings for anything that was marked deprecated in > * the defined version, or before. It is a candidate for rewrite. > */ > +#ifndef GLIB_VERSION_MIN_REQUIRED > #define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_40 > +#endif > > /* Ask for warnings if code tries to use function that did not > * exist in the defined version. These risk breaking builds > */ > +#ifndef GLIB_VERSION_MAX_ALLOWED > #define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_40 > +#endif
This does not look good. This header can only be included once thanks to the #ifndef QEMU_GLIB_COMPAT_H. So the fact that you need these conditionals is a hint of a bug elsewhere in the code related to glib usage. > diff --git a/include/io/proxy-link.h b/include/io/proxy-link.h > new file mode 100644 > index 0000000..ee78cdd > --- /dev/null > +++ b/include/io/proxy-link.h > @@ -0,0 +1,147 @@ > +/* > + * Communication channel between QEMU and remote device process > + * > + * Copyright 2019, Oracle and/or its affiliates. > + * > + * Permission is hereby granted, free of charge, to any person obtaining a > copy > + * of this software and associated documentation files (the "Software"), to > deal > + * in the Software without restriction, including without limitation the > rights > + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > + * copies of the Software, and to permit persons to whom the Software is > + * furnished to do so, subject to the following conditions: > + * > + * The above copyright notice and this permission notice shall be included in > + * all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL > + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > FROM, > + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN > + * THE SOFTWARE. > + */ > + > +#ifndef PROXY_LINK_H > +#define PROXY_LINK_H > + > +#include <stddef.h> > +#include <stdint.h> > +#include <glib.h> I'm guessing this is the cause - nothing should be including this directly - it is pulled in for you via qemu/osdep.h > +#include <pthread.h> > + > +#include "qemu/osdep.h" > +#include "qom/object.h" > +#include "qemu/thread.h" 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 :|