[Qemu-devel] [PATCH v4 20/26] ppc/xics: register the reset handler of ICP objects

2017-02-27 Thread Cédric Le Goater
The reset of the ICP objects is currently handled by XICS but this can be done for each individual ICP. Signed-off-by: Cédric Le Goater --- hw/intc/xics.c | 18 -- hw/ppc/spapr.c | 1 + 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/hw/intc/xics.c b/hw/intc/xics.

[Qemu-devel] segfault use VRingMemoryRegionCaches for avail and used ring vs num-queues

2017-02-27 Thread Christian Borntraeger
Paolo, commit 97cd965c070152bc626c7507df9fb356bbe1cd81 "virtio: use VRingMemoryRegionCaches for avail and used rings" does cause a segfault on my s390 system when I use num-queues. gdb --args qemu-system-s390x -nographic -enable-kvm -m 1G -drive file=/var/lib/libvirt/qemu/image.zhyp137,if=none,i

[Qemu-devel] [PATCH v4 13/26] ppc/xics: remove the XICS list of ICS

2017-02-27 Thread Cédric Le Goater
This is not used anymore. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- hw/intc/xics.c| 8 hw/ppc/spapr.c| 1 - include/hw/ppc/xics.h | 2 -- 3 files changed, 11 deletions(-) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 97775c2b61e5..76b50dc7722a

Re: [Qemu-devel] [PATCH 22/54] block: Request real permissions in bdrv_attach_child()

2017-02-27 Thread Kevin Wolf
Am 22.02.2017 um 15:31 hat Max Reitz geschrieben: > On 21.02.2017 15:58, Kevin Wolf wrote: > > Now that all block drivers with children tell us what permissions they > > need from each of their children, bdrv_attach_child() can use this > > information and make the right requirements while trying t

[Qemu-devel] [PATCH v4 16/26] ppc/xics: simplify the cpu_setup() handler

2017-02-27 Thread Cédric Le Goater
The cpu_setup() handler currently takes a 'XICSState *' argument to grab the kernel ICP file descriptor. This interface can be simplified by using the 'xics' backlink of the ICP object. This change is also required by subsequent patches which makes use of the QOM interface for XICS. Signed-off-by

[Qemu-devel] [PATCH v1 1/2] new: dockerfiles/debian-s390-cross

2017-02-27 Thread Alex Bennée
This adds an s390 cross build target to our library of docker setups. There is an issue with the xfslibs-dev:s390x package having a clash so we do a || apt-get -f install to fixup the rest of the dependencies. This doesn't build on the debian.docker file as we are using the multilib compiler which

[Qemu-devel] [PATCH v4 15/26] ppc/xics: move kernel_xics_fd out of KVMXICSState

2017-02-27 Thread Cédric Le Goater
The kernel ICP file descriptor is the only reason behind the KVMXICSState class and it's in the way of more cleanups. Let's make it a static for the moment and move forward. If this is problem, we could use an attribute under the sPAPR machine later on. Signed-off-by: Cédric Le Goater --- hw/in

[Qemu-devel] [PATCH v4 23/26] ppc/xics: remove the XICSState classes

2017-02-27 Thread Cédric Le Goater
The XICSState classes are not used anymore. They have now been fully deprecated by the XICSFabric QOM interface. Do the cleanups. Signed-off-by: Cédric Le Goater --- hw/intc/xics.c | 11 --- hw/intc/xics_kvm.c | 13 - hw/intc/xics_spapr.c | 14 -- hw

Re: [Qemu-devel] [PATCH 18/54] block: Default .bdrv_child_perm() for format drivers

2017-02-27 Thread Max Reitz
On 27.02.2017 15:05, Kevin Wolf wrote: > Am 27.02.2017 um 13:34 hat Max Reitz geschrieben: >> On 27.02.2017 13:33, Kevin Wolf wrote: >>> Am 25.02.2017 um 12:57 hat Max Reitz geschrieben: On 21.02.2017 15:58, Kevin Wolf wrote: > Almost all format drivers have the same characteristics as far

[Qemu-devel] [PATCH v4 22/26] ppc/xics: export the XICS init routines

2017-02-27 Thread Cédric Le Goater
There is nothing left related to the XICS object in the realize functions of the KVMXICSState and XICSState class. So adapt the interfaces to call these routines directly from the sPAPR machine init sequence. Signed-off-by: Cédric Le Goater --- hw/intc/xics_kvm.c| 13 +++-- hw/intc/x

[Qemu-devel] [PATCH v4 18/26] ppc/xics: use the QOM interface to grab an ICP

2017-02-27 Thread Cédric Le Goater
Also introduce a xics_icp_get() helper to simplify the changes. Signed-off-by: Cédric Le Goater --- Changes since v3: - changed ICSState 'xics' backlink to be a XICSFabric. hw/intc/xics.c | 32 ++-- hw/intc/xics_spapr.c| 17 + hw/ppc/

[Qemu-devel] [PATCH v4 21/26] ppc/xics: move the ICP array under the sPAPR machine

2017-02-27 Thread Cédric Le Goater
This is the last step to remove the XICSState abstraction and have the machine hold all the objects related to interrupts : ICSs and ICPs. Signed-off-by: Cédric Le Goater --- hw/ppc/spapr.c | 17 - include/hw/ppc/spapr.h | 3 +++ include/hw/ppc/xics.h | 2 -- 3 files c

Re: [Qemu-devel] [PATCH v2 04/28] 9pfs: introduce openat_nofollow() helper

2017-02-27 Thread Greg Kurz
On Mon, 27 Feb 2017 12:44:30 + Stefan Hajnoczi wrote: > On Sun, Feb 26, 2017 at 11:42:03PM +0100, Greg Kurz wrote: > > +int openat_nofollow(int dirfd, const char *path, int flags, mode_t mode) > > +{ > > +int fd; > > + > > +fd = dup(dirfd); > > +if (fd == -1) { > > +return

[Qemu-devel] [PATCH v4 19/26] ppc/xics: simplify spapr_dt_xics() interface

2017-02-27 Thread Cédric Le Goater
spapr_dt_xics() only needs the number of servers to build the device tree nodes. Let's change the routine interface to reflect that. Signed-off-by: Cédric Le Goater --- hw/intc/xics_spapr.c | 4 ++-- hw/ppc/spapr.c| 2 +- include/hw/ppc/xics.h | 2 +- 3 files changed, 4 insertions(+), 4

[Qemu-devel] [PATCH v4 03/26] ppc/xics: remove set_nr_irqs() handler from XICSStateClass

2017-02-27 Thread Cédric Le Goater
Today, the ICS (Interrupt Controller Source) object is created and realized by the init and realize routines of the XICS object, but some of the parameters are only known at the machine level. These parameters are passed from the sPAPR machine to the ICS object in a rather convoluted way using pro

[Qemu-devel] [PATCH v4 25/26] ppc/xics: move InterruptStatsProvider to the sPAPR machine

2017-02-27 Thread Cédric Le Goater
It provides a better monitor output of the ICP and ICS objects, else the objects are printed out of order. Signed-off-by: Cédric Le Goater --- hw/intc/xics.c| 20 ++-- hw/ppc/spapr.c| 17 + include/hw/ppc/xics.h | 2 ++ 3 files changed, 21 inserti

Re: [Qemu-devel] [PULL 08/24] tcg: drop global lock during TCG code execution

2017-02-27 Thread Alex Bennée
Laurent Desnogues writes: > Hello, > > On Fri, Feb 24, 2017 at 12:20 PM, Alex Bennée wrote: >> From: Jan Kiszka >> >> This finally allows TCG to benefit from the iothread introduction: Drop >> the global mutex while running pure TCG CPU code. Reacquire the lock >> when entering MMIO or PIO emu

[Qemu-devel] [PATCH v4 07/26] ppc/xics: introduce a XICSFabric QOM interface to handle ICSs

2017-02-27 Thread Cédric Le Goater
This interface provides two simple handlers. One is to get an ICS (Interrupt Source Controller) object from an irq number and a second to resend the irqs when needed. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- Changes since v2: - renamed QOM Interface to XICSFabric hw/int

[Qemu-devel] [PATCH v4 26/26] ppc/xics: rename 'ICPState *' variables to 'icp'

2017-02-27 Thread Cédric Le Goater
'ICPState *' variables are currently named 'ss'. This is confusing, so let's give them an appropriate name: 'icp'. Signed-off-by: Cédric Le Goater --- hw/intc/xics.c | 154 ++--- hw/intc/xics_kvm.c | 34 ++-- 2 files changed, 94 insert

[Qemu-devel] [PATCH v4 24/26] ppc/xics: move ics-simple post_load under the machine

2017-02-27 Thread Cédric Le Goater
The ICS object uses a post_load() handler which is implicitly relying on the fact that the internal state of the ICS and ICP objects has been restored but this is not guaranteed. So, let's move the code under the post_load() handler of the machine where we know the objects have been fully restored.

[Qemu-devel] [PATCH v4 08/26] ppc/xics: use the QOM interface under the sPAPR machine

2017-02-27 Thread Cédric Le Goater
Add 'ics_get' and 'ics_resend' handlers to the sPAPR machine. These are relatively simple for a single ICS. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- hw/intc/xics.c| 2 +- hw/ppc/spapr.c| 18 ++ include/hw/ppc/xics.h | 1 + 3 files changed,

Re: [Qemu-devel] [PATCH v16 13/22] qcow2: add persistent dirty bitmaps support

2017-02-27 Thread Max Reitz
On 25.02.2017 18:07, Vladimir Sementsov-Ogievskiy wrote: > Store persistent dirty bitmaps in qcow2 image. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block.c | 6 +- > block/qcow2-bitmap.c | 473 > +++ > block/qcow2.c

Re: [Qemu-devel] [PATCH] pl190: Fix off-by-one error in priority handling when reading VECTADDR

2017-02-27 Thread Marc Bommert
> Peter Maydell hat am 27. Februar 2017 um 15:07 > geschrieben: > > The comment in pl190_read() about VECTADDR says > "an enabled interrupt X at priority P causes prio_mask[Y] > to have bit X set for all Y > P", but your patch would > make that not be true. Sorry, of course, the comment has to

Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support

2017-02-27 Thread Andrea Arcangeli
Hello, On Mon, Feb 27, 2017 at 11:26:58AM +, Dr. David Alan Gilbert wrote: > * Alexey Perevalov (a.pereva...@samsung.com) wrote: > > Also if I'm not wrong, commands and pages are transferred over the same > > socket. Why not to use OOB TCP in this case for commands? > > My understanding was t

[Qemu-devel] [PATCH v4 11/26] ppc/xics: remove xics_find_source()

2017-02-27 Thread Cédric Le Goater
It is not used anymore now that we have the QOM interface for XICS. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- hw/intc/xics.c| 12 include/hw/ppc/xics.h | 1 - 2 files changed, 13 deletions(-) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 23e45a87d

Re: [Qemu-devel] segfault use VRingMemoryRegionCaches for avail and used ring vs num-queues

2017-02-27 Thread Cornelia Huck
On Mon, 27 Feb 2017 15:09:30 +0100 Christian Borntraeger wrote: > Paolo, > > commit 97cd965c070152bc626c7507df9fb356bbe1cd81 > "virtio: use VRingMemoryRegionCaches for avail and used rings" > does cause a segfault on my s390 system when I use num-queues. > > gdb --args qemu-system-s390x -nograp

[Qemu-devel] [PATCH v4 12/26] ppc/xics: register the reset handler of ICS objects

2017-02-27 Thread Cédric Le Goater
The reset of the ICS objects is currently handled by XICS but this can be done for each individual ICS. This also reduces the use of the XICS list of ICS. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- hw/intc/xics.c | 5 - hw/ppc/spapr.c | 1 + 2 files changed, 1 insertion(+

Re: [Qemu-devel] [PULL v2 00/17] KVM and cpu-exec patches for 2.9 soft freeze

2017-02-27 Thread Peter Maydell
On 27 February 2017 at 12:45, Paolo Bonzini wrote: > The following changes since commit d992f2f1368ceb92e6bfd8efece174110f4236ff: > > Merge remote-tracking branch 'remotes/artyom/tags/pull-sun4v-20170226' into > staging (2017-02-26 22:40:23 +) > > are available in the git repository at: > >

[Qemu-devel] [PULL 2/3] audio: make audio poll timer deterministic

2017-02-27 Thread Gerd Hoffmann
From: Pavel Dovgalyuk This patch changes resetting strategy of the audio polling timer. It does not change expiration time if the timer is already set. This patch is needed to make this timer deterministic and to use execution record/replay for audio devices. audio_reset_timer is used in the fun

Re: [Qemu-devel] [PATCH v2 06/28] 9pfs: local: open/opendir: don't follow symlinks

2017-02-27 Thread Greg Kurz
On Mon, 27 Feb 2017 12:49:01 + Stefan Hajnoczi wrote: > On Sun, Feb 26, 2017 at 11:42:18PM +0100, Greg Kurz wrote: > > @@ -48,6 +49,24 @@ typedef struct { > > int mountfd; > > } LocalData; > > > > +int local_open_nofollow(FsContext *fs_ctx, const char *path, int flags, > > +

Re: [Qemu-devel] [PATCH v16 15/22] qcow2: add .bdrv_can_store_new_dirty_bitmap

2017-02-27 Thread Max Reitz
On 25.02.2017 18:07, Vladimir Sementsov-Ogievskiy wrote: > Realize .bdrv_can_store_new_dirty_bitmap interface. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: John Snow > --- > block/qcow2-bitmap.c | 51 +++ > block/qcow2.c|

Re: [Qemu-devel] [PATCH v2 00/28] Series short description

2017-02-27 Thread Stefan Hajnoczi
On Sun, Feb 26, 2017 at 11:41:32PM +0100, Greg Kurz wrote: > This series tries to fix CVE-2016-9602 reported by Jann Horn of Google > Project Zero: > > https://bugzilla.redhat.com/show_bug.cgi?id=1413929 > > This vulnerability affects all accesses to the underlying filesystem in > the "local" bac

Re: [Qemu-devel] [PATCH] pl190: Fix off-by-one error in priority handling when reading VECTADDR

2017-02-27 Thread Peter Maydell
On 27 February 2017 at 14:35, Marc Bommert wrote: >> Peter Maydell hat am 27. Februar 2017 um 15:07 >> geschrieben: >> Suppose that only the interrupt programmed into VECTCNTL[0] >> and VECTADDR[0] is active. We will initially set the IRQ line >> (since s->priority is 17 and s->prio_mask[17] is

Re: [Qemu-devel] [PULL 11/24] tcg: enable thread-per-vCPU

2017-02-27 Thread Alex Bennée
Laurent Vivier writes: > Le 24/02/2017 à 12:20, Alex Bennée a écrit : >> There are a couple of changes that occur at the same time here: >> >> - introduce a single vCPU qemu_tcg_cpu_thread_fn >> >> One of these is spawned per vCPU with its own Thread and Condition >> variables. qemu_tcg_rr

Re: [Qemu-devel] [PULL v2 00/17] KVM and cpu-exec patches for 2.9 soft freeze

2017-02-27 Thread Peter Maydell
On 27 February 2017 at 14:37, Peter Maydell wrote: > PPC64, AArch64, ARM: > > /home/pm215/qemu/kvm-all.c:1898:23: error: ‘pending_sigbus_addr’ > defined but not used [-Werror=unuse > d-variable] > static __thread void *pending_sigbus_addr; >^ > /home/pm215/qemu/kvm-all.c:1

[Qemu-devel] [Bug 1668273] Re: DoS possible on - a QEMU process using userspace SLIRP?

2017-02-27 Thread Nehal J Wani
** Description changed: Steps to reproduce: - Launch a VM using QEMU (2.8.0): $ qemu-system-x86_64 \ -machine accel=kvm \ -hda Fedora-Cloud-Base-25-1.3.x86_64.qcow2 \ -m 2G \ -smp 2 \ -vnc :8 \ -boot dc \ -vga std \ -cpu host \ -net

[Qemu-devel] [PATCH v4 14/26] ppc/xics: extend the QOM interface to handle ICPs

2017-02-27 Thread Cédric Le Goater
Let's add two new handlers for ICPs. One is to get an ICP object from a server number and a second is to resend the irqs when needed. The icp_resend() handler is a temporary workaround needed by the ics-simple post_load() handler. It will be removed when the post_load portion can be done at the ma

Re: [Qemu-devel] [PATCH 4/4] block/rbd: Add blockdev-add support

2017-02-27 Thread Jeff Cody
On Mon, Feb 27, 2017 at 01:45:47PM +, Daniel P. Berrange wrote: > On Mon, Feb 27, 2017 at 02:30:41AM -0500, Jeff Cody wrote: > > Signed-off-by: Jeff Cody > > --- > > qapi/block-core.json | 47 --- > > 1 file changed, 44 insertions(+), 3 deletions(-)

Re: [Qemu-devel] [RFC 00/13] Live memory snapshot based on userfaultfd

2017-02-27 Thread Christian Pinto
Hello Hailiang, are there any updates on this patch series? Are you planning to release a new version? You say there are some issues with the current snapshot-v2 version, which issues were you referring to? On my side the only problem I have seen was that the live snapshot was not working on

Re: [Qemu-devel] segfault use VRingMemoryRegionCaches for avail and used ring vs num-queues

2017-02-27 Thread Paolo Bonzini
On 27/02/2017 15:09, Christian Borntraeger wrote: > Paolo, > > commit 97cd965c070152bc626c7507df9fb356bbe1cd81 > "virtio: use VRingMemoryRegionCaches for avail and used rings" > does cause a segfault on my s390 system when I use num-queues. I've sent a patch for this already: [PATCH] virtio: ch

[Qemu-devel] [PULL 0/3] audio patch queue

2017-02-27 Thread Gerd Hoffmann
repository at: git://git.kraxel.org/qemu tags/pull-audio-20170227-1 for you to fetch changes up to 516452fe6accef3f94b4bcf060b2518038f50c08: audio/sdlaudio: Allow audio playback with SDL2 (2017-02-27 14:37:59 +0100) audio: replay

Re: [Qemu-devel] [PATCH] virtio: check for vring setup in virtio_queue_empty

2017-02-27 Thread Cornelia Huck
On Thu, 23 Feb 2017 09:51:30 +0100 Paolo Bonzini wrote: > If the vring has not been set up, there is nothing in the virtqueue. > virtio_queue_host_notifier_aio_poll calls virtio_queue_empty even in > this case; we have to filter it out just like virtio_queue_notify_aio_vq. > > Reported-by: Gerd

[Qemu-devel] [PULL 3/3] audio/sdlaudio: Allow audio playback with SDL2

2017-02-27 Thread Gerd Hoffmann
From: Thomas Huth When compiling with SDL2, the semaphore trick used in sdlaudio.c does not work - QEMU locks up completely in this case. To avoid the hang and get at least some audio playback up and running (it's a little bit crackling, but better than nothing), we can use the SDL locking functi

Re: [Qemu-devel] [PULL v1 0/3] Merge qio 2017/02/27

2017-02-27 Thread Daniel P. Berrange
On Mon, Feb 27, 2017 at 03:33:02PM +, Peter Maydell wrote: > On 27 February 2017 at 13:35, Daniel P. Berrange wrote: > > The following changes since commit d992f2f1368ceb92e6bfd8efece174110f4236ff: > > > > Merge remote-tracking branch 'remotes/artyom/tags/pull-sun4v-20170226' > > into stagi

[Qemu-devel] [PULL 1/3] replay: add record/replay for audio passthrough

2017-02-27 Thread Gerd Hoffmann
From: Pavel Dovgalyuk This patch adds recording and replaying audio data. Is saves synchronization information for audio out and inputs from the microphone. v2: removed unneeded whitespace change Signed-off-by: Pavel Dovgalyuk Message-id: 20170202055054.4848.94901.st...@pasha-isp.lan02.inno Si

Re: [Qemu-devel] [PULL v1 0/3] Merge qio 2017/02/27

2017-02-27 Thread Peter Maydell
On 27 February 2017 at 13:35, Daniel P. Berrange wrote: > The following changes since commit d992f2f1368ceb92e6bfd8efece174110f4236ff: > > Merge remote-tracking branch 'remotes/artyom/tags/pull-sun4v-20170226' into > staging (2017-02-26 22:40:23 +) > > are available in the git repository at

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

2017-02-27 Thread Paolo Bonzini
On 27/02/2017 14:41, Marc-André Lureau wrote: > > -chr = CHARDEV(object_new(typename)); > +if (id) { > +obj = object_new_with_props(typename, get_chardevs_root(), > +id, &local_err, NULL); > +} else { > +obj = object_new(typename);

Re: [Qemu-devel] [PATCH v2 04/28] 9pfs: introduce openat_nofollow() helper

2017-02-27 Thread Stefan Hajnoczi
On Mon, Feb 27, 2017 at 03:31:47PM +0100, Greg Kurz wrote: > On Mon, 27 Feb 2017 12:44:30 + > Stefan Hajnoczi wrote: > > > On Sun, Feb 26, 2017 at 11:42:03PM +0100, Greg Kurz wrote: > > > +int openat_nofollow(int dirfd, const char *path, int flags, mode_t mode) > > > +{ > > > +int fd; > >

Re: [Qemu-devel] segfault use VRingMemoryRegionCaches for avail and used ring vs num-queues

2017-02-27 Thread Cornelia Huck
On Mon, 27 Feb 2017 16:06:09 +0100 Cornelia Huck wrote: > On Mon, 27 Feb 2017 15:09:30 +0100 > Christian Borntraeger wrote: > > > Paolo, > > > > commit 97cd965c070152bc626c7507df9fb356bbe1cd81 > > "virtio: use VRingMemoryRegionCaches for avail and used rings" > > does cause a segfault on my s3

Re: [Qemu-devel] segfault use VRingMemoryRegionCaches for avail and used ring vs num-queues

2017-02-27 Thread Paolo Bonzini
On 27/02/2017 16:37, Cornelia Huck wrote: > With the following applied (probably whitespace damaged), my guest > starts: > > diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c > index e487e36..28906e5 100644 > --- a/hw/virtio/virtio.c > +++ b/hw/virtio/virtio.c > @@ -287,6 +287,9 @@ static inl

[Qemu-devel] [Bug 1668273] Re: DoS possible on - a QEMU process using userspace SLIRP?

2017-02-27 Thread Daniel Berrange
Unless I'm mis-understanding what you're saying you have an app which opens 100's of TCP conenctions in the guest, and this causes QEMU to have 100's of file descriptors open in the host. If so, this is normal behaviour of SLIRP - it opens a socket for every connection it has to proxy across from

Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support

2017-02-27 Thread Daniel P. Berrange
On Mon, Feb 27, 2017 at 04:00:15PM +0100, Andrea Arcangeli wrote: > Hello, > > On Mon, Feb 27, 2017 at 11:26:58AM +, Dr. David Alan Gilbert wrote: > > * Alexey Perevalov (a.pereva...@samsung.com) wrote: > > > Also if I'm not wrong, commands and pages are transferred over the same > > > socket.

Re: [Qemu-devel] [PATCH v2 1/5] elf-loader: Allow late loading of elf

2017-02-27 Thread Cornelia Huck
On Thu, 23 Feb 2017 13:20:21 +0100 Cornelia Huck wrote: > From: Farhan Ali > > The current QEMU ROM infrastructure rejects late loading of ROMs. > And ELFs are currently loaded as ROM, this prevents delayed loading > of ELFs. So when loading ELF, allow the user to specify if ELF should > be loa

Re: [Qemu-devel] [PULL 00/24] MTTCG Base enabling patches with ARM enablement

2017-02-27 Thread Alex Bennée
Paolo Bonzini writes: > On 24/02/2017 12:20, Alex Bennée wrote: >> The following changes since commit 2d896b454a0e19ec4c1ddbb0e0b65b7e54fcedf3: >> >> Revert "hw/mips: MIPS Boston board support" (2017-02-23 18:04:45 +) >> >> are available in the git repository at: >> >> https://github.com

Re: [Qemu-devel] [PATCH] os: don't corrupt pre-existing memory-backend data with prealloc

2017-02-27 Thread Andrea Arcangeli
Hello, On Fri, Feb 24, 2017 at 05:27:14PM +, Daniel P. Berrange wrote: > diff --git a/util/oslib-posix.c b/util/oslib-posix.c > index 35012b9..2a5bb93 100644 > --- a/util/oslib-posix.c > +++ b/util/oslib-posix.c > @@ -355,7 +355,20 @@ void os_mem_prealloc(int fd, char *area, size_t memory, >

Re: [Qemu-devel] [PATCH] blk: Add discard=sparse mode

2017-02-27 Thread Max Reitz
Hi, On 27.02.2017 01:45, Samuel Thibault wrote: > By default, on discard requests, the posix block backend punches holes but > re-fallocates them to keep the allocated size intact. In some situations > it is however convenient, when using sparse disk images, to see disk image > sizes shrink on dis

[Qemu-devel] [Bug 1668273] Re: DoS possible on - a QEMU process using userspace SLIRP?

2017-02-27 Thread Nehal J Wani
But lsof shows that all connections are stuck at FIN_WAIT2 for an indefinite amount of time. Is that expected? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1668273 Title: DoS possible on - a QEMU

[Qemu-devel] [[PATCH-2]] Removed support for DEPTH!=32 in sm501.c

2017-02-27 Thread Suramya Shah
Signed-off-by: Suramya Shah --- hw/display/sm501.c | 17 - 1 file changed, 17 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 040a0b9..faca906 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -1173,23 +1173,6 @@ typedef void draw_line_func(uint8

Re: [Qemu-devel] [PATCH 0/2] vl: Print warning if a non-empty default config-file is found

2017-02-27 Thread Eduardo Habkost
Ping? I would like to include the warning on QEMU 2.9 (and I assume it qualifies as post-soft-freeze material). I am not sure I should go with a simpler solution and print the warning even if the config file was empty. Opinions? On Wed, Jan 18, 2017 at 11:56:22AM -0200, Eduardo Habkost wrote: >

[Qemu-devel] [PULL 5/9] sdl2: add scanout_disable support

2017-02-27 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 1487669841-13668-6-git-send-email-kra...@redhat.com --- include/ui/sdl2.h | 1 + ui/sdl2-gl.c | 16 +++- ui/sdl2.c | 1 + 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/include/ui/

Re: [Qemu-devel] [PATCH] vfio pci: kernel support of error recovery only for non fatal error

2017-02-27 Thread Michael S. Tsirkin
On Mon, Feb 27, 2017 at 03:28:43PM +0800, Cao jin wrote: > Subject: Re: [PATCH] vfio pci: kernel support of error recovery only for non > fatal error Don't make the subject so long. This is why I had [PATCH v3] vfio error recovery: kernel support you also want to add versioning as you inhe

Re: [Qemu-devel] [PULL 00/24] MTTCG Base enabling patches with ARM enablement

2017-02-27 Thread Paolo Bonzini
On 27/02/2017 16:48, Alex Bennée wrote: > Currently the code does: > > static bool default_mttcg_enabled(void) > { > QemuOpts *icount_opts = qemu_find_opts_singleton("icount"); > const char *rr = qemu_opt_get(icount_opts, "rr"); > > if (rr || TCG_OVERSIZED_GUEST) { >

[Qemu-devel] [PULL 2/9] console: add dpy_gl_scanout_disable

2017-02-27 Thread Gerd Hoffmann
Helper function (and DisplayChangeListenerOps ptr) to disable scanouts. Replaces using dpy_gl_scanout_texture with 0x0 size and no texture specified. Allows cleanups to make the io and gfx emulation code more readable. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 1487

[Qemu-devel] [PULL 01/11] i386: Unset cannot_destroy_with_object_finalize_yet on "host" model

2017-02-27 Thread Eduardo Habkost
The class is now safe because the assert(kvm_enabled()) line was removed by commit e435601058e656e6d24e3e87b187e5518f7bf16a. Message-Id: <20170119210449.11991-2-ehabk...@redhat.com> Signed-off-by: Eduardo Habkost --- target/i386/cpu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/i

[Qemu-devel] [PULL 3/9] virtio-gpu: use dpy_gl_scanout_disable

2017-02-27 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 1487669841-13668-4-git-send-email-kra...@redhat.com --- hw/display/virtio-gpu-3d.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c index b526b3

[Qemu-devel] [PULL 6/9] gtk-egl: add scanout_disable support

2017-02-27 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 1487669841-13668-7-git-send-email-kra...@redhat.com --- include/ui/gtk.h | 1 + ui/gtk-egl.c | 15 ++- ui/gtk.c | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/include/ui/gtk.

[Qemu-devel] [PULL 05/11] qapi-schema: Comment about full expansion of non-migration-safe models

2017-02-27 Thread Eduardo Habkost
Add a note warning that static expansion may not be 100% accurate when the CPU model is not migration-safe. This will be the case on x86 when expansing the "host" CPU model, because there are "host" features that can't have a migration-safe representation (e.g. "host-cache-info"). Message-Id: <201

[Qemu-devel] [PULL 4/9] spice: add scanout_disable support

2017-02-27 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 1487669841-13668-5-git-send-email-kra...@redhat.com --- ui/spice-display.c | 36 +--- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/ui/spice-display.c b/ui/spice-display.c in

[Qemu-devel] [PULL 1/9] console: rename dpy_gl_scanout to dpy_gl_scanout_texture

2017-02-27 Thread Gerd Hoffmann
We'll add a variant which accepts dmabufs soon. Change the name so we can easily disturgish the two variants. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 1487669841-13668-2-git-send-email-kra...@redhat.com --- hw/display/virtio-gpu-3d.c | 14 +++--- include/

[Qemu-devel] [PULL 8/9] spice: add display & head options

2017-02-27 Thread Gerd Hoffmann
This allows to specify display and head to use, simliar to vnc. Signed-off-by: Gerd Hoffmann Message-id: 1487663858-11731-1-git-send-email-kra...@redhat.com --- ui/spice-core.c| 6 ++ ui/spice-display.c | 22 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PULL 0/9] ui patch queue

2017-02-27 Thread Gerd Hoffmann
://git.kraxel.org/qemu tags/pull-ui-20170227-1 for you to fetch changes up to 2dc120beb89b825033972db441ab540bcc42a17e: vnc: fix double free issues (2017-02-27 16:22:01 +0100) gtk: fix kbd on xwayland vnc: fix double free issues opengl

[Qemu-devel] [PULL 06/11] i386: Create "max" CPU model

2017-02-27 Thread Eduardo Habkost
Rename the existing "host" CPU model to "max, and set it to kvm_enabled=false. The new "max" CPU model will be able to enable all features supported by TCG out of the box, because its logic is based on x86_cpu_get_supported_feature_word(), which already works with TCG. A new KVM-specific "host" cl

[Qemu-devel] [PULL 7/9] ui: Use XkbGetMap and XkbGetNames instead of XkbGetKeyboard

2017-02-27 Thread Gerd Hoffmann
From: "Daniel P. Berrange" XkbGetKeyboard does not work in XWayland and even on non-Wayland X11 servers its use is discouraged: https://bugs.freedesktop.org/show_bug.cgi?id=89240 This resolves a problem whereby QEMU prints "could not lookup keycode name" on startup when running under XWay

[Qemu-devel] [PULL 02/11] i386: Add ordering field to CPUClass

2017-02-27 Thread Eduardo Habkost
Instead of using kvm_enabled to order the "-cpu help" list, use a new "ordering" field for that. Message-Id: <20170119210449.11991-3-ehabk...@redhat.com> Tested-by: Jiri Denemark Signed-off-by: Eduardo Habkost --- target/i386/cpu-qom.h | 2 ++ target/i386/cpu.c | 8 2 files changed

[Qemu-devel] [PULL 10/11] i386: Implement query-cpu-model-expansion QMP command

2017-02-27 Thread Eduardo Habkost
Implement query-cpu-model-expansion for target-i386. This should meet all the requirements while being simple. In the case of static expansion, it will use the new "base" CPU model, and in the case of full expansion, it will keep the original CPU model name+props, and append extra properties. A f

[Qemu-devel] [PULL 00/11] x86 queue, 2017-02-27

2017-02-27 Thread Eduardo Habkost
The following changes since commit 3b1d8169844fafee184366b0e0d7080534758b4d: tests-aio-multithread: use atomic_read properly (2017-02-27 12:54:08 +) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/x86-pull-request for you to fetch changes up to b8097deb35

[Qemu-devel] [PULL 9/9] vnc: fix double free issues

2017-02-27 Thread Gerd Hoffmann
Reported by Coverity: CID 1371242, 1371243, 1371244. Cc: Paolo Bonzini Cc: Peter Maydell Cc: Daniel P. Berrange Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 1487682332-29154-1-git-send-email-kra...@redhat.com --- ui/vnc.c | 3 +++ 1 file changed, 3 insertions(+) d

[Qemu-devel] [PULL 04/11] i386: Reorganize and document CPUID initialization steps

2017-02-27 Thread Eduardo Habkost
CPU runnability checks and CPU model expansion have slightly different requirements. Document the steps involved in loading a CPU model and realizing a CPU, so their requirements and purpose are clearly defined. This patch doesn't change any implementation. It just add comments, rename the x86_cpu

[Qemu-devel] [PULL 03/11] i386: Rename X86CPU::host_features to X86CPU::max_features

2017-02-27 Thread Eduardo Habkost
Rename the field and add a small comment to make its purpose clearer. Message-Id: <20170119210449.11991-4-ehabk...@redhat.com> Tested-by: Jiri Denemark Signed-off-by: Eduardo Habkost --- target/i386/cpu.h | 2 +- target/i386/cpu.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) di

[Qemu-devel] [PULL 07/11] i386: Make "max" model not use any host CPUID info on TCG

2017-02-27 Thread Eduardo Habkost
Instead of reporting host CPUID data on "max", use the qemu64 CPU model as reference to initialize CPUID vendor/family/model/stepping/model-id. Message-Id: <20170222183919.11928-3-ehabk...@redhat.com> Tested-by: Richard W.M. Jones Tested-by: Jiri Denemark Signed-off-by: Eduardo Habkost --- tar

[Qemu-devel] [PULL 4/4] tests-aio-multithread: use atomic_read properly

2017-02-27 Thread Stefan Hajnoczi
From: Paolo Bonzini nodes[id].next is written by other threads. If atomic_read is not used (matching atomic_set in mcs_mutex_lock!) the compiler can optimize the whole "if" away! Reported-by: Alex Bennée Signed-off-by: Paolo Bonzini Tested-by: Greg Kurz Message-id: 20170227111726.9237-1-pbon

[Qemu-devel] [PULL 08/11] i386: Don't set CPUClass::cpu_def on "max" model

2017-02-27 Thread Eduardo Habkost
Host CPUID info is used by the "max" CPU model only in KVM mode. Move the initialization of CPUID data for "max" from class_init to instance_init, and don't set CPUClass::cpu_def for "max". Message-Id: <20170222183919.11928-4-ehabk...@redhat.com> Tested-by: Richard W.M. Jones Tested-by: Jiri Dene

Re: [Qemu-devel] [[PATCH-2]] Removed support for DEPTH!=32 in sm501.c

2017-02-27 Thread Peter Maydell
On 27 February 2017 at 16:01, Suramya Shah wrote: > Signed-off-by: Suramya Shah > --- > hw/display/sm501.c | 17 - > 1 file changed, 17 deletions(-) > > diff --git a/hw/display/sm501.c b/hw/display/sm501.c > index 040a0b9..faca906 100644 > --- a/hw/display/sm501.c > +++ b/hw/disp

Re: [Qemu-devel] [PULL v1 0/2] Merge qcrypto 2017/02/27

2017-02-27 Thread Peter Maydell
On 27 February 2017 at 13:39, Daniel P. Berrange wrote: > The following changes since commit d992f2f1368ceb92e6bfd8efece174110f4236ff: > > Merge remote-tracking branch 'remotes/artyom/tags/pull-sun4v-20170226' into > staging (2017-02-26 22:40:23 +) > > are available in the git repository at

Re: [Qemu-devel] [PATCH] blk: Add discard=sparse mode

2017-02-27 Thread Max Reitz
On 27.02.2017 17:33, Samuel Thibault wrote: > Hello, > > Max Reitz, on lun. 27 févr. 2017 17:12:47 +0100, wrote: >>> #ifdef CONFIG_FALLOCATE_PUNCH_HOLE >>> -if (s->has_discard && s->has_fallocate) { >>> +if (s->has_discard && (s->has_fallocate || open_flags & >>> BDRV_O_SPARSE)) { >> >>

[Qemu-devel] [PULL 11/11] i386: Improve query-cpu-model-expansion full mode

2017-02-27 Thread Eduardo Habkost
This keeps the same results on type=static expansion, but make type=full expansion return every single QOM property on the CPU object that have a different value from the "base' CPU model, plus all the CPU feature flag properties. Cc: Jiri Denemark Message-Id: <20170222190029.17243-4-ehabk...@red

[Qemu-devel] [PULL 09/11] i386: Define static "base" CPU model

2017-02-27 Thread Eduardo Habkost
The query-cpu-model-expand QMP command needs at least one static model, to allow the "static" expansion mode to be implemented. Instead of defining static versions of every CPU model, define a "base" CPU model that has absolutely no feature flag enabled. Despite having no CPUID data set at all, "-

Re: [Qemu-devel] [PATCH v2 05/26] qmp: Clean up how we enforce capability negotiation

2017-02-27 Thread Eric Blake
On 02/26/2017 03:43 PM, Markus Armbruster wrote: > To enforce capability negotiation before normal operation, > handle_qmp_command() inspects every command before it's handed off to > qmp_dispatch(). This is a bit of a layering violation, and results in > duplicated code. > > Before capability ne

Re: [Qemu-devel] [PATCH v2 13/26] qapi: Drop string input visitor method optional()

2017-02-27 Thread Eric Blake
On 02/26/2017 03:43 PM, Markus Armbruster wrote: > visit_optional() is to be called only between visit_start_struct() and > visit_end_struct(). Visitors that don't support struct visits, > i.e. don't implement start_struct(), end_struct(), have no use for it. > Clarify documentation. > > The stri

[Qemu-devel] [Bug 1668273] Re: DoS possible on - a QEMU process using userspace SLIRP?

2017-02-27 Thread Daniel Berrange
IIUC, a socket staying around in FIN_WAIT2 state means that a socket has been closed in one direction, but not the other direction. Assuming SLIRP is just mirroring what the guest OS has done with the socket shutdown process, this would be expected. -- You received this bug notification because y

[Qemu-devel] [PULL 0/4] Block patches

2017-02-27 Thread Stefan Hajnoczi
The following changes since commit d992f2f1368ceb92e6bfd8efece174110f4236ff: Merge remote-tracking branch 'remotes/artyom/tags/pull-sun4v-20170226' into staging (2017-02-26 22:40:23 +) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request fo

Re: [Qemu-devel] [PATCH v3 1/6] docs/block-replication: Add description for shared-disk case

2017-02-27 Thread Stefan Hajnoczi
On Fri, Jan 20, 2017 at 11:47:55AM +0800, zhanghailiang wrote: > +Secondary: > + -drive > if=none,driver=qcow2,file.filename=/mnt/ramfs/hidden_disk.img,id=hidden_disk0,\ > +backing.driver=raw,backing.file.filename=1.raw \ > + -drive if=virtio,id=active-disk0,driver=replication,mode=seconda

Re: [Qemu-devel] [PATCH] blk: Add discard=sparse mode

2017-02-27 Thread Samuel Thibault
Hello, Max Reitz, on lun. 27 févr. 2017 17:12:47 +0100, wrote: > > #ifdef CONFIG_FALLOCATE_PUNCH_HOLE > > -if (s->has_discard && s->has_fallocate) { > > +if (s->has_discard && (s->has_fallocate || open_flags & > > BDRV_O_SPARSE)) { > > s->has_fallocate has a meaning. I wouldn't try to c

Re: [Qemu-devel] [PATCH] pl190: Fix off-by-one error in priority handling when reading VECTADDR

2017-02-27 Thread Peter Maydell
On 27 February 2017 at 16:42, Marc Bommert wrote: > Hello Peter, you are completely right. The bug isn't in master > and my patch is to be rejected. There was once a version of pl190.c > (like uhhm, around 2011) which didn't have the [i+1] in the array > index and somehow (please don't ask) it mad

[Qemu-devel] [PULL 2/4] nfs: do not use aio_context_acquire/release

2017-02-27 Thread Stefan Hajnoczi
From: Paolo Bonzini Now that all bottom halves and callbacks take care of taking the AioContext lock, we can migrate some users away from it and to a specific QemuMutex or CoMutex. Protect libnfs calls with a QemuMutex. Callbacks are invoked using bottom halves, so we don't even have to drop it

[Qemu-devel] [PULL 06/17] cpus: remove ugly cast on sigbus_handler

2017-02-27 Thread Paolo Bonzini
The cast is there because sigbus_handler is invoked via sigfd_handler. But it feels just wrong to use struct qemu_signalfd_siginfo in the prototype of a function that is passed to sigaction. Instead, do a simple-minded conversion of qemu_signalfd_siginfo to siginfo_t. Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] Qemu and Changed Block Tracking

2017-02-27 Thread Eric Blake
On 02/26/2017 02:41 PM, Peter Lieven wrote: > The live-snapshot/live-commit stuff could indeed help in my scenario. If I > understand correctly this is > something that already works today, correct? If I have taken a live-snapshot, > is live-migration and > stop/start of the VM still possible? Wh

Re: [Qemu-devel] [PATCH v2 02/26] libqtest: Work around a "QMP wants a newline" bug

2017-02-27 Thread Eric Blake
On 02/26/2017 03:43 PM, Markus Armbruster wrote: > The next commit is going to add a test that calls qmp("null"). > Curiously, this hangs. Here's why. > > qmp_fd_sendv() doesn't send newlines. Not even when @fmt contains > some. At first glance, the QMP parser seems to be fine with that. > Howe

[Qemu-devel] [PULL 1/4] curl: do not use aio_context_acquire/release

2017-02-27 Thread Stefan Hajnoczi
From: Paolo Bonzini Now that all bottom halves and callbacks take care of taking the AioContext lock, we can migrate some users away from it and to a specific QemuMutex or CoMutex. Protect BDRVCURLState access with a QemuMutex. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message

Re: [Qemu-devel] [PATCH v2 14/26] qapi: Make string input and opts visitor require non-null input

2017-02-27 Thread Eric Blake
On 02/26/2017 03:43 PM, Markus Armbruster wrote: > The string input visitor tries to cope with null input. Null input > isn't used anywhere, and isn't covered by tests. Unsurprisingly, it > doesn't fully work: start_list() crashes because it passes the input > via parse_str() to strtoll() uncheck

<    1   2   3   4   5   6   >