Re: [PATCH v3 6/7] docs: gpio: Add GPIO Aggregator/Repeater documentation

2020-01-06 Thread Geert Uytterhoeven
Hi Linus, On Sat, Jan 4, 2020 at 1:21 AM Linus Walleij wrote: > On Thu, Dec 12, 2019 at 3:48 PM Geert Uytterhoeven > wrote: > > On Thu, Dec 12, 2019 at 3:42 PM Linus Walleij > > wrote: > > > On Wed, Nov 27, 2019 at 9:43 AM Geert Uytterhoeven > > > wrote: > > > > +The GPIO Aggregator allows a

Re: [PATCH v3 4/7] dt-bindings: gpio: Add gpio-repeater bindings

2020-01-06 Thread Geert Uytterhoeven
Hi Rob, On Fri, Dec 6, 2019 at 4:04 PM Rob Herring wrote: > On Fri, Dec 6, 2019 at 3:17 AM Geert Uytterhoeven > wrote: > > On Thu, Dec 5, 2019 at 10:06 PM Rob Herring wrote: > > > On Wed, Nov 27, 2019 at 09:42:50AM +0100, Geert Uytterhoeven wrote: > > > > Add Device Tree bindings for a GPIO re

Re: [PATCH v3 5/7] gpio: Add GPIO Aggregator/Repeater driver

2020-01-06 Thread Geert Uytterhoeven
Hi Linus, On Sat, Jan 4, 2020 at 1:38 AM Linus Walleij wrote: > Sorry for slowness... christmas. Np. Happy New Year! > On Thu, Dec 12, 2019 at 4:24 PM Geert Uytterhoeven > wrote: > > On Thu, Dec 12, 2019 at 3:34 PM Linus Walleij > > wrote: > > > > + This can serve the following purp

Re: [PATCH] virtio: add the queue number check

2020-01-06 Thread Yang Zhong
On Fri, Jan 03, 2020 at 10:18:58PM +0100, Paolo Bonzini wrote: > Il ven 3 gen 2020, 16:08 Yang Zhong ha scritto: > > > I also tried virtio-blk device like below: > > https://patchwork.kernel.org/cover/10873193/ > > > > The virtio-blk can work with this changes, but vhost-user-blk device > >

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread David Gibson
On Mon, Jan 06, 2020 at 05:28:55PM +1100, Alexey Kardashevskiy wrote: > > > On 06/01/2020 15:19, David Gibson wrote: > > On Mon, Jan 06, 2020 at 10:42:42AM +1100, Alexey Kardashevskiy wrote: > >> The Petitboot bootloader is way more advanced than SLOF is ever going to > >> be as Petitboot comes w

Re: [PATCH v18 2/7] ppc: spapr: Introduce FWNMI capability

2020-01-06 Thread Greg Kurz
On Thu, 2 Jan 2020 13:21:06 +0530 Ganesh Goudar wrote: > From: Aravinda Prasad > > Introduce fwnmi an spapr capability and validate it against > the kernels existing capability by trying to enable it. I see this patch indeed adds a KVM helper to do that but it isn't called before some later p

Re: [PATCH 1/2] virtio: reset region cache when on queue deletion

2020-01-06 Thread Yuri Benditovich
Michael, Can you please comment on Jason's question: why we have a problem only with q35 and not with legacy pc? If you have a simple answer, it will help us in further work with other hot plug/unplug problems. Thanks, Yuri Benditovich On Sun, Jan 5, 2020 at 6:21 PM Yuri Benditovich wrote: > >

Re: [PATCH] vfio/pci: Don't remove irqchip notifier if not registered

2020-01-06 Thread Greg Kurz
On Tue, 31 Dec 2019 08:39:15 -0500 Peter Xu wrote: > The kvm irqchip notifier is only registered if the device supports > INTx, however it's unconditionally removed. If the assigned device > does not support INTx, this will cause QEMU to crash when unplugging > the device from the system. Chang

Re: Audio not working in Qemu-4.2 with pulse audio.

2020-01-06 Thread Stefan Hajnoczi
On Tue, Dec 24, 2019 at 10:01:37PM +0530, padmashree mandri wrote: > I tried to run Qemu-4.2 with pulse audio but faced issue > as there is no audio at all in guest .However it works fine with ALSA. I > tried the same in Qemu-3.0 with pulseaudio. It was working fine. But facing > i

[PATCH v2] ui: Print available display backends with '-display help'

2020-01-06 Thread Thomas Huth
We already print availabled devices with "-device help", or available backends with "-netdev help" or "-chardev help". Let's provide a way for the users to query the available display backends, too. Signed-off-by: Thomas Huth --- v2: Now it should work with modules, too include/ui/console.h |

Re: [PATCH 2/2] arm/virt/acpi: remove _ADR from devices identified by _HID

2020-01-06 Thread Michael S. Tsirkin
On Sun, Jan 05, 2020 at 04:54:20PM -0600, Corey Minyard wrote: > On Sun, Jan 05, 2020 at 07:33:55AM -0500, Michael S. Tsirkin wrote: > > On Thu, Dec 19, 2019 at 02:47:59PM +0800, Heyi Guo wrote: > > > According to ACPI spec, _ADR should be used for device which is on a > > > bus that has a standard

Re: [PATCH v18 3/7] target/ppc: Handle NMI guest exit

2020-01-06 Thread Greg Kurz
On Thu, 2 Jan 2020 13:21:07 +0530 Ganesh Goudar wrote: > From: Aravinda Prasad > > Memory error such as bit flips that cannot be corrected > by hardware are passed on to the kernel for handling. > If the memory address in error belongs to guest then > the guest kernel is responsible for taking

Re: [PATCH 1/2] virtio: reset region cache when on queue deletion

2020-01-06 Thread Michael S. Tsirkin
I guess it somehow has to do with the following: if (proxy->disable_legacy == ON_OFF_AUTO_AUTO) { proxy->disable_legacy = pcie_port ? ON_OFF_AUTO_ON : ON_OFF_AUTO_OFF; } so by default device on an express port does not have a legacy interface. Somehow having a legacy interface fi

Re: [PATCH v2] ui: Print available display backends with '-display help'

2020-01-06 Thread Philippe Mathieu-Daudé
On 1/6/20 10:33 AM, Thomas Huth wrote: We already print availabled devices with "-device help", or available backends with "-netdev help" or "-chardev help". Let's provide a way for the users to query the available display backends, too. Signed-off-by: Thomas Huth --- v2: Now it should work w

Re: [PATCH v2] hw/i386: Allow building machines without IOMMU

2020-01-06 Thread Michael S. Tsirkin
On Fri, Dec 27, 2019 at 10:39:31PM +0100, Philippe Mathieu-Daudé wrote: > Commit 6c730e4af9 introduced a stub to build the MicroVM machine > without Intel IOMMU suppport. However when configure with > --without-default-devices, the build fails: > > LINKx86_64-softmmu/qemu-system-x86_64 >

Re: [PATCH for-5.0 v2 0/9] q35: CPU hotplug with secure boot, part 1+2

2020-01-06 Thread Igor Mammedov
On Mon, 9 Dec 2019 14:08:53 +0100 Igor Mammedov wrote: > ChangeLog: > * since v1: > - include "hw: add compat machines for 5.0" to provide > compat context for 4.2 machine types > - add comment that SMRAM at SMBASE is QEMU hack > and why it was used > - split

Re: [PATCH for-5.0 v2 0/9] q35: CPU hotplug with secure boot, part 1+2

2020-01-06 Thread Michael S. Tsirkin
On Mon, Jan 06, 2020 at 11:10:20AM +0100, Igor Mammedov wrote: > On Mon, 9 Dec 2019 14:08:53 +0100 > Igor Mammedov wrote: > > > ChangeLog: > > * since v1: > > - include "hw: add compat machines for 5.0" to provide > > compat context for 4.2 machine types > > - add comment t

Re: [PATCH v2] MAINTAINERS: Replace Claudio Fontana for tcg/aarch64

2020-01-06 Thread Philippe Mathieu-Daudé
On 1/6/20 7:34 AM, Richard Henderson wrote: Claudio's Huawei address has been defunct for quite a while. In https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06872.html he asked for his personal address to be removed as well. I will take over officially. Thanks for this! Reviewed

[PATCH] ppc/pnv: Drop "num-chips" machine property

2020-01-06 Thread Greg Kurz
The number of CPU chips of the powernv machine is configurable through a "num-chips" property. This doesn't fit well with the CPU topology, eg. some configurations can come up with more CPUs than the maximum of CPUs set in the toplogy. This causes assertion to be hit with mttcg: -machine powern

Re: [PULL 00/12] target-arm queue

2020-01-06 Thread Peter Maydell
On Fri, 20 Dec 2019 at 14:26, Peter Maydell wrote: > > One last arm pullreq before I stop work for the end of the year... > > -- PMM > > The following changes since commit 8e5943260a8f765216674ee87ce8588cc4e7463e: > > Merge remote-tracking branch > 'remotes/vivier2/tags/trivial-branch-pull-requ

Re: [PATCH 1/2] virtio: reset region cache when on queue deletion

2020-01-06 Thread Yuri Benditovich
On Mon, Jan 6, 2020 at 11:58 AM Michael S. Tsirkin wrote: > I guess it somehow has to do with the following: > > if (proxy->disable_legacy == ON_OFF_AUTO_AUTO) { > proxy->disable_legacy = pcie_port ? ON_OFF_AUTO_ON : > ON_OFF_AUTO_OFF; > } > > so by default device on an express po

Re: [PATCH v2] hppa: allow max ram size upto 4Gb

2020-01-06 Thread Igor Mammedov
On Sat, 4 Jan 2020 16:00:19 +0100 Philippe Mathieu-Daudé wrote: > On 1/3/20 10:54 AM, Igor Mammedov wrote: > > On Thu, 2 Jan 2020 21:22:12 +0100 > > Helge Deller wrote: > > > >> On 02.01.20 18:46, Igor Mammedov wrote: > >>> Previous patch drops silent ram_size fixup and makes > >>> QEMU err

Re: [PATCH] 9p: local: fix memory leak

2020-01-06 Thread Greg Kurz
On Mon, 30 Dec 2019 12:34:51 +0100 Christian Schoenebeck wrote: > On Montag, 30. Dezember 2019 03:23:47 CET Yan Wang wrote: > > Signed-off-by: Yan Wang > > --- > > hw/9pfs/9p-local.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-

Re: [PATCH v2 1/9] tests/virtio-9p: add terminating null in v9fs_string_read()

2020-01-06 Thread Greg Kurz
On Wed, 18 Dec 2019 14:06:30 +0100 Christian Schoenebeck wrote: > The 9p protocol sends strings in general without null termination > over the wire. However for future use of this functions it is > beneficial for the delivered string to be null terminated though > for being able to use the string

Re: [PATCH] ppc/pnv: Drop "num-chips" machine property

2020-01-06 Thread Cédric Le Goater
On 1/6/20 11:29 AM, Greg Kurz wrote: > The number of CPU chips of the powernv machine is configurable through a > "num-chips" property. This doesn't fit well with the CPU topology, eg. > some configurations can come up with more CPUs than the maximum of CPUs > set in the toplogy. This causes assert

Re: [PATCH v2] hppa: allow max ram size upto 4Gb

2020-01-06 Thread Philippe Mathieu-Daudé
On 1/6/20 11:48 AM, Igor Mammedov wrote: On Sat, 4 Jan 2020 16:00:19 +0100 Philippe Mathieu-Daudé wrote: On 1/3/20 10:54 AM, Igor Mammedov wrote: On Thu, 2 Jan 2020 21:22:12 +0100 Helge Deller wrote: On 02.01.20 18:46, Igor Mammedov wrote: Previous patch drops silent ram_size fixup and

Re: [PATCH] 9pfs: local: Fix possible memory leak in local_link()

2020-01-06 Thread Philippe Mathieu-Daudé
On 12/23/19 11:59 AM, Greg Kurz wrote: On Fri, 20 Dec 2019 17:49:34 +0800 Jiajun Chen wrote: There is a possible memory leak while local_link return -1 without free odirpath and oname. Reported-by: Euler Robot Signed-off-by: Jaijun Chen Signed-off-by: Xiang Zheng --- Applied to 9p-next.

Re: [PATCH v2] hppa: allow max ram size upto 4Gb

2020-01-06 Thread Helge Deller
On 06.01.20 11:48, Igor Mammedov wrote: > On Sat, 4 Jan 2020 16:00:19 +0100 > Philippe Mathieu-Daudé wrote: > >> On 1/3/20 10:54 AM, Igor Mammedov wrote: >>> On Thu, 2 Jan 2020 21:22:12 +0100 >>> Helge Deller wrote: >>> On 02.01.20 18:46, Igor Mammedov wrote: > Previous patch drops silen

Re: [PULL 0/9] Add dbus-vmstate

2020-01-06 Thread Peter Maydell
On Fri, 20 Dec 2019 at 15:05, Marc-André Lureau wrote: > > The following changes since commit 8e5943260a8f765216674ee87ce8588cc4e7463e: > > Merge remote-tracking branch > 'remotes/vivier2/tags/trivial-branch-pull-request' into staging (2019-12-20 > 12:46:10 +) > > are available in the Git

Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE

2020-01-06 Thread Max Reitz
On 20.12.19 22:15, Eric Blake wrote: > On 12/19/19 8:38 AM, Max Reitz wrote: >> fuse-export-add allows mounting block graph nodes via FUSE on some >> existing regular file.  That file should then appears like a raw disk >> image, and accesses to it result in accesses to the exported BDS. >> >> Righ

Re: [PATCH v2 2/9] 9pfs: validate count sent by client with T_readdir

2020-01-06 Thread Greg Kurz
On Wed, 18 Dec 2019 14:17:59 +0100 Christian Schoenebeck wrote: > A good 9p client sends T_readdir with "count" parameter that's > sufficiently smaller than client's initially negotiated msize > (maximum message size). We perform a check for that though to > avoid the server to be interrupted wit

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Alexey Kardashevskiy
On 06/01/2020 19:50, David Gibson wrote: On Mon, Jan 06, 2020 at 05:28:55PM +1100, Alexey Kardashevskiy wrote: On 06/01/2020 15:19, David Gibson wrote: On Mon, Jan 06, 2020 at 10:42:42AM +1100, Alexey Kardashevskiy wrote: The Petitboot bootloader is way more advanced than SLOF is ever goi

[PATCH] freebsd: use python37

2020-01-06 Thread Gerd Hoffmann
FreeBSD seems to use python37 by default now, which breaks the build script. Add python to the package list, to explicitly pick the version, and also adapt the configure command line. Signed-off-by: Gerd Hoffmann --- tests/vm/freebsd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

Re: [RFC PATCH] virtio: Change order of appling runstate to device and bus

2020-01-06 Thread Michael S. Tsirkin
On Fri, Dec 20, 2019 at 03:52:45PM +0300, Anton Kuchin wrote: > On transition to running first apply state to bus and then to device > so device can access bus functions correctly. When going to stopped > notify device first and then the bus. > > Signed-off-by: Anton Kuchin I kind of like this b

[PULL 2/6] hda-codec: fix recording rate control

2020-01-06 Thread Gerd Hoffmann
From: Volker Rümelin Apply previous commit to hda_audio_input_cb for the same reasons. Signed-off-by: Volker Rümelin Message-id: 20200104091122.13971-2-vr_q...@t-online.de Signed-off-by: Gerd Hoffmann --- hw/audio/hda-codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[PULL 4/6] paaudio: try to drain the recording stream

2020-01-06 Thread Gerd Hoffmann
From: Volker Rümelin There is no guarantee a single call to pa_stream_peek every timer_period microseconds can read a recording stream faster than the data gets produced at the source. Let qpa_read try to drain the recording stream. To reproduce the problem: Start qemu with -audiodev pa,id=audi

[PULL 0/6] Audio 20200106 patches

2020-01-06 Thread Gerd Hoffmann
The following changes since commit f0dcfddecee8b860e015bb07d67cfcbdfbfd51d9: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2020-01-03 17:18:08 +) are available in the Git repository at: git://git.kraxel.org/qemu tags/audio-20200106-pu

[PULL 1/6] hda-codec: fix playback rate control

2020-01-06 Thread Gerd Hoffmann
From: Volker Rümelin Since commit 1930616b98 "audio: make mixeng optional" the function hda_audio_output_cb can no longer assume the function parameter avail contains the free buffer size. With the playback mixing-engine turned off this leads to a broken playback rate control and playback buffer

[PULL 6/6] audio: fix integer overflow

2020-01-06 Thread Gerd Hoffmann
From: Volker Rümelin Tell the compiler to do a 32bit * 32bit -> 64bit multiplication because period_ticks is a 64bit variable. The overflow occurs for audio timer periods larger than 4294967us. Fixes: be1092afa0 "audio: fix audio timer rate conversion bug" Signed-off-by: Volker Rümelin Message

[PULL 5/6] paaudio: wait until the recording stream is ready

2020-01-06 Thread Gerd Hoffmann
From: Volker Rümelin Don't call pa_stream_peek before the recording stream is ready. Information to reproduce the problem. Start and stop Audacity in the guest several times because the problem is racy. libvirt log file: -audiodev pa,id=audio0,server=localhost,out.latency=3, out.mixing-en

[PULL 3/6] paaudio: drop recording stream in qpa_fini_in

2020-01-06 Thread Gerd Hoffmann
From: Volker Rümelin Every call to pa_stream_peek which returns a data length > 0 should have a corresponding pa_stream_drop. A call to qpa_read does not necessarily call pa_stream_drop immediately after a call to pa_stream_peek. Test in qpa_fini_in if a last pa_stream_drop is needed. This preve

Re: [PATCH 2/2] arm/virt/acpi: remove _ADR from devices identified by _HID

2020-01-06 Thread Corey Minyard
On Mon, Jan 06, 2020 at 04:39:51AM -0500, Michael S. Tsirkin wrote: > On Sun, Jan 05, 2020 at 04:54:20PM -0600, Corey Minyard wrote: > > On Sun, Jan 05, 2020 at 07:33:55AM -0500, Michael S. Tsirkin wrote: > > > On Thu, Dec 19, 2019 at 02:47:59PM +0800, Heyi Guo wrote: > > > > According to ACPI spec

[PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option

2020-01-06 Thread Philippe Mathieu-Daudé
Commit 6f6e1698a6 desugarized "-machine accel=" to a list of "-accel" options. Since now "-machine accel" and "-accel" became incompatible, update the iotests to the new format. Error reported here: https://gitlab.com/qemu-project/qemu/-/jobs/385801004#L3400 Reported-by: GitLab CI Fixes: 6f6e1698

Re: [PATCH] tests/qemu-iotests: Update tests to recent desugarized -accel option

2020-01-06 Thread Max Reitz
On 06.01.20 14:09, Philippe Mathieu-Daudé wrote: > Commit 6f6e1698a6 desugarized "-machine accel=" to a list > of "-accel" options. Since now "-machine accel" and "-accel" > became incompatible, update the iotests to the new format. > > Error reported here: > https://gitlab.com/qemu-project/qemu/-

Re: [PATCH] freebsd: use python37

2020-01-06 Thread Philippe Mathieu-Daudé
On 1/6/20 1:37 PM, Gerd Hoffmann wrote: FreeBSD seems to use python37 by default now, which breaks the build script. Add python to the package list, to explicitly pick the version, and also adapt the configure command line. Signed-off-by: Gerd Hoffmann --- tests/vm/freebsd | 3 ++- 1 file c

Re: [PATCH] freebsd: use python37

2020-01-06 Thread Philippe Mathieu-Daudé
On Mon, Jan 6, 2020 at 2:19 PM Philippe Mathieu-Daudé wrote: > > On 1/6/20 1:37 PM, Gerd Hoffmann wrote: > > FreeBSD seems to use python37 by default now, which breaks the build BTW it looks clearer replacing by 'python3.7' here and in subject. > > script. Add python to the package list, to exp

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Alexey Kardashevskiy
On 06/01/2020 15:19, David Gibson wrote: +const struct fdt_property *prop; +const char *tmp; + +readstr(prevaddr, prev); +for (offset = fdt_first_property_offset(fdt, offset); + (offset >= 0); + (offset = fdt_next_property_offset(fdt, offset))) { + +pro

Re: [PATCH] 9p: init_in_iov_from_pdu can truncate the size

2020-01-06 Thread Greg Kurz
On Wed, 18 Dec 2019 16:42:51 -0800 Stefano Stabellini wrote: > From: Stefano Stabellini > > init_in_iov_from_pdu might not be able to allocate the full buffer size > requested, which comes from the client and could be larger than the > transport has available at the time of the request. Specifi

Re: [PULL 0/2] Require Python >= 3.5 to build QEMU

2020-01-06 Thread Peter Maydell
On Fri, 20 Dec 2019 at 16:51, Eduardo Habkost wrote: > > Differences from the previous Python 3.5 pull request > that was rejected: > > * Now tests/vm/netbsd was fixed > * .travis.yml is being updated to replace Python 3.4 job with 3.5 > > The following changes since commit f59b31e6d0c69792b5d817c

Re: [PATCH 027/104] virtiofsd: add --fd=FDNUM fd passing option

2020-01-06 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:47PM +, Dr. David Alan Gilbert (git) wrote: > From: Stefan Hajnoczi > > Although --socket-path=PATH is useful for manual invocations, management > tools typically create the UNIX domain socket themselves and pass it to > the vhost-user device backend. This way Q

Re: [RFC PATCH qemu] spapr: Kill SLOF

2020-01-06 Thread Daniel Henrique Barboza
Hey, On 1/5/20 8:38 PM, Alexey Kardashevskiy wrote: Another version is coming, I'll start putting fewer people in the cc: list, watch qemu-...@nongnu.org for further updates if interested. Thanks, Question: does Petitboot already replaces SLOF in every possible scenario for all the spapr mac

Re: [PATCH 028/104] virtiofsd: make -f (foreground) the default

2020-01-06 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:48PM +, Dr. David Alan Gilbert (git) wrote: > From: Stefan Hajnoczi > > According to vhost-user.rst "Backend program conventions", backend > programs should run in the foregound by default. Follow the > conventions so libvirt and other management tools can contr

Re: [PATCH 029/104] virtiofsd: add vhost-user.json file

2020-01-06 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:49PM +, Dr. David Alan Gilbert (git) wrote: > From: Stefan Hajnoczi > > Install a vhost-user.json file describing virtiofsd. This allows > libvirt and other management tools to enumerate vhost-user backend > programs. > > Signed-off-by: Stefan Hajnoczi > --- >

Re: [PATCH 031/104] virtiofs: Add maintainers entry

2020-01-06 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:51PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Signed-off-by: Dr. David Alan Gilbert > --- > MAINTAINERS | 8 > 1 file changed, 8 insertions(+) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrang

Re: [PATCH 030/104] virtiofsd: add --print-capabilities option

2020-01-06 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:50PM +, Dr. David Alan Gilbert (git) wrote: > From: Stefan Hajnoczi > > Add the --print-capabilities option as per vhost-user.rst "Backend > programs conventions". Currently there are no advertised features. > > Signed-off-by: Stefan Hajnoczi > --- > docs/int

Re: [PATCH 032/104] virtiofsd: passthrough_ll: create new files in caller's context

2020-01-06 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:52PM +, Dr. David Alan Gilbert (git) wrote: > From: Vivek Goyal > > We need to create files in the caller's context. Otherwise after > creating a file, the caller might not be able to do file operations on > that file. > > Changed effective uid/gid to caller's u

Re: [PATCH 038/104] virtiofsd: validate path components

2020-01-06 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:37:58PM +, Dr. David Alan Gilbert (git) wrote: > From: Stefan Hajnoczi > > Several FUSE requests contain single path components. A correct FUSE > client sends well-formed path components but there is currently no input > validation in case something went wrong or t

Re: [PATCH 047/104] virtiofsd: sandbox mount namespace

2020-01-06 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:38:07PM +, Dr. David Alan Gilbert (git) wrote: > From: Stefan Hajnoczi > > Use a mount namespace with the shared directory tree mounted at "/" and > no other mounts. > > This prevents symlink escape attacks because symlink targets are > resolved only against the sh

Re: [PATCH 048/104] virtiofsd: move to an empty network namespace

2020-01-06 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:38:08PM +, Dr. David Alan Gilbert (git) wrote: > From: Stefan Hajnoczi > > If the process is compromised there should be no network access. Use an > empty network namespace to sandbox networking. > > Signed-off-by: Stefan Hajnoczi > --- > tools/virtiofsd/passthr

Re: [PATCH 049/104] virtiofsd: move to a new pid namespace

2020-01-06 Thread Daniel P . Berrangé
On Thu, Dec 12, 2019 at 04:38:09PM +, Dr. David Alan Gilbert (git) wrote: > From: Stefan Hajnoczi > > virtiofsd needs access to /proc/self/fd. Let's move to a new pid > namespace so that a compromised process cannot see another other > processes running on the system. > > One wrinkle in thi

[PULL 00/34] Block patches

2020-01-06 Thread Max Reitz
The following changes since commit f17783e706ab9c7b3a2b69cf48e4f0ba40664f54: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20191220' into staging (2020-01-03 18:50:33 +) are available in the Git repository at: https://github.com/XanClic/qemu.git tags/pull-block-202

[PULL 01/34] block: Add bdrv_qapi_perm_to_blk_perm()

2020-01-06 Thread Max Reitz
We need some way to correlate QAPI BlockPermission values with BLK_PERM_* flags. We could: (1) have the same order in the QAPI definition as the the BLK_PERM_* flags are in LSb-first order. However, then there is no guarantee that they actually match (e.g. when someone modifies the QAPI

[PULL 08/34] iotests: s/qocw2/qcow2/

2020-01-06 Thread Max Reitz
Probably due to blind copy-pasting, we have several instances of "qocw2" in our iotests. Fix them. Reported-by: Maxim Levitsky Signed-off-by: Max Reitz Message-id: 20191107163708.833192-2-mre...@redhat.com Reviewed-by: Eric Blake Reviewed-by: Maxim Levitsky Signed-off-by: Max Reitz --- test

[PULL 04/34] iotests: Add @error to wait_until_completed

2020-01-06 Thread Max Reitz
Callers can use this new parameter to expect failure during the completion process. Signed-off-by: Max Reitz Reviewed-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20191108123455.39445-5-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 18 ++

[PULL 02/34] block: Use bdrv_qapi_perm_to_blk_perm()

2020-01-06 Thread Max Reitz
We can save some LoC in xdbg_graph_add_edge() by using bdrv_qapi_perm_to_blk_perm(). Signed-off-by: Max Reitz Message-id: 20191108123455.39445-3-mre...@redhat.com Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Max Reitz --- block.c | 29 - 1 file changed,

[PULL 20/34] iotests: Drop IMGOPTS use in 267

2020-01-06 Thread Max Reitz
Overwriting IMGOPTS means ignoring all user-supplied options, which is not what we want. Replace the current IMGOPTS use by a new BACKING_FILE variable. Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-14-mre...@redhat.com Signed-off-by: Max Reitz --- tes

[PULL 10/34] iotests/qcow2.py: Split feature fields into bits

2020-01-06 Thread Max Reitz
Print the feature fields as a set of bits so that filtering is easier. Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-4-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/031.out | 36 +-- tests/qemu-iotests/036.out | 18

[PULL 06/34] throttle-groups: fix memory leak in throttle_group_set_limit:

2020-01-06 Thread Max Reitz
From: PanNengyuan This avoid a memory leak when qom-set is called to set throttle_group limits, here is an easy way to reproduce: 1. run qemu-iotests as follow and check the result with asan: ./check -qcow2 184 Following is the asan output backtrack: Direct leak of 912 byte(s) in 3 objec

[PULL 03/34] blkdebug: Allow taking/unsharing permissions

2020-01-06 Thread Max Reitz
Sometimes it is useful to be able to add a node to the block graph that takes or unshare a certain set of permissions for debugging purposes. This patch adds this capability to blkdebug. (Note that you cannot make blkdebug release or share permissions that it needs to take or cannot share, because

[PULL 15/34] iotests: Let _make_test_img parse its parameters

2020-01-06 Thread Max Reitz
This will allow us to add more options than just -b. Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-9-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/common.rc | 28 1 file changed, 20 insertions(+), 8 delet

[PULL 23/34] iotests: Avoid cp/mv of test images

2020-01-06 Thread Max Reitz
This will not work with external data files, so try to get tests working without it as far as possible. Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-17-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/063 | 12 tests/q

[PULL 11/34] iotests: Add _filter_json_filename

2020-01-06 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-5-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/common.filter | 24 1 file changed, 24 insertions(+) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-io

[PULL 05/34] iotests: Add test for failing mirror complete

2020-01-06 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Tested-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20191108123455.39445-6-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 44 ++ tests/qem

[PULL 24/34] iotests: Make 091 work with data_file

2020-01-06 Thread Max Reitz
The image end offset as reported by qemu-img check is different when using an external data file; we do not care about its value here, so we can just filter it. Incidentally, common.rc already has _check_test_img for us which does exactly that. Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsk

[PULL 22/34] iotests: Use _rm_test_img for deleting test images

2020-01-06 Thread Max Reitz
Just rm will not delete external data files. Use _rm_test_img every time we delete a test image. (In the process, clean up the indentation of every _cleanup() this patch touches.) ((Also, use quotes consistently. I am happy to see unquoted instances like "rm -rf $TEST_DIR/..." go.)) Signed-off

[PULL 13/34] iotests: Replace IMGOPTS by _unsupported_imgopts

2020-01-06 Thread Max Reitz
Some tests require compat=1.1 and thus set IMGOPTS='compat=1.1' globally. That is not how it should be done; instead, they should simply set _unsupported_imgopts to compat=0.10 (compat=1.1 is the default anyway). This makes the tests heed user-specified $IMGOPTS. Some do not work with all image

[PULL 07/34] qcow2-bitmaps: fix qcow2_can_store_new_dirty_bitmap

2020-01-06 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy qcow2_can_store_new_dirty_bitmap works wrong, as it considers only bitmaps already stored in the qcow2 image and ignores persistent BdrvDirtyBitmap objects. So, let's instead count persistent BdrvDirtyBitmaps. We load all qcow2 bitmaps on open, so there should

[PULL 26/34] iotests: Make 137 work with data_file

2020-01-06 Thread Max Reitz
When using an external data file, there are no refcounts for data clusters. We thus have to adjust the corruption test in this patch to not be based around a data cluster allocation, but the L2 table allocation (L2 tables are still refcounted with external data files). Furthermore, we should not

[PULL 27/34] iotests: Make 198 work with data_file

2020-01-06 Thread Max Reitz
We do not care about the json:{} filenames here, so we can just filter them out and thus make the test work both with and without external data files. Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-21-mre...@redhat.com Signed-off-by: Max Reitz --- tests/

[PULL 09/34] iotests/qcow2.py: Add dump-header-exts

2020-01-06 Thread Max Reitz
This is useful for tests that want to whitelist fields from dump-header (with grep) but still print all header extensions. Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-3-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/qcow2.py | 5 +++

[PULL 16/34] iotests: Add -o and --no-opts to _make_test_img

2020-01-06 Thread Max Reitz
Blindly overriding IMGOPTS is suboptimal as this discards user-specified options. Whatever options the test needs should simply be appended. Some tests do this (with IMGOPTS=$(_optstr_add "$IMGOPTS" "...")), but that is cumbersome. It’s simpler to just give _make_test_img an -o parameter with wh

[PULL 28/34] iotests: Disable data_file where it cannot be used

2020-01-06 Thread Max Reitz
Signed-off-by: Max Reitz Message-id: 20191107163708.833192-22-mre...@redhat.com [mreitz: Also disable 273] Signed-off-by: Max Reitz --- tests/qemu-iotests/007 | 5 +++-- tests/qemu-iotests/014 | 2 ++ tests/qemu-iotests/015 | 5 +++-- tests/qemu-iotests/026 | 5 - tests/qemu-iotests/029 | 5

[PULL 29/34] iotests: Allow check -o data_file

2020-01-06 Thread Max Reitz
The problem with allowing the data_file option is that you want to use a different data file per image used in the test. Therefore, we need to allow patterns like -o data_file='$TEST_IMG.data_file'. Then, we need to filter it out from qemu-img map, qemu-img create, and remove the data file in _rm

[PULL 12/34] iotests: Filter refcount_order in 036

2020-01-06 Thread Max Reitz
This test can run just fine with other values for refcount_bits, so we should filter the value from qcow2.py's dump-header. In fact, we can filter everything but the feature bits and header extensions, because that is what the test is about. (036 currently ignores user-specified image options, bu

[PULL 17/34] iotests: Inject space into -ocompat=0.10 in 051

2020-01-06 Thread Max Reitz
It did not matter before, but now that _make_test_img understands -o, we should use it properly here. Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-11-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/051 | 2 +- 1 file changed, 1 insert

[PATCH] tests/iothread: Always connect iothread GSource to a GMainContext

2020-01-06 Thread Peter Maydell
On older versions of glib (anything prior to glib commit 0f056ebe from May 2019), the implementation of g_source_ref() and g_source_unref() is not threadsafe for a GSource which is not attached to a GMainContext. QEMU's real iothread.c implementation always attaches its iothread->ctx's GSource to

[PULL 30/34] block: introduce compress filter driver

2020-01-06 Thread Max Reitz
From: Andrey Shinkevich Allow writing all the data compressed through the filter driver. The written data will be aligned by the cluster size. Based on the QEMU current implementation, that data can be written to unallocated clusters only. May be used for a backup job. Suggested-by: Max Reitz S

[PULL 14/34] iotests: Drop compat=1.1 in 050

2020-01-06 Thread Max Reitz
IMGOPTS can never be empty for qcow2, because the check scripts adds compat=1.1 unless the user specified any compat option themselves. Thus, this block does not do anything and can be dropped. Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-8-mre...@redhat

[PULL 18/34] iotests: Replace IMGOPTS= by -o

2020-01-06 Thread Max Reitz
Tests should not overwrite all user-supplied image options, but only add to it (which will effectively overwrite conflicting values). Accomplish this by passing options to _make_test_img via -o instead of $IMGOPTS. For some tests, there is no functional change because they already only appended o

[PULL v2 5/9] Add dbus-vmstate object

2020-01-06 Thread Marc-André Lureau
When instantiated, this object will connect to the given D-Bus bus "addr". During migration, it will take/restore the data from org.qemu.VMState1 instances. See documentation for details. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- backends/dbus-vmstate.c | 510 ++

[PULL 33/34] tests/qemu-iotests: Update tests to recent desugarized -accel option

2020-01-06 Thread Max Reitz
From: Philippe Mathieu-Daudé Commit 6f6e1698a6 desugarized "-machine accel=" to a list of "-accel" options. Since now "-machine accel" and "-accel" became incompatible, update the iotests to the new format. Error reported here: https://gitlab.com/qemu-project/qemu/-/jobs/385801004#L3400 Reporte

[PULL 19/34] iotests: Replace IMGOPTS='' by --no-opts

2020-01-06 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-13-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/071 | 4 ++-- tests/qemu-iotests/174 | 2 +- tests/qemu-iotests/178 | 4 ++-- tests/qemu-iotests/197 | 4 ++-- tests/qemu-iotests/215 | 4 +

[PULL 21/34] iotests: Avoid qemu-img create

2020-01-06 Thread Max Reitz
Use _make_test_img whenever possible. This way, we will not ignore user-specified image options. Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-15-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/094 | 2 +- tests/qemu-iotests/111 | 3 +

[PULL v2 0/9] Add dbus-vmstate

2020-01-06 Thread Marc-André Lureau
The following changes since commit b0b74e1f17508cb8cef8afd698558db1bd8999cc: Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2020-01-06 11:39:55 +) are available in the Git repository at: https://github.com/elmarco/qemu.git tags/dbus-vmstate7-

[PULL v2 8/9] tests: add migration-helpers unit

2020-01-06 Thread Marc-André Lureau
Move a few helper functions from migration-test.c to migration-helpers.c Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- tests/migration-helpers.h | 37 tests/migration-helpers.c | 167 tests/migration-test.c| 176 +++--

[PULL 25/34] iotests: Make 110 work with data_file

2020-01-06 Thread Max Reitz
The only difference is that the json:{} filename of the image looks different. We actually do not care about that filename in this test, we are only interested in (1) that there is a json:{} filename, and (2) whether the backing filename can be constructed. So just filter out the json:{} data, th

[PULL v2 1/9] vmstate: add qom interface to get id

2020-01-06 Thread Marc-André Lureau
Add an interface to get the instance id, instead of depending on Device and qdev_get_dev_path(). Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Acked-by: Dr. David Alan Gilbert --- include/hw/vmstate-if.h | 40 include/migration/regis

[PULL 32/34] tests/qemu-iotests: add case to write compressed data of multiple clusters

2020-01-06 Thread Max Reitz
From: Andrey Shinkevich Add the case to the iotest #214 that checks possibility of writing compressed data of more than one cluster size. The test case involves the compress filter driver showing a sample usage of that. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy

Re: [PULL 0/3] x86 and machine queue, 2019-12-20

2020-01-06 Thread Peter Maydell
On Fri, 20 Dec 2019 at 19:20, Eduardo Habkost wrote: > > The following changes since commit aceeaa69d28e6f08a24395d0aa6915b687d0a681: > > Merge remote-tracking branch > 'remotes/huth-gitlab/tags/pull-request-2019-12-17' into staging (2019-12-17 > 15:55:20 +) > > are available in the Git re

[PULL 31/34] qcow2: Allow writing compressed data of multiple clusters

2020-01-06 Thread Max Reitz
From: Andrey Shinkevich QEMU currently supports writing compressed data of the size equal to one cluster. This patch allows writing QCOW2 compressed data that exceed one cluster. Now, we split buffered data into separate clusters and write them compressed using the block/aio_task API. Suggested-

  1   2   3   4   >