Re: [Virtio-fs] [PATCH 11/13] virtiofsd: Shutdown notification queue in the end

2021-10-06 Thread Christophe de Dinechin
/ > vu_dispatch_unlock(vud); > -fv_queue_cleanup_thread(vud, qidx); > + > +/* > + * If queue 0 is being shutdown, treat it as if device is being > + * shutdown and stop all queues. > + */ > +if (qidx == 0) { > + stop_all

Re: [Virtio-fs] [PATCH 12/13] virtiofsd: Implement blocking posix locks

2021-10-06 Thread Christophe de Dinechin
access req after this. Once lock is > + * available, send a notification instead. > + */ > +if (sleep && lock->l_type != F_UNLCK) { > + /* > + * If notification queue is not enabled, can't support async > + * locks. > + */ > +if (!se->notify_enabled) { > +saverr = EOPNOTSUPP; > +goto out; > +} > +blocking_lock = true; > +unique = req->unique; > +fuse_reply_wait(req); > +} > + > /* TODO: Is it alright to modify flock? */ > lock->l_pid = 0; > -ret = fcntl(plock->fd, F_OFD_SETLK, lock); > +if (blocking_lock) { > +ret = fcntl(ofd, F_OFD_SETLKW, lock); > +} else { > +ret = fcntl(ofd, F_OFD_SETLK, lock); > +} > if (ret == -1) { > saverr = errno; > } > > out: > -pthread_mutex_unlock(>plock_mutex); > lo_inode_put(lo, ); > > -fuse_reply_err(req, saverr); > +if (!blocking_lock) { > +fuse_reply_err(req, saverr); > +} else { > +setlk_send_notification(se, unique, saverr); > +} > } > > static void lo_fsyncdir(fuse_req_t req, fuse_ino_t ino, int datasync, -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Virtio-fs] [PATCH 06/13] vhost-user-fs: Use helpers to create/cleanup virtqueue

2021-10-06 Thread Christophe de Dinechin
/* This will stop vhost backend if appropriate. */ > vuf_set_status(vdev, 0); > @@ -267,14 +290,8 @@ static void vuf_device_unrealize(DeviceState *dev) > > vhost_user_cleanup(>vhost_user); > > -virtio_delete_queue(fs->hiprio_vq); > -for (i = 0; i < fs->conf.num_request_queues; i++) { > -virtio_delete_queue(fs->req_vqs[i]); > -} > -g_free(fs->req_vqs); > +vuf_cleanup_vqs(vdev); > virtio_cleanup(vdev); > -g_free(fs->vhost_dev.vqs); > -fs->vhost_dev.vqs = NULL; > } > > static const VMStateDescription vuf_vmstate = { -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Virtio-fs] [PATCH 09/13] virtiofsd: Specify size of notification buffer using config space

2021-10-06 Thread Christophe de Dinechin
fscfg.notify_buf_size = notify_size; > +memcpy(config, , len); > +fuse_log(FUSE_LOG_DEBUG, "%s:Setting notify_buf_size=%d\n", __func__, > + fscfg.notify_buf_size); > +return 0; > +} > + > static const VuDevIface fv_iface = { > .get_features = fv_get_features, > .set_features = fv_set_features, > @@ -864,6 +893,8 @@ static const VuDevIface fv_iface = { > .queue_set_started = fv_queue_set_started, > > .queue_is_processed_in_order = fv_queue_order, > +.get_protocol_features = fv_get_protocol_features, > +.get_config = fv_get_config, > }; > > /* -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Virtio-fs] [PATCH 07/13] virtiofsd: Release file locks using F_UNLCK

2021-10-05 Thread Christophe de Dinechin
NLCK; > +flock.l_whence = SEEK_SET; > +/* Unlock whole file */ > +flock.l_start = flock.l_len = 0; > +fcntl(plock->fd, F_OFD_SETLK, ); > +} > + > pthread_mutex_unlock(>plock_mutex); > } > res = close(dup(lo_fi_fd(req, fi))); -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v2 2/9] backends/tpm: Replace qemu_mutex_lock calls with QEMU_LOCK_GUARD

2021-05-06 Thread Christophe de Dinechin
<= 0) { > +return -1; > +} > } > } > > -ret = 0; > - > -end: > -qemu_mutex_unlock(>mutex); > -return ret; > +return 0; > } > > static int tpm_emulator_unix_tx_bufs(TPMEmulator *tpm_emu, I really like the improvement, but it looks like it does not belong to the top-level series (i.e. not related to replacing alloca() by g_malloc()). Reviewed-by: Christophe de Dinechin -- Cheers, Christophe de Dinechin (IRC c3d)

Re: vnc clipboard support

2021-02-01 Thread Christophe de Dinechin
> On 1 Feb 2021, at 17:56, Daniel P. Berrangé wrote: > > On Mon, Feb 01, 2021 at 05:31:52PM +0100, Christophe de Dinechin wrote: >> >> >>> On 1 Feb 2021, at 16:51, Daniel P. Berrangé wrote: >>> >>> On Mon, Feb 01, 2021 a

Re: vnc clipboard support

2021-02-01 Thread Christophe de Dinechin
> On 29 Jan 2021, at 16:04, Gerd Hoffmann wrote: > > Hi, > >> Unless we para-virtualize the keyboard? > > The main advantage of paste via key events is that it doesn't require > guest support. The main disadvantage, though, is that it does not work at all ;-) Imagine pasting Ademar's

Re: vnc clipboard support

2021-02-01 Thread Christophe de Dinechin
> On 1 Feb 2021, at 16:51, Daniel P. Berrangé wrote: > > On Mon, Feb 01, 2021 at 04:27:43PM +0100, Christophe de Dinechin wrote: >> >> >>> On 29 Jan 2021, at 15:32, Daniel P. Berrangé wrote: >>> >>> On Fri, Jan 29, 2021 a

Re: vnc clipboard support

2021-02-01 Thread Christophe de Dinechin
> On 29 Jan 2021, at 15:32, Daniel P. Berrangé wrote: > > On Fri, Jan 29, 2021 at 03:19:45PM +0100, Christophe de Dinechin wrote: >> >> >>> On 29 Jan 2021, at 12:08, Daniel P. Berrangé wrote: >>> >>> On Fri, Jan 29, 2021 a

Re: vnc clipboard support

2021-01-29 Thread Christophe de Dinechin
> On 29 Jan 2021, at 12:08, Daniel P. Berrangé wrote: > > On Fri, Jan 29, 2021 at 11:50:10AM +0100, Christophe de Dinechin wrote: >> >> >>> On 29 Jan 2021, at 09:03, Gerd Hoffmann wrote: >>> >>> Hi, >>> >>>>> (1)

Re: vnc clipboard support

2021-01-29 Thread Christophe de Dinechin
> On 29 Jan 2021, at 12:49, Gerd Hoffmann wrote: > > Hi, > >> - What I'm suggesting is that qemu-vnc could then switch to simply >> relaying VNC traffic to that in-guest server. You'd get the smart update >> algorithm that Apple has put in place to deal with transparency and the >> like, as

Re: vnc clipboard support

2021-01-29 Thread Christophe de Dinechin
> On 29 Jan 2021, at 09:03, Gerd Hoffmann wrote: > > Hi, > >>> (1) Have some guest agent (spice does it that way). >>> Advantage: more flexible, allows more features. >>> Disadvantage: requires agent in the guest. >> >> What about running the option to relay data to a VNC server in

Re: vnc clipboard support

2021-01-28 Thread Christophe de Dinechin
Christophe (Typos are from my iPhone) > Le 28 janv. 2021 à 21:24, Marc-André Lureau a > écrit : > >  > Hi > >> On Thu, Jan 28, 2021 at 9:14 PM Gerd Hoffmann wrote: >> Hi folks, >> >> I'm looking for a good way to implement cut+paste support for vnc. >> >> The vnc core protocol has

Re: vnc clipboard support

2021-01-28 Thread Christophe de Dinechin
> On 28 Jan 2021, at 18:12, Gerd Hoffmann wrote: > > Hi folks, > > I'm looking for a good way to implement cut+paste support for vnc. > > The vnc core protocol has support for text/plain cut+paste, and there > is an extension adding support for other formats. That'll cover one > part of

Re: [PATCH] x86/cpu: Add AVX512_FP16 cpu feature

2020-12-16 Thread Christophe de Dinechin
X512_FP16 instruction */ > +#define CPUID_7_0_EDX_AVX512_FP16 (1U << 23) > /* Speculation Control */ > #define CPUID_7_0_EDX_SPEC_CTRL (1U << 26) > /* Single Thread Indirect Branch Predictors */ -- Cheers, Christophe de Dinechin (IRC c3d)

Re: VFIO Migration

2020-11-04 Thread Christophe de Dinechin
> On 3 Nov 2020, at 19:49, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com ) wrote: >> On Tue, Nov 03, 2020 at 12:17:09PM +, Dr. David Alan Gilbert wrote: >>> * Stefan Hajnoczi (stefa...@redhat.com) wrote: Device Models

Re: VFIO Migration

2020-11-03 Thread Christophe de Dinechin
based on a version and/or configuration parameters: > * ``version=1`` - use the device configuration aliased by version 1 > * ``version=2,rx-filter-size=64`` - use version 1 and override > ``rx-filter-size`` > * ``rx-filter-size=0`` - directly set configuration parameters without using > a version > > Device creation fails if the version and/or configuration parameters are not > supported. > > There must be a mechanism to query the "latest" configuration for a device > model. It may simply report the ``version=5`` where 5 is the latest version > but > it could also report all configuration parameters instead of using a version > alias. Instead of "latest", we could have a query that lists the "supported" configurations. Again, vGPUs are a good example where this would be useful. A same card can be partitioned in a number of ways, and you can't really claim that "M10-2B" or "M10-0Q" is "latest". You could arguably assign a unique URI to each sub-model. Maybe that's how you were envisioning things? -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v2 5/6] tools/virtiofsd: xattr name mappings: Map server xattr names

2020-10-06 Thread Christophe de Dinechin
+in_index += in_len; > +} > +ret = out_index; > + if (ret == 0) { > +goto out; > +} > +} > fuse_reply_buf(req, value, ret); > } else { > +/* > + * xattrmap only ever shortens the result, > + * so we don't need to do anything clever with the > + * allocation length here. > + */ > fuse_reply_xattr(req, ret); > } > out_free: -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v2 5/6] tools/virtiofsd: xattr name mappings: Map server xattr names

2020-10-06 Thread Christophe de Dinechin
n_index += in_len; > +} > +ret = out_index; > +if (ret == 0) { > +goto out; > + } > + } > fuse_reply_buf(req, value, ret); > } else { > +/* > + * xattrmap only ever shortens the result, > + * so we don't need to do anything clever with the > + * allocation length here. > + */ I don't understand the comment above. We are in the !lo->xattrmap) case, no? > fuse_reply_xattr(req, ret); > } > out_free: -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v2 3/6] tools/virtiofsd: xattr name mappings: Add option

2020-10-06 Thread Christophe de Dinechin
= tmp + 1; > +/* End of rule - go around again for another rule */ > +} > + > +if (!nentries) { > +fuse_log(FUSE_LOG_ERR, "Empty xattr map\n"); > +exit(1); > +} > + > +/* Add a terminator to error in cases the user hasn't specified */ > +res = g_realloc_n(res, ++nentries, sizeof(XattrMapEntry)); > +res[nentries - 1].flags = XATTR_MAP_FLAG_ALL | XATTR_MAP_FLAG_END_BAD; > +res[nentries - 1].key = g_strdup(""); > +res[nentries - 1].prepend = g_strdup(""); > + > +return res; > +} > + > static void lo_getxattr(fuse_req_t req, fuse_ino_t ino, const char *name, > size_t size) > { > @@ -2909,6 +3052,11 @@ int main(int argc, char *argv[]) > } else { > lo.source = strdup("/"); > } > + > +if (lo.xattrmap) { > +xattr_map_list = parse_xattrmap(lo.xattrmap); This is never freed. If you put the static in struct lo_data, you could naturally clean it up in fuse_lo_data_cleanup. > +} > + > if (!lo.timeout_set) { > switch (lo.cache) { > case CACHE_NONE: -- Cheers, Christophe de Dinechin (IRC c3d)

Re: Python docstrings and licensing/authorship

2020-09-16 Thread Christophe de Dinechin
> On 16 Sep 2020, at 17:47, John Snow wrote: > > For some of the Python cleanup work I am doing, I am moving preamble comments > into docstrings. These docstrings are visible in interactive editors and may > be visible when using Sphinx to generate documentation manuals for Python > code.

Qemu web site down?

2020-08-06 Thread Christophe de Dinechin
Hi Stefan, The link from https://wiki.qemu.org/Documentation pointing to https://qemu.weilnetz.de/doc/qemu-doc.html seems to be dead. Is the problem on your web site, or should the wiki be updated? Thanks Christophe

Re: [PATCH v2 2/3] trace: Add support for recorder back-end

2020-07-30 Thread Christophe de Dinechin
On 2020-07-30 at 10:13 CEST, Markus Armbruster wrote... > Christophe de Dinechin writes: > >> On 2020-07-29 at 13:53 CEST, Markus Armbruster wrote... >>> Christophe de Dinechin writes: >>> >>>> On 2020-07-27 at 10:23 CEST, Markus Armbruster wro

Re: [PATCH 2/7] build: fix device module builds

2020-07-29 Thread Christophe de Dinechin
On 2020-07-28 at 18:37 CEST, Philippe Mathieu-Daudé wrote... > On 7/23/20 7:46 PM, Christophe de Dinechin wrote: >> From: Gerd Hoffmann >> >> See comment. Feels quite hackish. Better ideas anyone? > > I don't understand this patch, how is it related to the r

Re: [PATCH v2 2/3] trace: Add support for recorder back-end

2020-07-29 Thread Christophe de Dinechin
On 2020-07-29 at 13:53 CEST, Markus Armbruster wrote... > Christophe de Dinechin writes: > >> On 2020-07-27 at 10:23 CEST, Markus Armbruster wrote... >>> Christophe de Dinechin writes: >>> >>>> On 2020-07-23 at 16:06 CEST, Markus Armbruster wro

Re: Missing qapi_free_Type in error case for qapi generated code?

2020-07-29 Thread Christophe de Dinechin
On 2020-07-29 at 10:34 CEST, Markus Armbruster wrote... > Eric Blake writes: > >> On 7/28/20 10:26 AM, Christophe de Dinechin wrote: >>> The qapi generated code for qmp_marshal_query_spice seems to be missing a >>> resource deallocation for "

Re: [PATCH v7 01/47] block: Add child access functions

2020-07-28 Thread Christophe de Dinechin
QLIST_FOREACH(c, >children, next) { > if (c->role & BDRV_CHILD_PRIMARY) { > -return c; > +assert(!found); > +found = c; > } > } > > -return NULL; > +return c; Shouldn't that be "return found"? > } > > > with or without: > Reviewed-by: Vladimir Sementsov-Ogievskiy -- Cheers, Christophe de Dinechin (IRC c3d)

Missing qapi_free_Type in error case for qapi generated code?

2020-07-28 Thread Christophe de Dinechin
i.e. I get "SpiceInfo *" and not "SpiceInfo". - If not, is there any good way to know if the type is a pointer type? (A quick look in cripts/qapi/types.py does not show anything obvious) -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v2 2/3] trace: Add support for recorder back-end

2020-07-28 Thread Christophe de Dinechin
On 2020-07-27 at 10:23 CEST, Markus Armbruster wrote... > Christophe de Dinechin writes: > >> On 2020-07-23 at 16:06 CEST, Markus Armbruster wrote... >>> Christophe de Dinechin writes: >>> >>>> On 2020-06-30 at 15:02 CEST, Daniel P. Berrangé wrote..

[PATCH 6/7] build: Add SPICE_CFLAGS and SPICE_LIBS to relevant files

2020-07-23 Thread Christophe de Dinechin
Instead of adding the spice build flags to the top-level build options, add them where they are necessary. This is a step to move the burden of linking with spice libraries away from the top-level qemu. Signed-off-by: Christophe de Dinechin --- configure| 4 ++-- hw/display

[PATCH 2/7] build: fix device module builds

2020-07-23 Thread Christophe de Dinechin
From: Gerd Hoffmann See comment. Feels quite hackish. Better ideas anyone? Signed-off-by: Gerd Hoffmann Signed-off-by: Christophe de Dinechin --- dtc | 2 +- roms/SLOF | 2 +- roms/openbios | 2 +- roms/opensbi | 2 +- roms/seabios | 2 +- slirp | 2 +- 6 files

[PATCH 7/7] spice: Call qemu spice functions indirectly

2020-07-23 Thread Christophe de Dinechin
iborc-0.4.so.0 => /lib64/liborc-0.4.so.0 (HEX) Signed-off-by: Christophe de Dinechin --- include/ui/qemu-spice.h | 74 +++-- monitor/hmp-cmds.c | 13 monitor/misc.c | 2 +- monitor/qmp-cmds.c | 6 ++-- softmmu/vl.c| 28

[PATCH 1/7] spice: simplify chardev setup

2020-07-23 Thread Christophe de Dinechin
From: Gerd Hoffmann Initialize spice before chardevs. That allows to register the spice chardevs directly in the init function and removes the need to maintain a linked list of chardevs just for registration. Signed-off-by: Gerd Hoffmann Signed-off-by: Christophe de Dinechin --- chardev

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

2020-07-23 Thread Christophe de Dinechin
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. Signed-off-by: Christophe de Dinechin --- audio/Makefile.objs | 2 +- chardev/Makefile.objs | 3

[PATCH 4/7] spice: Make spice a module configuration

2020-07-23 Thread Christophe de Dinechin
This commit changes the spice configuration 'm' by default, and moves the spice components to obj-m variables. It is sufficient to build without modules enable, but does not link correctly yet, since no shims have been created for the missing functions yet. Signed-off-by: Christophe de Dinechin

[PATCH 3/7] minikconf: Pass variables for modules

2020-07-23 Thread Christophe de Dinechin
Signed-off-by: Christophe de Dinechin --- scripts/minikconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/minikconf.py b/scripts/minikconf.py index bcd91015d3..d60add97f6 100755 --- a/scripts/minikconf.py +++ b/scripts/minikconf.py @@ -690,10 +690,10

[PATCH 0/7] Make SPICE a load module

2020-07-23 Thread Christophe de Dinechin
libgstreamer-1.0.so.0 libssl.so.1.1 liborc-0.4.so.0 There are still some not-so-nice changes in the makefiles, e.g. references to ../directory/foo.o. I don't want to invest too much time in fixing it the right way if Meson changes the way these things are built. Christophe de

Re: [PATCH v2 2/3] trace: Add support for recorder back-end

2020-07-23 Thread Christophe de Dinechin
On 2020-07-23 at 16:06 CEST, Markus Armbruster wrote... > Christophe de Dinechin writes: > >> On 2020-06-30 at 15:02 CEST, Daniel P. Berrangé wrote... >>> On Fri, Jun 26, 2020 at 06:27:05PM +0200, Christophe de Dinechin wrote: >>>> The recorder library provide

[PATCH v4 1/2] trace: Add support for recorder back-end

2020-07-23 Thread Christophe de Dinechin
: * recorder dump: Dump the current state of the recorder. You can give that command a recorder name, to only dump that recorder. * recorder trace: Set traces using the recorder_trace_set() syntax. You can use "recorder trace help" to list all available recorders. Signed-off-by: Christophe d

[PATCH v4 2/2] trace: Example of non-tracing recorder use

2020-07-23 Thread Christophe de Dinechin
state # Hit the 't' key to toggle timing display # Hit the 'c' key to dump the screen data as CSV cat recorder_scope_data-1.csv Signed-off-by: Christophe de Dinechin --- util/qemu-thread-common.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/util/qemu-thread-comm

[PATCH v4 0/2] trace: Add a trace backend for the recorder library

2020-07-23 Thread Christophe de Dinechin
ecorder.h" * Added myself as a reviewer for trace subsystem Later patches wil address larger topics that were discussed that would impact other tracing mechanisms, as well as GitHub / GitLab build tests. Christophe de Dinechin (2): trace: Add support for recorder back-end trace: Examp

Re: [PATCH v2 2/3] trace: Add support for recorder back-end

2020-07-23 Thread Christophe de Dinechin
On 2020-06-30 at 15:02 CEST, Daniel P. Berrangé wrote... > On Fri, Jun 26, 2020 at 06:27:05PM +0200, Christophe de Dinechin wrote: >> The recorder library provides support for low-cost continuous >> recording of events, which can then be replayed. This makes it >> possible t

Re: [PATCH] spice: simplify chardev setup

2020-07-23 Thread Christophe de Dinechin
On 2020-07-22 at 13:18 CEST, Gerd Hoffmann wrote... > On Wed, Jul 22, 2020 at 12:19:43PM +0200, Christophe de Dinechin wrote: >> >> On 2020-07-22 at 11:20 CEST, Christophe de Dinechin wrote... >> > On 2020-07-22 at 10:49 CEST, Gerd Hoffmann wrote... >> >&

Re: [PATCH v5 03/10] qdev: device module support

2020-07-22 Thread Christophe de Dinechin
On 2020-07-22 at 13:05 CEST, Gerd Hoffmann wrote... > On Wed, Jul 22, 2020 at 10:05:51AM +0200, Christophe de Dinechin wrote: >> >> On 2020-07-21 at 16:27 CEST, Gerd Hoffmann wrote... >> > Hi, >> > >> >&

Re: [PATCH] spice: simplify chardev setup

2020-07-22 Thread Christophe de Dinechin
On 2020-07-22 at 11:20 CEST, Christophe de Dinechin wrote... > On 2020-07-22 at 10:49 CEST, Gerd Hoffmann wrote... >> Initialize spice before chardevs. That allows to register the spice >> chardevs directly in the init function and removes the need to maintain >> a linked

Re: [PATCH] spice: simplify chardev setup

2020-07-22 Thread Christophe de Dinechin
nn Looks good to me, but I still need to test how this integrates with my work on putting SPICE in a module. Reviewed-by: Christophe de Dinechin > --- > include/chardev/spice.h | 1 - > include/ui/qemu-spice.h | 1 - > chardev/spice.c | 29 ++--- >

Re: [PATCH v5 02/10] object: qom module support

2020-07-22 Thread Christophe de Dinechin
typename); > +#ifdef CONFIG_MODULES > +if (!oc) { > +module_load_qom_one(typename); > +oc = object_class_by_name(typename); > +} > +#endif > +return oc; > +} > + > ObjectClass *object_class_get_parent(ObjectClass *class) > { > TypeImpl *type = type_get_parent(class->type); -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v5 05/10] ccid: build smartcard as module

2020-07-22 Thread Christophe de Dinechin
in a recent RFC, but you don't have it. OK. > > So, yes, for now we can do only "all modules" or "no modules" but > nothing inbetween. > > take care, > Gerd -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v5 03/10] qdev: device module support

2020-07-22 Thread Christophe de Dinechin
} #endif return oc; } Both call module_load_qom_one and object_class_by_name using the name as input, so I don't see the difference (except for the order). Am I reading this wrong? > >> > return DEVICE(object_new(name)); >> > } > > take care, > Gerd -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v5 10/10] chardev: enable modules, use for braille

2020-07-20 Thread Christophe de Dinechin
dev/Makefile.objs > +++ b/chardev/Makefile.objs > @@ -18,8 +18,11 @@ chardev-obj-$(CONFIG_WIN32) += char-win.o > chardev-obj-$(CONFIG_WIN32) += char-win-stdio.o > > common-obj-y += msmouse.o wctablet.o testdev.o > -common-obj-$(CONFIG_BRLAPI) += baum.o > + > +ifeq ($(CONFIG_BRLAPI),y) > +common-obj-m += baum.o Shouldn't that be a .mo? > baum.o-cflags := $(SDL_CFLAGS) > baum.o-libs := $(BRLAPI_LIBS) > +endif > > common-obj-$(CONFIG_SPICE) += spice.o -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v5 09/10] vga: build virtio-gpu as module

2020-07-20 Thread Christophe de Dinechin
-$(call land,$(CONFIG_VIRTIO_GPU),$(CONFIG_VIRTIO_PCI)) += > virtio-gpu-pci.o > +virtio-gpu-obj-$(call land,$(CONFIG_VHOST_USER_GPU),$(CONFIG_VIRTIO_PCI)) += > vhost-user-gpu-pci.o > +virtio-gpu-obj-$(CONFIG_VIRTIO_VGA) += virtio-vga.o > +virtio-gpu-obj-$(CONFIG_VHOST_USER_VGA) += vhost-user-vga.o > +virtio-gpu.mo-objs := $(virtio-gpu-obj-y) > +virtio-gpu.mo-cflags := $(VIRGL_CFLAGS) > +virtio-gpu.mo-libs := $(VIRGL_LIBS) > +endif > + > common-obj-$(CONFIG_DPCD) += dpcd.o > common-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx_dp.o Reviewed-by: Christophe de Dinechin -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v5 07/10] vga: build qxl as module

2020-07-20 Thread Christophe de Dinechin
index 77a7d622bd2d..76b3571e4902 100644 > --- a/hw/display/Makefile.objs > +++ b/hw/display/Makefile.objs > @@ -44,7 +44,10 @@ common-obj-$(CONFIG_ARTIST) += artist.o > > obj-$(CONFIG_VGA) += vga.o > > -common-obj-$(CONFIG_QXL) += qxl.o qxl-logger.o qxl-render.o > +ifeq ($(

Re: [PATCH v5 06/10] usb: build usb-redir as module

2020-07-20 Thread Christophe de Dinechin
irect.o-cflags = $(USB_REDIR_CFLAGS) > -redirect.o-libs = $(USB_REDIR_LIBS) > +ifeq ($(CONFIG_USB_REDIR),y) > +common-obj-m += redirect.mo > +redirect.mo-objs = redirect.o quirks.o > +redirect.mo-cflags = $(USB_REDIR_CFLAGS) > +redirect.mo-libs = $(USB_REDIR_LIBS) > +endif > endif > > # usb pass-through With the same questions as for earlier patches Reviewed-by: Christophe de Dinechin -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v5 05/10] ccid: build smartcard as module

2020-07-20 Thread Christophe de Dinechin
module things that are marked as 'y'? > -common-obj-$(CONFIG_SMARTCARD)+= smartcard.mo > +ifeq ($(CONFIG_SMARTCARD),y) > +common-obj-m += smartcard.mo > smartcard.mo-objs := ccid-card-passthru.o ccid-card-emulated.o > smartcard.mo-cflags := $(SMARTCARD_CFLAGS) > smartcard.mo-libs := $(SMARTCARD_LIBS) > endif > +endif > > ifeq ($(CONFIG_POSIX),y) > common-obj-$(CONFIG_USB_STORAGE_MTP) += dev-mtp.o -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v5 03/10] qdev: device module support

2020-07-20 Thread Christophe de Dinechin
; --- a/softmmu/vl.c > +++ b/softmmu/vl.c > @@ -1772,8 +1772,8 @@ static bool vga_interface_available(VGAInterfaceType t) > > assert(t < VGA_TYPE_MAX); > return !ti->class_names[0] || > - object_class_by_name(ti->class_names[0]) || > - object_class_by_name(ti->class_names[1]); > + module_object_class_by_name(ti->class_names[0]) || > + module_object_class_by_name(ti->class_names[1]); > } > > static const char * -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v5 02/10] object: qom module support

2020-07-20 Thread Christophe de Dinechin
eason to only trigger the module load when you don't find the object class. You could simply call module_load_qom_one under #ifdef CONFIG_MODULES. Performance wise, I don't think this makes much of a difference, and it simplifies the logical flow IMO. > +return oc; > +} > + > ObjectClass *object_class_get_parent(ObjectClass *class) > { > TypeImpl *type = type_get_parent(class->type); -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v5 01/10] module: qom module support

2020-07-20 Thread Christophe de Dinechin
les[i].module) == 0 && > + strcmp(qom_modules[i - 1].prefix, > + qom_modules[i].prefix) == 0)) { > +/* one module implementing multiple types -> load only once */ This is the sorting requirement I'm talking about > +continue; > +} > +module_load_one(qom_modules[i].prefix, qom_modules[i].module); > +} > +module_loaded_qom_all = true; > +} -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v5 04/10] build: fix device module builds

2020-07-20 Thread Christophe de Dinechin
nnest-vars,.., \ > authz-obj-y \ -- Cheers, Christophe de Dinechin (IRC c3d)

Re: build: haiky system build fix

2020-07-15 Thread Christophe de Dinechin
nit: typo in the mail subject (haiky instead of haiku) > On 25 Jun 2020, at 20:36, David CARLIER wrote: > > From 25adbdcdc17ef51a41759f16576901338ed8a469 Mon Sep 17 00:00:00 2001 > From: David Carlier > Date: Thu, 25 Jun 2020 19:32:42 + > Subject: [PATCH] build: haiku system build fix > >

[PATCH v3 2/2] trace: Example of non-tracing recorder use

2020-07-06 Thread Christophe de Dinechin
state # Hit the 't' key to toggle timing display # Hit the 'c' key to dump the screen data as CSV cat recorder_scope_data-1.csv Signed-off-by: Christophe de Dinechin --- util/qemu-thread-common.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/util/qemu-thread-comm

[PATCH v3 1/2] trace: Add support for recorder back-end

2020-07-06 Thread Christophe de Dinechin
: * recorder dump: Dump the current state of the recorder. You can give that command a recorder name, to only dump that recorder. * recorder trace: Set traces using the recorder_trace_set() syntax. You can use "recorder trace help" to list all available recorders. Signed-off-by: Christophe d

[PATCH v3 0/2] trace: Add a trace backend for the recorder library

2020-07-06 Thread Christophe de Dinechin
/ GitLab build tests. Christophe de Dinechin (2): trace: Add support for recorder back-end trace: Example of non-tracing recorder use configure | 14 hmp-commands.hx | 23 +++- monitor/misc.c| 27 +

[PATCH] trivial: Remove trailing whitespaces

2020-07-06 Thread Christophe de Dinechin
. Signed-off-by: Christophe de Dinechin --- block/iscsi.c | 2 +- disas/cris.c | 2 +- disas/microblaze.c| 80 +++--- disas/nios2.c | 256 +- hmp

Re: [PATCH v2 3/3] trace: Example of "centralized" recorder tracing

2020-07-03 Thread Christophe de Dinechin
On 2020-07-03 at 15:08 CEST, Daniel P. Berrangé wrote... > On Fri, Jul 03, 2020 at 12:12:14PM +0200, Christophe de Dinechin wrote: >> >> On 2020-07-02 at 15:47 CEST, Stefan Hajnoczi wrote... >> > On Wed, Jul 01, 2020 at 05:15:01PM +0100, Daniel P. Berrangé wrote: >&g

Re: [PATCH v2 0/3] trace: Add a trace backend for the recorder library

2020-07-03 Thread Christophe de Dinechin
On 2020-06-30 at 14:59 CEST, Stefan Hajnoczi wrote... > On Fri, Jun 26, 2020 at 06:27:03PM +0200, Christophe de Dinechin wrote: >> The recorder library implements low-cost always-on tracing, with three >> usage models: >> >> 1. Flight recorder: Dump information on rec

Re: [PATCH v2 3/3] trace: Example of "centralized" recorder tracing

2020-07-03 Thread Christophe de Dinechin
> > On Fri, Jun 26, 2020 at 06:27:06PM +0200, Christophe de Dinechin wrote: >> > > IMHO the whole point of having the pluggable trace backend impls, is >> > > precisely that we don't have to add multiple different calls in the >> > > code. A single tra

Re: [PATCH] Makefile: Compute libraries for libqemuutil.a and libvhost-user.a

2020-07-01 Thread Christophe de Dinechin
On 2020-06-23 at 16:44 CEST, Stefan Hajnoczi wrote... > On Tue, Jun 16, 2020 at 06:18:14PM +0200, Christophe de Dinechin wrote: >> In util/Makefile.objs, there is a setting for dbus.o-libs. >> Trying to copy-paste that to add a library for module.o that was was >> not ot

Re: [PATCH 08/10] build: Add SPICE_CFLAGS and SPICE_LIBS to relevant files

2020-06-30 Thread Christophe de Dinechin
N", "BLOCK", "OPTS", "QOM", >> +"TRACE", "XEN_BACKEND", "LIBQOS", "FUZZ_TARGET", >> +"MAX" >> +}; >> +#endif >> +record(modules, "Register DSO module init %p type %u %+s", >> + fn, type, name[type]); >> init_lists(); >> >> e = g_malloc0(sizeof(*e)); > > Unrelated change. > > (the recorder stuff should probably integrate with qemu trace support, > so you can record any trace point qemu has, but that'll be another patch > series ...) I sent it separately, and fixed the leftover patch. > > take care, > Gerd -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH 01/10] modules: Provide macros making it easier to identify module exports

2020-06-30 Thread Christophe de Dinechin
On 2020-06-29 at 12:13 CEST, Claudio Fontana wrote... > Hello Christophe, > > On 6/26/20 6:42 PM, Christophe de Dinechin wrote: >> In order to facilitate the move of large chunks of functionality to >> load modules, it is simpler to create a wrapper with the same name

Re: [PATCH 01/10] modules: Provide macros making it easier to identify module exports

2020-06-30 Thread Christophe de Dinechin
On 2020-06-30 at 11:38 CEST, Michael S. Tsirkin wrote... > On Fri, Jun 26, 2020 at 06:42:58PM +0200, Christophe de Dinechin wrote: >> In order to facilitate the move of large chunks of functionality to >> load modules, it is simpler to create a wrapper with the same name >&g

Re: [PATCH v2 2/3] trace: Add support for recorder back-end

2020-06-30 Thread Christophe de Dinechin
On 2020-06-30 at 11:05 CEST, Dr. David Alan Gilbert wrote... > * Christophe de Dinechin (dinec...@redhat.com) wrote: >> The recorder library provides support for low-cost continuous >> recording of events, which can then be replayed. This makes it >> possible to collect

Re: [PATCH 09/10] spice: Put spice functions in a separate load module

2020-06-30 Thread Christophe de Dinechin
s a shortcut for (*foo)(x). >> So for a vtable, you need to manually write wrappers. > > See above, I don't think we need wrappers. Well, so far that's two for two for the vtable approach. So unless someone else agrees with my arguments for pointer patching, that will be my next iteration of that series :-) > > take care, > Gerd -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH 10/10] REMOVE: Instrumentation to show the module functions being replaced

2020-06-30 Thread Christophe de Dinechin
On 2020-06-26 at 19:29 CEST, Daniel P. Berrangé wrote... > On Fri, Jun 26, 2020 at 06:43:07PM +0200, Christophe de Dinechin wrote: >> Signed-off-by: Christophe de Dinechin >> --- >> include/qemu/module.h | 4 >> 1 file changed, 4 insertions(+) >> >&g

Re: [PATCH 09/10] spice: Put spice functions in a separate load module

2020-06-29 Thread Christophe de Dinechin
On 2020-06-26 at 19:35 CEST, Daniel P. Berrangé wrote... > On Fri, Jun 26, 2020 at 06:43:06PM +0200, Christophe de Dinechin wrote: >> Use the MODIFACE and MODIMPL macros to to redirect the highest-level >> qemu_spice functions into the spice-app.so load module when SPICE

[PATCH] trivial: Respect alphabetical order of .o files in Makefile.objs

2020-06-29 Thread Christophe de Dinechin
The vmgenid.o is the only file that is not in alphabetical order. Signed-off-by: Christophe de Dinechin --- stubs/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index f32b9e47a3..1df8bb3814 100644 --- a/stubs

Re: [PATCH 08/10] build: Add SPICE_CFLAGS and SPICE_LIBS to relevant files

2020-06-29 Thread Christophe de Dinechin
On 2020-06-26 at 19:26 CEST, Daniel P. Berrangé wrote... > On Fri, Jun 26, 2020 at 06:43:05PM +0200, Christophe de Dinechin wrote: >> Instead of adding the spice build flags to the top-level build >> options, add them where they are necessary. This is a step to move the >&

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

2020-06-29 Thread Christophe de Dinechin
On 2020-06-26 at 19:20 CEST, Daniel P. Berrangé wrote... > On Fri, Jun 26, 2020 at 06:43:01PM +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 >>

[PATCH 09/10] spice: Put spice functions in a separate load module

2020-06-26 Thread Christophe de Dinechin
.so.0 => /lib64/libgstbase-1.0.so.0 (HEX) libgstreamer-1.0.so.0 => /lib64/libgstreamer-1.0.so.0 (HEX) libssl.so.1.1 => /lib64/libssl.so.1.1 (HEX) liborc-0.4.so.0 => /lib64/liborc-0.4.so.0 (HEX) Signed-off-by: Christophe de Dinechin --- i

[PATCH 10/10] REMOVE: Instrumentation to show the module functions being replaced

2020-06-26 Thread Christophe de Dinechin
Signed-off-by: Christophe de Dinechin --- include/qemu/module.h | 4 1 file changed, 4 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 1922a0293c..8d6e10ba81 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -14,10 +14,13 @@ #ifndef

[PATCH 06/10] trivial: Remove extra trailing whitespace

2020-06-26 Thread Christophe de Dinechin
Signed-off-by: Christophe de Dinechin --- hw/display/qxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index d5627119ec..28caf878cd 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -51,7 +51,7 @@ #undef ALIGN #define ALIGN(a, b

[PATCH 08/10] build: Add SPICE_CFLAGS and SPICE_LIBS to relevant files

2020-06-26 Thread Christophe de Dinechin
Instead of adding the spice build flags to the top-level build options, add them where they are necessary. This is a step to move the burden of linking with spice libraries away from the top-level qemu. Signed-off-by: Christophe de Dinechin --- configure| 4 ++-- hw/display

[PATCH 07/10] qxl - FIXME: Build as module

2020-06-26 Thread Christophe de Dinechin
Forcibly build qxl as a module to see if we can load it Signed-off-by: Christophe de Dinechin --- hw/display/Makefile.objs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index 77a7d622bd..f51411619b 100644 --- a/hw

[PATCH 00/10] RFC: Move SPICE to a load module

2020-06-26 Thread Christophe de Dinechin
ib64/liborc-0.4.so.0 (HEX) I will keep pushing updates on branch "modular-spice" on https://github.com/c3d/qemu.git Christophe de Dinechin (10): modules: Provide macros making it easier to identify module exports minikconf: Pass variables for modules spice: Make spice a module config

[PATCH 05/10] build: Avoid build failure when building drivers as modules

2020-06-26 Thread Christophe de Dinechin
Signed-off-by: Gerd Hoffmann Signed-off-by: Christophe de Dinechin --- Makefile.objs| 1 + Makefile.target | 7 +++ hw/Makefile.objs | 1 + 3 files changed, 9 insertions(+) diff --git a/Makefile.objs b/Makefile.objs index e38768c8d5..6703353493 100644 --- a/Makefile.objs +++ b

[PATCH 04/10] spice: Move all the spice-related code in spice-app.so

2020-06-26 Thread Christophe de Dinechin
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. Signed-off-by: Christophe de Dinechin --- audio/Makefile.objs | 2 +- chardev/Makefile.objs | 3

[PATCH 03/10] spice: Make spice a module configuration

2020-06-26 Thread Christophe de Dinechin
This commit changes the spice configuration 'm' by default, and moves the spice components to obj-m variables. It is sufficient to build without modules enable, but does not link correctly yet, since no shims have been created for the missing functions yet. Signed-off-by: Christophe de Dinechin

[PATCH 02/10] minikconf: Pass variables for modules

2020-06-26 Thread Christophe de Dinechin
Signed-off-by: Christophe de Dinechin --- scripts/minikconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/minikconf.py b/scripts/minikconf.py index bcd91015d3..d60add97f6 100755 --- a/scripts/minikconf.py +++ b/scripts/minikconf.py @@ -690,10 +690,10

[PATCH 01/10] modules: Provide macros making it easier to identify module exports

2020-06-26 Thread Christophe de Dinechin
. In that case, we rename the actual implementation by appending _implementation to its name. This makes it easier to select which function you want to put a breakpoint on. Signed-off-by: Christophe de Dinechin --- include/qemu/module.h | 24 1 file changed, 24 insertions(+) diff

[PATCH v2 2/3] trace: Add support for recorder back-end

2020-06-26 Thread Christophe de Dinechin
rder trace: Set traces using the recorder_trace_set() syntax. You can use "recorder trace help" to list all available recorders. Signed-off-by: Christophe de Dinechin --- configure | 5 +++ hmp-commands.hx | 19 ++

[PATCH v2 3/3] trace: Example of "centralized" recorder tracing

2020-06-26 Thread Christophe de Dinechin
"lock=state,id" qemu & recorder_scope state cat recorder_scope_data-1.csv Signed-off-by: Christophe de Dinechin --- util/qemu-thread-common.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/util/qemu-thread-common.h b/util/qemu-thread-common.h index 2af6b12085..0de07a

[PATCH v2 0/3] trace: Add a trace backend for the recorder library

2020-06-26 Thread Christophe de Dinechin
ble multiple related traces for a particular topic. This series requires a small makefile fix submitted earlier, included here for convenience. Christophe de Dinechin (3): Makefile: Compute libraries for libqemuutil.a and libvhost-user.a trace: Add support for recorder back-end trace: Exa

[PATCH v2 1/3] Makefile: Compute libraries for libqemuutil.a and libvhost-user.a

2020-06-26 Thread Christophe de Dinechin
dependencies are not propagated to the .a files automatically. Adding a call to extract-libs to get the libraries for the two .a files that are used elsewhere. Signed-off-by: Christophe de Dinechin --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index a0092153af

Re: [PATCH] trivial: Remove extra character in configure help

2020-06-24 Thread Christophe de Dinechin
Please ignore. The =B appears intentional, even if it offsets the whole help text. Maybe replace with =L to indicate a list is expected? > On 24 Jun 2020, at 10:33, Christophe de Dinechin wrote: > > Signed-off-by: Christophe de Dinechin > --- > configure | 2 +- > 1 file ch

[PATCH] trivial: Remove extra character in configure help

2020-06-24 Thread Christophe de Dinechin
Signed-off-by: Christophe de Dinechin --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index ba88fd1824..c7a6a5adfe 100755 --- a/configure +++ b/configure @@ -1787,7 +1787,7 @@ Advanced options (experts only): --block-drv-ro-whitelist=L

Re: how to build QEMU with the peripheral device modules

2020-06-19 Thread Christophe de Dinechin
> Le 19 Jun 2020 à 15:24, casmac a écrit : > > Hi All, >I am trying to add a DMA peripheral module. In hw/dma directory, a file > ti_dma.c is added. >Also, in hw/dma/kconfig, I added the following lines: > config TI_DMA > bool >In hw/dma/makefile.ojb, added one line: >

Understanding initialization order for spice in qemu

2020-06-18 Thread Christophe de Dinechin
Hi Gerd, When I build qemu on master with moduels enabled, and run with spice, I occasionally see: qemu-system-x86_64: util/module.c:136: module_load_file: Assertion `QTAILQ_EMPTY(_init_list)' failed. Interestingly, I seem to have seen that only on master, but not on my own branch. Have

Re: ovmf / PCI passthrough impaired due to very limiting PCI64 aperture

2020-06-17 Thread Christophe de Dinechin
> Le 16 Jun 2020 à 19:10, Eduardo Habkost a écrit : > > On Tue, Jun 16, 2020 at 05:57:46PM +0100, Dr. David Alan Gilbert wrote: >> * Gerd Hoffmann (kra...@redhat.com) wrote: >>> Hi, >>> (a) We could rely in the guest physbits to calculate the PCI64 aperture. >>> >>> I'd love to do

Re: ovmf / PCI passthrough impaired due to very limiting PCI64 aperture

2020-06-17 Thread Christophe de Dinechin
> Le 16 Jun 2020 à 18:50, Gerd Hoffmann a écrit : > > Hi, > >> (a) We could rely in the guest physbits to calculate the PCI64 aperture. > > I'd love to do that. Move the 64-bit I/O window as high as possible and > use -- say -- 25% of the physical address space for it. > > Problem is we

[PATCH] Makefile: Compute libraries for libqemuutil.a and libvhost-user.a

2020-06-16 Thread Christophe de Dinechin
dependencies are not propagated to the .a files automatically. Adding a call to extract-libs to get the libraries for the two .a files that are used elsewhere. Signed-off-by: Christophe de Dinechin --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 2e93068894

  1   2   >