[Qemu-devel] [Bug 1662468] [NEW] [feature request] qemu-img convert should respond to control-T like dd

2017-02-07 Thread Christophe de Dinechin
Public bug reported: Since qemu-img convert is a long-running operation, it would be nice if it reported progress in response to control-T (SIGINFO) to show progress information, much like dd, fsck, dump, cp, etc. ** Affects: qemu Importance: Undecided Status: New ** Tags:

Re: [Qemu-devel] Minutes of KVM Forum BoF on deprecating stuff

2018-10-29 Thread Christophe de Dinechin
> On 26 Oct 2018, at 16:03, Markus Armbruster wrote: > > This is from my (imperfect) notes, corrections welcome. > > Motivation: QEMU contains stuff of dubious value, which gets in the way > in various (sometimes painful and expensive) ways. > > Deprecation is the marking of an external

Re: [Qemu-devel] [PATCH v3 2/5] util: introduce threaded workqueue

2018-12-04 Thread Christophe de Dinechin
> On 27 Nov 2018, at 14:51, Paolo Bonzini wrote: > > On 27/11/18 13:49, Christophe de Dinechin wrote: >> So this is not really >> helping. Also, the ThreadLocal structure itself is not necessarily aligned >> within struct Threads. Therefore, it’s possible that “req

Re: [Qemu-devel] [PATCH v3 2/5] util: introduce threaded workqueue

2018-11-27 Thread Christophe de Dinechin
(I did not finish the review, but decided to send what I already had). > On 22 Nov 2018, at 08:20, guangrong.x...@gmail.com wrote: > > From: Xiao Guangrong > > This modules implements the lockless and efficient threaded workqueue. I’m not entirely convinced that it’s either “lockless” or

Re: [Qemu-devel] [PATCH 3/4] Add hepler functions for CPUID xsave area size calculation.

2019-01-08 Thread Christophe de Dinechin
Typo in subject line (helper) > On 26 Dec 2018, at 09:25, Yang Weijiang wrote: > > These functions are called when return CPUID xsave area > size information. > > Signed-off-by: Zhang Yi > Signed-off-by: Yang Weijiang > --- > target/i386/cpu.c | 26 +- > 1 file

Re: [Qemu-devel] [PATCH 5/5] vfio/migration: support device memory capability

2019-02-19 Thread Christophe de Dinechin
> On 19 Feb 2019, at 09:53, Yan Zhao wrote: > > If a device has device memory capability, save/load data from device memory > in pre-copy and stop-and-copy phases. > > LOGGING state is set for device memory for dirty page logging: > in LOGGING state, get device memory returns whole device

Re: [Qemu-devel] [PATCH 5/5] vfio/migration: support device memory capability

2019-02-20 Thread Christophe de Dinechin
> On 20 Feb 2019, at 08:58, Zhao Yan wrote: > > On Tue, Feb 19, 2019 at 03:42:36PM +0100, Christophe de Dinechin wrote: >> >> >>> On 19 Feb 2019, at 09:53, Yan Zhao wrote: >>> >>> If a device has device memory capability, save/load data from

Re: [Qemu-devel] [PATCH] minikconf: do not include variables from MINIKCONF_ARGS in config-all-devices.mak

2019-06-25 Thread Christophe de Dinechin
-devices.mak, because config-devices.mak is > included after config-host.mak. Avoid this by omitting assignments coming > from the command line in the output of minikconf. > > Reported-by: Christophe de Dinechin > Signed-off-by: Paolo Bonzini > --- > scripts/minikconf.py | 5 ++

[Qemu-devel] [PATCH] Fix build error when VNC is configured out

2019-06-25 Thread Christophe de Dinechin
’ [-Werror=unused-variable] 1946 | MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common); | ^~~ Signed-off-by: Christophe de Dinechin --- monitor/hmp-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/hmp-cmds.c b/monitor/hmp

[Qemu-devel] [PATCH v2] Fix build error when VNC is configured out

2019-06-25 Thread Christophe de Dinechin
’ [-Werror=unused-variable] 1946 | MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common); | ^~~ v2: Move variable down as suggested by Philippe Mathieu-Daudé Signed-off-by: Christophe de Dinechin --- monitor/hmp-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] [PATCH] target/i386: fix feature check in hyperv-stub.c

2019-06-26 Thread Christophe de Dinechin
> On 24 Jun 2019, at 14:38, Alex Bennée wrote: > > Commit 2d384d7c8 broken the build when built with: > > configure --without-default-devices --disable-user > > The reason was the conversion of cpu->hyperv_synic to > cpu->hyperv_synic_kvm_only although the rest of the patch introduces a >

[Qemu-devel] [PATCH] hyperv-stub: Remove invalid reference to hyperv_synic

2019-06-26 Thread Christophe de Dinechin
In commit 2d384d7c8 "i386/kvm: convert hyperv enlightenments properties from bools to bits", the hyperv_synic member was removed from struct X86CPU. The change was not applied to hyperv-stub.c, breaking the build for specific "lightweight" configurations. Signed-off-by: Ch

Re: [Qemu-devel] [Qemu-trivial] Fix cacheline size retrieval on FreeBSD/PowerPC(64)

2019-07-01 Thread Christophe de Dinechin
comfortable > with it. I just updated the commit message with your feedback and used > git send-email to submit the patch. I hope everything went well. FWIW, there is also a handy git-publish script that is worth looking at. It deals with multiple iterations of a patch and other niceties. https://github.com/stefanha/git-publish > > Thanks for your feedback. > > - Justin -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Qemu-devel] [PATCH 4/3] pcie: minor cleanups for slot control/status

2019-07-01 Thread Christophe de Dinechin
I_EXP_SLTCTL_PCC) || > +(old_slt_ctl & PCI_EXP_SLTCTL_PIC_OFF) != PCI_EXP_SLTCTL_PIC_OFF)) { > PCIBus *sec_bus = pci_bridge_get_sec_bus(PCI_BRIDGE(dev)); > pci_for_each_device(sec_bus, pci_bus_num(sec_bus), > pcie_unplug_device, NULL); Good idea. Reviewed-by: Christophe de Dinechin -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Qemu-devel] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-24 Thread Christophe de Dinechin
> On 23 Apr 2019, at 12:39, Daniel P. Berrangé wrote: > > On Fri, Apr 19, 2019 at 04:35:04AM -0400, Yan Zhao wrote: >> device version attribute in mdev sysfs is used by user space software >> (e.g. libvirt) to query device compatibility for live migration of VFIO >> mdev devices. This

Re: [Qemu-devel] [PATCH 3/7] configure: integrate Meson in the build system

2019-06-27 Thread Christophe de Dinechin
echo --strip) \ >> +--buildtype $(if test "$debug" = yes; then echo debug; else echo >> release; fi) \ >> +"$PWD" "$source_path" >> + >> + >> # Save the configure command line for later reuse. >> cat <config.status >> #!/bin/sh >> diff --git a/meson.build b/meson.build >> new file mode 100644 >> index 000..b683d70 >> --- /dev/null >> +++ b/meson.build >> @@ -0,0 +1,9 @@ >> +project('qemu', 'c', meson_version: '>=0.50.999') >> + >> +kconfig = import('unstable-kconfig') >> +config_host = kconfig.load(meson.current_build_dir() / 'config-host.mak') >> + >> +add_project_arguments(config_host['QEMU_CFLAGS'].split(), >> + language: 'c') >> +add_project_arguments(config_host['QEMU_INCLUDES'].split(), >> + language: 'c') >> diff --git a/scripts/ninjatool.py b/scripts/ninjatool.py >> new file mode 100644 >> index 000..6d90919 >> --- /dev/null >> +++ b/scripts/ninjatool.py > [Lots of code...] > > Did you write ninjatool.py specifically for QEMU, or did you steal it > (or parts) somewhere? -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Qemu-devel] [PATCH] console: fix cell overflow

2019-06-27 Thread Christophe de Dinechin
escape(QemuConsole *s) static void console_clear_xy(QemuConsole *s, int x, int y) { int y1 = (s->y_base + y) % s->total_height; +if (x >= s->width) { +x = s->width - 1; +} TextCell *c = >cells[y1 * s->width + x]; c->ch = ' '; c->t_

Re: [Qemu-devel] [PATCH v3 08/15] hw/i386/pc: Let fw_cfg_init() use the generic MachineState

2019-07-01 Thread Christophe de Dinechin
@@ void pc_memory_init(PCMachineState *pcms, > option_rom_mr, > 1); > > -fw_cfg = fw_cfg_arch_create(pcms, mc->possible_cpu_arch_ids(machine), > +fw_cfg = fw_cfg_arch_create(machine, mc->possible_cpu_arch_ids(machine), >

Re: [Qemu-devel] [libvirt] [PATCH 2/2] qapi: deprecate implicit filters

2019-08-30 Thread Christophe de Dinechin
John Snow writes: > On 8/29/19 12:45 PM, Christophe de Dinechin wrote: >> [...] >> Sorry for catching up late, this mail thread happened during my PTO. >> >> I remember bringing up at the time [1] that the correct solution needs >> to take into ac

Re: [Qemu-devel] [libvirt] [PATCH 2/2] qapi: deprecate implicit filters

2019-08-29 Thread Christophe de Dinechin
Connect warn_report() and all the error_vprintf output to QAPI, e.g. using John's suggestion of adding the messages using some "warning" or "deprecated" tag? 3. Teach libvirt how to consume that new tag and pass it along? [1] https://lists.nongnu.org/archive/html/qemu-devel/2018-10/msg06131.html -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Qemu-devel] [PATCH 2/2] qapi: deprecate implicit filters

2019-08-29 Thread Christophe de Dinechin
lready at the BoF seemed like a really big hammer to kill a fly. CC'ing Andrea as well, because we discussed recently about how to deal with error checking in general, and if a new error checking framework is being put in place, adding deprecation to the thinking could be a good idea. -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Qemu-devel] [PATCH-4.2 v1 4/6] target/riscv: Create function to test if FP is enabled

2019-07-30 Thread Christophe de Dinechin
gt; { > target_ulong mstatus = env->mstatus; > target_ulong mask = 0; > +int dirty; > > /* flush tlb on mstatus fields that affect VM */ > if (env->priv_ver <= PRIV_VERSION_1_09_1) { > @@ -340,8 +341,8 @@ static int write_mstatus(CPURISCVState *env, int csrno, > target_ulong val) > > mstatus = (mstatus & ~mask) | (val & mask); > > -int dirty = ((mstatus & MSTATUS_FS) == MSTATUS_FS) | > -((mstatus & MSTATUS_XS) == MSTATUS_XS); > +dirty = riscv_cpu_fp_enabled(env) | > +((mstatus & MSTATUS_XS) == MSTATUS_XS); > mstatus = set_field(mstatus, MSTATUS_SD, dirty); > env->mstatus = mstatus; Reviewed-by: Christophe de Dinechin -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Qemu-devel] [PATCH for-4.1] scsi-cd: Fix inserting read-only media in empty drive

2019-07-30 Thread Christophe de Dinechin
If not, why not make it a "else"? > + > + if (!blkconf_apply_backend_options(>conf, read_only, > dev->type == TYPE_DISK, errp)) { > return; > } -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-31 Thread Christophe de Dinechin
;xsave_buf, 0, sizeof(struct kvm_xsave)); >> >> OK >> >>> } >>> >>> max_nested_state_len = kvm_max_nested_state_length(); >>> @@ -3477,6 +3479,7 @@ static int kvm_put_debugregs(X86CPU *cpu) >>> return 0; >>> } >>> >>> +memset(, 0, sizeof(dbgregs)); >> >> OK >> >>> for (i = 0; i < 4; i++) { >>> dbgregs.db[i] = env->dr[i]; >>> } >> >> We could remove 'dbgregs.flags = 0;' >> >> Reviewed-by: Philippe Mathieu-Daudé >> -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-31 Thread Christophe de Dinechin
cept of locality associated with warm reset? For example, you'd expect a cold reset to happen on the whole system, but I guess a warm reset could be restricted to a single bus. The documentation should give examples of how warm reset could be triggered, and what it could do differently from cold reset. > > thanks > -- PMM -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-08-01 Thread Christophe de Dinechin
> On 1 Aug 2019, at 11:19, Damien Hedde wrote: > > > On 7/31/19 12:17 PM, Christophe de Dinechin wrote: >> >> Peter Maydell writes: >> >>> On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: >>>> >>>> On Tue, 30 Jul 2019 14:44

Re: [PATCH] memory: Do not allow subregion out of the parent region range

2019-12-17 Thread Christophe de Dinechin
> On 17 Dec 2019, at 11:51, Paolo Bonzini wrote: > > On 16/12/19 18:46, Philippe Mathieu-Daudé wrote: >>> >>> I think in some cases this could be intentional, for example if you have >>> different models with different BAR sizes and you organize this with the >>> same tree of

Re: [PATCH RESEND v2] util/cutils: Expand do_strtosz parsing precision to 64 bits

2019-12-17 Thread Christophe de Dinechin
> On 9 Dec 2019, at 09:30, Tao Xu wrote: > > Parse input string both as a double and as a uint64_t, then use the > method which consumes more characters. Update the related test cases. > > Signed-off-by: Tao Xu > --- > > Changes in v2: >- Resend to use double small than DBL_MIN >-

Re: [PATCH] util/cutils: Expand do_strtosz parsing precision to 64 bits

2019-12-17 Thread Christophe de Dinechin
> On 17 Dec 2019, at 15:08, Markus Armbruster wrote: > > Christophe de Dinechin writes: > >>> On 5 Dec 2019, at 16:29, Markus Armbruster wrote: >>> >>> Tao Xu writes: >>> >>>> Parse input string both as a double and as a uint6

Re: [PATCH] util/cutils: Expand do_strtosz parsing precision to 64 bits

2019-12-17 Thread Christophe de Dinechin
> On 5 Dec 2019, at 16:29, Markus Armbruster wrote: > > Tao Xu writes: > >> Parse input string both as a double and as a uint64_t, then use the >> method which consumes more characters. Update the related test cases. >> >> Signed-off-by: Tao Xu >> --- > [...] >> diff --git a/util/cutils.c

Re: Vote against removing the bluetooth subsystem from Quemu.

2019-12-17 Thread Christophe de Dinechin
> On 17 Dec 2019, at 15:11, Andreas Scheucher > wrote: > > Hello, > > I found following note in the Qemu documentation: This option and the whole > bluetooth subsystem is considered as deprecated. If you still use it, please > send a mail to qemu-devel@nongnu.org where you describe your

Re: [PATCH v3 09/16] libqos: access VIRTIO 1.0 vring in little-endian

2019-10-22 Thread Christophe de Dinechin
; { For my education, I was wondering why tests use the (1ull << FEATURE) notation and not an equivalent of virtio_has_feature()? Is this intentional, or just legacy? -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [RFC 1/3] acpi: cpuhp: fix 'Command data' description is spec

2019-10-22 Thread Christophe de Dinechin
Otherwise, if the "Command field" value last stored by the > guest differs from 0, then 0. > Otherwise, the currently selected CPU. How about phrasing it to put the more general case first, e.g. [0x8] Command data: (DWORD access, little endian) The currently selected CPU, unless: - The "CPU selector" value refers to an impossible CPU - The "Command field" value last stored by the guest differs from 0 In these last two cases, the value is 0. > > Thanks, > Laszlo -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Qemu-devel] [PATCH v2 2/2] linux-user: manage binfmt-misc preserve-arg[0] flag

2019-10-23 Thread Christophe de Dinechin
enerate_register() { > if [ "$PERSISTENT" = "yes" ] ; then > flags="${flags}F" > fi > +if [ "$PRESERVE_ARG0" = "yes" ] ; then > + flags="${flags}P" > +fi > > echo ":qemu-$cpu:M::$magic:$mask:$qemu:$flags" > } > @@ -322,9 +327,10 @@ DEBIANDIR="/usr/share/binfmts" > QEMU_PATH=/usr/local/bin > CREDENTIAL=no > PERSISTENT=no > +PRESERVE_ARG0=no > QEMU_SUFFIX="" > > -options=$(getopt -o ds:Q:S:e:hc:p: -l > debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,persistent: > -- "$@") > +options=$(getopt -o ds:Q:S:e:hc:p:0: -l > debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,persistent:,preserve-arg0: > -- "$@") > eval set -- "$options" > > while true ; do > @@ -380,6 +386,10 @@ while true ; do > shift > PERSISTENT="$1" > ;; > +-0|--preserve-arg0) > +shift > +PRESERVE_ARG0="$1" > +;; > *) > break > ;; -- Cheers, Christophe de Dinechin (IRC c3d)

Re: virtiofsd: Where should it live?

2019-12-02 Thread Christophe de Dinechin
e a "processes" subdirectory, and have virtiofsd be the first entry there. Thomas Huth suggested "tools", but I tend to read "tools" as things that are used during the build process. > > Your suggestions/ideas please. My preference is (a). > > Dave -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [Qemu-devel] [libvirt] [PATCH 2/2] qapi: deprecate implicit filters

2019-11-22 Thread Christophe de Dinechin
> On 22 Nov 2019, at 09:41, Markus Armbruster wrote: > > Reviving this old thread, because I'd like to connect it to more recent > discussions. > > Christophe de Dinechin mailto:dinec...@redhat.com>> > writes: > >> Markus Armbruster

[PATCH] scsi/qemu-pr-helper: Fix out-of-bounds access to trnptid_list[]

2020-02-28 Thread Christophe de Dinechin
-off-by: Christophe de Dinechin --- scsi/qemu-pr-helper.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c index 0659ceef09..01013221b3 100644 --- a/scsi/qemu-pr-helper.c +++ b/scsi/qemu-pr-helper.c @@ -421,7

Re: Integrating QOM into QAPI

2020-01-26 Thread Christophe de Dinechin
gt;>>> Marc-André Lureau writes: >>>> >>>>> Hi >>>>> >>>>> On Tue, Jan 21, 2020 at 3:32 PM Stefan Hajnoczi >>>>> wrote: >>>>>> >>>>>> On Tue, Jan 21, 2020 at 06:42:47AM +0100, Markus Arm

Re: Making QEMU easier for management tools and applications

2020-01-25 Thread Christophe de Dinechin
> On 23 Jan 2020, at 18:58, John Snow wrote: > > > > On 1/23/20 2:19 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> On 12/24/19 8:41 AM, Daniel P. Berrangé wrote: > * scripts/qmp/qmp-shell > > Half-hearted attempt at a human-friendly wrapper around the JSON >

Re: [PULL 111/111] virtiofsd: add some options to the help message

2020-01-27 Thread Christophe de Dinechin
default: depends on cache= > option.\n" > + "-o writeback|no_writeback enable/disable writeback cache\n" > + " default: no_writeback\n" > + "-o xattr|no_xattr enable/disable xattr\n" > + " default: no_xattr\n" > + ); > } > > static int fuse_helper_opt_proc(void *data, const char *arg, int key, -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PULL 016/111] virtiofsd: Add options for virtio

2020-01-27 Thread Christophe de Dinechin
ersion print version\n" > + "-d -o debug enable debug output (implies > -f)\n" > + "-f foreground operation\n" > + "-o max_idle_threadsthe maximum number of idle worker > " > + "threads\n" > + " allowed (default: 10)\n"); > } > > static int fuse_helper_opt_proc(void *data, const char *arg, int key, -- Cheers, Christophe de Dinechin (IRC c3d)

Re: Integrating QOM into QAPI

2020-01-29 Thread Christophe de Dinechin
> On 28 Jan 2020, at 11:03, Daniel P. Berrangé wrote: > > On Mon, Jan 27, 2020 at 08:05:36PM +0100, Christophe de Dinechin wrote: >> >> >>> On 26 Jan 2020, at 16:04, Peter Maydell wrote: >>> >>> On Sun, 26 Jan 2020 at 08:10, Christoph

Re: [PATCH] docs: add virtiofsd(1) man page

2020-01-29 Thread Christophe de Dinechin
+ > +.. option:: --cache=none|auto|always > + > + Select the desired trade-off between coherency and performance. ``none`` > + forbids the FUSE client from caching to achieve best coherency at the cost > of > + performance. ``auto`` acts similar to NFS with a 1 second metadata cache > + timeout. ``always`` sets a long cache lifetime at the expense of > coherency. > + > +Examples > + > + > +Export ``/var/lib/fs/vm001/`` on vhost-user UNIX domain socket > +``/var/run/vm001-vhost-fs.sock``: > + > +:: > + > + host# virtiofsd --socket-path=/var/run/vm001-vhost-fs.sock -o > source=/var/lib/fs/vm001 > + host# qemu-system-x86_64 \ > + -chardev socket,id=char0,path=/var/run/vm001-vhost-fs.sock \ > + -device vhost-user-fs-pci,chardev=char0,tag=myfs \ > + -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \ > + -numa node,memdev=mem \ > + ... > + guest# mount -t virtio_fs myfs /mnt -- Cheers, Christophe de Dinechin (IRC c3d)

Re: Integrating QOM into QAPI

2020-01-27 Thread Christophe de Dinechin
> On 26 Jan 2020, at 16:04, Peter Maydell wrote: > > On Sun, 26 Jan 2020 at 08:10, Christophe de Dinechin > wrote: >> I’m still puzzled as to why anybody would switch to something like >> GObject when there is C++. > > I'm fairly strongly against using C

Re: Integrating QOM into QAPI

2020-01-27 Thread Christophe de Dinechin
> On 26 Jan 2020, at 17:47, Paolo Bonzini wrote: > > On 26/01/20 10:11, Marc-André Lureau wrote: >>> I’m still puzzled as to why anybody would switch to something like >>> GObject when there is C++. >> C++ is another level of complexity. >> >> Replacing QOM with GObject would mainly bring us

Re: Integrating QOM into QAPI

2020-01-27 Thread Christophe de Dinechin
> On 26 Jan 2020, at 10:11, Marc-André Lureau > wrote: > > Hi > > On Sun, Jan 26, 2020 at 9:10 AM Christophe de Dinechin > wrote: >> >> >> >>> On 21 Jan 2020, at 16:11, Marc-André Lureau >>> wrote: >>> >&g

Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications]

2020-01-31 Thread Christophe de Dinechin
> On 31 Jan 2020, at 08:46, Paolo Bonzini wrote: > > On 31/01/20 07:11, Markus Armbruster wrote: >> May I present you Armbru's Comment Trust Levels: >> >> ACTL2: The comment may be overly terse or incomplete, but the >> probability for it to be outright wrong is low. >> >> ACTL1: Treat as

Re: Making QEMU easier for management tools and applications

2020-01-15 Thread Christophe de Dinechin
Thanks a bunch. This clarifies a number of my misconceptions about how this is currently used. Most notably this one: > On 15 Jan 2020, at 10:20, Markus Armbruster wrote: > >> We don’t want the QAPI to let arbitrary fields of a QOM object >> be modified, do we? > > We already do: QMP command

Re: Priority of -accel

2020-01-13 Thread Christophe de Dinechin
> On 13 Jan 2020, at 15:39, Markus Armbruster wrote: > > Thomas Huth writes: 'any' is a russian roulette, you don't want it to return 'qtest' ;) >>> >>> We could make it return "qtest" only on April 1st ;-P >> >> ... or we finally dare to let QEMU chose the "best" accelerator by

Re: Making QEMU easier for management tools and applications

2020-01-14 Thread Christophe de Dinechin
I started cutting some stuff out. > On 14 Jan 2020, at 14:04, Markus Armbruster wrote: > > Prior art: > >Presentation >KVM Forum 2017: Towards a More Expressive and Introspectable QEMU >Command Line >https://www.youtube.com/watch?v=gtpOLQgnwug >

Re: Priority of -accel

2020-01-14 Thread Christophe de Dinechin
> On 13 Jan 2020, at 17:25, Paolo Bonzini wrote: > > On 13/01/20 17:17, Markus Armbruster wrote: >> Perfect opportunity to change the default to something more useful. > > I am not sure acutally if it's that more useful, now that we have > sanctioned qemu-kvm as the fast alternative. OK,

Re: Extraneous nesting in QAPI schema

2020-01-16 Thread Christophe de Dinechin
> On 16 Dec 2019, at 17:59, Markus Armbruster wrote: > > Kevin suggested to investigate a more generic flattening solutions. > > Of course, flattening is only possible as long as there are no name > clashes. Or you could reverse the name sequence and allow the “upper” layers to

Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option)

2020-01-07 Thread Christophe de Dinechin
> On 7 Jan 2020, at 11:14, Paolo Bonzini wrote: > > On 07/01/20 11:03, Thomas Huth wrote: >>> >>> vm = QEMUMachine(iotests.qemu_prog) >>> -vm.add_args('-machine', 'accel=kvm:tcg') >>> +vm.add_args('-accel', 'kvm', '-accel', 'tcg') >> Looking at this, I wonder whether we really want the

Re: Making QEMU easier for management tools and applications

2020-01-07 Thread Christophe de Dinechin
Hi Stefan, > On 20 Dec 2019, at 17:13, Stefan Hajnoczi wrote: > > Hi, > QEMU presents a command-line interface and QMP monitor for > applications to interact with. Applications actually need API > bindings in their programming language. Bindings avoid reimplementing > code to spawn a QEMU

Re: Priority of -accel (was: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option)

2020-01-07 Thread Christophe de Dinechin
> On 7 Jan 2020, at 15:37, Paolo Bonzini wrote: > > On 07/01/20 14:55, Christophe de Dinechin wrote: >> So what about ranking the accelerators, so that all combinaisons >> -accel=kvm:tcg, -accel=tcg:kvm, -accel kvm -accel tcg, etc would > > (I assume you m

Re: Making QEMU easier for management tools and applications

2020-01-07 Thread Christophe de Dinechin
> On 7 Jan 2020, at 13:57, Kevin Wolf wrote: > > Am 07.01.2020 um 11:55 hat Michal Privoznik geschrieben: >> On 1/7/20 10:36 AM, Kevin Wolf wrote: >>> The easy way out would be tying libvirt to a specific QEMU version. And >>> I'm only half joking. >>> >>> If libvirt didn't exist yet and we

Re: Making QEMU easier for management tools and applications

2020-01-08 Thread Christophe de Dinechin
> On 8 Jan 2020, at 11:43, Kevin Wolf wrote: > > Am 07.01.2020 um 18:11 hat Christophe de Dinechin geschrieben: >> So I think that it might help, in the long run, to start defining the >> language in question in some abstract way, and then to have rules >> for how

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: [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 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: How to fuzz devices that use timers?

2020-05-28 Thread Christophe de Dinechin
> On 28 May 2020, at 11:26, Philippe Mathieu-Daudé wrote: > > Hi, > > Some devices use timers (QEMUTimer) to emulate hardware precise timings. > i.e. with a flash device, the guest orders erasing it, the physical > erasure takes some time - let say 200ms - and upon completion a bit is > set

Re: [PATCH] or1k: Fix compilation hiccup

2020-05-29 Thread Christophe de Dinechin
}; Why is the value [2] correct here? The loop that initializes loops over machine->smp.cpus. Is it always less than 2 on this machine? > qemu_irq serial_irq; > int n; > unsigned int smp_cpus = machine->smp.cpus; -- 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.

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 > >

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 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 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 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] 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 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 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

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-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 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 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 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 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 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

[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 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: 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

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: 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: >

[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: [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 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 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 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 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 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 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

  1   2   >