[Qemu-devel] [PULL 31/40] backup: Use Bitmap to replace "s->bitmap"

2016-03-14 Thread Kevin Wolf
From: Fam Zheng "s->bitmap" tracks done sectors, we only check bit states without using any iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and more memory efficient. Meanwhile, rename it to done_bitmap, to reflect the intention. Signed-off-by: Fam Zheng Reviewed-by: Jo

[Qemu-devel] [PULL 36/40] iotests: Correct 081's reference output

2016-03-14 Thread Kevin Wolf
From: Max Reitz The newly added type parameter for the QUORUM_REPORT_BAD event changed the output of iotest 081, so the reference should be amended accordingly. Signed-off-by: Max Reitz Message-id: 1457705687-27122-1-git-send-email-mre...@redhat.com Reviewed-by: Alberto Garcia --- tests/qemu-

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

2016-03-14 Thread Kevin Wolf
The following changes since commit 0dcee62261cb044339b10e4bda1f67ef7dc82803: Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.6-7' into staging (2016-03-14 13:51:21 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream f

[Qemu-devel] [PULL 24/40] qcow2: Use BB functions in .bdrv_create()

2016-03-14 Thread Kevin Wolf
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf --- block/qcow2.c | 62 +++ 1 file changed, 33 insertions(+),

[Qemu-devel] [PULL 15/40] vmdk: Switch to heap arrays for vmdk_write_cid

2016-03-14 Thread Kevin Wolf
From: Fam Zheng It is only called once for each opened image, so we can do it the easy way. Reviewed-by: Peter Xu Signed-off-by: Fam Zheng Reviewed-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block/vmdk.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-)

[Qemu-devel] [PULL 21/40] block: Introduce blk_set_allow_write_beyond_eof()

2016-03-14 Thread Kevin Wolf
We check that the guest can't write beyond the end of its disk, but for other internal users it can make sense to allow growing a file. Signed-off-by: Kevin Wolf --- block/block-backend.c | 23 --- include/sysemu/block-backend.h | 1 + 2 files changed, 17 insertions

[Qemu-devel] [PULL 16/40] vmdk: Switch to heap arrays for vmdk_read_cid

2016-03-14 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block/vmdk.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/vmdk.c b/block/vmdk.c index 1ec2452..c68f456 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -242,15 +24

[Qemu-devel] [PULL 20/40] block: Use writeback in .bdrv_create() implementations

2016-03-14 Thread Kevin Wolf
There's no reason to use a writethrough cache mode while creating an image. Signed-off-by: Kevin Wolf --- block/parallels.c | 3 ++- block/qcow.c | 3 ++- block/qcow2.c | 3 ++- block/sheepdog.c | 6 -- block/vdi.c | 3 ++- block/vhdx.c | 3 ++- block/vmdk.c | 9 +++

[Qemu-devel] [PULL 27/40] vdi: Use BB functions in .bdrv_create()

2016-03-14 Thread Kevin Wolf
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf --- block/vdi.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/block/vdi

[Qemu-devel] [PULL 01/40] qemu-img: eliminate memory leak

2016-03-14 Thread Kevin Wolf
From: Paolo Bonzini Not particularly important since qemu-img exits immediately after calling img_rebase, but easily fixed. Coverity says thanks. Signed-off-by: Paolo Bonzini Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- qemu-img.c | 9 - 1 file changed, 4 insertions(+),

[Qemu-devel] [PULL 29/40] vmdk: Use BB functions in .bdrv_create()

2016-03-14 Thread Kevin Wolf
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf --- block/vmdk.c | 77 +--- 1 file changed, 43 insertions(+),

[Qemu-devel] [PULL 17/40] vmdk: Switch to heap arrays for vmdk_parent_open

2016-03-14 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block/vmdk.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index c68f456..03be7f0 100644 --- a/block/vmdk.c +++ b/block/vmdk.c

[Qemu-devel] [PULL 22/40] parallels: Use BB functions in .bdrv_create()

2016-03-14 Thread Kevin Wolf
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf --- block/parallels.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/

[Qemu-devel] [PULL 12/40] blockdev: Snapshotting must not open second instance of old top

2016-03-14 Thread Kevin Wolf
Calling bdrv_img_create() with a size of -1 means that it determines the size automatically by opening the backing file. However, in the case of live snapshots, the backing file is already opened and we must avoid opening the same image twice at the same time. Apart from that, just getting the size

[Qemu-devel] [PULL 14/40] block: Fix cache mode defaults in bds_tree_init()

2016-03-14 Thread Kevin Wolf
Without setting explicit defaults in the options, blockdev-add without an ID ended up defaulting to writethrough. It should be writeback as documented. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- blockdev.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/blockdev.c b/blockd

[Qemu-devel] [PULL 19/40] hmp: Extend drive_del to delete nodes without BB

2016-03-14 Thread Kevin Wolf
Now that we can use drive_add to create new nodes without a BB, we also want to be able to delete such nodes again. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- blockdev.c | 9 + 1 file changed, 9 insertions(+) diff --git a/blockdev.c b/blockdev.c index 1297c90..322ca03 100644

[Qemu-devel] [PULL 13/40] block: Fix snapshot=on cache modes

2016-03-14 Thread Kevin Wolf
Since commit 91a097e, we end up with a somewhat weird cache mode configuration with snapshot=on: The commit broke the cache mode inheritance for the snapshot overlay so that it is opened as writethrough instead of unsafe now. The following bdrv_append() call to put it on top of the tree swaps the W

[Qemu-devel] [PULL 10/40] qmp event: Refactor QUORUM_REPORT_BAD

2016-03-14 Thread Kevin Wolf
From: Changlong Xie Introduce QuorumOpType, and make QUORUM_REPORT_BAD compatible with it. Cc: Dr. David Alan Gilbert Cc: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- block/quorum.c | 17 --

[Qemu-devel] [PULL 07/40] block/vpc: give option to force the current_size field in .bdrv_create

2016-03-14 Thread Kevin Wolf
From: Jeff Cody When QEMU creates a VHD image, it goes by the original spec, calculating the current_size based on the nearest CHS geometry (with an exception for disks > 127GB). Apparently, Azure will only allow images that are sized to the nearest MB, and the current_size as calculated from CH

[Qemu-devel] [PULL 11/40] quorum: modify vote rules for flush operation

2016-03-14 Thread Kevin Wolf
From: Changlong Xie Keep flush interface the same logic as quorum read/write, Otherwise in following scenario, we'll encounter unexpected errors. Quorum has two children(A, B). A do flush sucessfully, but B flush failed. This cause the filesystem of guest become read-only with following errors:

[Qemu-devel] [PULL 09/40] docs: fix invalid node name in qmp event

2016-03-14 Thread Kevin Wolf
From: Changlong Xie Cc: Dr. David Alan Gilbert Cc: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- docs/qmp-events.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/qmp-events.txt b/d

[Qemu-devel] [PULL 05/40] block/vpc: choose size calculation method based on creator_app field

2016-03-14 Thread Kevin Wolf
From: Jeff Cody The VHD file format is used by both Virtual PC, and Hyper-V. However, how the virtual disk size is calculated varies between the two. Virtual PC uses the CHS drive parameters to determine the drive size. Hyper-V, on the other hand, uses the current_size field in the footer when

[Qemu-devel] [PULL 08/40] block/vpc: add tests for image creation force_size parameter

2016-03-14 Thread Kevin Wolf
From: Jeff Cody Signed-off-by: Jeff Cody Signed-off-by: Kevin Wolf --- tests/qemu-iotests/146 | 51 ++ tests/qemu-iotests/146.out | 32 + 2 files changed, 83 insertions(+) diff --git a/tests/qemu-iotests/146 b/tests/q

[Qemu-devel] [PULL 04/40] block/qapi: Include empty drives in query-blockstats

2016-03-14 Thread Kevin Wolf
Since commit 5ec18f8c, query-blockstats didn't return the statistics of drives without media any more because such drives have only a BB now, but not a BDS any more. This patch fixes the regression so that query-blockstats iterates over BBs by default and empty drives are displayed again. Signed-

[Qemu-devel] [PULL 06/40] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images

2016-03-14 Thread Kevin Wolf
From: Jeff Cody This tests auto-detection, and overrides, of VHD image sizes created by Virtual PC, Hyper-V, and Disk2vhd. This adds three sample images: hyperv2012r2-dynamic.vhd.bz2 - dynamic VHD image created with Hyper-V virtualpc-dynamic.vhd.bz2- dynamic VHD image created with Virtual P

[Qemu-devel] [PULL 03/40] block/qapi: Factor out bdrv_query_bds_stats()

2016-03-14 Thread Kevin Wolf
The new functions handles the data that is taken from the BlockDriverState. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/qapi.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index c04f1d8..31ae879

Re: [Qemu-devel] [PATCH 00/11] block: Use BB function in .bdrv_create() implementations

2016-03-14 Thread Kevin Wolf
Am 14.03.2016 um 17:55 hat Max Reitz geschrieben: > On 14.03.2016 12:31, Kevin Wolf wrote: > > Am 08.03.2016 um 17:34 hat Kevin Wolf geschrieben: > >> All users of the block layers are supposed to go through a BlockBackend. > >> The .bdrv_create() implementations are such users, so this series > >>

Re: [Qemu-devel] [PATCH v8 5/9] qemu-log: new option -dfilter to limit output

2016-03-14 Thread Alex Bennée
Richard Henderson writes: > On 03/04/2016 03:18 AM, Alex Bennée wrote: >> +case '+': >> +{ >> +unsigned long len; >> +err |= qemu_strtoull(r2, NULL, 0, &len); >> +if (len > 0) { >> +

Re: [Qemu-devel] [PATCH v2 1/1] socket: Allocating Large sized arrays to heap

2016-03-14 Thread Daniel P. Berrange
On Mon, Mar 14, 2016 at 10:44:22PM +0530, Pooja Dhannawat wrote: > On Mon, Mar 14, 2016 at 10:20 PM, Daniel P. Berrange > wrote: > > > On Mon, Mar 14, 2016 at 10:07:53PM +0530, Pooja Dhannawat wrote: > > > net_socket_send has a huge stack usage of 69712 bytes approx. > > > Moving large arrays to

[Qemu-devel] [PATCH 12/17] ppc: Fix writing to AMR/UAMOR

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt The masks weren't chosen nor applied properly. The architecture specifies that writes to AMR are masked by UAMOR for PR=1, otherwise AMOR for HV=0. The writes to UAMOR are masked by AMOR for HV=0 Signed-off-by: Benjamin Herrenschmidt [clg: fixed gen_spr_amr() call

[Qemu-devel] e1000 emulation and mmio_exists counter

2016-03-14 Thread alexnln
Hi list, I am testing e1000 emulation with qemu 2.5. Command line: -netdev tap,fd=21,id=hostnet0 \ -device e1000,netdev=hostnet0,id=net0,mac=$MAC1,bus=pci.0,addr=0x4 AFAIU, e1000 is emulated in qemu (userspace) and each i/o should cause vmexit to userspace. And each exit to userspace should incr

Re: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-14 Thread Dr. David Alan Gilbert
* Li, Liang Z (liang.z...@intel.com) wrote: > > > > Hi, > > I'm just catching back up on this thread; so without reference to any > > particular previous mail in the thread. > > > > 1) How many of the free pages do we tell the host about? > > Your main change is telling the host about al

Re: [Qemu-devel] [PULL 0/7] target-i386 fixes

2016-03-14 Thread Peter Maydell
On 13 March 2016 at 02:17, Richard Henderson wrote: > This is primarily patches fixing Windows booting regressions > introduced by myself. Many thanks to Herve for reporting them > and Paolo for fixing two of them. > > > r~ > > > The following changes since commit 3c0f12df65da872d5fbccae469f2cb21

Re: [Qemu-devel] [PATCH v2 1/1] socket: Allocating Large sized arrays to heap

2016-03-14 Thread Pooja Dhannawat
On Mon, Mar 14, 2016 at 10:20 PM, Daniel P. Berrange wrote: > On Mon, Mar 14, 2016 at 10:07:53PM +0530, Pooja Dhannawat wrote: > > net_socket_send has a huge stack usage of 69712 bytes approx. > > Moving large arrays to heap to reduce stack usage. > > > > Signed-off-by: Pooja Dhannawat > > --- >

[Qemu-devel] [PATCH 17/17] ppc: A couple more dummy POWER8 Book4 regs

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Signed-off-by: Benjamin Herrenschmidt [clg: squashed in patch 'ppc: Add dummy ACOP SPR' ] Signed-off-by: Cédric Le Goater --- target-ppc/cpu.h| 3 +++ target-ppc/translate_init.c | 12 2 files changed, 15 insertions(+) diff --git a/target

[Qemu-devel] [PATCH 16/17] ppc: Add dummy CIABR SPR

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We should implement HW breakpoint/watchpoint, qemu supports them... Signed-off-by: Benjamin Herrenschmidt --- target-ppc/cpu.h| 1 + target-ppc/translate_init.c | 5 + 2 files changed, 6 insertions(+) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.

[Qemu-devel] [PATCH 04/17] ppc: Add number of threads per core to the processor definition

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Also use it to clamp the max SMT mode and ensure that the cpu_dt_id are offset by that value in order to preserve consistency with the HW implementations. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/cpu-qom.h| 1 + target-ppc/translate_init.c | 11

[Qemu-devel] [PATCH 08/17] ppc: Add placeholder SPRs for DPDES and DHDES on P8

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We still need to eventually implement doorbells but at least this makes us not crash when the SPRs are accessed. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/cpu.h| 2 ++ target-ppc/translate_init.c | 17 + 2 files changed, 19 i

[Qemu-devel] [PATCH 14/17] ppc: Add dummy write to VTB

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt The Hypervisor can write it. We don't handle that properly yet but at least let's not blow up when it is written. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate_init.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --gi

[Qemu-devel] [PATCH 09/17] ppc: SPURR & PURR are HV writeable and privileged

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Those are HV writeable, so we provide a dummy write. We eventually need to provide a better emulation but for now this will get us going. We also make them non-user readable as per the architecture. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate_in

[Qemu-devel] [PATCH 13/17] ppc: Add POWER8 IAMR register

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt With appropriate AMR-like masks. Not actually used by the translation logic at that point Signed-off-by: Benjamin Herrenschmidt [clg: add the use of spr_register_kvm_hv()] Signed-off-by: Cédric Le Goater --- target-ppc/cpu.h| 1 + target-ppc/translate

[Qemu-devel] [PATCH 03/17] ppc: Add a bunch of hypervisor SPRs to Book3s

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We don't give them a KVM reg number to most of the registers yet as no current KVM version supports HV mode. For DAWR and DAWRX, the KVM reg number is needed since this register can be set by the guest via the H_SET_MODE hypercall. Signed-off-by: Benjamin Herrenschmi

[Qemu-devel] [PATCH 07/17] ppc: Better figure out if processor has HV mode

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We use an env. flag which is set to the initial value of MSR_HVB in the msr_mask. We also adjust the POWER8 mask to set SHV. Also use this to adjust ctx.hv so that it is *set* when the processor doesn't have an HV mode (970 with Apple mode for example), thus enabling

[Qemu-devel] [PATCH 11/17] ppc: Initialize AMOR in PAPR mode

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Make sure we give the guest full authorization Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate_init.c | 4 1 file changed, 4 insertions(+) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 68abd847a251..c921d9f53984 1

[Qemu-devel] [PATCH 10/17] ppc: Add dummy SPR_IC for POWER8

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt It's supposed to be an instruction counter. For now make us not crash when accessing it. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/cpu.h| 1 + target-ppc/translate_init.c | 12 2 files changed, 13 insertions(+) diff --git a/tar

[Qemu-devel] [PATCH 15/17] ppc: Add dummy POWER8 MPPR register

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Controls the micropartition prefetch, this is pretty much meaningless in full emulation (used for priming the caches on real HW). Signed-off-by: Benjamin Herrenschmidt --- target-ppc/cpu.h| 1 + target-ppc/translate_init.c | 13 + 2 files c

[Qemu-devel] [PATCH 06/17] ppc: Create cpu_ppc_set_papr() helper

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt And move the code adjusting the MSR mask and calling kvmppc_set_papr() to it. This allows us to add a few more things such as disabling setting of MSR:HV and appropriate LPCR bits which will be used when fixing the exception model. Signed-off-by: Benjamin Herrenschmi

Re: [Qemu-devel] [PULL 0/2] Tracing patches

2016-03-14 Thread Peter Maydell
On 14 March 2016 at 11:27, Stefan Hajnoczi wrote: > The following changes since commit a648c137383d84bc4f95696e5293978d9541a26e: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160309-1' into > staging (2016-03-10 02:51:14 +) > > are available in the git repository at: > >

[Qemu-devel] [PATCH 01/17] ppc: Update SPR definitions

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Add definitions for additional SPR numbers and SPR bit definitions that will be relevant for subsequent improvements to POWER8 emulation Also fix the definition of LPIDR which was incorrect (and is different for server and embedded). Signed-off-by: Benjamin Herrensc

[Qemu-devel] [PATCH 02/17] ppc: Add macros to register hypervisor mode SPRs

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt The current set of spr_register_* macros only take the user and supervisor function pointers. To make the transition easy, we don't change that but we add "_hv" variants that can be used to register all 3 sets. To simplify the transition, users of the "old" macro wil

[Qemu-devel] [PATCH 05/17] ppc: Fix hreg_store_msr() so that non-HV mode cannot alter MSR:HV

2016-03-14 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This helper is only used by the various instructions that can alter MSR and not interrupts. Add a comment to that effect to the interrupt code as well in case somebody wants to change this Signed-off-by: Benjamin Herrenschmidt Reviewed-by: David Gibson --- target-

[Qemu-devel] [PATCH 00/17] ppc: preparing pnv landing

2016-03-14 Thread Cédric Le Goater
Hello, This is a first mini-serie of patches adding support for new ppc SPRs. They were taken from Ben's larger patchset adding the ppc powernv platform and they should already be useful for the pseries guest migration. Initial patches come from : https://github.com/ozbenh/qemu/commits/p

Re: [Qemu-devel] [PATCH 00/11] block: Use BB function in .bdrv_create() implementations

2016-03-14 Thread Max Reitz
On 14.03.2016 12:31, Kevin Wolf wrote: > Am 08.03.2016 um 17:34 hat Kevin Wolf geschrieben: >> All users of the block layers are supposed to go through a BlockBackend. >> The .bdrv_create() implementations are such users, so this series >> converts them. >> >> This series (specifically patch 1) wil

[Qemu-devel] [PATCH v2] Sort the fw_cfg file list

2016-03-14 Thread minyard
From: Gerd Hoffmann Entries are inserted at the correct place instead of being appended to the end in case sorting is enabled. Signed-off-by: Gerd Hoffmann Added a machine type handling for compatibility. Signed-off-by: Corey Minyard --- Don't add a new machine type in this version, just us

Re: [Qemu-devel] [PATCH 5/5] block: Reject writethrough mode except at the root

2016-03-14 Thread Eric Blake
On 03/14/2016 09:44 AM, Kevin Wolf wrote: > Writethrough mode is going to become a BlockBackend feature rather than > a BDS one, so forbid it in places where we won't be able to support it > when the code finally matches the envisioned design. > > We only allowed setting the cache mode of non-root

Re: [Qemu-devel] [PATCH v2 1/1] socket: Allocating Large sized arrays to heap

2016-03-14 Thread Daniel P. Berrange
On Mon, Mar 14, 2016 at 10:07:53PM +0530, Pooja Dhannawat wrote: > net_socket_send has a huge stack usage of 69712 bytes approx. > Moving large arrays to heap to reduce stack usage. > > Signed-off-by: Pooja Dhannawat > --- > net/socket.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletio

Re: [Qemu-devel] [PATCH 4/5] block: Make backing files always writeback

2016-03-14 Thread Eric Blake
On 03/14/2016 09:44 AM, Kevin Wolf wrote: > First of all, we're generally not writing to backing files, but when we > do, it's in the context of block jobs which know very well when to flush > the image. > > Signed-off-by: Kevin Wolf > --- > block.c| 5 +++-- > tests/qemu-io

Re: [Qemu-devel] [PATCH 7/9] log: report HMP command and event

2016-03-14 Thread Denis V. Lunev
On 03/14/2016 05:36 PM, Paolo Bonzini wrote: On 14/03/2016 12:21, Denis V. Lunev wrote: From: Pavel Butsykin Please explain the usecase here. Is it for debugging the hypervisor or for something else? Paolo yes. There are important HMP-only commands like switch to snapshot, which should be l

Re: [Qemu-devel] [PATCH 6/9] log: log QMP commands and replies

2016-03-14 Thread Paolo Bonzini
On 14/03/2016 17:16, Denis V. Lunev wrote: >> BTW, I'm not against adding this to QEMU in general - just pointing out >> that in the context of libvirt usage reference in the commit message, >> it is not really needed. I'm totally ambivalent wrt adding this to QEMU >> for benefit of non-libvirt u

[Qemu-devel] [PATCH v2 1/1] socket: Allocating Large sized arrays to heap

2016-03-14 Thread Pooja Dhannawat
net_socket_send has a huge stack usage of 69712 bytes approx. Moving large arrays to heap to reduce stack usage. Signed-off-by: Pooja Dhannawat --- net/socket.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/socket.c b/net/socket.c index e32e3cb..3fcd7a6 100644 -

Re: [Qemu-devel] [PATCH] Sort the fw_cfg file list

2016-03-14 Thread Corey Minyard
On 03/14/2016 11:33 PM, Paolo Bonzini wrote: On 14/03/2016 17:23, miny...@acm.org wrote: From: Gerd Hoffmann Entries are inserted at the correct place instead of being appended to the end in case sorting is enabled. Signed-off-by: Gerd Hoffmann Added a new machine type for compatibility.

Re: [Qemu-devel] [PATCH 6/9] log: log QMP commands and replies

2016-03-14 Thread Paolo Bonzini
On 14/03/2016 17:10, Denis V. Lunev wrote: > On 03/14/2016 06:26 PM, Daniel P. Berrange wrote: >> On Mon, Mar 14, 2016 at 06:05:07PM +0300, Denis V. Lunev wrote: >>> On 03/14/2016 05:38 PM, Daniel P. Berrange wrote: On Mon, Mar 14, 2016 at 03:33:53PM +0100, Paolo Bonzini wrote: > On 14/0

Re: [Qemu-devel] [PATCH 7/9] log: report HMP command and event

2016-03-14 Thread Paolo Bonzini
On 14/03/2016 16:08, Denis V. Lunev wrote: >> Please explain the usecase here. Is it for debugging the hypervisor or >> for something else? > > yes. There are important HMP-only commands like switch to snapshot, > which should be logged. The rest is the same as I have answered to > Daniel to pat

Re: [Qemu-devel] [PATCH] Sort the fw_cfg file list

2016-03-14 Thread Paolo Bonzini
On 14/03/2016 17:23, miny...@acm.org wrote: > From: Gerd Hoffmann > > Entries are inserted at the correct place instead of being > appended to the end in case sorting is enabled. > > Signed-off-by: Gerd Hoffmann > > Added a new machine type for compatibility. > > Signed-off-by: Corey Minyar

Re: [Qemu-devel] [PATCH v2 0/6] external backup api

2016-03-14 Thread Denis V. Lunev
On 03/10/2016 08:40 PM, Paolo Bonzini wrote: On 10/03/2016 18:37, Stefan Hajnoczi wrote: I suggest giving the new NBD command a "type" argument: 0 - SCSI mapped/anchored values according to SCSI Get LBA Status 1 - Dirty/clean, useful for incremental backup and other blocking tracking cases Thi

[Qemu-devel] [Bug 1557033] [NEW] Persistent malfunction after guest shutdown/reboot

2016-03-14 Thread Piknik
Public bug reported: Running the VM the first time after the host has booted up is completely fine, no issues at all. However, after shutting down or restarting the VM, certain problems occur. In the Windows 10 VM, it may throw a SYSTEM_THREAD_EXCEPTION error on bootup, and other times it simply w

[Qemu-devel] [PATCH] Sort the fw_cfg file list

2016-03-14 Thread minyard
From: Gerd Hoffmann Entries are inserted at the correct place instead of being appended to the end in case sorting is enabled. Signed-off-by: Gerd Hoffmann Added a new machine type for compatibility. Signed-off-by: Corey Minyard --- I don't really like the double-negative created by dont_so

Re: [Qemu-devel] [PATCH 3/5] block: Remove cache.writeback from blockdev-add

2016-03-14 Thread Kevin Wolf
Am 14.03.2016 um 17:10 hat Eric Blake geschrieben: > On 03/14/2016 09:44 AM, Kevin Wolf wrote: > > The WCE bit is a frontend property and should not be part of the backend > > configuration. This is especially important because the same BDS can be > > used by different users with different WCE requ

Re: [Qemu-devel] [PATCH v2 0/4] Separate QUORUM_REPORT_BAD events according to their node name

2016-03-14 Thread Max Reitz
On 10.03.2016 12:55, Alberto Garcia wrote: > QUORUM_REPORT_BAD events are limited to a maximum rate of 1 per > second. While this is not a problem in itself, this means that an > error in one a Quorum child will mask errors in the other children if > they happen within the same 1 second interval. >

Re: [Qemu-devel] [PATCH v3] net.c: Moved large array in nc_sendv_compat from the stack to the heap

2016-03-14 Thread Paolo Bonzini
On 14/03/2016 16:32, Eric Blake wrote: >> +const size_t STACKBUF_SIZE = 2048; >> + >> +uint8_t *buffer, *dynbuf = NULL; >> +uint8_t stackbuf[STACKBUF_SIZE]; Instead of using the "STACKBUF_SIZE" constant, you can use just "stackbuf[2048]", and then use sizeof(stackbuf) below. This is

Re: [Qemu-devel] [PULL 0/2] X86 fixes

2016-03-14 Thread Peter Maydell
On 11 March 2016 at 18:47, Eduardo Habkost wrote: > The following changes since commit a648c137383d84bc4f95696e5293978d9541a26e: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160309-1' into > staging (2016-03-10 02:51:14 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH 6/9] log: log QMP commands and replies

2016-03-14 Thread Denis V. Lunev
On 03/14/2016 07:11 PM, Daniel P. Berrange wrote: On Mon, Mar 14, 2016 at 03:26:04PM +, Daniel P. Berrange wrote: On Mon, Mar 14, 2016 at 06:05:07PM +0300, Denis V. Lunev wrote: On 03/14/2016 05:38 PM, Daniel P. Berrange wrote: On Mon, Mar 14, 2016 at 03:33:53PM +0100, Paolo Bonzini wrote:

Re: [Qemu-devel] [PATCH 6/9] log: log QMP commands and replies

2016-03-14 Thread Daniel P. Berrange
On Mon, Mar 14, 2016 at 03:26:04PM +, Daniel P. Berrange wrote: > On Mon, Mar 14, 2016 at 06:05:07PM +0300, Denis V. Lunev wrote: > > On 03/14/2016 05:38 PM, Daniel P. Berrange wrote: > > >On Mon, Mar 14, 2016 at 03:33:53PM +0100, Paolo Bonzini wrote: > > >> > > >>On 14/03/2016 12:21, Denis V.

Re: [Qemu-devel] [PATCH 3/5] block: Remove cache.writeback from blockdev-add

2016-03-14 Thread Eric Blake
On 03/14/2016 09:44 AM, Kevin Wolf wrote: > The WCE bit is a frontend property and should not be part of the backend > configuration. This is especially important because the same BDS can be > used by different users with different WCE requirements. > > Signed-off-by: Kevin Wolf > --- > qapi/blo

Re: [Qemu-devel] [PATCH 6/9] log: log QMP commands and replies

2016-03-14 Thread Denis V. Lunev
On 03/14/2016 06:26 PM, Daniel P. Berrange wrote: On Mon, Mar 14, 2016 at 06:05:07PM +0300, Denis V. Lunev wrote: On 03/14/2016 05:38 PM, Daniel P. Berrange wrote: On Mon, Mar 14, 2016 at 03:33:53PM +0100, Paolo Bonzini wrote: On 14/03/2016 12:21, Denis V. Lunev wrote: From: Pavel Butsykin

Re: [Qemu-devel] [PULL v3 0/8] VFIO updates 2016-03-11

2016-03-14 Thread Peter Maydell
On 11 March 2016 at 16:00, Alex Williamson wrote: > The following changes since commit a648c137383d84bc4f95696e5293978d9541a26e: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160309-1' into > staging (2016-03-10 02:51:14 +) > > are available in the git repository at: > > >

[Qemu-devel] [PATCH 4/4] timer/m48t59.c: Change qemu_system_reset_request to watchdog_perform_action where appropriate

2016-03-14 Thread Nikos Filippakis
Instead of using qemu_system_reset_request() to reset when a watchdog triggers, let watchdog_perform_action() decide what to do, as stated in the BiteSizedTasks wiki page. Signed-off-by: Nikos Filippakis --- hw/timer/m48t59.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/

[Qemu-devel] [PATCH 3/4] etraxfs_timer: Change qemu_system_reset_request to watchdog_perform_action where appropriate

2016-03-14 Thread Nikos Filippakis
Instead of using qemu_system_reset_request() to reset when a watchdog triggers, let watchdog_perform_action() decide what to do, as stated in the BiteSizedTasks wiki page. Signed-off-by: Nikos Filippakis --- hw/timer/etraxfs_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -

[Qemu-devel] [PATCH 2/4] omap1: Change qemu_system_reset_request to watchdog_perform_action where appropriate

2016-03-14 Thread Nikos Filippakis
Instead of using qemu_system_reset_request() to reset when a watchdog triggers, let watchdog_perform_action() decide what to do, as stated in the BiteSizedTasks wiki page. Signed-off-by: Nikos Filippakis --- hw/arm/omap1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/

Re: [Qemu-devel] [PATCH 2/5] block: Remove dirty bitmaps from bdrv_move_feature_fields()

2016-03-14 Thread Eric Blake
On 03/14/2016 09:44 AM, Kevin Wolf wrote: > This patch changes dirty bitmaps from following a BlockBackend in graph > changes to sticking with the node they were created at. For the full > discussion, read the following mailing list thread: > > [Qemu-block] block: Dirty bitmaps and COR in bdrv_m

[Qemu-devel] [PATCH 1/4] musicpal: Change qemu_system_reset_request to watchdog_perform_action where appropriate

2016-03-14 Thread Nikos Filippakis
Instead of using qemu_system_reset_request() to reset when a watchdog triggers, let watchdog_perform_action() decide what to do, as stated in the BiteSizedTasks wiki page. Signed-off-by: Nikos Filippakis --- hw/arm/musicpal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH 1/5] block: Remove copy-on-read from bdrv_move_feature_fields()

2016-03-14 Thread Eric Blake
On 03/14/2016 09:44 AM, Kevin Wolf wrote: > Ever since we first introduced bdrv_append() in commit 8802d1fd ('qapi: > Introduce blockdev-group-snapshot-sync command'), the copy-on-read flag > was moved to the new top layer when taking a snapshot. The only problem > is that it doesn't make a whole l

Re: [Qemu-devel] [Qemu-ppc] [PATCH 72/77] ppc: A couple more dummy POWER8 Book4 regs

2016-03-14 Thread Cédric Le Goater
On 03/14/2016 04:43 PM, Thomas Huth wrote: > On 14.03.2016 15:53, Cédric Le Goater wrote: >> Hello Thomas, >> >> On 03/11/2016 03:46 PM, Thomas Huth wrote: >>> I'd maybe also squash the "Add KVM numbers to some P8 SPRs" patch into >>> the "Add a bunch of hypervisor SPRs to Book3s" to reduce the cod

[Qemu-devel] [PATCH 5/5] block: Reject writethrough mode except at the root

2016-03-14 Thread Kevin Wolf
Writethrough mode is going to become a BlockBackend feature rather than a BDS one, so forbid it in places where we won't be able to support it when the code finally matches the envisioned design. We only allowed setting the cache mode of non-root nodes after the 2.5 release, so we're still free to

[Qemu-devel] [PATCH 2/5] block: Remove dirty bitmaps from bdrv_move_feature_fields()

2016-03-14 Thread Kevin Wolf
This patch changes dirty bitmaps from following a BlockBackend in graph changes to sticking with the node they were created at. For the full discussion, read the following mailing list thread: [Qemu-block] block: Dirty bitmaps and COR in bdrv_move_feature_fields() https://lists.nongnu.org/arch

[Qemu-devel] [PATCH 3/5] block: Remove cache.writeback from blockdev-add

2016-03-14 Thread Kevin Wolf
The WCE bit is a frontend property and should not be part of the backend configuration. This is especially important because the same BDS can be used by different users with different WCE requirements. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 4 +--- 1 file changed, 1 insertion(+), 3

[Qemu-devel] [PATCH 1/5] block: Remove copy-on-read from bdrv_move_feature_fields()

2016-03-14 Thread Kevin Wolf
Ever since we first introduced bdrv_append() in commit 8802d1fd ('qapi: Introduce blockdev-group-snapshot-sync command'), the copy-on-read flag was moved to the new top layer when taking a snapshot. The only problem is that it doesn't make a whole lot of sense. The use case for manually enabled Co

[Qemu-devel] [PATCH 4/5] block: Make backing files always writeback

2016-03-14 Thread Kevin Wolf
First of all, we're generally not writing to backing files, but when we do, it's in the context of block jobs which know very well when to flush the image. Signed-off-by: Kevin Wolf --- block.c| 5 +++-- tests/qemu-iotests/142.out | 10 +- 2 files changed, 8 insertio

[Qemu-devel] [PATCH 0/5] block: API changes for 2.6

2016-03-14 Thread Kevin Wolf
This series contains those part of my current work that I want to be in the 2.6 release because they change the semantics of some QMP interfaces. This is especially true for the WCE changes, which concern things that weren't even accessible in 2.5 yet, so we're still completely free to change them

Re: [Qemu-devel] [Qemu-ppc] [PATCH 72/77] ppc: A couple more dummy POWER8 Book4 regs

2016-03-14 Thread Thomas Huth
On 14.03.2016 15:53, Cédric Le Goater wrote: > Hello Thomas, > > On 03/11/2016 03:46 PM, Thomas Huth wrote: >> I'd maybe also squash the "Add KVM numbers to some P8 SPRs" patch into >> the "Add a bunch of hypervisor SPRs to Book3s" to reduce the code churn >> a little bit (note that the patch desc

Re: [Qemu-devel] [PATCH] spice: Disallow use of gl + TCP port

2016-03-14 Thread Eric Blake
On 03/14/2016 05:41 AM, Christophe Fergeau wrote: > Currently, virgl support has to go through a local unix socket, trying > to connect to a VM using -spice gl through spice://localhost:5900 will > only result in a black screen. > This commit errors out when the user tries to start a VM with both G

[Qemu-devel] [PATCH V2 1/1] virtio:Allocate temporary VirtQueueElementOld on heap

2016-03-14 Thread Jaya Tiwari
As per the list of functions in : http://wiki.qemu.org/BiteSizedTasks#Large_frames, qemu_get_virtqueue_element and qemu_put_virtqueue_element have large arrays on stack. Hence, moving them to heap This reduced their stack size from something 49248 to fit into less than 200. Signed-off-by: Jaya Ti

Re: [Qemu-devel] [PATCH] Added NULL check for qemu_find_file()

2016-03-14 Thread Eric Blake
On 03/12/2016 01:36 PM, rutu.shah...@gmail.com wrote: > From: Rutuja Shah > > This patch adds NULL check for return value from qemu_find_file(), where it > is missing. It avoids unnecessary function calls with NULL parameter which in > turn return -1. Especially, incase of load_uimage(), two fu

Re: [Qemu-devel] [PATCH v3] net.c: Moved large array in nc_sendv_compat from the stack to the heap

2016-03-14 Thread Eric Blake
On 03/14/2016 06:46 AM, Nikos Filippakis wrote: > Allocate array in nc_sendv_compat on the heap if it is large to reduce stack > frame size, as stated in the BiteSizedTasks wiki page. Please wrap your commit messages at 70 or so columns (since 'git log' will display your text with indentation, an

[Qemu-devel] TCG question reg. tcg_cpu_exec()

2016-03-14 Thread Pranith Kumar
Hello Paolo, I have a question reg. tcg_cpu_exec(cpu) which is called from tcg_exec_all(). tcg_cpu_exec() is called for each cpu in a loop. I observed that this call does not always execute TBs on that particular CPU. It return because the exit_request is set. I am trying to understand what scen

Re: [Qemu-devel] [PATCH 6/9] log: log QMP commands and replies

2016-03-14 Thread Daniel P. Berrange
On Mon, Mar 14, 2016 at 06:05:07PM +0300, Denis V. Lunev wrote: > On 03/14/2016 05:38 PM, Daniel P. Berrange wrote: > >On Mon, Mar 14, 2016 at 03:33:53PM +0100, Paolo Bonzini wrote: > >> > >>On 14/03/2016 12:21, Denis V. Lunev wrote: > >>>From: Pavel Butsykin > >>> > >>>This log would be very welc

Re: [Qemu-devel] [PATCH 2/5] pc: Postpone SMBIOS table installation to post machine init

2016-03-14 Thread Gerd Hoffmann
Hi, > > Didn't Gerd have a patch to sort fw_cfg files? > > > > ... yes, here it is: > > https://lists.gnu.org/archive/html/qemu-devel/2015-06/msg05238.html > > I could take that patch and modify it to add a new machine type... Sure, go ahead. Didn't submit the patch because I wasn't sure it i

Re: [Qemu-devel] [PATCH 5/9] log: improve performance of qemu_log and qemu_log_mask if disabled

2016-03-14 Thread Denis V. Lunev
On 03/14/2016 05:30 PM, Paolo Bonzini wrote: On 14/03/2016 12:21, Denis V. Lunev wrote: The patch is intended to avoid to perform any operation including calculation of log function arguments when the log is not enabled due to various reasons. Functions qemu_log and qemu_log_mask are replaced

Re: [Qemu-devel] [Patch v2 1/1] blizzard: Remove support for DEPTH != 32

2016-03-14 Thread Peter Maydell
On 14 March 2016 at 15:04, Pooja Dhannawat wrote: > Removing support for DEPTH != 32 from blizzard template header > and file that includes it, as macro DEPTH == 32 only used. > > Signed-off-by: Pooja Dhannawat > --- > hw/display/blizzard.c | 24 > hw/display/bl

Re: [Qemu-devel] [PATCH 6/9] log: log QMP commands and replies

2016-03-14 Thread Denis V. Lunev
On 03/14/2016 05:38 PM, Daniel P. Berrange wrote: On Mon, Mar 14, 2016 at 03:33:53PM +0100, Paolo Bonzini wrote: On 14/03/2016 12:21, Denis V. Lunev wrote: From: Pavel Butsykin This log would be very welcome for long-term diagnostics of the system in the production. This log is at least nece

<    1   2   3   >