Re: [Qemu-devel] [PATCH 2/2] vmxnet3: VMStatify rx/tx q_descr and int_state

2017-01-04 Thread Dmitry Fleytman
> On 3 Jan 2017, at 21:40 PM, Dr. David Alan Gilbert > wrote: > > * Dmitry Fleytman (dmi...@daynix.com ) wrote: >>> >>> On 16 Dec 2016, at 14:19 PM, Dr. David Alan Gilbert >>> wrote: >>> >>> * Dr. David Alan Gilbert (git) (dgilb...@redhat.com) wrote: From: "Dr

[Qemu-devel] [PULL 03/13] 9pfs: call v9fs_init_qiov_from_pdu before v9fs_pack

2017-01-04 Thread Greg Kurz
From: Stefano Stabellini v9fs_xattr_read should not access VirtQueueElement elems directly. Move v9fs_init_qiov_from_pdu up in the file and call v9fs_init_qiov_from_pdu before v9fs_pack. Use v9fs_pack on the new iovec. Signed-off-by: Stefano Stabellini Reviewed-by: Greg Kurz Signed-off-by: Gre

[Qemu-devel] [PULL 01/13] 9pfs: move pdus to V9fsState

2017-01-04 Thread Greg Kurz
From: Stefano Stabellini pdus are initialized and used in 9pfs common code. Move the array from V9fsVirtioState to V9fsState. Signed-off-by: Stefano Stabellini Reviewed-by: Greg Kurz Signed-off-by: Greg Kurz --- hw/9pfs/9p.c| 7 +++ hw/9pfs/9p.h| 1 + hw/9pfs/virtio-9p.h

[Qemu-devel] [PULL 00/13] 9p patches 20170104

2017-01-04 Thread Greg Kurz
The following changes since commit dbe2b65566e76d3c3a0c3358285c0336ac61e757: Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.9-pull-request' into staging (2016-12-28 17:11:11 +) are available in the git repository at: https://github.com/gkurz/qemu.git tags/for-upstream for

[Qemu-devel] [PULL 02/13] 9pfs: introduce transport specific callbacks

2017-01-04 Thread Greg Kurz
From: Stefano Stabellini Don't call virtio functions from 9pfs generic code, use generic function callbacks instead. Signed-off-by: Stefano Stabellini Reviewed-by: Greg Kurz Signed-off-by: Greg Kurz --- hw/9pfs/9p.c | 8 hw/9pfs/9p.h | 19 +++

[Qemu-devel] [PULL 11/13] tests: virtio-9p: add walk operation test

2017-01-04 Thread Greg Kurz
The walk operation is used to traverse the directory tree and to associate paths to fids. A single walk can be used to traverse up to P9_MAXWELEM path elements at the same time. The test creates a path with P9_MAXWELEM elements on the backend (à la 'mkdir -p') and issues a walk operation. The walk

[Qemu-devel] [PULL 04/13] 9pfs: introduce init_out/in_iov_from_pdu

2017-01-04 Thread Greg Kurz
From: Stefano Stabellini Not all 9pfs transports share memory between request and response. For those who don't, it is necessary to know how much memory is required in the response. Split the existing init_iov_from_pdu function in two: init_out_iov_from_pdu (for writes) and init_in_iov_from_pdu

[Qemu-devel] [PULL 05/13] 9pfs: fix crash when fsdev is missing

2017-01-04 Thread Greg Kurz
If the user passes -device virtio-9p without the corresponding -fsdev, QEMU dereferences a NULL pointer and crashes. This is a 2.8 regression introduced by commit 702dbcc274e2c. Signed-off-by: Greg Kurz Reviewed-by: Li Qiang --- hw/9pfs/9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[Qemu-devel] [PULL 08/13] 9pfs: fix P9_NOTAG and P9_NOFID macros

2017-01-04 Thread Greg Kurz
The u16 and u32 types don't exist in QEMU common headers. It never broke build because these two macros aren't use by the current code, but this is about to change with the future addition of functional tests for 9P. Also, these should have enclosing parenthesis to be usable in any syntactical sit

[Qemu-devel] [PULL 06/13] tests: virtio-9p: rename PCI configuration test

2017-01-04 Thread Greg Kurz
Signed-off-by: Greg Kurz --- tests/virtio-9p-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/virtio-9p-test.c b/tests/virtio-9p-test.c index 9c4f6cb40647..f458297f9ae1 100644 --- a/tests/virtio-9p-test.c +++ b/tests/virtio-9p-test.c @@ -92,7 +92,7 @@ static vo

[Qemu-devel] [PULL 07/13] tests: virtio-9p: code refactoring

2017-01-04 Thread Greg Kurz
This moves the test_share static and the QOSState into the QVirtIO9P structure, and put PCI related code in functions with a _pci_ name. This will avoid code duplication in future tests, and allow to add support for non-PCI platforms. Signed-off-by: Greg Kurz --- tests/virtio-9p-test.c | 101 ++

[Qemu-devel] [PULL 10/13] tests: virtio-9p: add attach operation test

2017-01-04 Thread Greg Kurz
The attach operation is used to establish a connection between the client and the server. After this, the client is able to access the underlying filesystem and do I/O. This test simply ensures the operation succeeds without error. Reference: http://man.cat-v.org/plan_9/5/attach Signed-off-by:

[Qemu-devel] [PULL 12/13] tests: virtio-9p: no slash in path elements during walk

2017-01-04 Thread Greg Kurz
The walk operation is expected to fail and to return ENOENT. Signed-off-by: Greg Kurz --- tests/virtio-9p-test.c | 24 1 file changed, 24 insertions(+) diff --git a/tests/virtio-9p-test.c b/tests/virtio-9p-test.c index 2deb7fbf92f1..83cb23b3afc7 100644 --- a/tests/virti

[Qemu-devel] [PULL 13/13] tests: virtio-9p: ".." cannot be used to walk out of the shared directory

2017-01-04 Thread Greg Kurz
According to the 9P spec at http://man.cat-v.org/plan_9/5/intro, the parent directory of the root directory of a server's tree is itself. This test hence checks that the qid of the root directory as returned by attach is the same as the qid of ".." when walking from the root directory. Signed-off-

[Qemu-devel] [PULL 09/13] tests: virtio-9p: add version operation test

2017-01-04 Thread Greg Kurz
This patch lays the foundations to be able to test 9P operations and provides a test for the version operation as a first example. A 9P request is composed of a T-message sent by the client (guest) to the server (QEMU), and a R-message sent by the server back to the client. The following general

[Qemu-devel] [PATCH] serial: fix memory leak in serial exit

2017-01-04 Thread Li Qiang
From: Li Qiang The serial_exit_core function doesn't free some resources. This can lead memory leak when hotplug and unplug. This patch avoid this. Signed-off-by: Li Qiang --- hw/char/serial.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/char/serial.c b/hw/char/serial.c i

[Qemu-devel] NBD handshake may block qemu main thread when socket delays or has packet loss

2017-01-04 Thread Fangyi (C)
As we all know, socket is in blocking mode when nbd is negotiating with the other end. If the network is poor because of delay or packet loss, socket read or write will return very slowly. The mainloop events won't be handled in time util nbd handshake ends. Any advices to solve the pr

Re: [Qemu-devel] [PATCH] ui/vnc: Fix problem with sending too many bytes as server name

2017-01-04 Thread Gerd Hoffmann
On Mo, 2016-11-21 at 18:25 +0100, Thomas Huth wrote: > If the buffer is not big enough, snprintf() does not return the number > of bytes that have been written to the buffer, but the number of bytes > that would be needed for writing the whole string. By using this value > for the following vnc_wri

Re: [Qemu-devel] [PATCH] ui/gtk: Fix mouse wheel on 3.4.0 or later

2017-01-04 Thread Gerd Hoffmann
> +#if GTK_CHECK_VERSION(3, 4, 0) > +} else if (scroll->direction == GDK_SCROLL_SMOOTH) { > +gdouble delta_x, delta_y; > +if (!gdk_event_get_scroll_deltas((GdkEvent*)scroll, &delta_x, > &delta_y)) > +return TRUE; > +if (delta_y > 0) > +btn = INPU

Re: [Qemu-devel] [PATCH v3] ps2: Fix lost scancodes by recent changes

2017-01-04 Thread Gerd Hoffmann
On Mi, 2016-12-28 at 04:55 +0900, OGAWA Hirofumi wrote: > With "ps2: use QEMU qcodes instead of scancodes", key handling was > changed to qcode base. But all scancodes are not converted to new one. > > This adds some missing qcodes/scancodes what I found in using. Added to ui queue. thanks, Ge

Re: [Qemu-devel] [PATCH] vnc: track LED state separately

2017-01-04 Thread Gerd Hoffmann
On Fr, 2016-12-16 at 10:00 +0100, Pierre Ossman wrote: > On 15/12/16 17:41, Gerd Hoffmann wrote: > >> > >> -caps = ledstate & QEMU_CAPS_LOCK_LED ? 1 : 0; > >> -num = ledstate & QEMU_NUM_LOCK_LED ? 1 : 0; > >> -scr = ledstate & QEMU_SCROLL_LOCK_LED ? 1 : 0; > >> +if (ledstate != v

Re: [Qemu-devel] [PATCHv4 0/3] Move getting XWindow ID from baum driver to graphical backend

2017-01-04 Thread Gerd Hoffmann
On Mi, 2016-12-21 at 01:38 +0100, Samuel Thibault wrote: > Hello, > > This is a respin of moving getting XWindow ID from baum to actual > graphical backends. This only contains the new API, the move > of existing code to the new API, and the addition of support for > SDL2. Gtk will need more disc

Re: [Qemu-devel] [PATCH] gtk: avoid oob array access

2017-01-04 Thread Gerd Hoffmann
On Mi, 2016-12-07 at 13:55 +0300, Marc-André Lureau wrote: > When too many consoles are created, vcs[] may be write out-of-bounds. > > Signed-off-by: Marc-André Lureau > --- > ui/gtk.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/ui/gtk.c b/ui/gtk.c > index e81642876a..67c52179

Re: [Qemu-devel] [PATCH v2] egl-helpers: Change file licensing to LGPLv2

2017-01-04 Thread Gerd Hoffmann
On Do, 2016-12-08 at 10:45 +, Frediano Ziglio wrote: > The relicense permits sharing the code with Spice which > is LGPL. > > All people listed below have agreed to the > relicense: > - Arei Gonglei; > - Cole Robinson; > - Gerd Hoffmann; > - Peter Maydell. > > Signed-off-by: Frediano Ziglio

Re: [Qemu-devel] Speed menu for GTK interfaace

2017-01-04 Thread Gerd Hoffmann
Hi, > It is quite simple, there would be a 100% to a 1% menu item. It would look > like > this: > > Speed > --- > 100% > 90% > 80% > 70% > 60% > 50% > 40% > 30% > 20% > 10% > 1% > > > Each menu item would call cpu_throttle_set(). The value sent to this function > would > be determined l

[Qemu-devel] [PATCH v15 1/2] virtio-crypto: Add virtio crypto device specification

2017-01-04 Thread Gonglei
The virtio crypto device is a virtual crypto device (ie. hardware crypto accelerator card). Currently, the virtio crypto device provides the following crypto services: CIPHER, MAC, HASH, and AEAD. In this patch, CIPHER, MAC, HASH, AEAD services are introduced. VIRTIO-153 Signed-off-by: Gonglei

[Qemu-devel] [PATCH v15 0/2] virtio-crypto: virtio crypto device specification

2017-01-04 Thread Gonglei
Changes since v14: - drop VIRTIO_CRYPTO_S_STARTED status [Halil & Cornelia] - correct a sentence about dataqueue and controlq in the first paragraph. [Halil] - change a MAY to MUST about max_dataqueues. [Halil] - add non-session mode support 1) add four features for different crypto service

Re: [Qemu-devel] [PATCH v15 0/2] virtio-crypto: virtio crypto device specification

2017-01-04 Thread Gonglei (Arei)
Hi all, I attach the diff files between v14 and v15 for better review. diff --git a/virtio-crypto.tex b/virtio-crypto.tex index 9f7faf0..884ee95 100644 --- a/virtio-crypto.tex +++ b/virtio-crypto.tex @@ -2,8 +2,8 @@ The virtio crypto device is a virtual cryptography device as well as a kind of

[Qemu-devel] [PATCH v15 2/2] virtio-crypto: Add conformance clauses

2017-01-04 Thread Gonglei
Add the conformance targets and clauses for virtio-crypto device. Signed-off-by: Gonglei --- conformance.tex | 30 ++ 1 file changed, 30 insertions(+) diff --git a/conformance.tex b/conformance.tex index f59e360..3bde4b6 100644 --- a/conformance.tex +++ b/conformance

Re: [Qemu-devel] [PATCH] win32: use glib gpoll if glib >= 2.50

2017-01-04 Thread Daniel P. Berrange
On Tue, Jan 03, 2017 at 08:19:33PM +0100, Marc-André Lureau wrote: > A fix has been committed in upstream glib commit > 210a9796f78eb90f76f1bd6a304e9fea05e97617. > (See also related bug https://bugzilla.gnome.org/show_bug.cgi?id=764415) The bug is a little misleading because the comments indicate

Re: [Qemu-devel] [PATCH v2 4/4] migration: Fail migration blocker for --only-migratble

2017-01-04 Thread Ashijeet Acharya
On Fri, Dec 16, 2016 at 4:44 PM, Greg Kurz wrote: > On Fri, 16 Dec 2016 15:23:44 +0530 > Ashijeet Acharya wrote: > >> migrate_add_blocker should rightly fail if the '--only-migratable' >> option was specified and the device in use should not be able to >> perform the action which results in an un

Re: [Qemu-devel] [PATCH] Crypto: fix leak in ivgen essiv init

2017-01-04 Thread Daniel P. Berrange
On Tue, Jan 03, 2017 at 08:31:34PM -0800, Li Qiang wrote: > From: Li Qiang > > On error path, the 'salt' doesn't been freed thus leading > a memory leak. This patch avoid this. > > Signed-off-by: Li Qiang > --- > crypto/ivgen-essiv.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/cr

[Qemu-devel] [Bug 1399943] Re: qemu-system-sparc loses serial console data on EAGAIN

2017-01-04 Thread Andreas Gustafsson
Hi Mark, I have now upgraded to qemu 2.8 and successfully run more than 20 scripted installs of NetBSD/sparc over a serial console without failures, so it does indeed look like the bug is now fixed, and the bug report can be closed. -- You received this bug notification because you are a member

Re: [Qemu-devel] [PATCH v2] qemu-thread: fix qemu_thread_set_name() race in qemu_thread_create()

2017-01-04 Thread Daniel P. Berrange
On Wed, Jan 04, 2017 at 09:32:01AM +0800, zhanghailiang wrote: > From: Caoxinhua > > QEMU will crash with the follow backtrace if the new created thread exited > before > we call qemu_thread_set_name() for it. > > (gdb) bt > #0 0x7f9a68b095d7 in __GI_raise (sig=sig@entry=6) at > ../npt

Re: [Qemu-devel] [PATCH v10 16/26] intel_iommu: add support for split irqchip

2017-01-04 Thread Jan Kiszka
On 2017-01-03 07:15, Peter Xu wrote: > On Sun, Jun 26, 2016 at 03:27:50PM +0200, Jan Kiszka wrote: >> On 2016-06-26 03:48, Peter Xu wrote: >>> On Sat, Jun 25, 2016 at 05:18:40PM +0200, Jan Kiszka wrote: On 2016-06-25 15:18, Peter Xu wrote: > On Sat, Jun 25, 2016 at 10:08:10AM +0200, Jan Ki

[Qemu-devel] [PULL 01/11] ui/gtk: fix crash at startup when no console is available

2017-01-04 Thread Gerd Hoffmann
From: Hervé Poussineau This patch fixes a segfault at QEMU startup, introduced in a08156321ab9a7d2fed9ee77dbfeea2a61ffd153. gd_vc_find_current() return NULL, which is dereferenced without checking it. While at it, disable the whole 'View' menu if no console exists. Reproducer: qemu-system-i386

[Qemu-devel] [PULL 08/11] gtk: avoid oob array access

2017-01-04 Thread Gerd Hoffmann
From: Marc-André Lureau When too many consoles are created, vcs[] may be write out-of-bounds. Signed-off-by: Marc-André Lureau Message-id: 20161207105511.25173-1-marcandre.lur...@redhat.com Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 5 + 1 file changed, 5 insertions(+) diff --git a/ui/g

[Qemu-devel] [PULL 02/11] ui: use evdev keymap when running under wayland

2017-01-04 Thread Gerd Hoffmann
From: "Daniel P. Berrange" Wayland always uses evdev as its input source, so QEMU can use the existing evdev keymap data Signed-off-by: Daniel P. Berrange Tested-by: Stefan Hajnoczi Message-id: 20161201094117.16407-1-berra...@redhat.com Signed-off-by: Gerd Hoffmann --- include/ui/gtk.h | 4 +

[Qemu-devel] [PULL 09/11] ui: drop unused MOUSE_EVENT_WHEEL{UP, DN} defines

2017-01-04 Thread Gerd Hoffmann
Also update comment to make clear this is for legacy mouse emulation only. Signed-off-by: Gerd Hoffmann Message-id: 1480409632-6163-1-git-send-email-kra...@redhat.com --- include/ui/console.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/ui/console.h b/include/u

[Qemu-devel] [PULL 00/11] ui patch queue

2017-01-04 Thread Gerd Hoffmann
r-2.9-pull-request' into staging (2016-12-28 17:11:11 +) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-ui-20170104-1 for you to fetch changes up to df07469e471a8a02b5b1dd23d73600bf32037ce3: curses: Fix compiler warnings (Mingw-w64 redefinition of macro

[Qemu-devel] [PULL 04/11] console: add API to get underlying gui window ID

2017-01-04 Thread Gerd Hoffmann
From: Samuel Thibault This adds two console functions, qemu_console_set_window_id and qemu_graphic_console_get_window_id, to let graphical backend record the window id in the QemuConsole structure, and let the baum driver read it. Signed-off-by: Samuel Thibault Message-id: 20161221003806.22412-

[Qemu-devel] [PULL 07/11] egl-helpers: Change file licensing to LGPLv2

2017-01-04 Thread Gerd Hoffmann
From: Frediano Ziglio The relicense permits sharing the code with Spice which is LGPL. All people listed below have agreed to the relicense: - Arei Gonglei; - Cole Robinson; - Gerd Hoffmann; - Peter Maydell. Signed-off-by: Frediano Ziglio Acked-by: Cole Robinson Acked-by: Gonglei Acked-by: P

[Qemu-devel] [PULL 03/11] ps2: Fix lost scancodes by recent changes

2017-01-04 Thread Gerd Hoffmann
From: OGAWA Hirofumi With "ps2: use QEMU qcodes instead of scancodes", key handling was changed to qcode base. But all scancodes are not converted to new one. This adds some missing qcodes what I found in using. Signed-off-by: OGAWA Hirofumi Reviewed-by: Hervé Poussineau Message-id: 87inqavlz

[Qemu-devel] [PULL 11/11] curses: Fix compiler warnings (Mingw-w64 redefinition of macro KEY_EVENT)

2017-01-04 Thread Gerd Hoffmann
From: Stefan Weil For builds with Mingw-w64 as it is included in Cygwin, there are two header files which define KEY_EVENT with different values. This results in lots of compiler warnings like this one: CC vl.o In file included from /qemu/include/ui/console.h:340:0, from

[Qemu-devel] [PULL 06/11] sdl2: set window ID

2017-01-04 Thread Gerd Hoffmann
From: Samuel Thibault This uses the console API to record the window ID of the SDL2 windows. Signed-off-by: Samuel Thibault Message-id: 20161221003806.22412-4-samuel.thiba...@ens-lyon.org Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/ui/

Re: [Qemu-devel] [PATCH v2 4/4] migration: Fail migration blocker for --only-migratble

2017-01-04 Thread Ashijeet Acharya
On Fri, Dec 16, 2016 at 5:03 PM, Peter Maydell wrote: > On 16 December 2016 at 09:53, Ashijeet Acharya > wrote: >> migrate_add_blocker should rightly fail if the '--only-migratable' >> option was specified and the device in use should not be able to >> perform the action which results in an unmig

[Qemu-devel] [PULL 10/11] ui/vnc: Fix problem with sending too many bytes as server name

2017-01-04 Thread Gerd Hoffmann
From: Thomas Huth If the buffer is not big enough, snprintf() does not return the number of bytes that have been written to the buffer, but the number of bytes that would be needed for writing the whole string. By using this value for the following vnc_write() calls, we send some junk at the end

[Qemu-devel] [PULL 05/11] console: move window ID code from baum to sdl

2017-01-04 Thread Gerd Hoffmann
From: Samuel Thibault This moves the SDL bits for window ID from the baum driver to SDL, as well as fixing the build for non-X11. Signed-off-by: Samuel Thibault Message-id: 20161221003806.22412-3-samuel.thiba...@ens-lyon.org Signed-off-by: Gerd Hoffmann --- backends/baum.c | 31 --

Re: [Qemu-devel] [PATCH for-2.9 v3 0/5] Sheepdog cleanups

2017-01-04 Thread Paolo Bonzini
On 04/01/2017 05:07, Jeff Cody wrote: > On Wed, Dec 21, 2016 at 03:07:07PM +0100, Paolo Bonzini wrote: >> >> >> On 29/11/2016 12:32, Paolo Bonzini wrote: >>> Cleaning up the code and removing duplication makes it simpler to >>> later adapt it for the multiqueue work. >>> >>> Tested against sheepd

Re: [Qemu-devel] [PATCH] serial: fix memory leak in serial exit

2017-01-04 Thread Paolo Bonzini
On 04/01/2017 09:43, Li Qiang wrote: > From: Li Qiang > > The serial_exit_core function doesn't free some resources. > This can lead memory leak when hotplug and unplug. This > patch avoid this. > > Signed-off-by: Li Qiang > --- > hw/char/serial.c | 10 ++ > 1 file changed, 10 insert

Re: [Qemu-devel] [PATCH 2/4] kvm: Allow invtsc migration if tsc-khz is set explicitly

2017-01-04 Thread Marcelo Tosatti
On Tue, Dec 27, 2016 at 05:21:18PM -0200, Eduardo Habkost wrote: > We can safely allow a VM to be migrated with invtsc enabled if > tsc-khz is set explicitly, because QEMU already refuses to start > if it can't set the TSC frequency to the configured value. On the source host, yes, but on the dest

Re: [Qemu-devel] [PATCH 4/4] kvm: Allow migration with invtsc

2017-01-04 Thread Marcelo Tosatti
On Tue, Dec 27, 2016 at 05:21:20PM -0200, Eduardo Habkost wrote: > Instead of blocking migration on the source when invtsc is > enabled, rely on the migration destination to ensure there's no > TSC frequency mismatch. > > We can't allow migration unconditionally because we don't know if > the dest

Re: [Qemu-devel] [PATCH 2/4] kvm: Allow invtsc migration if tsc-khz is set explicitly

2017-01-04 Thread Marcelo Tosatti
On Wed, Jan 04, 2017 at 09:44:06AM -0200, Marcelo Tosatti wrote: > On Tue, Dec 27, 2016 at 05:21:18PM -0200, Eduardo Habkost wrote: > > We can safely allow a VM to be migrated with invtsc enabled if > > tsc-khz is set explicitly, because QEMU already refuses to start > > if it can't set the TSC fre

Re: [Qemu-devel] [PATCH v2] qemu-thread: fix qemu_thread_set_name() race in qemu_thread_create()

2017-01-04 Thread Paolo Bonzini
On 04/01/2017 02:32, zhanghailiang wrote: > From: Caoxinhua > > QEMU will crash with the follow backtrace if the new created thread exited > before > we call qemu_thread_set_name() for it. > > (gdb) bt > #0 0x7f9a68b095d7 in __GI_raise (sig=sig@entry=6) at > ../nptl/sysdeps/unix/sysv/l

Re: [Qemu-devel] [PATCH v2] qemu-thread: fix qemu_thread_set_name() race in qemu_thread_create()

2017-01-04 Thread Paolo Bonzini
On 04/01/2017 11:32, Daniel P. Berrange wrote: > On Wed, Jan 04, 2017 at 09:32:01AM +0800, zhanghailiang wrote: >> From: Caoxinhua >> >> QEMU will crash with the follow backtrace if the new created thread exited >> before >> we call qemu_thread_set_name() for it. >> >> (gdb) bt >> #0 0x

[Qemu-devel] [PATCH v3 0/4] Introduce a new --only-migratable option

2017-01-04 Thread Ashijeet Acharya
Previously posted series patches: http://lists.nongnu.org/archive/html/qemu-devel/2016-12/msg02391.html http://lists.nongnu.org/archive/html/qemu-devel/2016-12/msg02062.html This series adds a new command line option "--only-migratable" which will only allow addition of those devices to a QEMU ins

[Qemu-devel] [PATCH v3 2/4] migration: Allow "device add" options to only add migratable devices

2017-01-04 Thread Ashijeet Acharya
Introduce checks for the unmigratable flag in the VMStateDescription structs of respective devices when user attempts to add them. If the "--only-migratable" was specified, all unmigratable devices will rightly fail to add. This feature is made compatible for both "-device" and "-usbdevice" command

[Qemu-devel] [PATCH v3 1/4] migration: Add a new option to enable only-migratable

2017-01-04 Thread Ashijeet Acharya
Add a new option "--only-migratable" in qemu which will allow to add only those devices which will not fail qemu after migration. Devices set with the flag 'unmigratable' cannot be added when this option will be used. Signed-off-by: Ashijeet Acharya --- include/migration/migration.h | 3 +++ qem

[Qemu-devel] [PATCH v3 3/4] migration: disallow migrate_add_blocker during migration

2017-01-04 Thread Ashijeet Acharya
If a migration is already in progress and somebody attempts to add a migration blocker, this should rightly fail. Add an errp parameter and a retcode return value to migrate_add_blocker. Signed-off-by: John Snow Signed-off-by: Ashijeet Acharya --- block/qcow.c | 6 +- blo

[Qemu-devel] [PATCH v3 4/4] migration: Fail migration blocker for --only-migratble

2017-01-04 Thread Ashijeet Acharya
migrate_add_blocker should rightly fail if the '--only-migratable' option was specified and the device in use should not be able to perform the action which results in an unmigratable VM. Make migrate_add_blocker return -EACCES in this case. Signed-off-by: Ashijeet Acharya --- block/qcow.c

Re: [Qemu-devel] [PATCH v3 0/4] Introduce a new --only-migratable option

2017-01-04 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v3 0/4] Introduce a new --only-migratable option Type: series Message-id: 1483533149-12807-1-git-send-email-ashijeetacha...@gmail.com === TEST SCRIPT BEGIN === #!/bin/bas

[Qemu-devel] [PATCH] hxtool: emit Texinfo headings as @subsection

2017-01-04 Thread Paolo Bonzini
Remove the colon, and add it in qemu-options-wrapper.h instead. The introduction of @subsection also found a case where the table was not closed and reopened around a heading, so fix it. Signed-off-by: Paolo Bonzini --- qemu-options-wrapper.h | 2 +- qemu-options.hx| 31

Re: [Qemu-devel] vhost-user breaks after 96a3d98.

2017-01-04 Thread Flavio Leitner
On Wed, 4 Jan 2017 15:52:55 +0800 Jason Wang wrote: > On 2017年01月04日 11:26, Jason Wang wrote: > > > > > > On 2017年01月04日 00:27, Michael S. Tsirkin wrote: > >> On Tue, Jan 03, 2017 at 06:28:18PM +0800, Jason Wang wrote: > >>> > >>> On 2017年01月03日 11:09, Jason Wang wrote: > > On 201

Re: [Qemu-devel] vhost-user breaks after 96a3d98.

2017-01-04 Thread Michael S. Tsirkin
On Wed, Jan 04, 2017 at 11:00:55AM -0200, Flavio Leitner wrote: > On Wed, 4 Jan 2017 15:52:55 +0800 > Jason Wang wrote: > > > On 2017年01月04日 11:26, Jason Wang wrote: > > > > > > > > > On 2017年01月04日 00:27, Michael S. Tsirkin wrote: > > >> On Tue, Jan 03, 2017 at 06:28:18PM +0800, Jason Wang wro

Re: [Qemu-devel] [PATCH] serial: fix memory leak in serial exit

2017-01-04 Thread Michael S. Tsirkin
On Wed, Jan 04, 2017 at 12:43:35PM +0100, Paolo Bonzini wrote: > > > On 04/01/2017 09:43, Li Qiang wrote: > > From: Li Qiang > > > > The serial_exit_core function doesn't free some resources. > > This can lead memory leak when hotplug and unplug. This > > patch avoid this. > > > > Signed-off-b

[Qemu-devel] [PATCH v3 00/10] aio_context_acquire/release pushdown, part 1

2017-01-04 Thread Paolo Bonzini
This is the first step of pushing down the AioContext lock. Bottom halves are already protected by their own lock, use it also for walking_bh and for the handlers list (including walking_handlers). The (lock, walking_foo) pair is wrapped into the QemuLockCnt primitive. Paolo v2->v3: fix

[Qemu-devel] [PATCH 01/10] aio: rename bh_lock to list_lock

2017-01-04 Thread Paolo Bonzini
This will be used for AioHandlers too. There is going to be little or no contention, so it is better to reuse the same lock. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- async.c | 20 ++-- include/block/aio.h | 2 +- 2 files changed, 11 insertions(

[Qemu-devel] [PATCH 03/10] aio: make ctx->list_lock a QemuLockCnt, subsuming ctx->walking_bh

2017-01-04 Thread Paolo Bonzini
This will make it possible to walk the list of bottom halves without holding the AioContext lock---and in turn to call bottom half handlers without holding the lock. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- async.c | 35 --- inclu

[Qemu-devel] [PATCH 04/10] qemu-thread: optimize QemuLockCnt with futexes on Linux

2017-01-04 Thread Paolo Bonzini
This is complex, but I think it is reasonably documented in the source. Signed-off-by: Paolo Bonzini --- docs/lockcnt.txt | 9 +- include/qemu/futex.h | 36 ++ include/qemu/thread.h| 2 + util/lockcnt.c | 282 +++ uti

[Qemu-devel] [PATCH 08/10] aio-win32: remove walking_handlers, protecting AioHandler list with list_lock

2017-01-04 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- aio-win32.c | 73 +++-- 1 file changed, 47 insertions(+), 26 deletions(-) diff --git a/aio-win32.c b/aio-win32.c index 1ad459d..900524c 100644 --- a/aio-win32.c +++ b/aio-win32.

[Qemu-devel] [PATCH 07/10] aio-posix: remove walking_handlers, protecting AioHandler list with list_lock

2017-01-04 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- aio-posix.c | 65 - 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index f83b7af..9453d83 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -16,7 +16,7 @@ #include

[Qemu-devel] [PATCH 02/10] qemu-thread: introduce QemuLockCnt

2017-01-04 Thread Paolo Bonzini
A QemuLockCnt comprises a counter and a mutex, with primitives to increment and decrement the counter, and to take and release the mutex. It can be used to do lock-free visits to a data structure whenever mutexes would be too heavy-weight and the critical section is too long for RCU. This could b

[Qemu-devel] [PATCH 06/10] aio: tweak walking in dispatch phase

2017-01-04 Thread Paolo Bonzini
Preparing for the following patch, use QLIST_FOREACH_SAFE and modify the placement of walking_handlers increment/decrement. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- aio-posix.c | 26 -- aio-win32.c | 26 -- 2 files changed, 24

[Qemu-devel] [PATCH 05/10] aio-posix: split aio_dispatch_handlers out of aio_dispatch

2017-01-04 Thread Paolo Bonzini
This simplifies the handling of dispatch_fds. Signed-off-by: Paolo Bonzini --- aio-posix.c | 43 +-- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index 1585571..25198d9 100644 --- a/aio-posix.c +++ b/aio-posix.c

[Qemu-devel] [PATCH 09/10] aio: document locking

2017-01-04 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- docs/multiple-iothreads.txt | 13 + include/block/aio.h | 32 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/docs/multiple-iothreads.txt b/docs/multiple-iothreads.

[Qemu-devel] [PULL 08/14] virtio-blk: suppress virtqueue kick during processing

2017-01-04 Thread Stefan Hajnoczi
The guest does not need to kick the virtqueue while we are processing it. This reduces the number of vmexits during periods of heavy I/O. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20161201192652.9509-8-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- hw/block

[Qemu-devel] [PULL 04/14] aio: add polling mode to AioContext

2017-01-04 Thread Stefan Hajnoczi
The AioContext event loop uses ppoll(2) or epoll_wait(2) to monitor file descriptors or until a timer expires. In cases like virtqueues, Linux AIO, and ThreadPool it is technically possible to wait for events via polling (i.e. continuously checking for events without blocking). Polling can be fas

[Qemu-devel] [PATCH 10/10] async: optimize aio_bh_poll

2017-01-04 Thread Paolo Bonzini
Avoid entering the slow path of qemu_lockcnt_dec_and_lock if no bottom half has to be deleted. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- async.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/async.c b/async.c index 2305e11..0d218ab 100644 ---

[Qemu-devel] [PULL 07/14] iothread: add polling parameters

2017-01-04 Thread Stefan Hajnoczi
Poll mode can be configured with -object iothread,poll-max-ns=NUM. Polling is disabled with a value of 0 nanoseconds. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20161201192652.9509-7-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- include/sysemu/iothread.h |

[Qemu-devel] [PULL 02/14] aio: add flag to skip fds to aio_dispatch()

2017-01-04 Thread Stefan Hajnoczi
Polling mode will not call ppoll(2)/epoll_wait(2). Therefore we know there are no fds ready and should avoid looping over fd handlers in aio_dispatch(). Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20161201192652.9509-2-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PULL 05/14] virtio: poll virtqueues for new buffers

2017-01-04 Thread Stefan Hajnoczi
Add an AioContext poll handler to detect new virtqueue buffers without waiting for a guest->host notification. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20161201192652.9509-5-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 16

[Qemu-devel] [PULL 14/14] iothread: add poll-grow and poll-shrink parameters

2017-01-04 Thread Stefan Hajnoczi
These parameters control the poll time self-tuning algorithm. They are optional and will default to sane values if omitted. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20161201192652.9509-14-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- include/sysemu/iothre

[Qemu-devel] [PULL 00/14] Block patches

2017-01-04 Thread Stefan Hajnoczi
The following changes since commit dbe2b65566e76d3c3a0c3358285c0336ac61e757: Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.9-pull-request' into staging (2016-12-28 17:11:11 +) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-reque

[Qemu-devel] [PULL 09/14] virtio-scsi: suppress virtqueue kick during processing

2017-01-04 Thread Stefan Hajnoczi
The guest does not need to kick the virtqueue while we are processing it. This reduces the number of vmexits during periods of heavy I/O. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20161201192652.9509-9-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- hw/scsi/

[Qemu-devel] [PULL 01/14] HACKING: document #include order

2017-01-04 Thread Stefan Hajnoczi
It was not obvious to me why "qemu/osdep.h" must be the first #include. This documents the rationale and the overall #include order. Cc: Fam Zheng Cc: Markus Armbruster Cc: Eric Blake Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Message-id: 1479307161

[Qemu-devel] [PULL 10/14] virtio: turn vq->notification into a nested counter

2017-01-04 Thread Stefan Hajnoczi
Polling should disable virtqueue notifications but that requires nested virtio_queue_set_notification() calls. Turn vq->notification into a counter so it is possible to do nesting. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20161201192652.9509-10-stefa...@redhat.com S

Re: [Qemu-devel] [PATCH 2/4] kvm: Allow invtsc migration if tsc-khz is set explicitly

2017-01-04 Thread Marcelo Tosatti
On Wed, Jan 04, 2017 at 11:40:17AM -0200, Eduardo Habkost wrote: > On Wed, Jan 04, 2017 at 09:44:06AM -0200, Marcelo Tosatti wrote: > > On Tue, Dec 27, 2016 at 05:21:18PM -0200, Eduardo Habkost wrote: > > > We can safely allow a VM to be migrated with invtsc enabled if > > > tsc-khz is set explicit

[Qemu-devel] [PULL 11/14] aio: add .io_poll_begin/end() callbacks

2017-01-04 Thread Stefan Hajnoczi
The begin and end callbacks can be used to prepare for the polling loop and clean up when polling stops. Note that they may only be called once for multiple aio_poll() calls if polling continues to succeed. Once polling fails the end callback is invoked before aio_poll() resumes file descriptor m

[Qemu-devel] [PULL 03/14] aio: add AioPollFn and io_poll() interface

2017-01-04 Thread Stefan Hajnoczi
The new AioPollFn io_poll() argument to aio_set_fd_handler() and aio_set_event_handler() is used in the next patch. Keep this code change separate due to the number of files it touches. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20161201192652.9509-3-stefa...@redhat.c

[Qemu-devel] [PULL 13/14] aio: self-tune polling time

2017-01-04 Thread Stefan Hajnoczi
This patch is based on the algorithm for the kvm.ko halt_poll_ns parameter in Linux. The initial polling time is zero. If the event loop is woken up within the maximum polling time it means polling could be effective, so grow polling time. If the event loop is woken up beyond the maximum polling

[Qemu-devel] [PULL 06/14] linux-aio: poll ring for completions

2017-01-04 Thread Stefan Hajnoczi
The Linux AIO userspace ABI includes a ring that is shared with the kernel. This allows userspace programs to process completions without system calls. Add an AioContext poll handler to check for completions in the ring. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 201

[Qemu-devel] [PULL 12/14] virtio: disable virtqueue notifications during polling

2017-01-04 Thread Stefan Hajnoczi
This is a performance optimization to eliminate vmexits during polling. It also avoids spurious ioeventfd processing after polling ends. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20161201192652.9509-12-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- hw/virtio

Re: [Qemu-devel] [PATCH 4/4] kvm: Allow migration with invtsc

2017-01-04 Thread Eduardo Habkost
On Wed, Jan 04, 2017 at 09:56:56AM -0200, Marcelo Tosatti wrote: > On Tue, Dec 27, 2016 at 05:21:20PM -0200, Eduardo Habkost wrote: > > Instead of blocking migration on the source when invtsc is > > enabled, rely on the migration destination to ensure there's no > > TSC frequency mismatch. > > > >

Re: [Qemu-devel] [PATCH 0/4] QOM'ify work for ppc

2017-01-04 Thread 赵小强
Hmm,sounds reasonable. I will take a look. PS: guys, some other comments about this? Best wishes ! >> 在 2017年1月4日,11:28,David Gibson 写道: >> >> On Tue, Jan 03, 2017 at 10:02:21PM +0800, 赵小强 wrote: >> Hi,david: >> >> To my understanding,what must be put in the realize function is >> code whi

Re: [Qemu-devel] [PATCH 2/4] kvm: Allow invtsc migration if tsc-khz is set explicitly

2017-01-04 Thread Eduardo Habkost
On Wed, Jan 04, 2017 at 09:44:06AM -0200, Marcelo Tosatti wrote: > On Tue, Dec 27, 2016 at 05:21:18PM -0200, Eduardo Habkost wrote: > > We can safely allow a VM to be migrated with invtsc enabled if > > tsc-khz is set explicitly, because QEMU already refuses to start > > if it can't set the TSC fre

Re: [Qemu-devel] [PATCH 2/4] kvm: Allow invtsc migration if tsc-khz is set explicitly

2017-01-04 Thread Eduardo Habkost
On Wed, Jan 04, 2017 at 11:45:36AM -0200, Marcelo Tosatti wrote: > On Wed, Jan 04, 2017 at 11:40:17AM -0200, Eduardo Habkost wrote: > > On Wed, Jan 04, 2017 at 09:44:06AM -0200, Marcelo Tosatti wrote: > > > On Tue, Dec 27, 2016 at 05:21:18PM -0200, Eduardo Habkost wrote: > > > > We can safely allow

Re: [Qemu-devel] [PATCH 3/4] pc: Add 2.9 machine-types

2017-01-04 Thread Laszlo Ersek
On 12/27/16 20:21, Eduardo Habkost wrote: > Cc: "Michael S. Tsirkin" > Cc: Laszlo Ersek > Cc: Igor Mammedov > Signed-off-by: Eduardo Habkost > --- > include/hw/i386/pc.h | 1 + > hw/i386/pc_piix.c| 15 --- > hw/i386/pc_q35.c | 13 +++-- > 3 files changed, 24 insert

Re: [Qemu-devel] [PATCH 3/4] pc: Add 2.9 machine-types

2017-01-04 Thread Eduardo Habkost
On Wed, Jan 04, 2017 at 03:01:07PM +0100, Laszlo Ersek wrote: > On 12/27/16 20:21, Eduardo Habkost wrote: > > Cc: "Michael S. Tsirkin" > > Cc: Laszlo Ersek > > Cc: Igor Mammedov > > Signed-off-by: Eduardo Habkost > > --- > > include/hw/i386/pc.h | 1 + > > hw/i386/pc_piix.c| 15 ++

[Qemu-devel] [Bug 1455912] Re: vnc websocket option not properly parsed when running on commandline

2017-01-04 Thread Daniel Berrange
This is an accidental regression caused by commit 4db14629c38611061fc19ec6927405923de84f08 Author: Gerd Hoffmann Date: Tue Sep 16 12:33:03 2014 +0200 vnc: switch to QemuOpts, allow multiple servers ** Changed in: qemu Assignee: (unassigned) => Daniel Berran

Re: [Qemu-devel] [RFC]virtio-blk: add disk-name device property

2017-01-04 Thread Stefan Hajnoczi
On Tue, Jan 03, 2017 at 10:53:06AM -0600, Eric Blake wrote: > On 12/29/2016 08:41 PM, Junkang Fu wrote: > >>From 74e913fc41ea98d1dde692175f1e3fb6729342aa Mon Sep 17 00:00:00 2001 > > From: "junkang.fjk" > > Date: Wed, 24 Aug 2016 19:36:53 +0800 > > Subject: [PATCH] virtio-blk: add disk-name device

  1   2   3   >