Re: [Qemu-devel] [PATCH] fix: avoid infinite loop when blockjob encountering failure

2017-06-14 Thread sochin.jiang
All right, Thanks... On 2017/6/14 14:46, Fam Zheng wrote: > On Tue, 06/13 23:33, no-re...@patchew.org wrote: >> In file included from /tmp/qemu-test/src/hw/net/vmxnet3.c:30: >> /tmp/qemu-test/src/include/migration/register.h:18: error: redefinition of >> typedef ‘LoadStateHandler’ >> /tmp/qemu-

Re: [Qemu-devel] [PATCH v1 3/3] s390x/cpumodel: allow to enable MVCOS for qemu cpu model

2017-06-14 Thread David Hildenbrand
On 14.06.2017 06:44, Richard Henderson wrote: > On 06/13/2017 02:47 PM, David Hildenbrand wrote: >> +if (!s390_has_feat(S390_FEAT_MOVE_WITH_OPTIONAL_SPEC)) { >> +program_interrupt(env, PGM_OPERATION, 6); >> +} > > This is (supposed to be) done via the feature field of insn-data.def

Re: [Qemu-devel] [PATCH v1 1/3] target/s390x: change PSW_SHIFT_KEY

2017-06-14 Thread Thomas Huth
On 13.06.2017 23:47, David Hildenbrand wrote: > Such shifts are usually used to easily extract the PSW KEY from the PSW > mask, so let's avoid the confisuing offset of 4. s/confisuing/confusing/ > Signed-off-by: David Hildenbrand > --- > target/s390x/cpu.h | 2 +- > target/s390x/translate

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

2017-06-14 Thread Fam Zheng
On Tue, 06/13 23:51, no-re...@patchew.org wrote: > In file included from /tmp/qemu-test/src/hw/net/vmxnet3.c:30: > /tmp/qemu-test/src/include/migration/register.h:18: error: redefinition of > typedef ‘LoadStateHandler’ > /tmp/qemu-test/src/include/migration/vmstate.h:32: note: previous declaration

Re: [Qemu-devel] [PATCH v2] migration: Remove unneeded includes

2017-06-14 Thread Juan Quintela
Peter Xu wrote: > On Tue, Jun 13, 2017 at 11:52:51AM +0200, Juan Quintela wrote: >> Signed-off-by: Juan Quintela >> --- >> include/migration/colo.h | 3 --- >> include/migration/misc.h | 2 ++ >> migration/block.c | 6 -- >> migration/colo-failover.c | 2 ++ >> migration/colo.c

Re: [Qemu-devel] [PATCH] target/ppc: Fix return value in tcg radix mmu fault handler

2017-06-14 Thread Fam Zheng
On Tue, 06/13 23:58, no-re...@patchew.org wrote: > In file included from /tmp/qemu-test/src/hw/net/vmxnet3.c:30: > /tmp/qemu-test/src/include/migration/register.h:18: error: redefinition of > typedef ‘LoadStateHandler’ > /tmp/qemu-test/src/include/migration/vmstate.h:32: note: previous declaration

Re: [Qemu-devel] [PATCH v1 2/3] target/s390x: implement mvcos instruction

2017-06-14 Thread David Hildenbrand
On 14.06.2017 06:41, Richard Henderson wrote: > On 06/13/2017 02:47 PM, David Hildenbrand wrote: >> +static inline bool psw_key_valid(CPUS390XState *env, uint8_t psw_key) >> +{ >> +uint16_t pkm = ((env->cregs[3] & CR3_PKM) >> 16); >> + >> +if (env->psw.mask & PSW_MASK_PSTATE) { >> +

Re: [Qemu-devel] [PATCH 1/2] migration: Test for disabled features on reception

2017-06-14 Thread Peter Xu
On Tue, Jun 13, 2017 at 11:54:31AM +0200, Juan Quintela wrote: > Right now, if we receive a compressed page while this features are > disabled, Bad Things (TM) can happen. Just add a test for them. > > Signed-off-by: Juan Quintela > Reviewed-by: Dr. David Alan Gilbert > > -- > > I had XBZRLE

Re: [Qemu-devel] [PATCH 2/2] migration: Don't create decompression threads if not enabled

2017-06-14 Thread Peter Xu
On Tue, Jun 13, 2017 at 11:54:32AM +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela > Reviewed-by: Dr. David Alan Gilbert > > -- > > I removed the [HACK] part because previous patch just check that > compression pages are not received. > --- > migration/ram.c | 6 ++ > 1 file cha

Re: [Qemu-devel] [PATCH v1 2/3] target/s390x: implement mvcos instruction

2017-06-14 Thread Thomas Huth
On 13.06.2017 23:47, David Hildenbrand wrote: > This adds support for the MOVE WITH OPTIONAL SPECIFICATIONS (MVCOS) > instruction (in a relatively slow way). But it is enough to boot > a linux kernel that uses it for uacccess (primary <-> seconardy). > > We are missing (as for most other part) low

Re: [Qemu-devel] [PATCH v1 3/3] s390x/cpumodel: allow to enable MVCOS for qemu cpu model

2017-06-14 Thread Thomas Huth
On 14.06.2017 09:03, David Hildenbrand wrote: > On 14.06.2017 06:44, Richard Henderson wrote: >> On 06/13/2017 02:47 PM, David Hildenbrand wrote: >>> +if (!s390_has_feat(S390_FEAT_MOVE_WITH_OPTIONAL_SPEC)) { >>> +program_interrupt(env, PGM_OPERATION, 6); >>> +} >> >> This is (suppos

Re: [Qemu-devel] [PATCH 2/2] migration: Don't create decompression threads if not enabled

2017-06-14 Thread Juan Quintela
Peter Xu wrote: > On Tue, Jun 13, 2017 at 11:54:32AM +0200, Juan Quintela wrote: >> Signed-off-by: Juan Quintela >> Reviewed-by: Dr. David Alan Gilbert >> >> -- >> >> I removed the [HACK] part because previous patch just check that >> compression pages are not received. >> --- >> migration/ra

Re: [Qemu-devel] [PATCH 2/2] migration: Don't create decompression threads if not enabled

2017-06-14 Thread Peter Xu
On Wed, Jun 14, 2017 at 09:46:50AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Tue, Jun 13, 2017 at 11:54:32AM +0200, Juan Quintela wrote: > >> Signed-off-by: Juan Quintela > >> Reviewed-by: Dr. David Alan Gilbert > >> > >> -- > >> > >> I removed the [HACK] part because previous patch

[Qemu-devel] [PULL 1/2] xhci: only update dequeue ptr on completed transfers

2017-06-14 Thread Gerd Hoffmann
The dequeue pointer should only be updated in case the transfer is actually completed. If we update it for inflight transfers we will not pick them up again after migration, which easily triggers with HID devices as they typically have a pending transfer, waiting for user input to happen. Fixes:

[Qemu-devel] [PULL 0/2] usb: bugfixes for ehci and xhci

2017-06-14 Thread Gerd Hoffmann
repository at: git://git.kraxel.org/qemu tags/pull-usb-20170614-1 for you to fetch changes up to ad3c5412f2704672bb212bb82035c9b1a72db782: ehci: stop recursive calls to ehci_work_bh (2017-06-13 12:17:33 +0200) usb: bugfixes fo

[Qemu-devel] [PULL 2/2] ehci: stop recursive calls to ehci_work_bh

2017-06-14 Thread Gerd Hoffmann
Can happen with usb-storage devices: ehci_work_bh calls usb-storage, usb-storage calls into block layer, block layer may run BHs. Add a simple bool and just do nothing in case we figure ehci_work_bh is active. Signed-off-by: Gerd Hoffmann Message-id: 20170612073109.25930-1-kra...@redhat.com ---

[Qemu-devel] [PATCH] migration: fix incorrect enable return path

2017-06-14 Thread Peter Xu
0425dc9 is actually v1 of that patch, but it was accidentally merged (while there was a v2). That will cause problem when we try to migrate to some old QEMUs when return path is not really there. Let's fix it, then squashing this patch with 0425dc9 will be exactly patch content of v2. Fixes: 0425d

[Qemu-devel] [PULL 1/5] Improve Cocoa modifier key handling

2017-06-14 Thread Gerd Hoffmann
From: Ian McKellar via Qemu-devel I had two problems with QEMU on macOS: 1) Sometimes when alt-tabbing to QEMU it would act as if the 'a' key was pressed so I'd get 'a'. 2) Using Sikuli to programatically send keys to the QEMU window text like "foo_bar" would come out as "fo

[Qemu-devel] [PULL 2/5] spice: Use proper enum type for kbd led state

2017-06-14 Thread Gerd Hoffmann
From: Jonathon Jongsma Although the Qemu and spice flags currently have the same value, it seems more correct to pass the spice flag values to spice_server_kbd_leds(), especially considering that this function already makes an effort to convert between the QEMU_*_LED and SPICE_KEYBOARD_MODIFIER_*

Re: [Qemu-devel] [PATCH v1 2/3] target/s390x: implement mvcos instruction

2017-06-14 Thread David Hildenbrand
>> -static inline int cpu_mmu_index (CPUS390XState *env, bool ifetch) >> +static inline bool psw_key_valid(CPUS390XState *env, uint8_t psw_key) >> +{ >> +uint16_t pkm = ((env->cregs[3] & CR3_PKM) >> 16); > > Since you're storing the value in an uint16_t anyway, I think you could > also do thi

[Qemu-devel] [PULL 3/5] gtk: prefer gtk3 over gtk2

2017-06-14 Thread Gerd Hoffmann
In case the configure script finds both gtk2 and gtk3 installed it still prefers gtk2 over gtk3. Prefer gtk3 instead. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 20170606105339.3613-2-kra...@redhat.com --- configure | 14 +++--- 1 file changed, 7 insertions(

[Qemu-devel] [PULL v2 0/5] ui patch queue

2017-06-14 Thread Gerd Hoffmann
branch 'remotes/pmaydell/tags/pull-target-arm-20170613' into staging (2017-06-13 15:49:07 +0100) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-ui-20170614-1 for you to fetch changes up to fe5c44f9c95be3f74fb58902077ac587998d1392: spice: don't en

[Qemu-devel] [PULL 5/5] spice: don't enter opengl mode in case another UI provides opengl support

2017-06-14 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Message-id: 20170606110618.10393-1-kra...@redhat.com --- include/ui/spice-display.h | 2 ++ ui/spice-core.c| 1 + ui/spice-display.c | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/ui/spice-display.h b/include/ui/spic

[Qemu-devel] [PULL 4/5] sdl: prefer sdl2 over sdl1

2017-06-14 Thread Gerd Hoffmann
In case the configure script finds both SDL 1.2 and SDL 2.x installed it still prefers SDL 1.2. Prefer SDL 2.x instead. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 20170606105339.3613-3-kra...@redhat.com --- configure | 10 +- 1 file changed, 5 insertions(+)

Re: [Qemu-devel] [PATCH V6 02/10] net/filter-mirror.c: Make filter mirror support vnet support.

2017-06-14 Thread Zhang Chen
On 06/13/2017 05:14 PM, Jason Wang wrote: On 2017年06月12日 17:27, Zhang Chen wrote: +if (nf->direction == NET_FILTER_DIRECTION_RX || +nf->direction == NET_FILTER_DIRECTION_ALL) { +vnet_hdr_len = nf->netdev->vnet_hdr_len; This can only work if e.g virtio-net

Re: [Qemu-devel] [PULL 22/33] sockets: improve error reporting if UNIX socket path is too long

2017-06-14 Thread Daniel P. Berrange
On Tue, Jun 13, 2017 at 05:10:00PM +0100, Peter Maydell wrote: > On 1 June 2017 at 13:41, Paolo Bonzini wrote: > > From: "Daniel P. Berrange" > > > > The 'struct sockaddr_un' only allows 108 bytes for the socket > > path. > > > > If the user supplies a path, QEMU uses snprintf() to silently > > t

Re: [Qemu-devel] [PATCH v1 2/2] migration: add bitmap for copied page

2017-06-14 Thread Alexey Perevalov
On 06/14/2017 09:53 AM, Peter Xu wrote: On Wed, Jun 14, 2017 at 09:39:53AM +0300, Alexey Perevalov wrote: On 06/14/2017 08:12 AM, Peter Xu wrote: On Tue, Jun 13, 2017 at 12:36:33PM +0300, Alexey Perevalov wrote: This patch adds ability to track down already copied pages, it's necessary for cal

Re: [Qemu-devel] [PATCH 2/2] socket: Handle race condition between binds to the same port

2017-06-14 Thread Daniel P. Berrange
On Fri, Jun 09, 2017 at 09:19:49PM +0200, Knut Omang wrote: > If an offset of ports is specified to the inet_listen_saddr function(), > and two or more processes tries to bind from these ports at the same time, > occasionally more than one process may be able to bind to the same > port. The conditi

Re: [Qemu-devel] [PATCH] virtio-blk: drain block before cleanup

2017-06-14 Thread Gi-Oh Kim
Yes, right. I forgot to comment that the problem didn't happen for QEMU 2.8~2.9. On Tue, Jun 13, 2017 at 8:04 PM, Paolo Bonzini wrote: > > > On 13/06/2017 11:30, Gioh Kim wrote: >> Hi, >> >> I'd like to report one use-after-free problem which is found by >> AddressSanitizer. >> My company provi

Re: [Qemu-devel] [PULL v1 0/5] Merge sockets 2017/06/07

2017-06-14 Thread Daniel P. Berrange
On Mon, Jun 12, 2017 at 02:14:19PM +0100, Peter Maydell wrote: > On 7 June 2017 at 18:54, Daniel P. Berrange wrote: > > The following changes since commit 0db1851becbefe3e50cfc03776fb1f75817376af: > > > > Merge remote-tracking branch > > 'remotes/vivier/tags/m68k-for-2.10-pull-request' into sta

Re: [Qemu-devel] [PATCH] target/ppc: Fix return value in tcg radix mmu fault handler

2017-06-14 Thread David Gibson
On Wed, Jun 14, 2017 at 04:44:52PM +1000, Suraj Jitindar Singh wrote: > The mmu fault handler should return 0 if it was able to successfully > handle the fault and a positive value otherwise. > > Currently the tcg radix mmu fault handler will return 1 after > successfully handling a fault in virtu

Re: [Qemu-devel] [PATCHv5 4/4] ppc: Rework CPU compatibility testing across migration

2017-06-14 Thread Greg Kurz
On Fri, 2 Jun 2017 13:15:07 +1000 David Gibson wrote: > Migrating between different CPU versions is a bit complicated for ppc. > A long time ago, we ensured identical CPU versions at either end by > checking the PVR had the same value. However, this breaks under KVM > HV, because we always have

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

2017-06-14 Thread David Gibson
On Tue, Jun 13, 2017 at 11:52:41PM -0700, no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Subject: [Qemu-devel] [PATCH qemu v8 0/2] memory/iommu: QOM'fy IOMMU > MemoryRegion > Message-id: 20170614063607.4786

Re: [Qemu-devel] [PATCH] migration: fix incorrect enable return path

2017-06-14 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > 0425dc9 is actually v1 of that patch, but it was accidentally > merged (while there was a v2). That will cause problem when we try to > migrate to some old QEMUs when return path is not really there. Let's > fix it, then squashing this patch with 0425dc9 will

[Qemu-devel] [PATCH] migration: Fix compilation with older compilers

2017-06-14 Thread Juan Quintela
That typedefs are needed on both files. New compilers (F25 where I work) don't complain about repeating a typedef. But older ones complain. Signed-off-by: Juan Quintela --- include/migration/register.h | 3 --- include/migration/vmstate.h | 1 - include/qemu/typedefs.h | 2 ++ 3 files ch

[Qemu-devel] [PATCH 3/4] sdl2: use framebuffer helper functions.

2017-06-14 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/sdl2.h | 8 ++-- ui/sdl2-gl.c | 36 +++- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h index aaf226c2c0..454367ac84 100644 --- a/include/ui/sdl2.h +++ b/i

[Qemu-devel] [PATCH 0/4] ui/opengl: add and use helper functions to handle framebuffers

2017-06-14 Thread Gerd Hoffmann
All UIs with opengl support have simliar code to handle opengl framebuffers. Create some helpers and put them into use to reduce code duplication. v2: * use GL_LINEAR * add helper for default framebuffer setup Gerd Hoffmann (4): egl-helpers: add helpers to handle opengl framebuffers egl-he

[Qemu-devel] [PATCH 2/4] egl-headless: use framebuffer helper functions.

2017-06-14 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- ui/egl-headless.c | 67 ++- 1 file changed, 17 insertions(+), 50 deletions(-) diff --git a/ui/egl-headless.c b/ui/egl-headless.c index d8d800f8a6..809bfde99c 100644 --- a/ui/egl-headless.c +++ b/ui/egl-headless.

[Qemu-devel] [PATCH 1/4] egl-helpers: add helpers to handle opengl framebuffers

2017-06-14 Thread Gerd Hoffmann
Add a collection of egl_fb_*() helper functions to manage and use opengl framebuffers, which is a common pattern in UI code with opengl support. Signed-off-by: Gerd Hoffmann --- include/ui/egl-helpers.h | 15 ++ ui/egl-helpers.c | 76 ++

[Qemu-devel] [PATCH 4/4] gtk: use framebuffer helper functions.

2017-06-14 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/gtk.h | 4 ++-- ui/gtk-egl.c | 36 +++- ui/gtk-gl-area.c | 26 +++--- 3 files changed, 16 insertions(+), 50 deletions(-) diff --git a/include/ui/gtk.h b/include/ui/gtk.h index ca9a2268de..2f7b720

Re: [Qemu-devel] [PATCH 1/2] migration: Test for disabled features on reception

2017-06-14 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Right now, if we receive a compressed page while this features are >> disabled, Bad Things (TM) can happen. Just add a test for them. >> >> Signed-off-by: Juan Quintela >> Reviewed-by: Dr. David Alan Gilbert > >

[Qemu-devel] [PATCH] console: remove do_safe_dpy_refresh

2017-06-14 Thread Gerd Hoffmann
Drop the temporary workaround for the broken display updates. All display adapters are updated, so this should be safe without causing regressions. Signed-off-by: Gerd Hoffmann --- ui/console.c | 25 + 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/ui/conso

Re: [Qemu-devel] [PATCH 1/2] migration: Test for disabled features on reception

2017-06-14 Thread Juan Quintela
Peter Xu wrote: > On Tue, Jun 13, 2017 at 11:54:31AM +0200, Juan Quintela wrote: >> Right now, if we receive a compressed page while this features are >> disabled, Bad Things (TM) can happen. Just add a test for them. >> >> Signed-off-by: Juan Quintela >> Reviewed-by: Dr. David Alan Gilbert >>

Re: [Qemu-devel] [PATCH] migration: Fix compilation with older compilers

2017-06-14 Thread Greg Kurz
On Wed, 14 Jun 2017 10:34:34 +0200 Juan Quintela wrote: > That typedefs are needed on both files. New compilers (F25 where I Only LoadStateHandler is actually needed by both files but I guess it is ok to keep these typedefs together. Reviewed-by: Greg Kurz > work) don't complain about repeat

Re: [Qemu-devel] [PATCH] migration: fix incorrect enable return path

2017-06-14 Thread Juan Quintela
no-re...@patchew.org wrote: > Hi, > === OUTPUT BEGIN === > Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc' > Cloning into '/var/tmp/patchew-tester-tmp-ynbw5yjp/src/dtc'... > Submodule path 'dtc': checked out '558cd81bdd432769b59bff01240c44f82cfb1a9d' > BUILD fedo

Re: [Qemu-devel] [PATCH] spapr: manage hotplugged devices while the VM is not started

2017-06-14 Thread Igor Mammedov
On Tue, 13 Jun 2017 16:42:45 -0500 Michael Roth wrote: > Quoting Igor Mammedov (2017-06-09 03:27:33) > > On Thu, 08 Jun 2017 15:00:53 -0500 > > Michael Roth wrote: > > > > > Quoting David Gibson (2017-05-30 23:35:57) > > > > On Tue, May 30, 2017 at 06:04:45PM +0200, Laurent Vivier wrote:

Re: [Qemu-devel] [PATCH v20 13/30] block: new bdrv_reopen_bitmaps_rw interface

2017-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2017 18:28, Max Reitz wrote: On 2017-06-13 12:25, Vladimir Sementsov-Ogievskiy wrote: 09.06.2017 16:27, Max Reitz wrote: On 2017-06-02 13:21, Vladimir Sementsov-Ogievskiy wrote: Add format driver handler, which should mark loaded read-only bitmaps as 'IN_USE' in the image and unset read_

Re: [Qemu-devel] [PATCH] migration: Fix compilation with older compilers

2017-06-14 Thread Juan Quintela
Greg Kurz wrote: > On Wed, 14 Jun 2017 10:34:34 +0200 > Juan Quintela wrote: > >> That typedefs are needed on both files. New compilers (F25 where I > > Only LoadStateHandler is actually needed by both files but I guess > it is ok to keep these typedefs together. Yeap. Sorry for the confusing

Re: [Qemu-devel] [PATCH v2] virtio-blk: drain block before cleanup

2017-06-14 Thread Stefan Hajnoczi
On Tue, Jun 13, 2017 at 12:35:21PM +0200, Gioh Kim wrote: > I'd like to report one use-after-free problem which is found by > AddressSanitizer. > My company provides virtualization server with Qemu-2.7. I have tried the following but was unable to reproduce a segfault. Please reproduce this issue

Re: [Qemu-devel] [PATCH v2] hmp, qmp: introduce "info memory" and "query-memory" commands

2017-06-14 Thread Dr. David Alan Gilbert
* Vadim Galitsyn (vadim.galit...@profitbricks.com) wrote: > Commands above provide the following memory information in bytes: > > * base-memory - amount of static memory specified > with '-m' option at the start of the QEMU process. > > * hot-plug-memory - amount of memory that was hot-pl

Re: [Qemu-devel] [PATCH] spapr: manage hotplugged devices while the VM is not started

2017-06-14 Thread Juan Quintela
Igor Mammedov wrote: > On Tue, 13 Jun 2017 16:42:45 -0500 > Michael Roth wrote: > >> Quoting Igor Mammedov (2017-06-09 03:27:33) >> > On Thu, 08 Jun 2017 15:00:53 -0500 >> > Michael Roth wrote: >> > >> > > Quoting David Gibson (2017-05-30 23:35:57) >> > > > On Tue, May 30, 2017 at 06:04:45P

[Qemu-devel] [PATCH] virtio-blk: trace vdev so devices can be distinguished

2017-06-14 Thread Stefan Hajnoczi
It is hard to analyze trace logs with multiple virtio-blk devices because none of the trace events include the VirtIODevice *vdev. This patch adds vdev so it's clear which device a request is associated with. I considered using VirtIOBlock *s instead but VirtIODevice *vdev is more general and may

Re: [Qemu-devel] [PATCH 13/23] hyperv: qdev-ify SynIC

2017-06-14 Thread Roman Kagan
On Tue, Jun 13, 2017 at 03:34:34PM -0300, Eduardo Habkost wrote: > On Tue, Jun 06, 2017 at 09:19:38PM +0300, Roman Kagan wrote: > > Make Hyper-V SynIC a device which is attached as a child to X86CPU. For > > now it only makes SynIC visibile in the qom hierarchy and exposes a few > > properties whi

Re: [Qemu-devel] [PATCH v3 3/4] migration: avoid recursive AioContext locking in save_vmstate()

2017-06-14 Thread Pavel Butsykin
On 22.05.2017 16:57, Stefan Hajnoczi wrote: AioContext was designed to allow nested acquire/release calls. It uses a recursive mutex so callers don't need to worry about nesting...or so we thought. BDRV_POLL_WHILE() is used to wait for block I/O requests. It releases the AioContext temporaril

Re: [Qemu-devel] [PATCH] console: remove do_safe_dpy_refresh

2017-06-14 Thread Alex Bennée
Gerd Hoffmann writes: > Drop the temporary workaround for the broken display updates. > All display adapters are updated, so this should be safe without > causing regressions. > > Signed-off-by: Gerd Hoffmann Acked-by: Alex Bennée > --- > ui/console.c | 25 + > 1 fil

Re: [Qemu-devel] [PATCH v4 0/2] Support CPUID signature for TCG

2017-06-14 Thread Daniel P. Berrange
On Fri, May 19, 2017 at 04:41:46PM -0300, Eduardo Habkost wrote: > On Tue, May 09, 2017 at 07:18:07AM -0700, Richard Henderson wrote: > > On 05/09/2017 07:13 AM, Richard W.M. Jones wrote: > > > On Tue, May 09, 2017 at 07:05:51AM -0700, Richard Henderson wrote: > > > > > Daniel P. Berrange (2): > >

[Qemu-devel] peter.mayd...@linaro.org

2017-06-14 Thread Antonio Huete Jiménez
Hi all, According to 2.9 changelog page, DragonFly BSD will be listed as unsupported with the possibility of dropping support completely in the future: http://wiki.qemu.org/ChangeLog/2.9 I'd like to volunteer so that qemu can keep DragonFly BSD as a supported platform. Could you please

Re: [Qemu-devel] [PATCH] target/aarch64: exit to main loop after handling MSR

2017-06-14 Thread Alex Bennée
Emilio G. Cota writes: > The appended fixes it for me. Can you please test? > [ apply with `git am --scissors' ] > > Thanks, > > Emilio > > 8< > > Commit e75449a3 ("target/aarch64: optimize indirect branches") causes > a regression by which aarch64 guests freeze under TCG

Re: [Qemu-devel] [PATCH] RFC: vmcoreinfo device

2017-06-14 Thread Marc-André Lureau
Hi On Mon, May 29, 2017 at 4:44 PM Igor Mammedov wrote: > On Fri, 26 May 2017 13:59:09 + > Marc-André Lureau wrote: > > > Hi > > > > On Thu, May 4, 2017 at 5:41 PM Igor Mammedov > wrote: > > > > > On Tue, 02 May 2017 19:03:15 + > > > Marc-André Lureau wrote: > > > > > > > Hi > > > > >

Re: [Qemu-devel] [PATCH] target/aarch64: exit to main loop after handling MSR

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 06:48, Richard Henderson wrote: >> >> Commit e75449a3 ("target/aarch64: optimize indirect branches") causes >> a regression by which aarch64 guests freeze under TCG with -smp > 1, >> even with `-accel accel=tcg,thread=single' (i.e. MTTCG disabled). >> >> I isolated the problem to th

Re: [Qemu-devel] [PULL v1 0/5] Merge sockets 2017/06/07

2017-06-14 Thread Daniel P. Berrange
On Mon, Jun 12, 2017 at 02:14:19PM +0100, Peter Maydell wrote: > On 7 June 2017 at 18:54, Daniel P. Berrange wrote: > > The following changes since commit 0db1851becbefe3e50cfc03776fb1f75817376af: > > > > Merge remote-tracking branch > > 'remotes/vivier/tags/m68k-for-2.10-pull-request' into sta

[Qemu-devel] DragonFly BSD support

2017-06-14 Thread Antonio Huete Jiménez
Hi all, According to 2.9 changelog page, DragonFly BSD will be listed as unsupported with the possibility of dropping support completely in the future: http://wiki.qemu.org/ChangeLog/2.9 I'd like to volunteer so that qemu can keep DragonFly BSD as a supported platform. Could you please

Re: [Qemu-devel] [PULL v3 00/23] Docker and block patches

2017-06-14 Thread Fam Zheng
On Mon, 06/12 19:26, Peter Maydell wrote: > On 8 June 2017 at 12:56, Fam Zheng wrote: > > The following changes since commit 64175afc695c0672876fbbfc31b299c86d562cb4: > > > > arm_gicv3: Fix ICC_BPR1 reset value when EL3 not implemented (2017-06-07 > > 17:21:44 +0100) > > > > are available in th

Re: [Qemu-devel] [PATCH 11/23] hyperv: address HvSintRoute by X86CPU pointer

2017-06-14 Thread Paolo Bonzini
On 13/06/2017 21:02, Eduardo Habkost wrote: >> @@ -101,16 +101,18 @@ static void hv_test_dev_control(void *opaque, hwaddr >> addr, uint64_t data, >> uint8_t sint = data & 0xFF; >> uint8_t vcpu_id = (data >> 8ULL) & 0xFF; > > vcpu_id risks being confused KVM's vcpu_id (which is the CPU

Re: [Qemu-devel] [PATCH 16/23] hyperv: map overlay pages after updating msrs

2017-06-14 Thread Paolo Bonzini
On 06/06/2017 20:19, Roman Kagan wrote: > There is a design flaw in the Hyper-V SynIC implementation in KVM: when > message page or event flags page is enabled by setting the corresponding > msr, KVM zeroes it out. This violates the spec in general (per spec, > the pages have to be overlay ones

Re: [Qemu-devel] [PATCH] usb: xhci: fix info leak when writing event to the guest

2017-06-14 Thread Juan Quintela
Gerd Hoffmann wrote: > Hi, > >> > CC      hw/timer/a9gtimer.o >> > In file included from /tmp/qemu-test/src/hw/net/vmxnet3.c:30: >> > /tmp/qemu-test/src/include/migration/register.h:18: error: >> > redefinition of typedef ‘LoadStateHandler’ >> > /tmp/qemu-test/src/include/migration/vmstate.h:32:

Re: [Qemu-devel] [PATCH] Makefile: Move balloon.o, numa.o and bootdevice.o to common-obj-y

2017-06-14 Thread Thomas Huth
On 08.06.2017 16:18, Thomas Huth wrote: > There does not seem to be any target specific code in these files, so > we can put them into "common-obj" instead of "obj" to compile them only > once for all targets. Self-NACK: balloon.c uses kvm_enabled() which in turn depends on CONFIG_KVM ... and that

Re: [Qemu-devel] [PATCH 20/23] hyperv: process POST_MESSAGE hypercall

2017-06-14 Thread Paolo Bonzini
On 06/06/2017 20:19, Roman Kagan wrote: > +typedef struct MsgHandler { > +struct rcu_head rcu; > +QLIST_ENTRY(MsgHandler) le; > +uint32_t conn_id; > +HvMsgHandler handler; > +void *data; > +} MsgHandler; > + > +static QLIST_HEAD(, MsgHandler) msg_handlers; > +static QemuMutex

Re: [Qemu-devel] [PULL v1 0/5] Merge sockets 2017/06/07

2017-06-14 Thread Peter Maydell
On 14 June 2017 at 09:26, Daniel P. Berrange wrote: > Was this clang on OSX/FreeBSD too, or is that on Linux ? If the latter, > what are the args to use with configure to exercise this scenario ? Linux. For details of how to run the sanitizer, see http://wiki.qemu.org/Testing#clang_UBSan thanks

Re: [Qemu-devel] [PULL v3 00/23] Docker and block patches

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 13:04, Fam Zheng wrote: > On Mon, 06/12 19:26, Peter Maydell wrote: >> On 8 June 2017 at 12:56, Fam Zheng wrote: >>> The following changes since commit 64175afc695c0672876fbbfc31b299c86d562cb4: >>> >>> arm_gicv3: Fix ICC_BPR1 reset value when EL3 not implemented (2017-06-07 >>>

Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index

2017-06-14 Thread Roman Kagan
On Tue, Jun 13, 2017 at 03:57:52PM -0300, Eduardo Habkost wrote: > On Tue, Jun 06, 2017 at 09:19:30PM +0300, Roman Kagan wrote: > > Hyper-V identifies vcpus by the virtual processor (VP) index which is > > normally queried by the guest via HV_X64_MSR_VP_INDEX msr. > > > > It has to be owned by QEM

Re: [Qemu-devel] [PATCH] Makefile: Move balloon.o, numa.o and bootdevice.o to common-obj-y

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 13:18, Thomas Huth wrote: > On 08.06.2017 16:18, Thomas Huth wrote: >> There does not seem to be any target specific code in these files, so >> we can put them into "common-obj" instead of "obj" to compile them only >> once for all targets. > > Self-NACK: balloon.c uses kvm_enabled

Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 13:25, Roman Kagan wrote: >> The problem with that is that it will break as soon as we create >> VCPUs in a different order. Unsolvable on hosts that don't allow >> HV_X64_MSR_VP_INDEX to be set, however. > Right, thanks for putting together a detailed explanation. > > This was a

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [PATCH v1] virtio-net: enable configurable tx queue size

2017-06-14 Thread Jason Wang
On 2017年06月13日 18:46, Jason Wang wrote: On 2017年06月13日 17:50, Wei Wang wrote: On 06/13/2017 05:04 PM, Jason Wang wrote: On 2017年06月13日 15:17, Wei Wang wrote: On 06/13/2017 02:29 PM, Jason Wang wrote: The issue is what if there's a mismatch of max #sgs between qemu and When the vhost bac

Re: [Qemu-devel] [PATCH 2/2] socket: Handle race condition between binds to the same port

2017-06-14 Thread Knut Omang
On Wed, 2017-06-14 at 09:17 +0100, Daniel P. Berrange wrote: > On Fri, Jun 09, 2017 at 09:19:49PM +0200, Knut Omang wrote: > > If an offset of ports is specified to the inet_listen_saddr function(), > > and two or more processes tries to bind from these ports at the same time, > > occasionally more

Re: [Qemu-devel] [PATCH] target/aarch64: exit to main loop after handling MSR

2017-06-14 Thread Alex Bennée
Paolo Bonzini writes: > On 14/06/2017 06:48, Richard Henderson wrote: >>> >>> Commit e75449a3 ("target/aarch64: optimize indirect branches") causes >>> a regression by which aarch64 guests freeze under TCG with -smp > 1, >>> even with `-accel accel=tcg,thread=single' (i.e. MTTCG disabled). >>> >

[Qemu-devel] [PULL 2/5] migration: fix incorrect enable return path

2017-06-14 Thread Juan Quintela
From: Peter Xu 0425dc9 is actually v1 of that patch, but it was accidentally merged (while there was a v2). That will cause problem when we try to migrate to some old QEMUs when return path is not really there. Let's fix it, then squashing this patch with 0425dc9 will be exactly patch content of

[Qemu-devel] [PULL 1/5] migration: Fix compilation with older compilers

2017-06-14 Thread Juan Quintela
That typedefs are needed on both files. New compilers (F25 where I work) don't complain about repeating a typedef. But older ones complain. Signed-off-by: Juan Quintela Reviewed-by: Greg Kurz --- include/migration/register.h | 3 --- include/migration/vmstate.h | 1 - include/qemu/typedefs.h

[Qemu-devel] [PULL 0/5] Migration PULL request

2017-06-14 Thread Juan Quintela
hub.com/juanquintela/qemu.git tags/migration/20170614 for you to fetch changes up to 3416ab5bb452f1b6cea58aed8983ffb9a455b7c4: migration: Don't create decompression threads if not enabled (2017-06-14 11:11:06 +0200) ---- mi

[Qemu-devel] [PULL 4/5] migration: Test for disabled features on reception

2017-06-14 Thread Juan Quintela
Right now, if we receive a compressed page while this features are disabled, Bad Things (TM) can happen. Just add a test for them. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu -- I had XBZRLE here also, but it don't need extra resources on destinatio

Re: [Qemu-devel] [PATCH v3 00/10] Clock framework API.

2017-06-14 Thread Paolo Bonzini
On 13/06/2017 12:33, Peter Maydell wrote: >> For the migration maybe we can refresh the whole clock tree at the end >> of the migration. Is that a good idea? > That seems kind of awkward -- where would this code that did a > clock tree refresh be? Also you're then reliant on all the > callback func

[Qemu-devel] [PULL 3/5] migration: Remove unneeded includes

2017-06-14 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Peter Xu --- include/migration/colo.h | 3 --- include/migration/misc.h | 2 ++ migration/block.c | 6 -- migration/colo-failover.c | 2 ++ migration/colo.c | 2 -- migration/exec.c | 2 -- migration/fd.c| 2 --

[Qemu-devel] [PULL 5/5] migration: Don't create decompression threads if not enabled

2017-06-14 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu -- I removed the [HACK] part because previous patch just check that compression pages are not received. --- migration/ram.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/migration/ram.c b/migrat

[Qemu-devel] NMI watchdog bug

2017-06-14 Thread ali saeedi
Hello I run qemu on linux kernel 4.11.4 at ubuntu lts 16.04 but when booting guest i encouner this in qemu monitor ' nmi watchdog: bug: soft lockup - cpu#0 stuck for 23s! [swapper:0/1]' i follow this link 'http://wiki.qemu.org/Hosts/Linux' what is the problem thanks a lot

Re: [Qemu-devel] [PATCH 16/23] hyperv: map overlay pages after updating msrs

2017-06-14 Thread Roman Kagan
On Wed, Jun 14, 2017 at 01:12:12PM +0200, Paolo Bonzini wrote: > > > On 06/06/2017 20:19, Roman Kagan wrote: > > There is a design flaw in the Hyper-V SynIC implementation in KVM: when > > message page or event flags page is enabled by setting the corresponding > > msr, KVM zeroes it out. This v

Re: [Qemu-devel] [PATCH] spapr: manage hotplugged devices while the VM is not started

2017-06-14 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Tue, 13 Jun 2017 16:42:45 -0500 > Michael Roth wrote: > > > Quoting Igor Mammedov (2017-06-09 03:27:33) > > > On Thu, 08 Jun 2017 15:00:53 -0500 > > > Michael Roth wrote: > > > > > > > Quoting David Gibson (2017-05-30 23:35:57) > > > > > On

Re: [Qemu-devel] [PATCH] target/aarch64: exit to main loop after handling MSR

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 13:45, Alex Bennée wrote: > > Paolo Bonzini writes: > >> On 14/06/2017 06:48, Richard Henderson wrote: Commit e75449a3 ("target/aarch64: optimize indirect branches") causes a regression by which aarch64 guests freeze under TCG with -smp > 1, even with `-accel

Re: [Qemu-devel] [PATCH v20 13/30] block: new bdrv_reopen_bitmaps_rw interface

2017-06-14 Thread Max Reitz
On 2017-06-14 11:03, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2017 18:28, Max Reitz wrote: >> On 2017-06-13 12:25, Vladimir Sementsov-Ogievskiy wrote: >>> 09.06.2017 16:27, Max Reitz wrote: On 2017-06-02 13:21, Vladimir Sementsov-Ogievskiy wrote: > Add format driver handler, which shoul

Re: [Qemu-devel] [PATCH 16/23] hyperv: map overlay pages after updating msrs

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 13:54, Roman Kagan wrote: >> Why not disable the zeroing for host-initiated MSR writes? This is >> pretty clearly a KVM bug, we can push it to stable kernels too. > > The only problem with this is that QEMU will have no reliable way to > know if the KVM it runs with has this bug fi

Re: [Qemu-devel] [PATCH] target/aarch64: exit to main loop after handling MSR

2017-06-14 Thread Alex Bennée
Paolo Bonzini writes: > On 14/06/2017 13:45, Alex Bennée wrote: >> >> Paolo Bonzini writes: >> >>> On 14/06/2017 06:48, Richard Henderson wrote: > > Commit e75449a3 ("target/aarch64: optimize indirect branches") causes > a regression by which aarch64 guests freeze under TCG with -sm

Re: [Qemu-devel] [PATCH 11/23] hyperv: address HvSintRoute by X86CPU pointer

2017-06-14 Thread Roman Kagan
On Wed, Jun 14, 2017 at 01:08:43PM +0200, Paolo Bonzini wrote: > > > On 13/06/2017 21:02, Eduardo Habkost wrote: > >> @@ -101,16 +101,18 @@ static void hv_test_dev_control(void *opaque, hwaddr > >> addr, uint64_t data, > >> uint8_t sint = data & 0xFF; > >> uint8_t vcpu_id = (data >> 8U

Re: [Qemu-devel] [PATCH] target/aarch64: exit to main loop after handling MSR

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 14:14, Alex Bennée wrote: >> Then Emilio's patch, if a bit of a heavy hammer, is correct. After >> aa64_daif_write needs you need an exit_tb so that arm_cpu_exec_interrupt >> is executed again. > > This is a case of cpu->interrupt_request being pending but not having > set cpu->ico

Re: [Qemu-devel] [PATCH 11/23] hyperv: address HvSintRoute by X86CPU pointer

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 14:14, Roman Kagan wrote: >>> vcpu_id risks being confused KVM's vcpu_id (which is the CPU APIC >>> ID in x86). If you are already touching this code, this could be >>> renamed to vp_index to avoid confusion. >> Actually the VP_INDEX is _also_ the vcpu_id. Should we just document

Re: [Qemu-devel] [PATCHv2 1/4] fw_cfg: don't map the fw_cfg IO ports in fw_cfg_io_realize()

2017-06-14 Thread Paolo Bonzini
On 12/06/2017 23:21, Mark Cave-Ayland wrote: > As indicated by Laszlo it is a QOM bug for the realize() method to actually > map the device. Set up the IO regions with sysbus_init_mmio() and defer > the mapping to the caller, as already done in fw_cfg_init_mem_wide(). ... sort of. The idea is t

Re: [Qemu-devel] [PATCH] target/aarch64: exit to main loop after handling MSR

2017-06-14 Thread Alex Bennée
Paolo Bonzini writes: > On 14/06/2017 14:14, Alex Bennée wrote: >>> Then Emilio's patch, if a bit of a heavy hammer, is correct. After >>> aa64_daif_write needs you need an exit_tb so that arm_cpu_exec_interrupt >>> is executed again. >> >> This is a case of cpu->interrupt_request being pending

Re: [Qemu-devel] [PATCHv2 0/4] fw_cfg: qdev-related tidy-ups

2017-06-14 Thread Paolo Bonzini
On 12/06/2017 23:21, Mark Cave-Ayland wrote: > As part of some ongoing sun4u work, I need to be able to wire the fw_cfg > IO interface to a separate IO space by instantiating the qdev device instead > of calling fw_cfg_init_io(). This patchset brings FW_CFG_IO in line with > FW_CFG_MEM and tidies

Re: [Qemu-devel] [PATCH v1 2/2] migration: add bitmap for copied page

2017-06-14 Thread Alexey Perevalov
On 06/13/2017 02:42 PM, Juan Quintela wrote: Alexey Perevalov wrote: Hi I think that it would make things clearer if we do a s/copied/received/ As what we are tracking here are the pages that have already been received. This patch adds ability to track down already copied pages, it's necess

Re: [Qemu-devel] [PATCH 16/23] hyperv: map overlay pages after updating msrs

2017-06-14 Thread Roman Kagan
On Wed, Jun 14, 2017 at 02:11:56PM +0200, Paolo Bonzini wrote: > On 14/06/2017 13:54, Roman Kagan wrote: > >> Why not disable the zeroing for host-initiated MSR writes? This is > >> pretty clearly a KVM bug, we can push it to stable kernels too. > > > > The only problem with this is that QEMU will

Re: [Qemu-devel] [PATCH] target/aarch64: exit to main loop after handling MSR

2017-06-14 Thread Paolo Bonzini
On 14/06/2017 14:35, Alex Bennée wrote: >> That would cause an unnecessary slowdown in code that runs with >> interrupts disabled but does a lot of indirect jumps... ppc's SLOF >> firmware probably qualifies. > > Really? Yes. :) SLOF basically runs a Forth interpreter. If you run "qemu-syste

Re: [Qemu-devel] [PATCH 13/23] hyperv: qdev-ify SynIC

2017-06-14 Thread Eduardo Habkost
On Wed, Jun 14, 2017 at 12:58:04PM +0300, Roman Kagan wrote: > On Tue, Jun 13, 2017 at 03:34:34PM -0300, Eduardo Habkost wrote: > > On Tue, Jun 06, 2017 at 09:19:38PM +0300, Roman Kagan wrote: > > > Make Hyper-V SynIC a device which is attached as a child to X86CPU. For > > > now it only makes Syn

  1   2   3   4   >