Re: [RFC 1/4] memory: add memory_region_init_io_with_dev interface

2020-09-20 Thread Paolo Bonzini
On 08/09/20 18:41, Li Qiang wrote: > Currently the MR is not explicitly connecting with its device instead of > a opaque. In most situation this opaque is the deivce but it is not an > enforcement. This patch adds a DeviceState member of to MemoryRegion > we will use it in later patch. > > Signed-

Re: [RFC 0/4] Add a 'in_mmio' device flag to avoid the DMA to MMIO

2020-09-20 Thread Paolo Bonzini
On 08/09/20 18:41, Li Qiang wrote: > Currently the qemu device fuzzer find some DMA to MMIO issue. If the > device handling MMIO currently trigger a DMA which the address is MMIO, > this will reenter the device MMIO handler. As some of the device doesn't > consider this it will sometimes crash the

Re: [PATCH v4 00/15] Reverse debugging

2020-09-20 Thread Paolo Bonzini
On 14/09/20 08:06, Pavel Dovgalyuk wrote: > GDB remote protocol supports reverse debugging of the targets. > It includes 'reverse step' and 'reverse continue' operations. > The first one finds the previous step of the execution, > and the second one is intended to stop at the last breakpoint that >

[PATCH 0/6] QOM minor fixes

2020-09-20 Thread Mark Cave-Ayland
This series started off as a fix for the nd_table misuse in the sparc32-ledma device as pointed out by Markus, and then I remembered there was similar issue around the use of serial_hd() in macio. The last patch is one I've had sitting in a local branch for a while and is a mistake I made during th

[PATCH 1/6] sparc32-dma: use object_initialize_child() for espdma and ledma child objects

2020-09-20 Thread Mark Cave-Ayland
Store the child objects directly within the sparc32-dma object rather than using link properties. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 15 +-- include/hw/sparc/sparc32_dma.h | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/hw/

[PATCH 3/6] sparc32-espdma: use object_initialize_child() for esp child object

2020-09-20 Thread Mark Cave-Ayland
Store the child object directly within the sparc32-espdma object rather than using link properties. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 17 - include/hw/sparc/sparc32_dma.h | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/h

[PATCH 2/6] sparc32-ledma: use object_initialize_child() for lance child object

2020-09-20 Thread Mark Cave-Ayland
Store the child object directly within the sparc32-ledma object rather than using link properties. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 14 -- include/hw/sparc/sparc32_dma.h | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/dma

[PATCH 6/6] sabre: don't call sysbus_mmio_map() in sabre_realize()

2020-09-20 Thread Mark Cave-Ayland
The device should not map itself but instead should be mapped to sysbus by the sun4u machine. Signed-off-by: Mark Cave-Ayland --- hw/pci-host/sabre.c | 8 hw/sparc64/sun4u.c | 7 +++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/pci-host/sabre.c b/hw/pci-host/sa

[PATCH 4/6] sparc32-ledma: don't reference nd_table directly within the device

2020-09-20 Thread Mark Cave-Ayland
Instead use qdev_set_nic_properties() to configure the on-board NIC at the sun4m machine level. Signed-off-by: Mark Cave-Ayland --- hw/dma/sparc32_dma.c | 5 - hw/sparc/sun4m.c | 21 + 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/dma/sparc32_dm

[PATCH 5/6] macio: don't reference serial_hd() directly within the device

2020-09-20 Thread Mark Cave-Ayland
Instead use qdev_prop_set_chr() to configure the ESCC serial chardevs at the Mac Old World and New World machine level. Also remove the now obsolete comment referring to the use of serial_hd() and change user_createable to true accordingly. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/maci

[PATCH 1/4] configure: cleanup invocation of submodule Make

2020-09-20 Thread Paolo Bonzini
Move common command line options to SUBDIR_MAKEFLAGS, thus simplifying the rules themselves. Signed-off-by: Paolo Bonzini --- Makefile | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 897246d77c..57fb63832f 100644 --- a/Makef

[PATCH 4/4] configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to meson

2020-09-20 Thread Paolo Bonzini
Environment variables like CFLAGS are easy to accidentally change. Meson warns if that happens, but in a project with a lot of configuration that is easy to lose. It is also surprising behavior since meson caches -D options and remembers those on reconfiguration (which we rely on, since configure

[PATCH 3/4] configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS

2020-09-20 Thread Paolo Bonzini
If the CFLAGS, CXXFLAGS or LDFLAGS variables are present in the environment, any modification made within the configure script is passed down to Meson. This is particularly undesirable for the "-pie" option, since it overrides "-shared" and thus messes up the linker flags for shared modules. Using

[PATCH 0/4] configure: bugfixes and cleanups for CFLAGS

2020-09-20 Thread Paolo Bonzini
Meson is placing -pie after -shared rather than before, and this causes linking to fail while building the ArchLinux package for QEMU? But why is -pie ending up in the flags? Because LDFLAGS is an environment variable, and changes to environment variables propagate when configure does LDFLAGS=

[Bug 1896096] Re: Git version: Build process is broken in block_curl.c.o

2020-09-20 Thread Paolo Bonzini
> But --extra-cflags="my additional compiler switch" seems to > also add it to the link line which seems a bit odd? That's due to LTO. IIRC autotools do the same (after all the linking step is a "cc" invocation), but I may be wrong. > I wonder why you didn't just bite the bullet and go full Meso

[PATCH 2/4] configure: cleanup CFLAGS and LDFLAGS for submodules

2020-09-20 Thread Paolo Bonzini
The -g and -O2 flags that configure adds to CFLAGS are only used by submodules, so do not put anymore the confusing CFLAGS variable in config-host.mak and replace it with more explicit SUBMODULE_CFLAGS variable. There was also no equivalent SUBMODULE_LDFLAGS variable, add it. This would theoretic

[Bug 1896096] Re: Git version: Build process is broken in block_curl.c.o

2020-09-20 Thread Paolo Bonzini
Posted "[PATCH 0/4] configure: bugfixes and cleanups for CFLAGS". -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1896096 Title: Git version: Build process is broken in block_curl.c.o Status in QEMU

Re: [PATCH 6/6] sabre: don't call sysbus_mmio_map() in sabre_realize()

2020-09-20 Thread Philippe Mathieu-Daudé
On 9/20/20 10:20 AM, Mark Cave-Ayland wrote: > The device should not map itself but instead should be mapped to sysbus by the > sun4u machine. Yeah good cleanup. Reviewed-by: Philippe Mathieu-Daudé > > Signed-off-by: Mark Cave-Ayland > --- > hw/pci-host/sabre.c | 8 > hw/sparc64/sun

Re: [PATCH 2/6] sparc32-ledma: use object_initialize_child() for lance child object

2020-09-20 Thread Philippe Mathieu-Daudé
On 9/20/20 10:20 AM, Mark Cave-Ayland wrote: > Store the child object directly within the sparc32-ledma object rather than > using link properties. > > Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé > --- > hw/dma/sparc32_dma.c | 14 -- > include/hw/

Re: [PATCH 1/6] sparc32-dma: use object_initialize_child() for espdma and ledma child objects

2020-09-20 Thread Philippe Mathieu-Daudé
On 9/20/20 10:20 AM, Mark Cave-Ayland wrote: > Store the child objects directly within the sparc32-dma object rather than > using > link properties. > > Signed-off-by: Mark Cave-Ayland > --- > hw/dma/sparc32_dma.c | 15 +-- > include/hw/sparc/sparc32_dma.h | 4 ++-- Consi

Re: [PATCH 3/6] sparc32-espdma: use object_initialize_child() for esp child object

2020-09-20 Thread Philippe Mathieu-Daudé
On 9/20/20 10:20 AM, Mark Cave-Ayland wrote: > Store the child object directly within the sparc32-espdma object rather than > using link properties. > > Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé > --- > hw/dma/sparc32_dma.c | 17 - > include

Re: [PATCH 5/6] macio: don't reference serial_hd() directly within the device

2020-09-20 Thread BALATON Zoltan via
On Sun, 20 Sep 2020, Mark Cave-Ayland wrote: Instead use qdev_prop_set_chr() to configure the ESCC serial chardevs at the Mac Old World and New World machine level. Also remove the now obsolete comment referring to the use of serial_hd() and change user_createable to true accordingly. Signed-of

[PATCH 0/2] qdev: Let BusRealize() return a boolean value to indicate error

2020-09-20 Thread Philippe Mathieu-Daudé
To ease error checking in DeviceRealize handlers, let BusRealize return a boolean value, as qbus_realize() does. Having DeviceRealize similarly return a boolean value is left as an exercice for volunteers :) Philippe Mathieu-Daudé (2): qdev: Document qbus_realize() and qbus_unrealize() qdev:

[PATCH 1/2] qdev: Document qbus_realize() and qbus_unrealize()

2020-09-20 Thread Philippe Mathieu-Daudé
Add some documentation for the qbus_realize() and qbus_unrealize() functions introduced in commit 9940b2cfbc0. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/qdev-core.h | 12 1 file changed, 12 insertions(+) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index

[PATCH 2/2] qdev: Let BusRealize() return a boolean value to indicate error

2020-09-20 Thread Philippe Mathieu-Daudé
Commit 9940b2cfbc0 introduced qdev_realize() and qbus_realize() with the ability to return a boolean value if an error occured, thus the caller does not need to check if the Error* pointer is set. Provide the same ability to the BusRealize type. Signed-off-by: Philippe Mathieu-Daudé --- include/

Re: [PATCH] virtio: update MemoryRegionCaches when guest set bad features

2020-09-20 Thread Paolo Bonzini
On 19/09/20 10:27, Li Qiang wrote: > Current the 'virtio_set_features' only update the 'MemorRegionCaches' > when the 'virtio_set_features_nocheck' return '0' which means it is > not bad features. However the guest can still trigger the access of the > used vring after set bad features. In this sit

Re: [PATCH] smp: drop support for deprecated (invalid topologies)

2020-09-20 Thread Paolo Bonzini
On 18/09/20 22:57, Eduardo Habkost wrote: > On Mon, Sep 14, 2020 at 09:37:20AM +0200, Igor Mammedov wrote: >> On Fri, 11 Sep 2020 11:04:47 -0400 >> "Michael S. Tsirkin" wrote: >> >>> On Fri, Sep 11, 2020 at 09:32:02AM -0400, Igor Mammedov wrote: it's was deprecated since 3.1 Support

[PATCH 7/9] configure: remove target configuration

2020-09-20 Thread Paolo Bonzini
The config-target.mak files are small constant, we can therefore just write them down explicitly. This removes about 10% of the configure script, including the whole logic to detect which accelerators are supported by each target. Signed-off-by: Paolo Bonzini --- configure

[PATCH 8/9] default-configs/targets: remove useless lines

2020-09-20 Thread Paolo Bonzini
Some lines are only meaningful for user-mode targets, remove them. Signed-off-by: Paolo Bonzini --- default-configs/targets/aarch64-softmmu.mak | 1 - default-configs/targets/alpha-softmmu.mak| 3 --- default-configs/targets/arm-softmmu.mak | 3 --- default-configs/targets/

[PATCH 5/9] configure: remove dead variable

2020-09-20 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 11 --- 1 file changed, 11 deletions(-) diff --git a/configure b/configure index ee5c4da54b..df3b031b1c 100755 --- a/configure +++ b/configure @@ -808,9 +808,6 @@ fi # OS specific -# host *BSD for user mode -HOST_VARIANT_DIR="" - case $t

[PATCH 2/9] configure: convert accelerator variables to meson options

2020-09-20 Thread Paolo Bonzini
Prepare for moving the tests to meson. For now they only have enabled/disabled as the possible values when meson is invoked, but "auto" will be a possibility later, when configure will only parse the command line options. Signed-off-by: Paolo Bonzini --- configure | 132

[PATCH 3/9] configure: rewrite accelerator defaults as tests

2020-09-20 Thread Paolo Bonzini
Prepare to process "auto" in meson rather than configure: localize the code that changes "auto" to enabled/disabled, it will be moved to meson and removed from configure. Signed-off-by: Paolo Bonzini --- configure | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-

[RFC PATCH 0/9] Move target configuration to meson

2020-09-20 Thread Paolo Bonzini
Next in the "Meson experiments" series, this one moves target configuration to meson. Actually only the accelerator part (supported_target etc.) is moved, the TARGET_* part of config-target.mak files become static. This is more maintainable since the files are small and change very rarely. The p

[PATCH 1/9] default-configs: move files to default-configs/devices/

2020-09-20 Thread Paolo Bonzini
Make room for target files in default-configs/targets/ Signed-off-by: Paolo Bonzini --- configure | 6 +++--- default-configs/{ => devices}/aarch64-linux-user.mak | 0 default-configs/{ => devices}/aarch64-softmmu.mak | 0 default-conf

[PATCH 6/9] configure: move CONFIG_* symbols to meson

2020-09-20 Thread Paolo Bonzini
These symbols are easily computed from just the target name, so remove them from config-target.mak. Signed-off-by: Paolo Bonzini --- configure | 11 +-- meson.build | 27 --- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/configure b/configure

[PATCH 4/9] configure: move accelerator logic to meson

2020-09-20 Thread Paolo Bonzini
Move to meson the code to detect the presence of accelerators, and to define accelerator-specific config-target.h symbols. The logic for now is duplicated in configure because it is still in use to build the list of targets (which is in turn used to create the config-target.mak files). The next p

[PATCH 9/9] default-configs: remove default-configs/devices for user-mode targets

2020-09-20 Thread Paolo Bonzini
We no longer need dummy files to detect targets, since default-configs/targets/ exists. Signed-off-by: Paolo Bonzini --- configure | 6 +++--- default-configs/devices/aarch64-linux-user.mak | 1 - default-configs/devices/aarch64_be-linux-user.mak

Re: [PATCH 7/9] configure: remove target configuration

2020-09-20 Thread Yonggang Luo
Can these be generated from meson directly? as makefile finally need to be removed On Sun, Sep 20, 2020 at 9:09 PM Paolo Bonzini wrote: > > The config-target.mak files are small constant, we can therefore just > write them down explicitly. > > This removes about 10% of the configure script, inclu

[PATCH 1/3] haprot: add a device for memory hot-add protocols

2020-09-20 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This device works like a virtual DIMM stick: it allows inserting extra RAM into the guest at run time. The main differences from the ACPI-based PC DIMM hotplug are: * Notifying the guest about the new memory range is not done via ACPI but via a protocol handler that r

[PATCH 3/3] Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon)

2020-09-20 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This driver is like virtio-balloon on steroids: it allows both changing the guest memory allocation via ballooning and inserting extra RAM into it by adding haprot virtual DIMM sticks. One of advantages of these over ACPI-based PC DIMM hotplug is that such memory can b

[PATCH 2/3] Add Hyper-V Dynamic Memory Protocol definitions

2020-09-20 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This commit adds Hyper-V Dynamic Memory Protocol definitions, taken from hv_balloon Linux kernel driver, adapted to the QEMU coding style and definitions. Signed-off-by: Maciej S. Szmigiero --- include/hw/hyperv/dynmem-proto.h | 425 +++

[PATCH] pc-dimm: remove unnecessary get_vmstate_memory_region() method

2020-09-20 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" The get_vmstate_memory_region() method from PCDIMMDeviceClass is only ever called from this class and is never overridden, so it can be converted into an ordinary function. Signed-off-by: Maciej S. Szmigiero --- hw/mem/pc-dimm.c | 33 ++--

[PATCH 0/3] Hyper-V Dynamic Memory Protocol driver (hv-balloon)

2020-09-20 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This series adds a Hyper-V Dynamic Memory Protocol driver (hv-balloon) and its protocol definitions. Also included is a driver providing backing devices for memory hot-add protocols ("haprots"). A haprot device works like a virtual DIMM stick: it allows inserting extr

Re: [PATCH 0/3] Hyper-V Dynamic Memory Protocol driver (hv-balloon)

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1600556526.git.maciej.szmigi...@oracle.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: cover.1600556526.git.maciej.szmigi...@oracle.com Subject: [PATCH 0/3] Hyper-V Dynam

Hi Bonzini, I've seen your 3.1 branch have conflict with qemu.org/master

2020-09-20 Thread Yonggang Luo
I rebased 3.1 branch on qemu.org/master and placed at https://github.com/lygstate/qemu/tree/for-3.1 And removed two conflcit revision * iotests: Work around failing readlink -f * Simplify the .gitignore file And test result at here: https://cirrus-ci.com/build/4717093432066048 -- 此致

[PATCH] vhost-vdpa: remove useless variable

2020-09-20 Thread Laurent Vivier
in vhost_vdpa_listener_region_del(), try_unmap is always true and so, vhost_vdpa_dma_unmap() is always called. We can remove the variable Signed-off-by: Laurent Vivier --- hw/virtio/vhost-vdpa.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b

[PATCH] timer: Fix timer_mod_anticipate() documentation

2020-09-20 Thread Philippe Mathieu-Daudé
timer_mod_anticipate() will be scaled to the timer unit, which is not always nanosecond. Fix the documentation. Fixes: add40e9777d ("timer: add timer_mod_anticipate*") Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/timer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] qom: Improve error message displayed with missing object properties

2020-09-20 Thread Philippe Mathieu-Daudé
Instead of only displaying the property missing, also display the object name. This help developer to quickly figure out the mistake without opening a debugger. Signed-off-by: Philippe Mathieu-Daudé --- qom/object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qom/object

Re: [PATCH] vhost-vdpa: remove useless variable

2020-09-20 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial@ On 9/20/20 5:20 PM, Laurent Vivier wrote: > in vhost_vdpa_listener_region_del(), try_unmap is always true and so, > vhost_vdpa_dma_unmap() is always called. We can remove the variable > > Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé > --- > hw/virtio

Re: [PATCH] vhost-vdpa: remove useless variable

2020-09-20 Thread Li Qiang
Laurent Vivier 于2020年9月20日周日 下午11:21写道: > > in vhost_vdpa_listener_region_del(), try_unmap is always true and so, > vhost_vdpa_dma_unmap() is always called. We can remove the variable > > Signed-off-by: Laurent Vivier Reviewed-by: Li Qiang > --- > hw/virtio/vhost-vdpa.c | 9 +++-- > 1 fil

Re: [PATCH] qom: Improve error message displayed with missing object properties

2020-09-20 Thread Li Qiang
Philippe Mathieu-Daudé 于2020年9月20日周日 下午11:54写道: > > Instead of only displaying the property missing, also display > the object name. This help developer to quickly figure out the > mistake without opening a debugger. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Li Qiang > --- > qom/

[PATCH 2/2] vhost-vdpa: add trace-events

2020-09-20 Thread Laurent Vivier
Add trace functionis in vhost-vdpa.c. All traces from this file can be enabled with '-trace vhost_vdpa*'. Signed-off-by: Laurent Vivier --- hw/virtio/trace-events | 29 ++ hw/virtio/vhost-vdpa.c | 85 +++--- 2 files changed, 109 insertions(+), 5 d

[PATCH 1/2] util/hexdump: introduce qemu_hexdump_line()

2020-09-20 Thread Laurent Vivier
Dumping one line of hexadecimal/ASCII from a buffer is often needed. Move this part from qemu_hexdump() and use it Signed-off-by: Laurent Vivier --- include/qemu-common.h | 8 +++ util/hexdump.c| 54 +++ 2 files changed, 42 insertions(+), 20 d

[PATCH 0/2] vhost-vdpa: add trace functions in vhost-vdpa.c

2020-09-20 Thread Laurent Vivier
Add trace events functions in vdpa functions. Modify qemu_hexdump() to be able to dump the vdpa config in trace logs in hexadecimal form. Laurent Vivier (2): util/hexdump: introduce qemu_hexdump_line() vhost-vdpa: add trace-events hw/virtio/trace-events | 29 ++ hw/virtio/vhost-

Re: Hi Bonzini, I've seen your 3.1 branch have conflict with qemu.org/master

2020-09-20 Thread Paolo Bonzini
On 20/09/20 16:53, 罗勇刚(Yonggang Luo) wrote: > I rebased 3.1 branch on  qemu.org/master and > placed at > https://github.com/lygstate/qemu/tree/for-3.1 > > And removed two conflcit revision > > * iotests: Work around failing readlink -f > * Simplify the .gitignore file >

Re: [PATCH 7/9] configure: remove target configuration

2020-09-20 Thread Paolo Bonzini
On 20/09/20 15:13, 罗勇刚(Yonggang Luo) wrote: > Can these be generated from meson directly? > as makefile finally need to be removed The files aren't generated and are independent of the Makefile infrastructure. Don't think too much of the .mak extension. :) Paolo

[PATCH 0/9] Audio fixes and improvements

2020-09-20 Thread Volker Rümelin
A few fixes and improvements from my audio patch queue. It's currently still not possible to reach the function audio_generic_read(). I tested the patch   audio: align audio_generic_read with audio_pcm_hw_run_in with a modified audio/paaudio.c version. If someone wants to reproduce the test, repl

[PATCH 1/9] audio: handle buf == NULL in put_buffer_out()

2020-09-20 Thread Volker Rümelin
With the next patch all audio backends put_buffer_out() functions have to handle the buf == NULL case, provided the get_buffer_out() function may return buf = NULL and size > 0. It turns out that all audio backends get_buffer_out() functions either can't return buf = NULL or return buf = NULL and

[PATCH 3/9] audio/spiceaudio: always rate limit playback stream

2020-09-20 Thread Volker Rümelin
The playback rate with the spiceaudio backend is currently too fast if there's no spice client connected or the spice client can't play audio. Rate limit the audio playback stream in all cases. To calculate the rate correctly the limiter has to know the maximum buffer size. Fixes: 8c198ff065 ("spi

[PATCH 6/9] audio: align audio_generic_write with audio_pcm_hw_run_out

2020-09-20 Thread Volker Rümelin
The function audio_generic_write should work exactly like audio_pcm_hw_run_out. It's a very similar function working on a different buffer. This patch significantly reduces the number of drop-outs with the DirectSound backend. To hear the difference start qemu with -audiodev dsound,id=audio0,out.m

[PATCH 5/9] audio: remove unnecessary calls to put_buffer_in

2020-09-20 Thread Volker Rümelin
This patch removes unnecessary calls to the pcm_ops function put_buffer_in(). No audio backend needs this call if the returned length of pcm_ops function get_buffer_in() is zero. For the DirectSound backend this prevents a call to dsound_unlock_in() without a preceding call to dsound_lock_in(). Wh

[PATCH 9/9] audio: revert tests for pcm_ops table

2020-09-20 Thread Volker Rümelin
With previous commit every audio backend has a pcm_ops function table. It's no longer necessary to test if the table is available. This reverts commit cbaf25d1f5: "audio: fix wavcapture segfault" Signed-off-by: Volker Rümelin --- audio/audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletio

[PATCH 2/9] audio/audio: fix video playback slowdown with spiceaudio

2020-09-20 Thread Volker Rümelin
This patch allows the audio backends get_buffer_out() functions to drop audio data and mitigates a bug reported on the qemu-devel mailing list. https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03832.html The new rules for the variables buf and size returned by get_buffer_out() are: siz

[PATCH 4/9] audio: align audio_generic_read with audio_pcm_hw_run_in

2020-09-20 Thread Volker Rümelin
The function audio_generic_read should work exactly like audio_pcm_hw_run_in. It's a very similar function working on a different buffer. Signed-off-by: Volker Rümelin --- audio/audio.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/audio/audio.c b/audio

[PATCH 7/9] audio: run downstream playback queue unconditionally

2020-09-20 Thread Volker Rümelin
Run the downstream playback queue even if there are no samples in the mixing engine buffer. The downstream queue may still have queued samples. Signed-off-by: Volker Rümelin --- audio/audio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/audio/audio.c b/audio/audio.c index 57eddb3324..a

[PATCH 8/9] audio: restore mixing-engine playback buffer size

2020-09-20 Thread Volker Rümelin
Commit ff095e5231 "audio: api for mixeng code free backends" introduced another FIFO for the audio subsystem with exactly the same size as the mixing-engine FIFO. Most audio backends use this generic FIFO. The generic FIFO used together with the mixing-engine FIFO doubles the audio FIFO size, becau

[PATCH 0/7] hw/arm/raspi: Fix SYS_timer on Linux + misc changes

2020-09-20 Thread Philippe Mathieu-Daudé
In this series we implement the COMPARE registers of the SYS_timer, since they are used by Linux. This fixes the hang reported by Niek here: https://www.mail-archive.com/qemu-devel@nongnu.org/msg682090.html Few trivial patches used while working on this added. Philippe Mathieu-Daudé (7): hw/ar

Re: [PATCH 5/6] macio: don't reference serial_hd() directly within the device

2020-09-20 Thread Mark Cave-Ayland
On 20/09/2020 11:52, BALATON Zoltan via wrote: > On Sun, 20 Sep 2020, Mark Cave-Ayland wrote: >> Instead use qdev_prop_set_chr() to configure the ESCC serial chardevs at the >> Mac Old World and New World machine level. >> >> Also remove the now obsolete comment referring to the use of serial_hd()

[PATCH 1/7] hw/arm/raspi: Define various blocks base addresses

2020-09-20 Thread Philippe Mathieu-Daudé
The Raspberry firmware is closed-source. While running it, it accesses various I/O registers. Logging these accesses as UNIMP (unimplemented) help to understand what the firmware is doing (ideally we want it able to boot a Linux kernel). Document various blocks we might use later. Reviewed-by: Al

[PATCH 3/7] hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers

2020-09-20 Thread Philippe Mathieu-Daudé
Add trace events for GPU and CPU IRQs. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/bcm2835_ic.c | 4 +++- hw/intc/trace-events | 4 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/intc/bcm2835_ic.c b/hw/intc/bcm2835_ic.c index 53ab8f58810..9000d995e81 100644 --- a/hw/

[PATCH 2/7] hw/arm/bcm2835: Add more unimplemented peripherals

2020-09-20 Thread Philippe Mathieu-Daudé
The bcm2835-v3d is used since Linux 4.7, see commit 49ac67e0c39c ("ARM: bcm2835: Add VC4 to the device tree"), and the bcm2835-txp since Linux 4.19, see commit b7dd29b401f5 ("ARM: dts: bcm283x: Add Transposer block"). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/bcm2835_peripherals.h

[PATCH 6/7] hw/timer/bcm2835: Support the timer COMPARE registers

2020-09-20 Thread Philippe Mathieu-Daudé
This peripheral has 1 free-running timer and 4 compare registers. Only the free-running timer is implemented. Add support the COMPARE registers (each register is wired to an IRQ). Reference: "BCM2835 ARM Peripherals" datasheet [*] chapter 12 "System Timer": The System Timer periphe

[PATCH 4/7] hw/timer/bcm2835: Introduce BCM2835_SYSTIMER_COUNT definition

2020-09-20 Thread Philippe Mathieu-Daudé
Use the BCM2835_SYSTIMER_COUNT definition instead of the magic '4' value. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/bcm2835_systmr.h | 4 +++- hw/timer/bcm2835_systmr.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/hw/timer/bcm2835_systm

[PATCH 7/7] hw/arm/bcm2835_peripherals: Correctly wire the SYS_timer IRQs

2020-09-20 Thread Philippe Mathieu-Daudé
The SYS_timer is not directly wired to the ARM core, but to the SoC interrupt controller. Fixes: 0e5bbd74064 ("hw/arm/bcm2835_peripherals: Use the SYS_timer") Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/bcm2835_peripherals.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(

[PATCH 5/7] hw/timer/bcm2835: Rename variable holding CTRL_STATUS register

2020-09-20 Thread Philippe Mathieu-Daudé
The variable holding the CTRL_STATUS register is misnamed 'status'. Rename it 'ctrl_status' to make it more obvious this register is also used to control the peripheral. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/bcm2835_systmr.h | 2 +- hw/timer/bcm2835_systmr.c | 8

Re: [PATCH 0/2] vhost-vdpa: add trace functions in vhost-vdpa.c

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200920162434.868041-1-lviv...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200920162434.868041-1-lviv...@redhat.com Subject: [PATCH 0/2] vhost-vdpa: add trace fun

[Bug 1823790] Re: QEMU mishandling of SO_PEERSEC forces systemd into tight loop

2020-09-20 Thread Charlie Sharpsteen
In my case the issue with using Ubuntu 20.04 as a container host appears to have come down to the use of the F, or "fix binary", flag by binfmnt_misc: # cat /proc/sys/fs/binfmt_misc/qemu-aarch64 enabled interpreter /usr/bin/qemu-aarch64-static flags: OCF offset 0 magic 7f454c4602010100

Re: [PATCH v10 25/26] block: Fixes nfs compiling error on msys2/mingw

2020-09-20 Thread Peter Lieven
Am 15.09.20 um 19:12 schrieb Yonggang Luo: > These compiling errors are fixed: > ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory >27 | #include > | ^~~~ > compilation terminated. > > ../block/nfs.c:63:5: error: unknown type name 'blkcnt_t' >63 |

Re: [PATCH 0/7] hw/arm/raspi: Fix SYS_timer on Linux + misc changes

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200920175825.417680-1-f4...@amsat.org/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!

Re: [PATCH 0/7] hw/arm/raspi: Fix SYS_timer on Linux + misc changes

2020-09-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200920175825.417680-1-f4...@amsat.org/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!

Re: [PATCH 0/6] Convert pc-bios Makefiles to meson

2020-09-20 Thread Peter Maydell
On Sat, 19 Sep 2020 at 15:59, Paolo Bonzini wrote: > > I don't know, the way pc-bios/ works seems just wrong to me. pc-bios > should IMO be its own build system with support for docker-based cross > compilers similar to tests/tcg. Yes, I've always thought this :-) It borrows the host x86 compile

Limiting per vCPU Usage

2020-09-20 Thread Peter Lieven
Hi Qemu folks, is there a BCP to limit just the maximum usage of a virtual (KVM) cpu? I know that there are many approaches, but as far as I know they all limit the complete qemu process which is far more than just the virtual CPUs. Is it possible to limit just the vCPU threads and leave thre

Re: [RFC 0/4] Add a 'in_mmio' device flag to avoid the DMA to MMIO

2020-09-20 Thread Peter Maydell
On Sun, 20 Sep 2020 at 08:56, Paolo Bonzini wrote: > > On 08/09/20 18:41, Li Qiang wrote: > > Currently the qemu device fuzzer find some DMA to MMIO issue. If the > > device handling MMIO currently trigger a DMA which the address is MMIO, > > this will reenter the device MMIO handler. As some of t

Re: [PATCH 0/2] qdev: Let BusRealize() return a boolean value to indicate error

2020-09-20 Thread Richard Henderson
On 9/20/20 4:44 AM, Philippe Mathieu-Daudé wrote: > Philippe Mathieu-Daudé (2): > qdev: Document qbus_realize() and qbus_unrealize() > qdev: Let BusRealize() return a boolean value to indicate error Reviewed-by: Richard Henderson r~

Re: [PATCH] timer: Fix timer_mod_anticipate() documentation

2020-09-20 Thread Richard Henderson
On 9/20/20 8:50 AM, Philippe Mathieu-Daudé wrote: > timer_mod_anticipate() will be scaled to the timer unit, > which is not always nanosecond. Fix the documentation. > > Fixes: add40e9777d ("timer: add timer_mod_anticipate*") > Signed-off-by: Philippe Mathieu-Daudé > --- > include/qemu/timer.h |

Re: [PATCH 1/4] configure: cleanup invocation of submodule Make

2020-09-20 Thread Richard Henderson
On 9/20/20 2:30 AM, Paolo Bonzini wrote: > Move common command line options to SUBDIR_MAKEFLAGS, thus simplifying > the rules themselves. > > Signed-off-by: Paolo Bonzini > --- > Makefile | 24 +++- > 1 file changed, 15 insertions(+), 9 deletions(-) Reviewed-by: Richard Hend

Re: [PATCH 2/4] configure: cleanup CFLAGS and LDFLAGS for submodules

2020-09-20 Thread Richard Henderson
On 9/20/20 2:30 AM, Paolo Bonzini wrote: > The -g and -O2 flags that configure adds to CFLAGS are only used by > submodules, > so do not put anymore the confusing CFLAGS variable in config-host.mak and > replace it with more explicit SUBMODULE_CFLAGS variable. > > There was also no equivalent SUB

Re: [PATCH 3/4] configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS

2020-09-20 Thread Richard Henderson
On 9/20/20 2:30 AM, Paolo Bonzini wrote: > If the CFLAGS, CXXFLAGS or LDFLAGS variables are present in the environment, > any modification made within the configure script is passed down to Meson. > This is particularly undesirable for the "-pie" option, since it overrides > "-shared" and thus mess

Re: [PATCH 4/4] configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to meson

2020-09-20 Thread Richard Henderson
On 9/20/20 2:30 AM, Paolo Bonzini wrote: > Environment variables like CFLAGS are easy to accidentally change. Meson > warns if that happens, but in a project with a lot of configuration that > is easy to lose. It is also surprising behavior since meson caches -D > options and remembers those on r

Re: [PATCH 1/9] default-configs: move files to default-configs/devices/

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > Make room for target files in default-configs/targets/ > > Signed-off-by: Paolo Bonzini > --- Reviewed-by: Richard Henderson r~

Re: [PATCH 2/9] configure: convert accelerator variables to meson options

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > Prepare for moving the tests to meson. For now they only have > enabled/disabled as the possible values when meson is invoked, > but "auto" will be a possibility later, when configure will only > parse the command line options. > > Signed-off-by: Paolo B

Re: [PATCH 3/9] configure: rewrite accelerator defaults as tests

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > +if test "$kvm" = "auto" ; then > + if test "$linux" = yes ; then > +kvm=enabled > + else > +if test "$kvm" = "enabled" ; then > + feature_not_found "kvm" "KVM is only available on Linux" Can't get here, as enabled != auto. r~

Re: [PATCH 4/9] configure: move accelerator logic to meson

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > Move to meson the code to detect the presence of accelerators, and > to define accelerator-specific config-target.h symbols. > > The logic for now is duplicated in configure because it is still > in use to build the list of targets (which is in turn used

Re: [PATCH 5/9] configure: remove dead variable

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > configure | 11 --- > 1 file changed, 11 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 6/9] configure: move CONFIG_* symbols to meson

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > These symbols are easily computed from just the target name, > so remove them from config-target.mak. > > Signed-off-by: Paolo Bonzini > --- > configure | 11 +-- > meson.build | 27 --- > 2 files changed, 25 insertions

Re: [PATCH 8/9] default-configs/targets: remove useless lines

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > Some lines are only meaningful for user-mode targets, remove them. > > Signed-off-by: Paolo Bonzini > --- This seems like it could be folded with the previous. r~

Re: [PATCH 9/9] default-configs: remove default-configs/devices for user-mode targets

2020-09-20 Thread Richard Henderson
On 9/20/20 6:07 AM, Paolo Bonzini wrote: > We no longer need dummy files to detect targets, since > default-configs/targets/ exists. > > Signed-off-by: Paolo Bonzini > --- Reviewed-by: Richard Henderson r~

Re: [PATCH] configure: fix performance regression due to PIC objects

2020-09-20 Thread Richard Henderson
On 9/19/20 8:56 AM, Paolo Bonzini wrote: > Because most files in QEMU are grouped into static libraries, Meson > conservatively > compiles them with -fPIC. This is overkill and produces slowdowns up to 20% > on > some TCG tests. > > As a stopgap measure, use the b_staticpic option to limit the

Re: [PATCH V9 6/6] hw/mips: Add Loongson-3 machine support

2020-09-20 Thread chen huacai
Hi, Philippe, On Sat, Sep 19, 2020 at 9:59 PM Philippe Mathieu-Daudé wrote: > > On 9/19/20 3:00 AM, Huacai Chen wrote: > > Hi, Philippe, > > > > On Thu, Sep 17, 2020 at 3:53 PM Philippe Mathieu-Daudé > > wrote: > >> > >> On 9/16/20 12:47 PM, Philippe Mathieu-Daudé wrote: > >>> On 9/16/20 11:49

Re: [PATCH v2 00/10] fix some error memleaks

2020-09-20 Thread Pan Nengyuan
ping! and cc: qemu-triv...@nongnu.org On 2020/9/17 20:49, Pan Nengyuan wrote: > ping! > > Anyone queued the rest(patch 01/02/03/07/08/09)? > > On 2020/8/31 21:43, Pan Nengyuan wrote: >> This series fix some Error/GError memleaks. >> >> V2: >> 1. remove two patches.(One has aleardy applied. T

  1   2   >