Re: [Qemu-devel] [PATCH 02/13] char-win: remove WinChardev.len

2017-05-09 Thread Philippe Mathieu-Daudé
On 05/09/2017 08:33 AM, Marc-André Lureau wrote: The "len" argument can be passed directly to win_chr_read() Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- chardev/char-win.h | 1 - chardev/char-win.c | 16

Re: [Qemu-devel] [PATCH 11/13] Remove/replace chardev/char.h inclusion

2017-05-09 Thread Philippe Mathieu-Daudé
Hi Marc-André Lureau, Isn't clearer if the "remove" part of this commit goes before your patch 6 "move headers to include/chardev"? On 05/09/2017 08:33 AM, Marc-André Lureau wrote: Those are apparently unnecessary includes. Signed-off-by: Marc-André Lureau ---

Re: [Qemu-devel] [Qemu-ppc] [PATCH] Revert "target-ppc/kvm: Enable in-kernel TCE acceleration for multi-tce"

2017-05-09 Thread joserz
On Tue, May 09, 2017 at 07:14:19PM +1000, Alexey Kardashevskiy wrote: > On 09/05/17 15:22, David Gibson wrote: > > On Tue, May 09, 2017 at 07:25:51AM +1000, Alexey Kardashevskiy wrote: > >> On 09/05/17 06:17, Jose Ricardo Ziviani wrote: > >>> This reverts commit

Re: [Qemu-devel] [PATCH v3 2/2] i386: expose "TCGTCGTCGTCG" in the 0x40000000 CPUID leaf

2017-05-09 Thread Daniel P. Berrange
On Tue, May 09, 2017 at 08:52:28AM -0300, Eduardo Habkost wrote: > On Tue, May 09, 2017 at 12:20:34PM +0100, Daniel P. Berrange wrote: > > Currently when running KVM, we expose "KVMKVMKVM\0\0\0" in > > the 0x4000 CPUID leaf. Other hypervisors (VMWare, > > HyperV, Xen, BHyve) all do the same

Re: [Qemu-devel] [Qemu-ppc] [PATCH] Revert "target-ppc/kvm: Enable in-kernel TCE acceleration for multi-tce"

2017-05-09 Thread joserz
On Tue, May 09, 2017 at 03:22:44PM +1000, David Gibson wrote: > On Tue, May 09, 2017 at 07:25:51AM +1000, Alexey Kardashevskiy wrote: > > On 09/05/17 06:17, Jose Ricardo Ziviani wrote: > > > This reverts commit 3dc410ae83e6cb76c81ea30a05d62596092b3165. > > > > > > Booting a radix guest in Power9

Re: [Qemu-devel] [PATCH v2 02/21] docker: add --include-file argument to 'build' command

2017-05-09 Thread Fam Zheng
On Tue, 05/09 09:14, Philippe Mathieu-Daudé wrote: > > > > Is it more useful if it's '--include-files' that accepts multiple files? Or > > alternatively allow this option to be use multiple times: > > > > -f foo -f bar -f ... > > I agree, since I'm not confident with Python so I tried to

Re: [Qemu-devel] [PATCH] Fix issues affecting Xen 9pfs discovered by Coverity

2017-05-09 Thread Greg Kurz
On Mon, 8 May 2017 17:05:01 -0500 Eric Blake wrote: > On 05/08/2017 05:00 PM, Stefano Stabellini wrote: > > >>> Directly calling fcntl(F_SETFD) without first reading fcntl(F_GETFD) is > >>> (theoretically) incorrect. Better might be using qemu_set_cloexec() > >>> instead of

Re: [Qemu-devel] [PATCH] usb-redir: fix stack overflow in usbredir_log_data

2017-05-09 Thread Manos Pitsidianakis
Shouldn't we be checking if a monitor has been set instead of printing to stderr anyway? On Tue, May 09, 2017 at 01:01:28PM +0200, Gerd Hoffmann wrote: Don't reinvent a broken wheel, just use the hexdump function we have. Impact: low, broken code doesn't run unless you have debug logging

Re: [Qemu-devel] [PATCH 03/10] s390x/css: add vmstate entities for css

2017-05-09 Thread Halil Pasic
On 05/08/2017 06:45 PM, Dr. David Alan Gilbert wrote: > * Halil Pasic (pa...@linux.vnet.ibm.com) wrote: >> As a preparation for switching to a vmstate based migration let us >> introduce vmstate entities (e.g. VMStateDescription) for the css entities >> to be migrated. Alongside some comments

Re: [Qemu-devel] [PATCH v2 05/21] docker: compact debian base

2017-05-09 Thread Fam Zheng
On Tue, 05/09 09:06, Philippe Mathieu-Daudé wrote: > On 05/09/2017 05:05 AM, Fam Zheng wrote: > > On Tue, 05/09 08:46, Alex Bennée wrote: > > > > > > Fam Zheng writes: > > > > > > > On Mon, 05/08 19:17, Philippe Mathieu-Daudé wrote: > > > > > - install common/basic tools at

Re: [Qemu-devel] [PATCH v2 02/21] docker: add --include-file argument to 'build' command

2017-05-09 Thread Philippe Mathieu-Daudé
On 05/09/2017 01:01 AM, Fam Zheng wrote: On Mon, 05/08 19:17, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 3 ++- tests/docker/docker.py| 5 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH v7 5/5] shutdown: Expose bool cause in SHUTDOWN and RESET events

2017-05-09 Thread Markus Armbruster
Eric Blake writes: > Libvirt would like to be able to distinguish between a SHUTDOWN > event triggered solely by guest request and one triggered by a > SIGTERM or other action on the host. While qemu_kill_report() was > already able to give different output to stderr based on

Re: [Qemu-devel] [PATCH v2 05/21] docker: compact debian base

2017-05-09 Thread Philippe Mathieu-Daudé
On 05/09/2017 05:05 AM, Fam Zheng wrote: On Tue, 05/09 08:46, Alex Bennée wrote: Fam Zheng writes: On Mon, 05/08 19:17, Philippe Mathieu-Daudé wrote: - install common/basic tools at once - use eatmydata and remove apt cache to save space - add bison and flex and git -

Re: [Qemu-devel] [PATCH 03/10] s390x/css: add vmstate entities for css

2017-05-09 Thread Halil Pasic
On 05/08/2017 06:45 PM, Dr. David Alan Gilbert wrote: > * Halil Pasic (pa...@linux.vnet.ibm.com) wrote: >> As a preparation for switching to a vmstate based migration let us >> introduce vmstate entities (e.g. VMStateDescription) for the css entities >> to be migrated. Alongside some comments

Re: [Qemu-devel] [PATCH v3 2/2] i386: expose "TCGTCGTCGTCG" in the 0x40000000 CPUID leaf

2017-05-09 Thread Eduardo Habkost
On Tue, May 09, 2017 at 12:20:34PM +0100, Daniel P. Berrange wrote: > Currently when running KVM, we expose "KVMKVMKVM\0\0\0" in > the 0x4000 CPUID leaf. Other hypervisors (VMWare, > HyperV, Xen, BHyve) all do the same thing, which leaves > TCG as the odd one out. > > The CPUID signature is

Re: [Qemu-devel] [PATCH qemu v6] memory/iommu: QOM'fy IOMMU MemoryRegion

2017-05-09 Thread Peter Xu
On Tue, May 09, 2017 at 09:34:34PM +1000, Alexey Kardashevskiy wrote: > On 09/05/17 19:14, Peter Xu wrote: > > >> +void memory_region_init_iommu(IOMMUMemoryRegion *iommu_mr, > >> + Object *owner, > >> + const MemoryRegionIOMMUOps *ops, >

Re: [Qemu-devel] [PATCH 07/13] chardev: serial & parallel declaration to own headers

2017-05-09 Thread Paolo Bonzini
On 09/05/2017 13:33, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau > --- > include/chardev/char-parallel.h | 20 +++- > include/chardev/char-serial.h | 22 ++ > include/chardev/char.h | 36

Re: [Qemu-devel] [Bug 1689499] Re: copy-storage-all/inc does not easily converge with load going on

2017-05-09 Thread ChristianEhrhardt
On Tue, May 9, 2017 at 12:41 PM, Dr. David Alan Gilbert wrote: > Interesting. > That's quite a big difference, so if you could bisect it down it would be > interesting to figure out where the change occurred. > Hi David, if it turns out to stay reproducible enough I can

Re: [Qemu-devel] [PATCH v7 2/5] shutdown: Prepare for use of an enum in reset/shutdown_request

2017-05-09 Thread Markus Armbruster
Eric Blake writes: > We want to track why a guest was shutdown; in particular, being able > to tell the difference between a guest request (such as ACPI request) > and host request (such as SIGINT) will prove useful to libvirt. > Since all requests eventually end up changing

Re: [Qemu-devel] [PATCH 06/13] chardev: move headers to include/chardev

2017-05-09 Thread Paolo Bonzini
On 09/05/2017 13:33, Marc-André Lureau wrote: > So they are all in one place. > > Signed-off-by: Marc-André Lureau > --- > {chardev => include/chardev}/char-fd.h| 2 +- > {chardev => include/chardev}/char-io.h| 2 +- > {chardev =>

[Qemu-devel] [PATCH 10/13] char: move CharBackend handling in char-fe unit

2017-05-09 Thread Marc-André Lureau
Move all the fronted struct and methods to a seperate unit. This avoids accidentally mixing backend and frontend calls, and helps with readibilty. Make qemu_chr_replay() a macro shared by both char and char-fe. Export qemu_chr_write(), and use a macro for qemu_chr_write_all() (nb: yes,

[Qemu-devel] [PATCH 12/13] char: rename functions that are not part of fe

2017-05-09 Thread Marc-André Lureau
There is no clear reason to have those functions associated with frontend. Signed-off-by: Marc-André Lureau --- chardev/char.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/chardev/char.c b/chardev/char.c index

Re: [Qemu-devel] [PATCH v3 1/2] i386: rewrite way CPUID index is validated

2017-05-09 Thread Eduardo Habkost
On Tue, May 09, 2017 at 12:20:33PM +0100, Daniel P. Berrange wrote: > Change the nested if statements into a flat format, to make > it clearer what validation / capping is being performed on > different CPUID index values. > > Signed-off-by: Daniel P. Berrange Probably

Re: [Qemu-devel] [PATCH qemu v6] memory/iommu: QOM'fy IOMMU MemoryRegion

2017-05-09 Thread Alexey Kardashevskiy
On 08/05/17 15:53, David Gibson wrote: > On Fri, May 05, 2017 at 08:19:30PM +1000, Alexey Kardashevskiy wrote: >> This defines new QOM object - IOMMUMemoryRegion - with MemoryRegion >> as a parent. >> >> This moves IOMMU-related fields from MR to IOMMU MR. However to avoid >> dymanic QOM casting

[Qemu-devel] [PATCH 13/13] char: make chr_fe_deinit() optionaly delete backend

2017-05-09 Thread Marc-André Lureau
This simplifies removing a backend for a frontend user (no need to retrive the associated driver and seperate delete call etc). NB: many frontends have questionable handling of ending a chardev. They should probably delete the backend to prevent broken reusage. Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH 08/13] be-hci: use backend functions

2017-05-09 Thread Marc-André Lureau
Avoid accessing CharBackend directly, use qemu_chr_be_* methods instead. be->chr_read should exists if qemu_chr_be_can_write() is true. (use qemu_chr_be_write(), _impl() bypasses replay) Signed-off-by: Marc-André Lureau --- hw/bt/hci-csr.c | 9 +++-- 1 file

[Qemu-devel] [PATCH 09/13] char: generalize qemu_chr_write_all()

2017-05-09 Thread Marc-André Lureau
qemu_chr_fe_write() is similar to qemu_chr_write_all(): the later write all with a chardev backend. Make qemu_chr_write() and qemu_chr_fe_write_buffer() take an 'all' argument. If false, handle 'partial' write the way qemu_chr_fe_write() use to, and call qemu_chr_write() from qemu_chr_fe_write().

[Qemu-devel] [PATCH 06/13] chardev: move headers to include/chardev

2017-05-09 Thread Marc-André Lureau
So they are all in one place. Signed-off-by: Marc-André Lureau --- {chardev => include/chardev}/char-fd.h| 2 +- {chardev => include/chardev}/char-io.h| 2 +- {chardev => include/chardev}/char-mux.h | 2 +- {chardev =>

[Qemu-devel] [PATCH 07/13] chardev: serial & parallel declaration to own headers

2017-05-09 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/chardev/char-parallel.h | 20 +++- include/chardev/char-serial.h | 22 ++ include/chardev/char.h | 36 hw/arm/strongarm.c |

[Qemu-devel] [PATCH 11/13] Remove/replace chardev/char.h inclusion

2017-05-09 Thread Marc-André Lureau
Those are apparently unnecessary includes. Signed-off-by: Marc-André Lureau --- hw/arm/bcm2835_peripherals.c | 1 - hw/char/imx_serial.c | 1 - hw/display/xenfb.c | 1 - hw/i386/xen/xen-hvm.c| 1 - hw/mips/mips_fulong2e.c | 1 -

[Qemu-devel] [PATCH 05/13] char-win: close file handle except with console

2017-05-09 Thread Marc-André Lureau
Only the console handle shouldn't be closed, however, the "file" handle should. Signed-off-by: Marc-André Lureau --- chardev/char-win.h | 5 ++--- chardev/char-console.c | 2 +- chardev/char-file.c| 2 +- chardev/char-win.c | 12 4 files

Re: [Qemu-devel] [PATCH qemu v6] memory/iommu: QOM'fy IOMMU MemoryRegion

2017-05-09 Thread Alexey Kardashevskiy
On 09/05/17 19:14, Peter Xu wrote: >> +void memory_region_init_iommu(IOMMUMemoryRegion *iommu_mr, >> + Object *owner, >> + const MemoryRegionIOMMUOps *ops, >> + const char *name, >> +

[Qemu-devel] [PATCH 04/13] char-win: rename hcom->file

2017-05-09 Thread Marc-André Lureau
hcom is the name of the file handle, regardless of the actual chardev driver (serial, file, console etc..). Rename it to be more explicit. Signed-off-by: Marc-André Lureau --- chardev/char-win.h | 2 +- chardev/char-pipe.c | 10 +- chardev/char-win.c | 36

[Qemu-devel] [PATCH 03/13] char-win: rename win_chr_init/poll win_chr_serial_init/poll

2017-05-09 Thread Marc-André Lureau
Those 2 functions are specific to serial chardev, make it more clear. Signed-off-by: Marc-André Lureau --- chardev/char-win.h| 2 +- chardev/char-serial.c | 2 +- chardev/char-win.c| 8 3 files changed, 6 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH 01/13] char-win: simplify win_chr_read()

2017-05-09 Thread Marc-André Lureau
win_chr_read_poll() is always used before win_chr_read(). We can easily fold win_chr_readfile() too. Signed-off-by: Marc-André Lureau --- chardev/char-win.h | 2 +- chardev/char-win.c | 35 +-- 2 files changed, 10 insertions(+), 27

[Qemu-devel] [PATCH 02/13] char-win: remove WinChardev.len

2017-05-09 Thread Marc-André Lureau
The "len" argument can be passed directly to win_chr_read() Signed-off-by: Marc-André Lureau --- chardev/char-win.h | 1 - chardev/char-win.c | 16 +++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/chardev/char-win.h

[Qemu-devel] [PATCH 00/13] chardev: misc clean-ups

2017-05-09 Thread Marc-André Lureau
Hi, This is the last batch of patches I have pending for chardev for now. They are mostly windows and headers related, and various small improvements. Comments welcome, Thanks Marc-André Lureau (13): char-win: simplify win_chr_read() char-win: remove WinChardev.len char-win: rename

Re: [Qemu-devel] [PATCH v6 2/5] shutdown: Prepare for use of an enum in reset/shutdown_request

2017-05-09 Thread Markus Armbruster
Eric Blake writes: > On 05/08/2017 01:26 PM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> We want to track why a guest was shutdown; in particular, being able >>> to tell the difference between a guest request (such as ACPI request) >>> and host

Re: [Qemu-devel] [PATCH RFC] target/s390x: improve SIGP to add SMP support

2017-05-09 Thread Alex Bennée
Aurelien Jarno writes: > This patch adds *very rough* SMP support to the s390x target, and make > it possible to use MTTCG, when used with the various atomic patches > posted on the mailing list. I haven't done any advanced test, so there > is certainly more atomic issues

[Qemu-devel] [PATCH v5 1/3] ramblock: add RAMBLOCK_FOREACH()

2017-05-09 Thread Peter Xu
So that it can simplifies the iterators. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- exec.c | 22 +++--- include/exec/ramlist.h | 5 + migration/ram.c| 15 --- 3 files changed,

[Qemu-devel] [PATCH v5 3/3] ramblock: add new hmp command "info ramblock"

2017-05-09 Thread Peter Xu
To dump information about ramblocks. It looks like: (qemu) info ramblock Block NamePSize Offset Used Total /objects/mem 2 MB 0x 0x8000 0x8000 vga.vram 4 KB

[Qemu-devel] [PATCH v5 2/3] utils: provide size_to_str()

2017-05-09 Thread Peter Xu
I stole the algorithm from print_type_size(). I didn't generalize it since that's using [KM...]iB while here we need [KM...]B to finally be able to stands for page sizes (and even more general). Signed-off-by: Peter Xu --- include/qemu-common.h | 1 + util/cutils.c |

[Qemu-devel] [PATCH v5 0/3] ramblock: add hmp command "info ramblock"

2017-05-09 Thread Peter Xu
v5 - add r-b for Dave on first patch (which I forgot in v4, so I got it again) - add one more patch to introduce size_to_str() as patch 2 [Dave] - let the last patch use the new interface v4: - move page_size_to_str() into util/cutil.c [Dave] v3: - cast the three PRIx64 addresses using

Re: [Qemu-devel] [PATCH v4 2/2] ramblock: add new hmp command "info ramblock"

2017-05-09 Thread Peter Xu
On Mon, May 08, 2017 at 08:21:33PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > To dump information about ramblocks. It looks like: > > > > (qemu) info ramblock > > Block NamePSize Offset Used > > Total

[Qemu-devel] [PATCH v3 1/2] i386: rewrite way CPUID index is validated

2017-05-09 Thread Daniel P. Berrange
Change the nested if statements into a flat format, to make it clearer what validation / capping is being performed on different CPUID index values. Signed-off-by: Daniel P. Berrange --- target/i386/cpu.c | 35 +++ 1 file changed, 15

[Qemu-devel] [PATCH v3 2/2] i386: expose "TCGTCGTCGTCG" in the 0x40000000 CPUID leaf

2017-05-09 Thread Daniel P. Berrange
Currently when running KVM, we expose "KVMKVMKVM\0\0\0" in the 0x4000 CPUID leaf. Other hypervisors (VMWare, HyperV, Xen, BHyve) all do the same thing, which leaves TCG as the odd one out. The CPUID signature is used by software to detect which virtual environment they are running in and

[Qemu-devel] [PATCH v3 0/2] Support CPUID signature for TCG

2017-05-09 Thread Daniel P. Berrange
This enables report of a signature in CPUID for the TCG interpretor. Changed in v3: - Simplify CPU limit code still further (Eduardo) Changed in v2: - Rewrite the way we bounds check / cap the CPUID index to use a flat switch, instead of nested ifs (Eduardo) - Add a 'tcg-cpuid' property

[Qemu-devel] [PATCH] sm501: make display updates thread safe

2017-05-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/sm501.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 2094adbc9c..9d254ef2e1 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@

[Qemu-devel] [PATCH] usb-redir: fix stack overflow in usbredir_log_data

2017-05-09 Thread Gerd Hoffmann
Don't reinvent a broken wheel, just use the hexdump function we have. Impact: low, broken code doesn't run unless you have debug logging enabled. Reported-by: 李强 Signed-off-by: Gerd Hoffmann --- hw/usb/redirect.c | 13 + 1 file changed, 1

Re: [Qemu-devel] [PATCH 0/2] scsi: Minor cleanups around scsi-disk

2017-05-09 Thread Paolo Bonzini
On 09/05/2017 12:56, Markus Armbruster wrote: > Markus Armbruster (2): > block: Clarify documentation of BlockInfo member io-status > virtio-scsi-test: Use scsi-hd instead of legacy scsi-disk > > qapi/block-core.json | 3 ++- > tests/virtio-scsi-test.c | 2 +- > 2 files changed, 3

[Qemu-devel] [PATCH 2/2] virtio-scsi-test: Use scsi-hd instead of legacy scsi-disk

2017-05-09 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- tests/virtio-scsi-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c index 0eabd56..27ef7c0 100644 --- a/tests/virtio-scsi-test.c +++ b/tests/virtio-scsi-test.c @@

[Qemu-devel] [PATCH 0/2] scsi: Minor cleanups around scsi-disk

2017-05-09 Thread Markus Armbruster
Markus Armbruster (2): block: Clarify documentation of BlockInfo member io-status virtio-scsi-test: Use scsi-hd instead of legacy scsi-disk qapi/block-core.json | 3 ++- tests/virtio-scsi-test.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.7.4

[Qemu-devel] [PATCH 1/2] block: Clarify documentation of BlockInfo member io-status

2017-05-09 Thread Markus Armbruster
Say "SCSI except scsi-generic" instead of "scsi-disk", because scsi-disk could mean either scsi-disk.c (which is correct) or device model scsi-disk (which would be incorrect). Signed-off-by: Markus Armbruster --- qapi/block-core.json | 3 ++- 1 file changed, 2 insertions(+),

[Qemu-devel] [Bug 1689499] Re: copy-storage-all/inc does not easily converge with load going on

2017-05-09 Thread Dr. David Alan Gilbert
Interesting. That's quite a big difference, so if you could bisect it down it would be interesting to figure out where the change occurred. What happens if you just make it a 'disk' workload without the memory stress? What network interface (1G/10G etc) are you migrating over and what bandwidth

[Qemu-devel] [PATCH] vga: fix display update region calculation

2017-05-09 Thread Gerd Hoffmann
vga display update mis-calculated the region for the dirty bitmap snapshot in case the scanlines are padded. This can triggere an assert in cpu_physical_memory_snapshot_get_dirty(). Fixes: fec5e8c92becad223df9d972770522f64aafdb72 Reported-by: Kevin Wolf Reported-by: 李强

[Qemu-devel] [PATCH RFC] target/s390x: improve SIGP to add SMP support

2017-05-09 Thread Aurelien Jarno
This patch adds *very rough* SMP support to the s390x target, and make it possible to use MTTCG, when used with the various atomic patches posted on the mailing list. I haven't done any advanced test, so there is certainly more atomic issues to fix. Anyway this patch is nothing more than a way to

Re: [Qemu-devel] [PATCH 0/4] curl: locking cleanups and fixes

2017-05-09 Thread Richard W.M. Jones
No I'm afraid this patch series does not fix the bug. The stack trace is below. Rich. Thread 4 (Thread 0x7f8595cf1700 (LWP 11235)): #0 0x7f86348e6700 in do_futex_wait () at /lib64/libpthread.so.0 #1 0x7f86348e6813 in __new_sem_wait_slow () at /lib64/libpthread.so.0 #2

Re: [Qemu-devel] [PATCH 1/3] hw/block: Introduce rotational qdev property

2017-05-09 Thread Kevin Wolf
Am 06.05.2017 um 14:43 hat Aurelien Jarno geschrieben: > The Linux kernel uses different I/O scheduler depending if the block > device is a rotational device or not. Also it uses rotational devices > to add entropy to the random pool. > > This patch add a rotational qdev property so that the

Re: [Qemu-devel] [PATCH 2/2] docs/qdev-device-use.txt: update section Default Devices

2017-05-09 Thread Thomas Huth
On 09.05.2017 11:41, Markus Armbruster wrote: > Resynchronize the table of default device suppressions with vl.c's > default_list[]. > > Signed-off-by: Markus Armbruster > --- > docs/qdev-device-use.txt | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > >

Re: [Qemu-devel] [Qemu-ppc] Floating point unit bugs

2017-05-09 Thread BALATON Zoltan
On Tue, 9 May 2017, Aurelien Jarno wrote: | main.c: In function 'print_fpscr_settings': | main.c:73:26: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] | if ((fpscr >> i) & 0x1 == 1) { | ^ Actually the compiler is correct

Re: [Qemu-devel] [PATCH 1/2] docs qemu-doc: Avoid ide-drive, it's deprecated

2017-05-09 Thread Thomas Huth
On 09.05.2017 11:41, Markus Armbruster wrote: > Suggested-by: Thomas Huth > Signed-off-by: Markus Armbruster > --- > docs/bootindex.txt | 2 +- > docs/qdev-device-use.txt | 4 ++-- > qemu-options.hx | 2 +- > 3 files changed, 4 insertions(+),

[Qemu-devel] [PATCH v8 3/4] qemu-img: introduce --target-image-opts for 'convert' command

2017-05-09 Thread Daniel P. Berrange
The '--image-opts' flag indicates whether the source filename includes options. The target filename has to remain in the plain filename format though, since it needs to be passed to bdrv_create(). When using --skip-create though, it would be possible to use image-opts syntax. This adds

[Qemu-devel] [PATCH v8 2/4] qemu-img: fix --image-opts usage with dd command

2017-05-09 Thread Daniel P. Berrange
The --image-opts flag can only be used to affect the parsing of the source image. The target image has to be specified in the traditional style regardless, since it needs to be passed to the bdrv_create() API which does not support the new style opts. Reviewed-by: Fam Zheng

[Qemu-devel] [PATCH v8 4/4] qemu-img: copy *key-secret opts when opening newly created files

2017-05-09 Thread Daniel P. Berrange
The qemu-img dd/convert commands will create an image file and then try to open it. Historically it has been possible to open new files without passing any options. With encrypted files though, the *key-secret options are mandatory, so we need to provide those options when opening the newly

[Qemu-devel] [PATCH v8 1/4] qemu-img: add support for --object with 'dd' command

2017-05-09 Thread Daniel P. Berrange
The qemu-img dd command added --image-opts support, but missed the corresponding --object support. This prevented passing secrets (eg auth passwords) needed by certain disk images. Reviewed-by: Fam Zheng Reviewed-by: Max Reitz Reviewed-by: Eric Blake

[Qemu-devel] [PATCH v8 0/4] Improve convert and dd commands

2017-05-09 Thread Daniel P. Berrange
Update to v1: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg05699.html v2: https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg00728.html v3: https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg04391.html v4:

Re: [Qemu-devel] [PATCH 0/2] docs: Minor updates around ide-drive

2017-05-09 Thread Markus Armbruster
I mis-pasted cc: Thomas. Sorry for the inconvenience.

Re: [Qemu-devel] [PATCH RESEND V3 5/6] migration: calculate downtime on dst side

2017-05-09 Thread Daniel P. Berrange
On Tue, May 09, 2017 at 10:40:34AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Mon, May 08, 2017 at 12:08:07PM +0300, Alexey wrote: > > > On Mon, May 08, 2017 at 02:29:06PM +0800, Peter Xu wrote: > > > > On Fri, Apr 28, 2017 at 02:11:19PM +0300, Alexey

[Qemu-devel] [PATCH 1/2] docs qemu-doc: Avoid ide-drive, it's deprecated

2017-05-09 Thread Markus Armbruster
Suggested-by: Thomas Huth Signed-off-by: Markus Armbruster --- docs/bootindex.txt | 2 +- docs/qdev-device-use.txt | 4 ++-- qemu-options.hx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/bootindex.txt

Re: [Qemu-devel] [PATCH 0/5] 9pfs: local: fix metadata of mapped-file security mode

2017-05-09 Thread Greg Kurz
On Mon, 8 May 2017 17:33:43 +0200 Leo Gaspard wrote: > Greg, > > I just tested on 2.9.0 with the 5 patches applied, and it appears to > work on my setup, thanks! > > Just a side note: .virtfs_metadata_root is set as u=rwx on the host file > system (the "ret = fchmod(map_fd,

[Qemu-devel] [PATCH 0/2] docs: Minor updates around ide-drive

2017-05-09 Thread Markus Armbruster
Markus Armbruster (2): docs qemu-doc: Avoid ide-drive, it's deprecated docs/qdev-device-use.txt: update section Default Devices docs/bootindex.txt | 2 +- docs/qdev-device-use.txt | 13 +++-- qemu-options.hx | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-)

[Qemu-devel] [PATCH 2/2] docs/qdev-device-use.txt: update section Default Devices

2017-05-09 Thread Markus Armbruster
Resynchronize the table of default device suppressions with vl.c's default_list[]. Signed-off-by: Markus Armbruster --- docs/qdev-device-use.txt | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/qdev-device-use.txt b/docs/qdev-device-use.txt

Re: [Qemu-devel] [PATCH v7 3/4] qemu-img: introduce --target-image-opts for 'convert' command

2017-05-09 Thread Daniel P. Berrange
On Wed, May 03, 2017 at 09:50:49PM +0200, Max Reitz wrote: > On 02.05.2017 16:47, Daniel P. Berrange wrote: > > The '--image-opts' flag indicates whether the source filename > > includes options. The target filename has to remain in the > > plain filename format though, since it needs to be passed

Re: [Qemu-devel] [PATCH RESEND V3 5/6] migration: calculate downtime on dst side

2017-05-09 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Mon, May 08, 2017 at 12:08:07PM +0300, Alexey wrote: > > On Mon, May 08, 2017 at 02:29:06PM +0800, Peter Xu wrote: > > > On Fri, Apr 28, 2017 at 02:11:19PM +0300, Alexey Perevalov wrote: > > > > On 04/28/2017 01:00 PM, Peter Xu wrote: > > > > >On Fri, Apr

Re: [Qemu-devel] [PATCH 5/5] 9pfs: local: forbid client access to metadata

2017-05-09 Thread Greg Kurz
On Fri, 5 May 2017 12:13:52 -0500 Eric Blake wrote: > On 05/05/2017 09:37 AM, Greg Kurz wrote: > > When using the mapped-file security mode, we shouldn't let the client > > mess with the metadata. The current code already hides it but the > > client can still access the

[Qemu-devel] [PATCH 3/4] curl: avoid recursive locking of BDRVCURLState mutex

2017-05-09 Thread Paolo Bonzini
The curl driver has a ugly hack where, if it cannot find an empty CURLState, it just uses aio_poll to wait for one to be empty. This is probably buggy when used together with dataplane, and a fix is in the next patch. A more immediate effect of the bug however is that it can cause a recursive

[Qemu-devel] [PATCH 2/4] curl: never invoke callbacks with s->mutex held

2017-05-09 Thread Paolo Bonzini
All curl callbacks go through curl_multi_do, and hence are called with s->mutex held. Note that with comments, and make curl_read_cb drop the lock before invoking the callback. Likewise for curl_find_buf, where the callback can be invoked by the caller. Cc: qemu-sta...@nongnu.org Cc:

[Qemu-devel] [PATCH 0/4] curl: locking cleanups and fixes

2017-05-09 Thread Paolo Bonzini
This is the full version of the simple patch: @@ -473,7 +475,9 @@ break; } if (!state) { +qemu_mutex_unlock(>mutex); aio_poll(bdrv_get_aio_context(bs), true); +qemu_mutex_lock(>mutex); } } while(!state); that was

[Qemu-devel] [PATCH 1/4] curl: strengthen assertion in curl_clean_state

2017-05-09 Thread Paolo Bonzini
curl_clean_state should only be called after all AIOCBs have been completed. This is not so obvious for the call from curl_detach_aio_context, so assert that. Cc: qemu-sta...@nongnu.org Cc: jc...@redhat.com Signed-off-by: Paolo Bonzini --- block/curl.c | 5 + 1 file

[Qemu-devel] [PATCH 4/4] curl: improve search for unused CURLState

2017-05-09 Thread Paolo Bonzini
The main change here is to pull the search loop to a new function, making it easier to switch from aio_poll to BDRV_POLL_WHILE. However, the "for (j...)" loop is also dead (there is no other read of "j" outside the loop), so remove it. Cc: jc...@redhat.com Cc: qemu-sta...@nongnu.org

Re: [Qemu-devel] [PATCH 4/5] 9pfs: local: metadata file for the VirtFS root

2017-05-09 Thread Greg Kurz
On Fri, 5 May 2017 12:11:14 -0500 Eric Blake wrote: > On 05/05/2017 09:37 AM, Greg Kurz wrote: > > When using the mapped-file security, credentials are stored in a metadata > > directory located in the parent directory. This is okay for all paths with > > the notable exception

Re: [Qemu-devel] [PATCH 3/5] 9pfs: local: simplify file opening

2017-05-09 Thread Greg Kurz
On Fri, 5 May 2017 12:01:55 -0500 Eric Blake wrote: > On 05/05/2017 09:37 AM, Greg Kurz wrote: > > All paths in the virtfs directory now start with "./" (except the virtfs > > root itself which is exactly "."). > > > > We hence don't need to skip leading '/' characters

Re: [Qemu-devel] [PATCH 1/3] target/s390x: mask the SIGP order_code using SIGP_ORDER_MASK

2017-05-09 Thread Thomas Huth
On 09.05.2017 10:27, Aurelien Jarno wrote: > For that move the definition from kvm.c to cpu.h > > Signed-off-by: Aurelien Jarno > --- > target/s390x/cpu.h | 3 +++ > target/s390x/kvm.c | 2 -- > target/s390x/misc_helper.c | 3 +-- > 3 files changed, 4

Re: [Qemu-devel] [PATCH qemu v6] memory/iommu: QOM'fy IOMMU MemoryRegion

2017-05-09 Thread Peter Xu
On Fri, May 05, 2017 at 08:19:30PM +1000, Alexey Kardashevskiy wrote: > This defines new QOM object - IOMMUMemoryRegion - with MemoryRegion > as a parent. > > This moves IOMMU-related fields from MR to IOMMU MR. However to avoid > dymanic QOM casting in fast path (address_space_translate, etc), >

Re: [Qemu-devel] [PATCH] Revert "target-ppc/kvm: Enable in-kernel TCE acceleration for multi-tce"

2017-05-09 Thread Alexey Kardashevskiy
On 09/05/17 15:22, David Gibson wrote: > On Tue, May 09, 2017 at 07:25:51AM +1000, Alexey Kardashevskiy wrote: >> On 09/05/17 06:17, Jose Ricardo Ziviani wrote: >>> This reverts commit 3dc410ae83e6cb76c81ea30a05d62596092b3165. >>> >>> Booting a radix guest in Power9 with that commit throws a host

Re: [Qemu-devel] [PATCH 2/5] 9pfs: local: resolve special directories in paths

2017-05-09 Thread Greg Kurz
On Fri, 5 May 2017 11:59:15 -0500 Eric Blake wrote: > On 05/05/2017 09:37 AM, Greg Kurz wrote: > > When using the mapped-file security mode, the creds of a path /foo/bar > > are stored in the /foo/.virtfs_metadata/bar file. This is okay for all > > paths unless they end with

Re: [Qemu-devel] [PATCH RESEND V3 5/6] migration: calculate downtime on dst side

2017-05-09 Thread Peter Xu
On Mon, May 08, 2017 at 12:08:07PM +0300, Alexey wrote: > On Mon, May 08, 2017 at 02:29:06PM +0800, Peter Xu wrote: > > On Fri, Apr 28, 2017 at 02:11:19PM +0300, Alexey Perevalov wrote: > > > On 04/28/2017 01:00 PM, Peter Xu wrote: > > > >On Fri, Apr 28, 2017 at 09:57:37AM +0300, Alexey Perevalov

Re: [Qemu-devel] [PATCH v7 09/13] vfio/ccw: get irqs info and set the eventfd fd

2017-05-09 Thread Auger Eric
Hi, On 05/05/2017 04:03, Dong Jia Shi wrote: > vfio-ccw resorts to the eventfd mechanism to communicate with userspace. > We fetch the irqs info via the ioctl VFIO_DEVICE_GET_IRQ_INFO, > register a event notifier to get the eventfd fd which is sent > to kernel via the ioctl VFIO_DEVICE_SET_IRQS,

Re: [Qemu-devel] [PATCH v7 08/13] vfio/ccw: get io region info

2017-05-09 Thread Auger Eric
Hi, On 05/05/2017 04:03, Dong Jia Shi wrote: > vfio-ccw provides an MMIO region for I/O operations. We fetch its > information via ioctls here, then we can use it performing I/O > instructions and retrieving I/O results later on. > > Signed-off-by: Dong Jia Shi

Re: [Qemu-devel] [PATCH v7 06/13] s390x/css: device support for s390-ccw passthrough

2017-05-09 Thread Auger Eric
Hi On 05/05/2017 04:03, Dong Jia Shi wrote: > In order to support subchannels pass-through, we introduce a s390 > subchannel device called "s390-ccw" to hold the real subchannel info. > The s390-ccw devices inherit from the abstract CcwDevice which connect > to the existing virtual-css-bus. > >

Re: [Qemu-devel] [PATCH v7 09/13] vfio/ccw: get irqs info and set the eventfd fd

2017-05-09 Thread Dong Jia Shi
* Auger Eric [2017-05-09 10:21:15 +0200]: Hi Eric, > Hi, > > On 05/05/2017 04:03, Dong Jia Shi wrote: > > vfio-ccw resorts to the eventfd mechanism to communicate with userspace. > > We fetch the irqs info via the ioctl VFIO_DEVICE_GET_IRQ_INFO, > > register a event

[Qemu-devel] [PULL v3 18/28] sockets: Limit SocketAddressLegacy to external interfaces

2017-05-09 Thread Markus Armbruster
SocketAddressLegacy is a simple union, and simple unions are awkward: they have their variant members wrapped in a "data" object on the wire, and require additional indirections in C. SocketAddress is the equivalent flat union. Convert all users of SocketAddressLegacy to SocketAddress, except

Re: [Qemu-devel] [RFC PATCH 03/20] intel_iommu: add "svm" option

2017-05-09 Thread Liu, Yi L
On Mon, May 08, 2017 at 07:20:34PM +0800, Peter Xu wrote: > On Mon, May 08, 2017 at 10:38:09AM +, Liu, Yi L wrote: > > On Thu, 27 Apr 2017 18:53:17 +0800 > > Peter Xu wrote: > > > > > On Wed, Apr 26, 2017 at 06:06:33PM +0800, Liu, Yi L wrote: > > > > Expose "Shared Virtual

[Qemu-devel] [PATCH 3/3] target/s390x: implement serialization in BRANCH CONDITION

2017-05-09 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno --- target/s390x/translate.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index c58c27f8e9..2f07ce2be9 100644 --- a/target/s390x/translate.c +++

[Qemu-devel] [PATCH 2/3] target/s390x: fix SIGNAL PROCESSOR return value

2017-05-09 Thread Aurelien Jarno
The SIGNAL PROCESSOR helper returns its value through the CC register. set_cc_static should be called just after the helper. Signed-off-by: Aurelien Jarno --- target/s390x/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/s390x/translate.c

Re: [Qemu-devel] [PATCH v7 07/13] vfio/ccw: vfio based subchannel passthrough driver

2017-05-09 Thread Auger Eric
Hi, On 05/05/2017 04:03, Dong Jia Shi wrote: > From: Xiao Feng Ren > > We use the IOMMU_TYPE1 of VFIO to realize the subchannels > passthrough, implement a vfio based subchannels passthrough > driver called "vfio-ccw". > > Support qemu parameters in the style of: >

[Qemu-devel] [PULL v3 23/28] qobject-input-visitor: Catch misuse of end_struct vs. end_list

2017-05-09 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <1493282486-28338-5-git-send-email-arm...@redhat.com> Reviewed-by: Marc-André Lureau [More elaborate assertions for clarity] --- qapi/qobject-input-visitor.c | 21 +++-- 1 file changed,

[Qemu-devel] [PATCH 0/3] target/s390x: misc patches

2017-05-09 Thread Aurelien Jarno
Those are just random patches I have written while trying to get a MTTCG version of qemu/s390x. I just send them to avoid duplicated work. Aurelien Jarno (3): target/s390x: mask the SIGP order_code using SIGP_ORDER_MASK target/s390x: fix SIGNAL PROCESSOR return value target/s390x: implement

Re: [Qemu-devel] [PATCH] block: Simplify BDRV_BLOCK_RAW recursion

2017-05-09 Thread Fam Zheng
On Thu, 05/04 12:37, Eric Blake wrote: > Since we are already in coroutine context during the body of > bdrv_co_get_block_status(), we can shave off a few layers of > wrappers when recursing to query the protocol when a format driver > returned BDRV_BLOCK_RAW. > > Note that we are already using

[Qemu-devel] [PULL v3 12/28] test-qga: Actually test 0xff sync bytes

2017-05-09 Thread Markus Armbruster
From: Eric Blake Commit 62c39b3 introduced test-qga, and at face value, appears to be testing the 'guest-sync' behavior that is recommended for guests in sending 0xff to QGA to force the parser to reset. But this aspect of the test has never actually done anything: the

<    1   2   3   4   >