Re: [Qemu-devel] [PATCH] nbd: fix memory leak on socket_connect failed

2017-04-03 Thread Paolo Bonzini
On 01/04/2017 02:15, yaolujing wrote: > From: y00357587 > > When TCP connection fails between nbd server and client, > the local var, sioc, memory leak. > > This patch fixes the memory leak. > > Signed-off-by: y00357587 > --- > block/nbd.c | 1 + > 1 file changed, 1 insertion(+) > > diff -

Re: [Qemu-devel] [RFC v3 0/5] SMMUv3 Emmulation Support

2017-04-03 Thread Auger Eric
Hi Radha, On 01/04/2017 02:56, Radha Mohan wrote: > Hi Eric > > On Thu, Mar 30, 2017 at 12:42 PM, Eric Auger wrote: >> This series introduces the emulation code for ARM SMMUv3. >> This is the continuation of Prem's work [1]. >> >> At the moment only AArch64 translation format is supported, ie. >

[Qemu-devel] [PATCH] hw/net: convert "dma" property type from ptr to link

2017-04-03 Thread Suramya Shah
The lance device needs pointer to ISA DMA device to operate. But according to qdev-properties.h, properties of pointer type should be avoided. A link type property is a good substitution. Signed-off-by: Suramya Shah --- hw/net/lance.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH v5 0/9] ppc/pnv: interrupt controller (POWER8)

2017-04-03 Thread Cédric Le Goater
Hello, Here is a series adding support for the interrupt controller as found on a POWER8 system. POWER9 uses a different interrupt controller called XIVE, still to be worked on. The initial patches are more cleanups of the XICS layer which move the IRQ 'server' number mapping under the machine ha

[Qemu-devel] [PATCH v5 2/9] spapr: allocate the ICPState object from under sPAPRCPUCore

2017-04-03 Thread Cédric Le Goater
Today, all the ICPs are created before the CPUs, stored in an array under the sPAPR machine and linked to the CPU when the core threads are realized. This modeling brings some complexity when a lookup in the array is required and it can be simplified by allocating the ICPs when the CPUs are. This

[Qemu-devel] [PATCH v5 3/9] ppc/xics: add a realize() handler to ICPStateClass

2017-04-03 Thread Cédric Le Goater
It will be used by derived classes in PowerNV for customization. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- hw/intc/xics.c| 5 + include/hw/ppc/xics.h | 1 + 2 files changed, 6 insertions(+) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index d4428b41b03a..292fffe

[Qemu-devel] [PATCH v5 1/9] spapr: move the IRQ server number mapping under the machine

2017-04-03 Thread Cédric Le Goater
This is the second step to abstract the IRQ 'server' number of the XICS layer. Now that the prereq cleanups have been done in the previous patch, we can move down the 'cpu_dt_id' to 'cpu_index' mapping in the sPAPR machine handler. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- h

[Qemu-devel] [PATCH v5 9/9] ppc/pnv: add memory regions for the ICP registers

2017-04-03 Thread Cédric Le Goater
This provides to a PowerNV chip (POWER8) access to the Interrupt Management area, which contains the registers of the Interrupt Control Presenters of each thread. These are used to accept, return, forward interrupts in the system. This area is modeled with a per-chip container memory region holdin

[Qemu-devel] [PATCH v5 5/9] ppc/pnv: extend the machine with a XICSFabric interface

2017-04-03 Thread Cédric Le Goater
A XICSFabric QOM interface is used by the XICS layer to manipulate the ICP and ICS objects. Let's define the associated handlers for the PowerNV machine. All handlers should be defined even if there is no ICS under the PowerNV machine yet. Signed-off-by: Cédric Le Goater --- Changes since v4:

[Qemu-devel] [PATCH v5 4/9] ppc/pnv: add a PnvICPState object

2017-04-03 Thread Cédric Le Goater
This provides a new ICPState object for the PowerNV machine (POWER8). Access to the Interrupt Management area is done though a memory region. It contains the registers of the Interrupt Control Presenters of each thread which are used to accept, return, forward interrupts in the system. Signed-off-

[Qemu-devel] [PATCH v5 6/9] ppc/pnv: extend the machine with a InterruptStatsProvider interface

2017-04-03 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 2d7aa5dcfbca..1c0672cbeb40 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -33,6 +33,8 @@ #include "exec/address-spaces.h" #include "qemu/cut

[Qemu-devel] [PATCH v5 8/9] ppc/pnv: add a helper to calculate MMIO addresses registers

2017-04-03 Thread Cédric Le Goater
Some controllers (ICP, PSI) have a base register address which is calculated using the chip id. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- include/hw/ppc/pnv.h | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/hw/ppc/pnv.h b/include/hw/p

[Qemu-devel] [PATCH v5 7/9] ppc/pnv: create the ICP object under PnvCore

2017-04-03 Thread Cédric Le Goater
Each thread of a core is linked to an ICP. This allocates a PnvICPState object before the PowerPCCPU object is realized and lets the XICSFabric do the store under the 'intc' backlink when xics_cpu_setup() is called. This modeling removes the need of maintaining an array of ICP objects under the Po

Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-04-03 Thread Kevin Wolf
Am 31.03.2017 um 19:43 hat Max Reitz geschrieben: > On 31.03.2017 18:03, Ciprian Barbu wrote: > > Hello, > > > > Similar to the other thread about possible regression with rbd, there might > > be a regression with nbd. > > This time we are launching an instance from an image (not volume) and try

Re: [Qemu-devel] [PATCH 10/43] s390x: made printf always compile in debug output

2017-04-03 Thread Cornelia Huck
On Sat, 1 Apr 2017 16:45:53 +0300 Danil Antonov wrote: > From ea9cd8f02bd98548435f561e62f4f9b672318bcb Mon Sep 17 00:00:00 2001 > From: Danil Antonov > Date: Wed, 29 Mar 2017 12:26:05 +0300 > Subject: [PATCH 10/43] s390x: made printf always compile in debug output s/made/make/ (Not sure where

Re: [Qemu-devel] [PATCH 21/43] s390: made printf always compile in debug output

2017-04-03 Thread Cornelia Huck
On Sat, 1 Apr 2017 16:56:30 +0300 Danil Antonov wrote: > From cbc3425092b6ee94d365f8714a39af5a583a Mon Sep 17 00:00:00 2001 > From: Danil Antonov > Date: Wed, 29 Mar 2017 12:33:01 +0300 > Subject: [PATCH 21/43] s390: made printf always compile in debug output > > Wrapped printf calls inside

Re: [Qemu-devel] [PATCH v4] Allow setting NUMA distance for different NUMA nodes

2017-04-03 Thread Andrew Jones
On Sat, Apr 01, 2017 at 06:25:26PM +0800, He Chen wrote: > Current, QEMU does not provide a clear command to set vNUMA distance for > guest although we already have `-numa` command to set vNUMA nodes. > > vNUMA distance makes sense in certain scenario. > But now, if we create a guest that has 4 vN

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Gerd Hoffmann
Hi, > I've spent a bit of time over the weekend attempting to convert the > SPARC CG3/TCX framebuffers over to use your new code and pushed the > result to my github branch here: > https://github.com/mcayland/qemu/commits/vga-fixes-sparc. work/vga-fixes branch updated & rebased to latest master

Re: [Qemu-devel] [RFC 02/19] s390: Add FIXME for unexplained user_creatable=false line

2017-04-03 Thread Cornelia Huck
On Fri, 31 Mar 2017 21:46:07 -0300 Eduardo Habkost wrote: > TYPE_S390_PCI_HOST_BRIDGE has user_creatable=false but has > no comment explaining why. Add a FIXME to document that. > > Cc: Frank Blaschka > Cc: Cornelia Huck > Cc: Christian Borntraeger > Cc: Alexander Graf > Cc: Richard Henderso

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Mark Cave-Ayland
On 03/04/17 09:44, Gerd Hoffmann wrote: > Hi, > >> I've spent a bit of time over the weekend attempting to convert the >> SPARC CG3/TCX framebuffers over to use your new code and pushed the >> result to my github branch here: >> https://github.com/mcayland/qemu/commits/vga-fixes-sparc. > > wor

Re: [Qemu-devel] [PATCH v1 1/3] applesmc: cosmetic whitespace and indentation cleanup

2017-04-03 Thread Alexander Graf
On 03/31/2017 06:48 PM, Gabriel L. Somlo wrote: Signed-off-by: Gabriel Somlo Reviewed-by: Alexander Graf Alex

Re: [Qemu-devel] hitting intermittent issue with live migration from qemu-kvm-ev 2.3.0 to qemu-kvm-ev 2.6.0

2017-04-03 Thread Dr. David Alan Gilbert
* Chris Friesen (chris.frie...@windriver.com) wrote: > Hi, > > I'm running into an issue with live-migrating a guest from a host running > qemu-kvm-ev 2.3.0-31 to a host running qemu-kvm-ev 2.6.0-27.1. This is a > libvirt-tunnelled migration, in the context of upgrading an OpenStack > install to

Re: [Qemu-devel] [PATCH v1 2/3] applesmc: consolidate port i/o into single contiguous region

2017-04-03 Thread Alexander Graf
On 03/31/2017 06:48 PM, Gabriel L. Somlo wrote: Newer AppleSMC revisions support an error status (read) port in addition to the data and command ports currently supported. Register the full 32-bit region at once, and handle individual ports at various offsets within the region from the top-level

Re: [Qemu-devel] [PATCH 17/43] net: made printf always compile in debug output

2017-04-03 Thread Thomas Huth
Hi, thanks for looking into this issue ... but I've got some comments: On 01.04.2017 15:52, Danil Antonov wrote: > From d01cd76d0b20ee8fa67c07da64b0e2301e510247 Mon Sep 17 00:00:00 2001 > From: Danil Antonov mailto:g.danil.a...@gmail.com>> > Date: Wed, 29 Mar 2017 12:30:42 +0300 > Subject: [PATC

Re: [Qemu-devel] [RFC v2 0/9] qom: Make object_get_class()/*_GET_CLASS return const pointers

2017-04-03 Thread Paolo Bonzini
On 02/04/2017 15:31, Eduardo Habkost wrote: > When trying to change OBJECT and OBJECT_CHECK, I've found a > problem: gcc 6.2.1 can't evaluate typeof(*a) if *a has an > incomplete type, even inside the (const typeof(*(t)0) *) > expression used in QUALIFIED_CAST. It works on clang, though. > > I'm

Re: [Qemu-devel] [PATCH for-2.10 0/2] etsec: (TYPE_)ETSEC_COMMON macro cleanup

2017-04-03 Thread Fabien Chouteau
On 02/04/2017 14:42, Philippe Mathieu-Daudé wrote: > On 03/31/2017 04:27 PM, Eduardo Habkost wrote: >> When working on other things, I got confused by the etsec code, >> that didn't use the TYPE_ETSEC_COMMON macro in its type >> declaration, and had no subclasses despite being named >> ETSEC_COMMON

[Qemu-devel] [PATCH] qga: improve fsfreeze documentations

2017-04-03 Thread Marc-André Lureau
Some users find the fsfreeze behaviour confusing. Add some notes about invalid mount points and Windows usage. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1436976 Signed-off-by: Marc-André Lureau --- qga/qapi-schema.json | 12 ++-- 1 file changed, 10 insertions(+), 2 deletio

[Qemu-devel] [PULL 1/1] pseries: Enforce homogeneous threads-per-core

2017-04-03 Thread David Gibson
For reasons that may be useful in future, CPU core objects, as used on the pseries machine type have their own nr-threads property, potentially allowing cores with different numbers of threads in the same system. If the user/management uses the values specified in query-hotpluggable-cpus as they'r

[Qemu-devel] [PULL 0/1] ppc-for-2.9 queue 20170403

2017-04-03 Thread David Gibson
pc-for-2.9-20170403 for you to fetch changes up to 8149e2992f7811355cc34721b79d69d1a3a667dd: pseries: Enforce homogeneous threads-per-core (2017-04-03 13:46:18 +1000) ppc patch queue 2017-04-03 A single bugfix in this pull request, f

Re: [Qemu-devel] [PULL for-2.9 0/3] Block patches

2017-04-03 Thread Peter Maydell
On 1 April 2017 at 02:25, Jeff Cody wrote: > The following changes since commit 95b31d709ba343ad237c3630047ee7438bac4065: > > Merge remote-tracking branch > 'remotes/awilliam/tags/vfio-updates-20170331.0' into staging (2017-03-31 > 18:06:13 +0100) > > are available in the git repository at: >

Re: [Qemu-devel] [PATCH v1 2/3] applesmc: consolidate port i/o into single contiguous region

2017-04-03 Thread Paolo Bonzini
On 03/04/2017 11:32, Alexander Graf wrote: > >> Newer AppleSMC revisions support an error status (read) port >> in addition to the data and command ports currently supported. >> >> Register the full 32-bit region at once, and handle individual >> ports at various offsets within the region from t

[Qemu-devel] [PULL 2/3] Fix input-linux reading from device

2017-04-03 Thread Gerd Hoffmann
From: Javier Celaya The evdev devices in input-linux.c are read in blocks of one whole event. If there are not enough bytes available, they are discarded, instead of being kept for the next read operation. This results in lost events, of even non-working devices. This patch keeps track of the nu

[Qemu-devel] [PULL 3/3] vnc: allow to connect with add_client when -vnc none

2017-04-03 Thread Gerd Hoffmann
From: Marc-André Lureau Do not skip VNC initialization, in particular of auth method when vnc is configured without sockets, since we should still allow connections through QMP add_client. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1434551 Signed-off-by: Marc-André Lureau Message-id: 2

[Qemu-devel] [PULL for-2.9 0/3] bugfixes: xhci, input-linux and vnc

2017-04-03 Thread Gerd Hoffmann
in the git repository at: git://git.kraxel.org/qemu tags/pull-fixes-20170403-1 for you to fetch changes up to fa03cb7fd212bc07f0253db9ea436383ddc6c08f: vnc: allow to connect with add_client when -vnc none (2017-04-03 11:48:55 +0200) ---

[Qemu-devel] [PULL 1/3] xhci: flush dequeue pointer to endpoint context

2017-04-03 Thread Gerd Hoffmann
When done processing a endpoint ring we must update the dequeue pointer in the endpoint context in guest memory. This is needed to make sure the guest has a correct view of things and also to make live migration work properly, because xhci post_load restores alot of the state from xhci data struct

[Qemu-devel] [PATCH] usb-host: switch to LIBUSB_API_VERSION

2017-04-03 Thread Gerd Hoffmann
libusbx doesn't exist any more, the fork got merged back to libusb. So stop using LIBUSBX_API_VERSION and use LIBUSB_API_VERSION instead. For backward compatibility alias LIBUSB_API_VERSION to LIBUSBX_API_VERSION in case we figure LIBUSB_API_VERSION isn't defined. Signed-off-by: Gerd Hoffmann -

Re: [Qemu-devel] [PATCH v0] fsdev: QMP interface for throttling

2017-04-03 Thread Daniel P. Berrange
On Tue, Mar 21, 2017 at 10:25:31AM +0100, Pradeep Jagadeesh wrote: > > On 3/20/2017 2:17 PM, Daniel P. Berrange wrote: > > On Mon, Mar 20, 2017 at 09:07:20AM -0400, Pradeep Jagadeesh wrote: > > > > > diff --git a/hmp-commands.hx b/hmp-commands.hx > > > index 8819281..e4e3478 100644 > > > --- a/hm

Re: [Qemu-devel] [PATCH v2] migration: Fix colo hang in socket_accept_incoming_migration

2017-04-03 Thread Daniel P. Berrange
On Fri, Mar 24, 2017 at 09:04:49AM +0800, Guang Wang wrote: > From: Wang guang > > The channel socket was initialized manually, > but forgot to set QIO_CHANNEL_FEATURE_SHUTDOWN. > Thus, the colo_process_incoming_thread would hang at recvmsg. > This patch just call qio_channel_socket_new to get c

Re: [Qemu-devel] [PATCH] qga: improve fsfreeze documentations

2017-04-03 Thread Vinzenz Feenstra
LGTM > On Apr 3, 2017, at 11:54 AM, Marc-André Lureau > wrote: > > Some users find the fsfreeze behaviour confusing. Add some notes about > invalid mount points and Windows usage. > > Related to: > https://bugzilla.redhat.com/show_bug.cgi?id=1436976 > > Signed-off-by: Marc-André Lureau > --

Re: [Qemu-devel] [PATCH] Create libqemutrace.a for all trace.o

2017-04-03 Thread Daniel P. Berrange
On Tue, Mar 28, 2017 at 07:00:34PM +, Xu, Anthony wrote: > > >>> ./trace.o, ./qapi/trace.o and ./util/trace.o are added into > > >>> libqemuutil.a to avoid recursive dependencies between > > >>> libqemuutil.a and libqemutrace.a. > > >> Why would libqemutrace.a depend on libqemuutil.a? > > > Ea

Re: [Qemu-devel] [PULL 0/1] ppc-for-2.9 queue 20170403

2017-04-03 Thread Peter Maydell
ilable in the git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-2.9-20170403 > > for you to fetch changes up to 8149e2992f7811355cc34721b79d69d1a3a667dd: > > pseries: Enforce homogeneous threads-per-core (2017-04-03 13:46:18 +1000) > > ---

Re: [Qemu-devel] [PATCH for-2.9 4/5] rbd: Peel off redundant RbdAuthMethod wrapper struct

2017-04-03 Thread Daniel P. Berrange
On Mon, Mar 27, 2017 at 07:58:51AM +0200, Markus Armbruster wrote: > = What to do for 2.9 = > > I propose to > > * drop both "auth_supported" and "password-secret" from the QAPI schema > > * drop "password-secret" from QemuOpts > > * hide "keyvalue-pairs" in QemuOpts > > No existing usage is a

Re: [Qemu-devel] [PATCH for-2.9] sockets: Fix socket_address_to_string() hostname truncation

2017-04-03 Thread Daniel P. Berrange
On Thu, Mar 23, 2017 at 12:23:28PM +0100, Markus Armbruster wrote: > We first snprintf() to a fixed buffer, then g_strdup() the result > *boggle*. > > Worse, the size of the fixed buffer INET6_ADDRSTRLEN + 5 + 4 is bogus: > the 4 correctly accounts for '[', ']', ':' and '\0', but > INET6_ADDRSTRLE

Re: [Qemu-devel] qio_dns_resolver_lookup_sync() and SOCKET_ADDRESS_KIND_FD?

2017-04-03 Thread Daniel P. Berrange
On Thu, Mar 23, 2017 at 05:30:07PM +0100, Markus Armbruster wrote: > Ignorant question: does qio_dns_resolver_lookup_sync() do the right > thing for SOCKET_ADDRESS_KIND_FD? The switch doesn't have a case for > it, and it's unclear whether the default case is really meant for > SOCKET_ADDRESS_KIND_

Re: [Qemu-devel] [PATCH] trace: fix tcg tracing build breakage

2017-04-03 Thread Daniel P. Berrange
On Mon, Mar 27, 2017 at 02:17:18PM +0100, Stefan Hajnoczi wrote: > Commit 0ab8ed18a6fe98bfc82705b0f041fbf2a8ca5b60 ("trace: switch to > modular code generation for sub-directories") forgot to convert "tcg" > trace events to the modular code generation approach where each > sub-directory has its own

Re: [Qemu-devel] [PATCH RFC v3 for-2.9 09/11] rbd: Revert -blockdev parameter password-secret

2017-04-03 Thread Daniel P. Berrange
On Mon, Mar 27, 2017 at 03:26:33PM +0200, Markus Armbruster wrote: > This reverts a part of commit 8a47e8e. We're having second thoughts > on the QAPI schema (and thus the external interface), and haven't > reached consensus, yet. Issues include: > > * BlockdevOptionsRbd member @password-secret

[Qemu-devel] [PATCH] virtio-gpu: replace PIXMAN_* by PIXMAN_BE_*

2017-04-03 Thread Laurent Vivier
This avoids a "#ifdef HOST_WORDS_BIGENDIAN" and this is the purpose of PIXMAN_BE_* macros. Signed-off-by: Laurent Vivier --- hw/display/virtio-gpu.c | 35 --- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virti

Re: [Qemu-devel] [PATCH 1/1] slirp: add SOCKS5 support

2017-04-03 Thread Daniel P. Berrange
On Mon, Mar 27, 2017 at 01:41:36PM -0500, Eric Blake wrote: > On 03/27/2017 01:21 PM, Laurent Vivier wrote: > > When the VM is used behind a firewall, This allows > > to use a SOCKS5 proxy server to connect the VM IP stack > > "allows to $verb" is not idiomatic English; the correct forms are > gen

Re: [Qemu-devel] [for-2.9 3/8] io vnc sockets: Clean up SocketAddressKind switches

2017-04-03 Thread Daniel P. Berrange
On Wed, Mar 29, 2017 at 06:45:15PM +0200, Markus Armbruster wrote: > We have quite a few switches over SocketAddressKind. Some have case > labels for all enumeration values, others rely on a default label. > Some abort when the value isn't a valid SocketAddressKind, others > report an error then.

Re: [Qemu-devel] [RFC v2 for-2.9 03/10] io vnc sockets: Clean up SocketAddressKind switches

2017-04-03 Thread Daniel P. Berrange
On Thu, Mar 30, 2017 at 03:15:00PM +0200, Markus Armbruster wrote: > We have quite a few switches over SocketAddressKind. Some have case > labels for all enumeration values, others rely on a default label. > Some abort when the value isn't a valid SocketAddressKind, others > report an error then.

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Paolo Bonzini
On 30/03/2017 15:41, Gerd Hoffmann wrote: > Hi, > >> Excellent! I can help out with converting and/or testing the SPARC >> devices (cg3/tcx) if required. > > Sure, test results and patches are very welcome. > > I've touched dirty bitmap code for the first time, so I've sent out this > rfc fo

Re: [Qemu-devel] [PATCH 1/1] slirp: add SOCKS5 support

2017-04-03 Thread Laurent Vivier
Le 03/04/2017 à 13:41, Daniel P. Berrange a écrit : > On Mon, Mar 27, 2017 at 01:41:36PM -0500, Eric Blake wrote: >> On 03/27/2017 01:21 PM, Laurent Vivier wrote: >>> When the VM is used behind a firewall, This allows >>> to use a SOCKS5 proxy server to connect the VM IP stack >> >> "allows to $ver

Re: [Qemu-devel] [PULL for-2.9 0/3] bugfixes: xhci, input-linux and vnc

2017-04-03 Thread Peter Maydell
iam/tags/vfio-updates-20170331.0' into staging (2017-03-31 > 18:06:13 +0100) > > are available in the git repository at: > > git://git.kraxel.org/qemu tags/pull-fixes-20170403-1 > > for you to fetch changes up to fa03cb7fd212bc07f0253db9ea436383ddc6c08f: > > vnc

[Qemu-devel] [Bug 1679126] [NEW] null pointer access on migration resume of systemrescuecd boot menu with qxl-vga

2017-04-03 Thread Matthew Stapleton
Public bug reported: With qemu-2.8.0 up to 2.9.0-rc2 and git master (6954cdc), when resuming from a migration state file created from a VM suspended while showing the System Rescue CD 4.9.2 boot menu and using the QXL VGA device, I get a null point access in pixman_image_get_data called from qemu_

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Gerd Hoffmann
Hi, > I checked the branch, is bitmap_copy_and_clear_atomic correct when you > have partial updates? Maybe you need to handle partial updates of the > first and last word? Should not be a problem. We might clear some more bits, but these are outsize the visible area so they should cause visib

[Qemu-devel] [PATCH for-2.10] net/tap: Replace tap-haiku.c and tap-aix.c by a generic tap-stub.c

2017-04-03 Thread Thomas Huth
The files tap-haiku.c and tap-aix.c are identical (except one line of error message). We should avoid such code duplication, so replace these by a generic tap-stub.c file instead. Signed-off-by: Thomas Huth --- net/Makefile.objs | 15 net/tap-haiku.c | 87 -

Re: [Qemu-devel] [PATCH for-2.10] net/tap: Replace tap-haiku.c and tap-aix.c by a generic tap-stub.c

2017-04-03 Thread Philippe Mathieu-Daudé
On 04/03/2017 09:05 AM, Thomas Huth wrote: The files tap-haiku.c and tap-aix.c are identical (except one line of error message). We should avoid such code duplication, so replace these by a generic tap-stub.c file instead. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé ---

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Mark Cave-Ayland
On 03/04/17 13:03, Gerd Hoffmann wrote: > Hi, > >> I checked the branch, is bitmap_copy_and_clear_atomic correct when you >> have partial updates? Maybe you need to handle partial updates of the >> first and last word? > > Should not be a problem. We might clear some more bits, but these are

Re: [Qemu-devel] [PATCH] virtio-gpu: replace PIXMAN_* by PIXMAN_BE_*

2017-04-03 Thread Philippe Mathieu-Daudé
On 04/03/2017 08:40 AM, Laurent Vivier wrote: This avoids a "#ifdef HOST_WORDS_BIGENDIAN" and this is the purpose of PIXMAN_BE_* macros. Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé --- hw/display/virtio-gpu.c | 35 --- 1 file changed,

Re: [Qemu-devel] [PATCH] usb-host: switch to LIBUSB_API_VERSION

2017-04-03 Thread Marc-André Lureau
Hi On Mon, Apr 3, 2017 at 12:53 PM Gerd Hoffmann wrote: > libusbx doesn't exist any more, the fork got merged back to libusb. So > stop using LIBUSBX_API_VERSION and use LIBUSB_API_VERSION instead. For > backward compatibility alias LIBUSB_API_VERSION to LIBUSBX_API_VERSION > in case we figure

Re: [Qemu-devel] [PATCH for-2.9] sockets: Fix socket_address_to_string() hostname truncation

2017-04-03 Thread Philippe Mathieu-Daudé
On 03/23/2017 08:23 AM, Markus Armbruster wrote: We first snprintf() to a fixed buffer, then g_strdup() the result *boggle*. Worse, the size of the fixed buffer INET6_ADDRSTRLEN + 5 + 4 is bogus: the 4 correctly accounts for '[', ']', ':' and '\0', but INET6_ADDRSTRLEN is not a suitable limit fo

Re: [Qemu-devel] [PATCH for-2.9 0/2] tcg/sparc: zero extend ld/st helper args

2017-04-03 Thread Peter Maydell
On 28 March 2017 at 00:35, Richard Henderson wrote: > On 03/28/2017 02:04 AM, Peter Maydell wrote: >> >> These patches fix problems with the SPARC TCG backend code >> which calls the load and store helpers. Where the argument >> being passed to the helper is narrower than the size of the >> native

Re: [Qemu-devel] [PATCH for-2.9] configure: Mark SPARC as supported

2017-04-03 Thread Peter Maydell
On 28 March 2017 at 11:58, Peter Maydell wrote: > Thanks to John Paul Adrian Glaubitz > and the Debian Project, we now have access to a SPARC Linux > system we can use for build testing. Move SPARC back into > the "supported" list. > > Signed-off-by: Peter Maydell > --- > We should also at least

Re: [Qemu-devel] [PATCH] usb-host: switch to LIBUSB_API_VERSION

2017-04-03 Thread Philippe Mathieu-Daudé
On 04/03/2017 07:52 AM, Gerd Hoffmann wrote: libusbx doesn't exist any more, the fork got merged back to libusb. So stop using LIBUSBX_API_VERSION and use LIBUSB_API_VERSION instead. For backward compatibility alias LIBUSB_API_VERSION to LIBUSBX_API_VERSION in case we figure LIBUSB_API_VERSION

Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-04-03 Thread Max Reitz
On 03.04.2017 10:15, Kevin Wolf wrote: > Am 31.03.2017 um 19:43 hat Max Reitz geschrieben: [...] >> So in theory all that's necessary is to set share-rw=on for the device >> in the management layer. But I'm not sure whether that's practical. > > Yes, libvirt needs to provide this option if the g

[Qemu-devel] [Bug 1679126] Re: null pointer access on migration resume of systemrescuecd boot menu with qxl-vga

2017-04-03 Thread Dr. David Alan Gilbert
Yep, I can repeat this here on qemu head; crash at: pixman_image_get_data (image=0x0) at pixman-image.c:845 845 if (image->type == BITS) (gdb) p image $1 = (pixman_image_t *) 0x0 ** Changed in: qemu Status: New => Confirmed -- You received this bug notification because you are

Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe.

2017-04-03 Thread Gerd Hoffmann
On Mo, 2017-04-03 at 13:24 +0100, Mark Cave-Ayland wrote: > On 03/04/17 13:03, Gerd Hoffmann wrote: > > > Hi, > > > >> I checked the branch, is bitmap_copy_and_clear_atomic correct when you > >> have partial updates? Maybe you need to handle partial updates of the > >> first and last word? > >

Re: [Qemu-devel] [RFC 05/19] pflash_cfi01: Remove user_creatable flag

2017-04-03 Thread Philippe Mathieu-Daudé
On 03/31/2017 09:46 PM, Eduardo Habkost wrote: TYPE_CFI_PFLASH01 devices need to be mapped by pflash_cfi01_register() and can't be used with -device. Remove user_creatable from the device class. Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-bl...@nongnu.org Cc: Laszlo Ersek Signed-off-by: Eduardo Hab

Re: [Qemu-devel] [PATCH RFC v3 for-2.9 09/11] rbd: Revert -blockdev parameter password-secret

2017-04-03 Thread Max Reitz
On 03.04.2017 13:37, Daniel P. Berrange wrote: > On Mon, Mar 27, 2017 at 03:26:33PM +0200, Markus Armbruster wrote: >> This reverts a part of commit 8a47e8e. We're having second thoughts >> on the QAPI schema (and thus the external interface), and haven't >> reached consensus, yet. Issues include

[Qemu-devel] [RFC PATCH v1 5/9] cpus: remove icount handling from qemu_tcg_cpu_thread_fn

2017-04-03 Thread Alex Bennée
We should never be running in multi-threaded mode with icount enabled. There is no point calling handle_icount_deadline here so remove it and assert !use_icount. Signed-off-by: Alex Bennée --- cpus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index 68

[Qemu-devel] [RFC PATCH v1 1/9] scripts/qemugdb/mtree.py: fix up mtree dump

2017-04-03 Thread Alex Bennée
Since QEMU has been able to build with native Int128 support this was broken as it attempts to fish values out of the non-existent structure. Also the alias print was trying to make a %x out of gdb.ValueType directly which didn't seem to work. Signed-off-by: Alex Bennée --- scripts/qemugdb/mtree

[Qemu-devel] [RFC PATCH v1 4/9] target/i386/misc_helper: wrap BQL around another IRQ generator

2017-04-03 Thread Alex Bennée
Anything that calls into HW emulation must be protected by the BQL. Signed-off-by: Alex Bennée --- target/i386/misc_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/misc_helper.c b/target/i386/misc_helper.c index ca2ea09f54..628f64aad5 100644 --- a/target/i386/misc_hel

Re: [Qemu-devel] [RFC 13/19] unimplemented-device: Remove user_creatable flag

2017-04-03 Thread Philippe Mathieu-Daudé
On 03/31/2017 09:46 PM, Eduardo Habkost wrote: unimplemented-device needs to be created and mapped using create_unimplemented_device(), and won't work with -device. Remove the user_creatable flag from the device class. Cc: Peter Maydell Signed-off-by: Eduardo Habkost Reviewed-by: Philippe Ma

[Qemu-devel] [RFC PATCH v1 6/9] cpus: check cpu->running in cpu_get_icount_raw()

2017-04-03 Thread Alex Bennée
The lifetime of current_cpu is now the lifetime of the vCPU thread. However get_icount_raw() can apply a fudge factor if called while code is running to take into account the current executed instruction count. To ensure this is always the case we also check cpu->running. Signed-off-by: Alex Benn

[Qemu-devel] [RFC PATCH v1 0/9] MTTCG and record/replay fixes for rc3

2017-04-03 Thread Alex Bennée
Hi, This is the current state of my fixes for icount based record and replay. It doesn't completely fix the problem (hence the RFC status) but improves it to the point that I have been able to record and replay the boot of a vexpress kernel. The first 3 patches are helper scripts I've been using

[Qemu-devel] [RFC PATCH v1 8/9] cpus: don't credit executed instructions before they have run

2017-04-03 Thread Alex Bennée
Outside of the vCPU thread icount time will only be tracked against timers_state.qemu_icount. We no longer credit cycles until they have completed the run. Inside the vCPU thread we adjust for passage of time by looking at how many have run so far. This is only valid inside the vCPU thread while it

[Qemu-devel] [RFC PATCH v1 2/9] scripts/qemu-gdb/timers.py: new helper to dump timer state

2017-04-03 Thread Alex Bennée
This introduces the qemu-gdb command "qemu timers" which will dump the state of the main timers in the system. Signed-off-by: Alex Bennée --- scripts/qemu-gdb.py | 3 ++- scripts/qemugdb/timers.py | 54 +++ 2 files changed, 56 insertions(+), 1 d

Re: [Qemu-devel] [RFC v2 for-2.9 03/10] io vnc sockets: Clean up SocketAddressKind switches

2017-04-03 Thread Max Reitz
On 03.04.2017 13:48, Daniel P. Berrange wrote: > On Thu, Mar 30, 2017 at 03:15:00PM +0200, Markus Armbruster wrote: >> We have quite a few switches over SocketAddressKind. Some have case >> labels for all enumeration values, others rely on a default label. >> Some abort when the value isn't a vali

[Qemu-devel] [RFC PATCH v1 7/9] cpus: move icount preparation out of tcg_exec_cpu

2017-04-03 Thread Alex Bennée
As icount is only supported for single-threaded execution due to the requirement for determinism let's remove it from the common tcg_exec_cpu path. Also remove the additional fiddling which shouldn't be required as the icount counters should all be rectified as you enter the loop. Signed-off-by:

[Qemu-devel] [RFC PATCH v1 9/9] replay: gracefully handle backward time events

2017-04-03 Thread Alex Bennée
For the purposes of record/replay time can only move forward. It is possible for the non-vCPU thread to find time has moved from under its feet as it goes on. This is OK as long as we don't try and re-wind time. Signed-off-by: Alex Bennée --- replay/replay-internal.c | 7 +++ replay/replay.

Re: [Qemu-devel] [RFC PATCH qemu v3 1/4] memory/iommu: QOM'fy IOMMU MemoryRegion

2017-04-03 Thread Philippe Mathieu-Daudé
On 04/01/2017 09:37 AM, 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), this adds an @is_iommu boole

[Qemu-devel] [RFC PATCH v1 3/9] scripts/replay-dump.py: replay log dumper

2017-04-03 Thread Alex Bennée
This script is a debugging tool for looking through the contents of a replay log file. It is incomplete but should fail gracefully at events it doesn't understand. It currently understands two different log formats as the audio record/replay support was merged during since MTTCG. It was written to

Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-04-03 Thread Peter Krempa
On Mon, Apr 03, 2017 at 10:15:42 +0200, Kevin Wolf wrote: > Am 31.03.2017 um 19:43 hat Max Reitz geschrieben: > > On 31.03.2017 18:03, Ciprian Barbu wrote: [...] > > So this doesn't work: > > > > $ x86_64-softmmu/qemu-system-x86_64 \ > > -blockdev node-name=image,driver=qcow2,\ > > file.driv

Re: [Qemu-devel] [PATCH v2 1/4] migration: set current_active_state once

2017-04-03 Thread Philippe Mathieu-Daudé
On 04/01/2017 05:18 AM, Peter Xu wrote: We set it right above this one. No need to set it twice. CC: Juan Quintela CC: Dr. David Alan Gilbert Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé --- migration/migration.c | 1 - 1 file changed,

Re: [Qemu-devel] [PATCH] usb-host: switch to LIBUSB_API_VERSION

2017-04-03 Thread Peter Maydell
On 3 April 2017 at 11:52, Gerd Hoffmann wrote: > libusbx doesn't exist any more, the fork got merged back to libusb. So > stop using LIBUSBX_API_VERSION and use LIBUSB_API_VERSION instead. For > backward compatibility alias LIBUSB_API_VERSION to LIBUSBX_API_VERSION > in case we figure LIBUSB_API

Re: [Qemu-devel] [RFC 13/19] unimplemented-device: Remove user_creatable flag

2017-04-03 Thread Peter Maydell
On 1 April 2017 at 01:46, Eduardo Habkost wrote: > unimplemented-device needs to be created and mapped using > create_unimplemented_device() This isn't correct -- create_unimplemented_device() is just a utility function; you can create, configure, initialize and map it "by hand" if you want. > a

Re: [Qemu-devel] [PATCH v2 3/4] hmp: info migrate_capability format tunes

2017-04-03 Thread Philippe Mathieu-Daudé
On 04/01/2017 05:18 AM, Peter Xu wrote: Dump the info in a single line is hard to read. Do it one per line. Also, the first "capabilities:" didn't help much. Let's remove it. CC: "Dr. David Alan Gilbert" Reviewed-by: "Dr. David Alan Gilbert" Signed-off-by: Peter Xu Reviewed-by: Philippe Mat

Re: [Qemu-devel] [PATCH v2 2/4] migration: rename max_size to threshold_size

2017-04-03 Thread Philippe Mathieu-Daudé
On 04/01/2017 05:18 AM, Peter Xu wrote: In migration codes (especially in migration_thread()), max_size is used in many place for the threshold value that we will start to do the final flush and jump to the next stage to dump the whole rest things to destination. However its name is confusing to

Re: [Qemu-devel] [PATCH v2 4/4] hmp: info migrate_parameters format tunes

2017-04-03 Thread Philippe Mathieu-Daudé
On 04/01/2017 05:18 AM, Peter Xu wrote: Do the same (one per line) to the parameter list. CC: "Dr. David Alan Gilbert" Reviewed-by: "Dr. David Alan Gilbert" Signed-off-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé --- hmp.c | 22 ++ 1 file changed, 10 insertions(+

Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-04-03 Thread Kevin Wolf
Am 03.04.2017 um 14:39 hat Max Reitz geschrieben: > On 03.04.2017 10:15, Kevin Wolf wrote: > > Am 31.03.2017 um 19:43 hat Max Reitz geschrieben: > > [...] > > >> So in theory all that's necessary is to set share-rw=on for the device > >> in the management layer. But I'm not sure whether that's pr

Re: [Qemu-devel] [PATCH for-2.9] block/parallels: Avoid overflows

2017-04-03 Thread Max Reitz
On 31.03.2017 19:05, Max Reitz wrote: > Change the types of variables in allocate_clusters() to int64_t so we do > not have to worry about potential overflows. > > Add an assertion that our accesses to s->bat[] do not result in a buffer > overflow and that the implicit conversion performed when in

[Qemu-devel] [PATCH for-2.9] configure: on Windows minimum glib version must be 2.30

2017-04-03 Thread Peter Maydell
In the 2.7 release we stated in the ChangeLog that the minimum glib version for Windows hosts was 2.30, but we didn't update configure to enforce this because we were very close to the release at the point where we noticed the issue, and it only affected building the test suite. We then forgot that

Re: [Qemu-devel] [PATCH RFC v3 for-2.9 09/11] rbd: Revert -blockdev parameter password-secret

2017-04-03 Thread Daniel P. Berrange
On Mon, Apr 03, 2017 at 02:42:48PM +0200, Max Reitz wrote: > On 03.04.2017 13:37, Daniel P. Berrange wrote: > > On Mon, Mar 27, 2017 at 03:26:33PM +0200, Markus Armbruster wrote: > >> This reverts a part of commit 8a47e8e. We're having second thoughts > >> on the QAPI schema (and thus the external

Re: [Qemu-devel] [RFC v2 for-2.9 03/10] io vnc sockets: Clean up SocketAddressKind switches

2017-04-03 Thread Daniel P. Berrange
On Mon, Apr 03, 2017 at 02:50:12PM +0200, Max Reitz wrote: > On 03.04.2017 13:48, Daniel P. Berrange wrote: > > On Thu, Mar 30, 2017 at 03:15:00PM +0200, Markus Armbruster wrote: > >> We have quite a few switches over SocketAddressKind. Some have case > >> labels for all enumeration values, others

Re: [Qemu-devel] [PATCH RFC v3 for-2.9 09/11] rbd: Revert -blockdev parameter password-secret

2017-04-03 Thread Jeff Cody
On Mon, Apr 03, 2017 at 02:04:42PM +0100, Daniel P. Berrange wrote: > On Mon, Apr 03, 2017 at 02:42:48PM +0200, Max Reitz wrote: > > On 03.04.2017 13:37, Daniel P. Berrange wrote: > > > On Mon, Mar 27, 2017 at 03:26:33PM +0200, Markus Armbruster wrote: > > >> This reverts a part of commit 8a47e8e.

Re: [Qemu-devel] [PATCH RFC v3 for-2.9 09/11] rbd: Revert -blockdev parameter password-secret

2017-04-03 Thread Max Reitz
On 03.04.2017 15:04, Daniel P. Berrange wrote: > On Mon, Apr 03, 2017 at 02:42:48PM +0200, Max Reitz wrote: >> On 03.04.2017 13:37, Daniel P. Berrange wrote: >>> On Mon, Mar 27, 2017 at 03:26:33PM +0200, Markus Armbruster wrote: This reverts a part of commit 8a47e8e. We're having second thoug

Re: [Qemu-devel] [RFC v2 for-2.9 03/10] io vnc sockets: Clean up SocketAddressKind switches

2017-04-03 Thread Max Reitz
On 03.04.2017 15:05, Daniel P. Berrange wrote: > On Mon, Apr 03, 2017 at 02:50:12PM +0200, Max Reitz wrote: >> On 03.04.2017 13:48, Daniel P. Berrange wrote: >>> On Thu, Mar 30, 2017 at 03:15:00PM +0200, Markus Armbruster wrote: We have quite a few switches over SocketAddressKind. Some have c

Re: [Qemu-devel] [PATCH] char: kick main loop after adding a watch

2017-04-03 Thread Stefan Hajnoczi
On Fri, Mar 31, 2017 at 06:53:56PM +0200, Paolo Bonzini wrote: > > > On 31/03/2017 18:43, Stefan Hajnoczi wrote: > > The ISA serial port device's output can hang when the pipe on stdout > > becomes full. This is a race condition where the vcpu thread executing > > serial emulation code adds a wa

Re: [Qemu-devel] [PATCH v1 1/3] applesmc: cosmetic whitespace and indentation cleanup

2017-04-03 Thread Philippe Mathieu-Daudé
Hi Gabriel, On 03/31/2017 01:48 PM, Gabriel L. Somlo wrote: Signed-off-by: Gabriel Somlo --- hw/misc/applesmc.c | 100 +++-- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c index 77fab5b..98

Re: [Qemu-devel] [RFC 13/19] unimplemented-device: Remove user_creatable flag

2017-04-03 Thread Eduardo Habkost
On Mon, Apr 03, 2017 at 01:57:06PM +0100, Peter Maydell wrote: > On 1 April 2017 at 01:46, Eduardo Habkost wrote: > > unimplemented-device needs to be created and mapped using > > create_unimplemented_device() > > This isn't correct -- create_unimplemented_device() is > just a utility function; y

  1   2   3   >