[Qemu-devel] [PULL for 2.9 48/49] qapi: Make pylint a bit happier

2017-03-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1489582656-31133-47-git-send-email-arm...@redhat.com> --- scripts/qapi-commands.py | 6 +++--- scripts/qapi-visit.py| 1 - scripts/qapi.py | 8 3 files changed, 7 insertions(+), 8 deletions(-) diff --git

[Qemu-devel] [PULL for 2.9 44/49] qapi: enum_types is a list used like a dict, make it one

2017-03-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1489582656-31133-43-git-send-email-arm...@redhat.com> --- scripts/qapi.py | 29 ++--- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 1f79eb4..735d

[Qemu-devel] [PULL for 2.9 38/49] tests/qapi-schema: Improve coverage of bogus member docs

2017-03-16 Thread Markus Armbruster
New test doc-bad-union-member.json shows we can fail to reject documentation for nonexistent members. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1489582656-31133-37-git-send-email-arm...@redhat.com> --- tests/Makefile.include | 2 ++ tests/qa

[Qemu-devel] [PULL for 2.9 05/49] qapi: Back out doc comments added just to please qapi.py

2017-03-16 Thread Markus Armbruster
This reverts commit 3313b61's changes to tests/qapi-schema/, except for tests/qapi-schema/doc-*. We could keep some of these doc comments to serve as positive test cases. However, they don't actually add to what we get from doc comment use in actual schemas, as we we don't test output matches exp

[Qemu-devel] [PULL for 2.9 43/49] qapi: Factor add_name() calls out of the meta conditional

2017-03-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1489582656-31133-42-git-send-email-arm...@redhat.com> --- scripts/qapi.py | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 3c6e137..1f79eb4 1

[Qemu-devel] [PULL 2/3] makefile: generate trace-events-all upfront

2017-03-16 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" Files should not be created in the build dir during the 'make install' phase. List 'trace-events-all' as a generated file so that it gets created upfront during build. Signed-off-by: Daniel P. Berrange Reviewed-by: Fam Zheng Message-id: 20170228122901.24520-3-berra..

[Qemu-devel] [PULL 0/3] Tracing patches

2017-03-16 Thread Stefan Hajnoczi
The following changes since commit 1883ff34b540daacae948f493b0ba525edf5f642: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2017-03-15 18:44:05 +) are available in the git repository at: git://github.com/stefanha/qemu.git tags/tracing-pull-request for you to

[Qemu-devel] [PULL 1/3] makefile: merge GENERATED_HEADERS & GENERATED_SOURCES variables

2017-03-16 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" The only functional difference between the GENERATED_HEADERS and GENERATED_SOURCES variables is that 'Makefile' has a dependancy on GENERATED_HEADERS, causing generated header files to be created immediatey at the start of the build process. There is no reason why this

[Qemu-devel] [PULL 3/3] trace: ensure $(tracetool-y) is defined in top level makefile

2017-03-16 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" The build rules for trace files have a dependancy on $(tracetool-y). This variable populated in the trace/Makefile.objs file and thus its definition gets pulled into the top level makefile. This happens too late in the process though, so by the time $(tracetool-y) is de

[Qemu-devel] [PATCH kernel v8 0/4] Extend virtio-balloon for fast (de)inflating & fast live migration

2017-03-16 Thread Wei Wang
This patch series implements two optimizations: 1) transfer pages in chuncks between the guest and host; 2) transfer the guest unused pages to the host so that they can be skipped to migrate in live migration. Please read each patch commit log for details. Changes: v7->v8: 1) Use only one chunk f

[Qemu-devel] [PATCH kernel v8 3/4] mm: add inerface to offer info about unused pages

2017-03-16 Thread Wei Wang
From: Liang Li This patch adds a function to provides a snapshot of the present system unused pages. An important usage of this function is to provide the unsused pages to the Live migration thread, which skips the transfer of thoses unused pages. Newly used pages can be re-tracked by the dirty p

[Qemu-devel] [PATCH kernel v8 2/4] virtio-balloon: VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-03-16 Thread Wei Wang
From: Liang Li The implementation of the current virtio-balloon is not very efficient, because the ballooned pages are transferred to the host one by one. Here is the breakdown of the time in percentage spent on each step of the balloon inflating process (inflating 7GB of an 8GB idle guest). 1)

[Qemu-devel] [PATCH kernel v8 4/4] virtio-balloon: VIRTIO_BALLOON_F_HOST_REQ_VQ

2017-03-16 Thread Wei Wang
From: Liang Li Add a new vq, host request vq. The host uses the vq to send requests to the guest. Upon getting a request, the guest responds what the host needs via this vq. The patch implements the request of getting the unsed pages from the guest. The unused guest pages are avoided to migrate

[Qemu-devel] [PATCH kernel v8 1/4] virtio-balloon: deflate via a page list

2017-03-16 Thread Wei Wang
From: Liang Li This patch saves the deflated pages to a list, instead of the PFN array. Accordingly, the balloon_pfn_to_page() function is removed. Signed-off-by: Liang Li Signed-off-by: Michael S. Tsirkin Signed-off-by: Wei Wang --- drivers/virtio/virtio_balloon.c | 22 -

Re: [Qemu-devel] [RFC PATCH v2 30/30] trace: Force compiler warnings on trace parameter type mismatches

2017-03-16 Thread Stefan Hajnoczi
On Wed, Mar 15, 2017 at 02:59:55PM -0500, Eric Blake wrote: > On 03/13/2017 02:55 PM, Eric Blake wrote: > > 2. there are still failures under 'make docker-test-mingw@fedora' > > due to more type mismatches that still need to be squashed. I'm > > still working on fixing those, but wanted to at least

Re: [Qemu-devel] [Qemu-ppc] qemu-system-ppc video artifacts since "tcg: drop global lock during TCG code execution"

2017-03-16 Thread Gerd Hoffmann
Hi, > >> Note that KVM has some similar hacks to avoid trapping all writes to > >> video memory with its coalesced mmio mechanism however I'm not familiar > >> with all the details. > > > > Normal linear framebuffer access doesn't use this. > > Ahh OK - as I said I wasn't super familiar with wh

Re: [Qemu-devel] [PATCH v2 02/30] trace: Fix incorrect megasas trace parameters

2017-03-16 Thread Stefan Hajnoczi
On Mon, Mar 13, 2017 at 02:55:19PM -0500, Eric Blake wrote: > hw/scsi/trace-events lists cmd as the first parameter for both > megasas_iovec_overflow and megasas_iovec_underflow, but the caller > was mistakenly passing cmd->iov_size twice instead of the command > index. Also, trace_megasas_abort_i

Re: [Qemu-devel] [PATCH v2 01/30] trace: Fix backwards mirror_yield parameters

2017-03-16 Thread Stefan Hajnoczi
On Mon, Mar 13, 2017 at 02:55:18PM -0500, Eric Blake wrote: > block/trace-events lists the parameters for mirror_yield > consistently with other mirror events (cnt just after s, like in > mirror_before_sleep; in_flight last, like in mirror_yield_in_flight). > But the callers were passing parameters

Re: [Qemu-devel] [PATCH v2 03/30] trace: Avoid abuse of amdvi_mmio_read

2017-03-16 Thread Stefan Hajnoczi
On Mon, Mar 13, 2017 at 02:55:20PM -0500, Eric Blake wrote: > hw/i386/trace-events has an amdvi_mmio_read trace that is used for > both normal reads (listing the register name, address, size, and > offset) and for an error case (abusing the register name to show > an error message, the address to s

Re: [Qemu-devel] [PATCH v2 29/30] trace: Fix parameter types in hw/virtio

2017-03-16 Thread Stefan Hajnoczi
On Mon, Mar 13, 2017 at 02:55:46PM -0500, Eric Blake wrote: > An upcoming patch will let the compiler warn us when we are silently > losing precision in traces; update the trace definitions to pass > through the full value at the callsite. > > Signed-off-by: Eric Blake > --- > hw/virtio/trace-ev

Re: [Qemu-devel] [Qemu-ppc] qemu-system-ppc video artifacts since "tcg: drop global lock during TCG code execution"

2017-03-16 Thread Alex Bennée
Paolo Bonzini writes: > On 14/03/2017 18:34, BALATON Zoltan wrote: >> Like from the display controller models that use >> memory_region_get_dirty() to check if the frambuffer needs to be >> updated? But all display adaptors seem to do this and the problem was >> only seem on ppc so it may be rel

Re: [Qemu-devel] [Qemu-ppc] qemu-system-ppc video artifacts since "tcg: drop global lock during TCG code execution"

2017-03-16 Thread Alex Bennée
Gerd Hoffmann writes: > Hi, > >> >> Note that KVM has some similar hacks to avoid trapping all writes to >> >> video memory with its coalesced mmio mechanism however I'm not familiar >> >> with all the details. >> > >> > Normal linear framebuffer access doesn't use this. >> >> Ahh OK - as I sa

Re: [Qemu-devel] [PATCH v2] Change the method to calculate dirty-pages-rate

2017-03-16 Thread Juan Quintela
Chao Fan wrote: > In function cpu_physical_memory_sync_dirty_bitmap, file > include/exec/ram_addr.h: > > if (src[idx][offset]) { > unsigned long bits = atomic_xchg(&src[idx][offset], 0); > unsigned long new_dirty; > new_dirty = ~dest[k]; > dest[k] |= bits; > new_dirty &= bits;

Re: [Qemu-devel] [PATCH for 2.9] migration: use "" as the default for tls-creds/hostname

2017-03-16 Thread Juan Quintela
"Daniel P. Berrange" wrote: > The tls-creds parameter has a default value of NULL indicating > that TLS should not be used. Setting it to non-NULL enables > use of TLS. Once tls-creds are set to a non-NULL value via the > monitor, it isn't possible to set them back to NULL again, due > to current

Re: [Qemu-devel] [PATCH v2] migration/block: Avoid invoking blk_drain too frequently

2017-03-16 Thread Juan Quintela
Fam Zheng wrote: > On Wed, 03/15 17:31, Dr. David Alan Gilbert wrote: >> * Fam Zheng (f...@redhat.com) wrote: >> > On Wed, 03/15 11:37, Lidong Chen wrote: >> > > Increase bmds->cur_dirty after submit io, so reduce the frequency >> > > involve into blk_drain, and improve the performance obviously >

Re: [Qemu-devel] [PATCH v1 1/1] vmstate: fix failed iotests case 68 and 91

2017-03-16 Thread Juan Quintela
QingFeng Hao wrote: > This problem affects s390x only if we are running without KVM. > Basically, S390CPU.irqstate is unused if we do not use KVM, > and thus no buffer is allocated. > This causes size=0, first_elem=NULL and n_elems=1 in > vmstate_load_state and vmstate_save_state. And the assert f

Re: [Qemu-devel] [RFC patch 1/3] blockjob: add block_job_start_shim

2017-03-16 Thread Paolo Bonzini
On 16/03/2017 01:46, John Snow wrote: > +/** > + * This code must run after the job's coroutine has been entered, > + * but not before. > + */ > +static void coroutine_fn block_job_start_shim(void *opaque) > +{ > +BlockJob *job = opaque; > + > +assert(job && job->driver && job->driver->st

Re: [Qemu-devel] [RFC patch 2/3] block-backend: add drained_begin / drained_end ops

2017-03-16 Thread Paolo Bonzini
On 16/03/2017 01:46, John Snow wrote: > > - Does the presence of blk->quiesce_counter relieve the burden of needing > blk->public.io_limits_disabled? I could probably eliminate this counter > entirely and just spy on the root node's quiescent state at key moments > instead. I am confident

Re: [Qemu-devel] [RFC patch 3/3] blockjob: add devops to blockjob backends

2017-03-16 Thread Paolo Bonzini
On 16/03/2017 01:46, John Snow wrote: > - BlkDevOps is traditionally only for Qdev devices, and a BlockJob is not > currently a 'device'... Do we want to loosen this restriction, find another > way to deliver callbacks to BlockJobs attached to BlkBackends, or do > something > crazy like ma

Re: [Qemu-devel] [Qemu-ppc] qemu-system-ppc video artifacts since "tcg: drop global lock during TCG code execution"

2017-03-16 Thread Paolo Bonzini
On 16/03/2017 08:51, Alex Bennée wrote: > > Paolo Bonzini writes: > >> On 14/03/2017 18:34, BALATON Zoltan wrote: >>> Like from the display controller models that use >>> memory_region_get_dirty() to check if the frambuffer needs to be >>> updated? But all display adaptors seem to do this and

Re: [Qemu-devel] [PATCH v3 00/11] MTTCG fix-ups for 2.9

2017-03-16 Thread Pavel Dovgalyuk
> From: Alex Bennée [mailto:alex.ben...@linaro.org] > Pavel Dovgalyuk writes: > >> From: Alex Bennée [mailto:alex.ben...@linaro.org] > >> Pavel Dovgalyuk writes: > >> >> From: mttcg-requ...@listserver.greensocs.com [mailto:mttcg- > >> requ...@listserver.greensocs.com] > >> >> > >> >> The next thi

[Qemu-devel] [PATCH v2] x86: Allow to set NUMA distance for different NUMA nodes

2017-03-16 Thread He Chen
Current, QEMU does not provide a clear command to set vNUMA distance for guest although we already have `-numa` command to set vNUMA nodes. vNUMA distance makes sense in certain scenario. But now, if we create a guest that has 4 vNUMA nodes, when we check NUMA info via `numactl -H`, we will see:

[Qemu-devel] [PATCH] Add page-size to output in 'info migrate'

2017-03-16 Thread Chao Fan
The number of dirty pages outputed in 'pages' in the command 'info migrate', so add page-size to calculate the number of dirty pages in bytes. Signed-off-by: Chao Fan Signed-off-by: Li Zhijian --- hmp.c | 3 +++ include/migration/migration.h | 1 + migration/migration.c

[Qemu-devel] [Bug 1673373] [NEW] qemu -version output is incorrect with configure --with-pkgversion

2017-03-16 Thread Jordan Justen
Public bug reported: Since qemu v2.7.0, up to the current master (1883ff34b540daacae948f493b0ba525edf5f642) the pkgversion feature appears to have a bug: $ ./configure --target-list=x86_64-softmmu --with-pkgversion=foo Results in this output: $ x86_64-softmmu/qemu-system-x86_64 -version QEMU em

[Qemu-devel] [PATCH] qemu: Fix -version with configure --with-pkgversion

2017-03-16 Thread Jordan Justen
This appears to have regressed in 67a1de0d19. When the configure --with-pkgversion=foo option is used, the output from -version will look like: QEMU emulator version 2.8.90(foo) Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers After this patch, it will be: QEMU emulator v

Re: [Qemu-devel] [PATCH] blockdev: fix bitmap clear undo

2017-03-16 Thread Kevin Wolf
Am 15.03.2017 um 22:28 hat John Snow geschrieben: > Only undo the action if we actually prepared the action. > > Signed-off-by: John Snow Thanks, applied to the block branch. Kevin

[Qemu-devel] [PULL 5/6] RAMBlocks: qemu_ram_is_shared

2017-03-16 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Provide a helper to say whether a RAMBlock was created as a shared mapping. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- exec.c| 5 + include/exec/cpu-common.h | 1 + 2 files changed,

[Qemu-devel] [PULL 1/6] Change the method to calculate dirty-pages-rate

2017-03-16 Thread Juan Quintela
From: Chao Fan In function cpu_physical_memory_sync_dirty_bitmap, file include/exec/ram_addr.h: if (src[idx][offset]) { unsigned long bits = atomic_xchg(&src[idx][offset], 0); unsigned long new_dirty; new_dirty = ~dest[k]; dest[k] |= bits; new_dirty &= bits; num_dirty +=

[Qemu-devel] [PULL 0/6] Migration fixes

2017-03-16 Thread Juan Quintela
intela/qemu.git tags/migration/20170316 for you to fetch changes up to 8679638b0e231f97ad3456c681bf569ca7f7f6d5: postcopy: Check for shared memory (2017-03-16 09:02:26 +0100) migration/ne

[Qemu-devel] [PULL 4/6] vmstate: fix failed iotests case 68 and 91

2017-03-16 Thread Juan Quintela
From: QingFeng Hao This problem affects s390x only if we are running without KVM. Basically, S390CPU.irqstate is unused if we do not use KVM, and thus no buffer is allocated. This causes size=0, first_elem=NULL and n_elems=1 in vmstate_load_state and vmstate_save_state. And the assert fails. With

[Qemu-devel] [PULL 6/6] postcopy: Check for shared memory

2017-03-16 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Postcopy doesn't support migration of RAM shared with another process yet (we've got a bunch of things to understand). Check for the case and don't allow postcopy to be enabled. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan

[Qemu-devel] [PULL 3/6] migration/block: Avoid invoking blk_drain too frequently

2017-03-16 Thread Juan Quintela
From: Lidong Chen Increase bmds->cur_dirty after submit io, so reduce the frequency involve into blk_drain, and improve the performance obviously when block migration. The performance test result of this patch: During the block dirty save phase, this patch improve guest os IOPS from 4.0K to 9.5

[Qemu-devel] [PULL 2/6] migration: use "" as the default for tls-creds/hostname

2017-03-16 Thread Juan Quintela
From: "Daniel P. Berrange" The tls-creds parameter has a default value of NULL indicating that TLS should not be used. Setting it to non-NULL enables use of TLS. Once tls-creds are set to a non-NULL value via the monitor, it isn't possible to set them back to NULL again, due to current implementa

Re: [Qemu-devel] [PULL 1/3] makefile: merge GENERATED_HEADERS & GENERATED_SOURCES variables

2017-03-16 Thread Markus Armbruster
Sorry for chiming in late, I had missed this change. Stefan Hajnoczi writes: > From: "Daniel P. Berrange" > > The only functional difference between the GENERATED_HEADERS > and GENERATED_SOURCES variables is that 'Makefile' has a > dependancy on GENERATED_HEADERS, causing generated header files

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] util: Use g_malloc/g_free in envlist.c

2017-03-16 Thread Stefan Hajnoczi
On Sun, Mar 05, 2017 at 02:56:05AM +, Saurav Sachidanand wrote: > diff --git a/util/envlist.c b/util/envlist.c > index e86857e70a..a42eefa5fe 100644 > --- a/util/envlist.c > +++ b/util/envlist.c > @@ -17,16 +17,14 @@ static int envlist_parse(envlist_t *envlist, > const char *env, int (*)(e

Re: [Qemu-devel] [PATCH for 2.9] migration: use "" as the default for tls-creds/hostname

2017-03-16 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Daniel P. Berrange (berra...@redhat.com) wrote: >> The tls-creds parameter has a default value of NULL indicating >> that TLS should not be used. Setting it to non-NULL enables >> use of TLS. Once tls-creds are set to a non-NULL value via the >> monitor, it is

[Qemu-devel] [PATCH v3 02/21] mux: simplfy muxes_realize_done

2017-03-16 Thread Marc-André Lureau
mux_chr_event() already send events to all backends, rename it, export it, and use it from muxes_realize_done. This should help abstract away mux implementation. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- chardev/char-mux.h | 2 +- chardev/char-mux.c | 11 --- chardev

[Qemu-devel] [PATCH v3 01/21] char: remove qemu_chr_be_generic_open

2017-03-16 Thread Marc-André Lureau
The function simply alias and hides the real event function. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- include/sysemu/char.h | 1 - chardev/char-pty.c| 2 +- chardev/char-socket.c | 2 +- chardev/char.c| 10 ++ ui/console.c | 2 +- ui/gtk.c

[Qemu-devel] [PATCH v3 00/21] chardev clean-ups & tests (after 2.9)

2017-03-16 Thread Marc-André Lureau
Hi, The following series contains various patches: - replace "chardevs" list for a /chardevs container object - add a few read-only socket properties mainly useful for testing - some chardev related clean-ups - add various chardev tests This series is part of a larger refactoring series that I tr

[Qemu-devel] [PATCH v3 09/21] char: remove chardevs list

2017-03-16 Thread Marc-André Lureau
The list is now empty, the chardev cleanup is taken care of by the unref of the root container. Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 1 - chardev/char.c| 6 -- 2 files changed, 7 deletions(-) diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 98

[Qemu-devel] [PATCH v3 04/21] container: don't leak container reference

2017-03-16 Thread Marc-André Lureau
object_property_add_child() references the child, unref it after to avoid ref leaks. Signed-off-by: Marc-André Lureau --- qom/container.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qom/container.c b/qom/container.c index c9eb49b01e..f6ccaf7ea7 100644 --- a/qom/container.c +++ b/qom/cont

[Qemu-devel] [PATCH v3 15/21] char-udp: flush as much buffer as possible

2017-03-16 Thread Marc-André Lureau
Instead of flushing the buffer byte by byte, call qemu_chr_be_write() with as much byte possible accepted by the front-end. Factor out buffer flushing in a common function udp_chr_flush_buffer(). Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- chardev/char-udp.c | 26 +

[Qemu-devel] [PATCH v3 06/21] vl: add todo note about root container cleanup

2017-03-16 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- vl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vl.c b/vl.c index 0b4ed5241c..5440e1eb47 100644 --- a/vl.c +++ b/vl.c @@ -4719,6 +4719,7 @@ int main(int argc, char **argv, char **envp) audio_cleanup(); monitor_cleanup(); qemu_chr_cleanu

[Qemu-devel] [PATCH v3 05/21] char: add a /chardevs container

2017-03-16 Thread Marc-André Lureau
Add a /chardevs container object to hold the list of chardevs. (Note: QTAILQ chardevs is going away in the following commits) Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 8 chardev/char.c | 50 + gdbstub.c

[Qemu-devel] [PATCH v3 03/21] xen: use a better chardev type check

2017-03-16 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- xen-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen-common.c b/xen-common.c index fd2c92847e..d46685ef4e 100644 --- a/xen-common.c +++ b/xen-common.c @@ -34,7 +34,7 @@ static int store_dev_info(int domi

[Qemu-devel] [PATCH v3 08/21] char: remove qemu_chardev_add

2017-03-16 Thread Marc-André Lureau
qemu_chardev_new() now uses object_new_with_props() with /chardevs parent container. It will fail to insert the object if the same "id" already exists. "chardevs" list usage has been removed in previous commits. Signed-off-by: Marc-André Lureau --- chardev/char.c | 27 ---

[Qemu-devel] [PATCH v3 07/21] char: use /chardevs container instead of chardevs list

2017-03-16 Thread Marc-André Lureau
Use object_resolve_path_component() and object_child_foreach() on /chardevs container instead of iterating over chardevs list. Signed-off-by: Marc-André Lureau --- chardev/char.c | 66 -- 1 file changed, 36 insertions(+), 30 deletions(-) d

[Qemu-devel] [PATCH v3 13/21] char-socket: add 'addr' property

2017-03-16 Thread Marc-André Lureau
Add a property to lookup the connection details. Signed-off-by: Marc-André Lureau --- chardev/char-socket.c | 13 + 1 file changed, 13 insertions(+) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 4325a05387..81021c5863 100644 --- a/chardev/char-socket.c +++ b/chard

[Qemu-devel] [PATCH v3 10/21] char: useless NULL check

2017-03-16 Thread Marc-André Lureau
g_strdup(NULL) returns NULL already. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- chardev/char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chardev/char.c b/chardev/char.c index aee8b4555d..33dbab6981 100644 --- a/chardev/char.c +++ b/chardev

[Qemu-devel] [PATCH v3 11/21] char-socket: introduce update_disconnected_filename()

2017-03-16 Thread Marc-André Lureau
This helper will be used in yet another place in the following patch. Signed-off-by: Marc-André Lureau --- chardev/char-socket.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index dc3d3532a7..e3b5288af7 100644

[Qemu-devel] [PATCH v3 14/21] char-socket: add 'connected' property

2017-03-16 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-socket.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 81021c5863..06389393fa 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -1015,6 +1015,14 @@ char_socket_

[Qemu-devel] [PULL for-2.9 5/7] cirrus: fix cirrus_invalidate_region

2017-03-16 Thread Gerd Hoffmann
off_cur_end is exclusive, so off_cur_end == cirrus_addr_mask is valid. Fix calculation to make sure to allow that, otherwise the assert added by commit f153b563f8cf121aebf5a2fff5f0110faf58ccb3 can trigger for valid blits. Test case: boot windows nt 4.0 Signed-off-by: Gerd Hoffmann Message-id: 14

[Qemu-devel] [PATCH v3 12/21] char-socket: update local address after listen

2017-03-16 Thread Marc-André Lureau
This is mainly useful to know the actual bound port when using port 0. For example, when starting qemu with socket on port 0, before: QEMU waiting for connection on: disconnected:tcp:localhost:0,server After: QEMU waiting for connection on: disconnected:tcp:localhost:32454,server Signed-off-by: M

[Qemu-devel] [PATCH v3 18/21] tests: add /char/file test

2017-03-16 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- tests/test-char.c | 71 +++ 1 file changed, 71 insertions(+) diff --git a/tests/test-char.c b/tests/test-char.c index 2b155ffcb7..87a4e2986d 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -277,6 +

[Qemu-devel] [PATCH v3 16/21] tests: add alias check in /char/ringbuf

2017-03-16 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- tests/test-char.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/test-char.c b/tests/test-char.c index 71de4b35ee..2811644bcd 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -104,6 +104,16 @@ static void char_ringbuf_test(void)

[Qemu-devel] [PULL for-2.9 2/7] cirrus/vnc: zap bitblit support from console code.

2017-03-16 Thread Gerd Hoffmann
There is a special code path (dpy_gfx_copy) to allow graphic emulation notify user interface code about bitblit operations carryed out by guests. It is supported by cirrus and vnc server. The intended purpose is to optimize display scrolls and just send over the scroll op instead of a full displa

[Qemu-devel] [PATCH v3 19/21] tests: add /char/socket test

2017-03-16 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- tests/test-char.c | 114 +- 1 file changed, 112 insertions(+), 2 deletions(-) diff --git a/tests/test-char.c b/tests/test-char.c index 87a4e2986d..9971498391 100644 --- a/tests/test-char.c +++ b/tests/test-c

[Qemu-devel] [PATCH v3 17/21] tests: add /char/pipe test

2017-03-16 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- tests/test-char.c | 90 +++ 1 file changed, 90 insertions(+) diff --git a/tests/test-char.c b/tests/test-char.c index 2811644bcd..2b155ffcb7 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -1,4 +1,

[Qemu-devel] [PATCH v3 21/21] tests: add /char/console test

2017-03-16 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- tests/test-char.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/tests/test-char.c b/tests/test-char.c index 19707bfcda..773a1c36ba 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -57,6 +57,32 @@ s

[Qemu-devel] [PATCH v3 20/21] tests: add /char/udp test

2017-03-16 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- tests/test-char.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/tests/test-char.c b/tests/test-char.c index 9971498391..19707bfcda 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -385,6 +385,51 @@

Re: [Qemu-devel] [PATCH RFC v3 00/15] basic vfio-ccw infrastructure

2017-03-16 Thread Cornelia Huck
On Mon, 13 Mar 2017 15:16:52 +0800 Dong Jia Shi wrote: > Beside the fixes for former comments form you and Alex, I will also do > the following stuff in the next version: > 1. Remove the "RFC" tag from the mail subject. > 2. Cc the s390 CIO layer maintainers for patch 1 and 2: > Sebastian Ott

[Qemu-devel] [PULL for-2.9 4/7] cirrus: add option to disable blitter

2017-03-16 Thread Gerd Hoffmann
Ok, we have this beast in the cirrus code which is not used at all by modern guests, except when you try to find security holes in qemu. So, add an option to disable blitter altogether. Guests released within the last ten years should not show any rendering issues if you turn off blitter support.

[Qemu-devel] [PULL for-2.9 1/7] fix :cirrus_vga fix OOB read case qemu Segmentation fault

2017-03-16 Thread Gerd Hoffmann
From: hangaohuai check the validity of parameters in cirrus_bitblt_rop_fwd_transp_xxx and cirrus_bitblt_rop_fwd_xxx to avoid the OOB read which causes qemu Segmentation fault. After the fix, we will touch the assert in cirrus_invalidate_region: assert(off_cur_end >= off_cur); Signed-off-by: fa

Re: [Qemu-devel] [PATCH RFC v3 00/15] basic vfio-ccw infrastructure

2017-03-16 Thread Dong Jia Shi
* Cornelia Huck [2017-03-16 10:25:16 +0100]: > On Mon, 13 Mar 2017 15:16:52 +0800 > Dong Jia Shi wrote: > > > Beside the fixes for former comments form you and Alex, I will also do > > the following stuff in the next version: > > 1. Remove the "RFC" tag from the mail subject. > > 2. Cc the s390

[Qemu-devel] [PULL for-2.9 3/7] cirrus: switch to 4 MB video memory by default

2017-03-16 Thread Gerd Hoffmann
Quoting cirrus source code: Follow real hardware, cirrus card emulated has 4 MB video memory. Also accept 8 MB/16 MB for backward compatibility. So just use 4MB by default. We decided to leave that at 8MB by default a while ago, for live migration compatibility reasons. But we have compat

[Qemu-devel] [PULL for-2.9 0/7] cirrus: more blitter security fixes.

2017-03-16 Thread Gerd Hoffmann
:05 +) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-cirrus-20170316-1 for you to fetch changes up to ffaf857778286ca54e3804432a2369a279e73aa7: cirrus: stop passing around src pointers in the blitter (2017-03-16

[Qemu-devel] [PULL for-2.9 6/7] cirrus: stop passing around dst pointers in the blitter

2017-03-16 Thread Gerd Hoffmann
Instead pass around the address (aka offset into vga memory). Calculate the pointer in the rop_* functions, after applying the mask to the address, to make sure the address stays within the valid range. Signed-off-by: Gerd Hoffmann Message-id: 1489574872-8679-1-git-send-email-kra...@redhat.com -

[Qemu-devel] [PULL for-2.9 7/7] cirrus: stop passing around src pointers in the blitter

2017-03-16 Thread Gerd Hoffmann
Does basically the same as "cirrus: stop passing around dst pointers in the blitter", just for the src pointer instead of the dst pointer. For the src we have to care about cputovideo blits though and fetch the data from s->cirrus_bltbuf instead of vga memory. The cirrus_src*() helper functions h

[Qemu-devel] Device 'id' property not getting set for virtio-net-pci device type

2017-03-16 Thread Gaurav Sharma
I am using qemu 2.6.2 and i have the following option in my command line "-device virtio-net-pci,netdev=net1,mac=XX:YY:XX:XX:99:99,id=n1". In the realize function for virtio-net-pci the value of 'id' is not getting reflected. Is this a known issue or am i missing something ? -Gaurav

Re: [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property

2017-03-16 Thread Janne Huttunen
On Wed, 2017-03-15 at 08:24 +0100, Gerd Hoffmann wrote: > > > > The short answer: emulating real hardware. > > Ok, that is reason enough. > > Adding bootonceindex everywhere doesn't look like the best plan to me > though.  Possibly we can pimp up bootindex in a backward-compatible > way? > Someth

Re: [Qemu-devel] [PULL for-2.9 4/7] cirrus: add option to disable blitter

2017-03-16 Thread 李强
Hello Gerd, > -Original Message- > From: Qemu-devel > [mailto:qemu-devel-bounces+liqiang6-s=360...@nongnu.org] On Behalf Of > Gerd Hoffmann > Sent: Thursday, March 16, 2017 5:31 PM > To: qemu-devel@nongnu.org > Cc: Gerd Hoffmann > Subject: [Qemu-devel] [PULL for-2.9 4/7] cirrus: add option

[Qemu-devel] [PATCH 1/3] COLO-proxy: Add virtio-net packet parse function

2017-03-16 Thread Zhang Chen
Change parse_packet_early(Packet *pkt) to parse_packet_early(Packet *pkt, int offset) that we can skip virtio-net header. Signed-off-by: Zhang Chen --- net/colo-compare.c| 11 +++ net/colo.c| 8 net/colo.h| 5 - net/filter-rewriter.c | 15 +

[Qemu-devel] [PATCH 3/3] COLO-compare: Add virtio-net packet compare support

2017-03-16 Thread Zhang Chen
If packet is virtio-net packet we will skip the virtio-net header compare packet's payload. Signed-off-by: Zhang Chen --- net/colo-compare.c | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index ce0cd12.

[Qemu-devel] [PATCH 0/3] Add COLO-proxy virtio-net support

2017-03-16 Thread Zhang Chen
If user use -device virtio-net-pci, virtio-net driver will add a header to raw net packet that colo-proxy can't handle it. COLO-proxy just focus on the packet payload, so we skip the virtio-net header to compare the sent packet that primary guest's to secondary guest's. Zhang Chen (3): COLO-pro

[Qemu-devel] [PATCH 2/3] COLO-proxy: Add a tag to mark virtio-net packet

2017-03-16 Thread Zhang Chen
Add this tag that compare can recognize virtio-net packet. Signed-off-by: Zhang Chen --- net/colo.c | 6 ++ net/colo.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/net/colo.c b/net/colo.c index 060e822..d2b3683 100644 --- a/net/colo.c +++ b/net/colo.c @@ -79,6 +79,12 @@ int parse_p

[Qemu-devel] [PATCH for-2.9 1/1] s390x/css: reassign subchannel if schid is changed after migration

2017-03-16 Thread Cornelia Huck
From: Dong Jia Shi The subchannel is a means to access a device. While the device number is assigned by the administrator, the subchannel number is assigned by the channel subsystem in an ascending order on cold and hot plug. When doing unplug and replug operations, the same device may end up on

[Qemu-devel] [PATCH for-2.9 0/1] bugfix for s390x

2017-03-16 Thread Cornelia Huck
A fix for a bug in the s390x css implementation. The especially annoying thing about that bug is that things seem to work fine after migration -- until you get funny errors when you try to add/delete some devices... Dong Jia Shi (1): s390x/css: reassign subchannel if schid is changed after migr

Re: [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property

2017-03-16 Thread Gerd Hoffmann
On Do, 2017-03-16 at 11:46 +0200, Janne Huttunen wrote: > On Wed, 2017-03-15 at 08:24 +0100, Gerd Hoffmann wrote: > > > > > > The short answer: emulating real hardware. > > > > Ok, that is reason enough. > > > > Adding bootonceindex everywhere doesn't look like the best plan to me > > though. Po

Re: [Qemu-devel] [PULL for-2.9] Update OpenBIOS images

2017-03-16 Thread Peter Maydell
On 15 March 2017 at 21:07, Mark Cave-Ayland wrote: > Hi Peter, > > This update contains just the 64-bit PCI BAR fix which enables virtio modern > devices to > work once again. Please pull. > > > ATB, > > Mark. > > > The following changes since commit 1883ff34b540daacae948f493b0ba525edf5f642: > >

Re: [Qemu-devel] [Bug 1217339] [PATCH] Unix signal to send ACPI-shutdown to Guest

2017-03-16 Thread Simon
Hi Peter, Why can't we use SIGHUP, again? I suppose for all those people who use non ACPI-aware guests in non daemonized Qemu instances and usually close their terminal without stopping Qemu first on the assumption that Qemu will stop itself automatically: this wouldn't work anymore... More s

Re: [Qemu-devel] [Bug 1217339] [PATCH] Unix signal to send ACPI-shutdown to Guest

2017-03-16 Thread Daniel P. Berrange
On Wed, Mar 15, 2017 at 06:45:57PM +, Peter Maydell wrote: > On 15 March 2017 at 18:08, Daniel P. Berrange wrote: > > On Wed, Mar 15, 2017 at 06:00:40PM +, Peter Maydell wrote: > >> On 15 March 2017 at 17:46, Simon wrote: > >> > OK for not using SIGHUP and keep SIGTERM, SIGINT and SIGHUP

[Qemu-devel] [PATCH] Dead Code Removal: removing support for DEPTH != 32.

2017-03-16 Thread iwona260909
From: Iwona Kotlarska Signed-off-by: Iwona Kotlarska --- hw/display/sm501.c | 37 - hw/display/sm501_template.h | 8 +--- 2 files changed, 1 insertion(+), 44 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 040a0b93f2..89

[Qemu-devel] [PATCH] puv3: always compile-check debug printf

2017-03-16 Thread Anishka0107
To prevent bitrot of the format string of the debug statement, files with conditional debug statements should ensure that printf is compiled always, and enclosed within if(0) statements and not in #ifdef. Signed-off-by: Anishka Gupta --- include/hw/unicore32/puv3.h | 14 +- 1

[Qemu-devel] [PATCH] Dead Code Removal: removing support for DEPTH != 32

2017-03-16 Thread iwona260909
Removing support for DEPTH != 32 - task from BiteSizedTasks/Dead code removal

Re: [Qemu-devel] [PATCH] puv3: always compile-check debug printf

2017-03-16 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH] puv3: always compile-check debug printf Message-id: 1489638621-31978-1-git-send-email-rimjhim0...@gmail.com === TEST SCRIPT BEGIN === #!/bin/bash BASE=base

Re: [Qemu-devel] [PATCH] Dead Code Removal: removing support for DEPTH != 32.

2017-03-16 Thread Peter Maydell
On 16 March 2017 at 09:20, wrote: > From: Iwona Kotlarska > > Signed-off-by: Iwona Kotlarska > --- > hw/display/sm501.c | 37 - > hw/display/sm501_template.h | 8 +--- > 2 files changed, 1 insertion(+), 44 deletions(-) Hi; thanks for this patc

Re: [Qemu-devel] [PULL for-rc1 0/3] Ide patches

2017-03-16 Thread Peter Maydell
On 16 March 2017 at 00:52, John Snow wrote: > The following changes since commit 1883ff34b540daacae948f493b0ba525edf5f642: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2017-03-15 18:44:05 +) > > are available in the git repository at: > > https://github

Re: [Qemu-devel] [PULL for-2.9 4/7] cirrus: add option to disable blitter

2017-03-16 Thread Thomas Huth
On 16.03.2017 10:51, 李强 wrote: > Hello Gerd, > >> -Original Message- >> From: Qemu-devel >> [mailto:qemu-devel-bounces+liqiang6-s=360...@nongnu.org] On Behalf Of >> Gerd Hoffmann >> Sent: Thursday, March 16, 2017 5:31 PM >> To: qemu-devel@nongnu.org >> Cc: Gerd Hoffmann >> Subject: [Qemu-d

[Qemu-devel] [PATCH v2] puv3: always compile-check debug printf

2017-03-16 Thread Anishka0107
To prevent bitrot of the format string of the debug statement, files with conditional debug statements should ensure that printf is compiled always, and enclosed within if(0) statements and not in #ifdef. Signed-off-by: Anishka Gupta --- include/hw/unicore32/puv3.h | 3 +-- 1 file

[Qemu-devel] [PATCH] List SASL config file under the cryptography maintainer's realm

2017-03-16 Thread Daniel P. Berrange
No one is listed as maintainer for qemu.sasl. It is used by the VNC server for SASL auth, but since it is cryptography related, list it under the crytography maintainer's realm, rather than under the UI maintainer. Signed-off-by: Daniel P. Berrange --- MAINTAINERS | 1 + 1 file changed, 1 insert

  1   2   3   >