[Qemu-devel] [Bug 1388735] [NEW] QEMU no longer allows to use full TCP port range for VNC

2014-11-03 Thread Sergey
Public bug reported: After upgrade to QEMU version 2.1.0 (Debian 2.1+dfsg-4ubuntu6), I am no longer able to use any TCP port for VNC display. For example, if I need to assign VNC server a TCP port 443, I used to run: # qemu-system-x86_64 -vnc :-5457 qemu-system-x86_64: Failed to start VNC server

Re: [Qemu-devel] [PATCH v6] numa: make 'info numa' take into account hotplugged memory

2014-11-03 Thread Michael Tokarev
03.11.2014 10:56, Markus Armbruster wrote: > Michael Tokarev writes: [] >> I'm not sure this qualifies as -trivial really. Yes the change >> does not affect anything but the `info' command, and is rather >> simple, but... I'm not sure. > > Fortunately, monitor.c got a maintainer. Luiz, would yo

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-11-03 Thread Markus Armbruster
Jeff Cody writes: > On Wed, Oct 29, 2014 at 08:22:16AM +0100, Markus Armbruster wrote: >> Eric Blake writes: >> >> > On 10/28/2014 12:29 PM, Jeff Cody wrote: >> [...] >> >>> What happens if more than one format tends to pick the same extension? >> >>> For example, would you consider '.qcow' a t

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-11-03 Thread Markus Armbruster
Jeff Cody writes: > On Wed, Oct 29, 2014 at 07:37:02AM +0100, Markus Armbruster wrote: >> Jeff Cody writes: >> >> > On Tue, Oct 28, 2014 at 05:03:40PM +0100, Markus Armbruster wrote: >> >> If the user neglects to specify the image format, QEMU probes the >> >> image to guess it automatically, f

[Qemu-devel] [PATCH v2] translate-all: Marked map_exec() with the 'unused' attribute

2014-11-03 Thread SeokYeon Hwang
Marked map_exec() with the 'unused' attribute to avoid '-Wunused-function' on clang 3.4 or later. Signed-off-by: SeokYeon Hwang --- translate-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translate-all.c b/translate-all.c index ba5c840..9d150fb 100644 --- a/trans

[Qemu-devel] [PATCH] Tracing: Fix simpletrace.py error on tcg enabled binary traces

2014-11-03 Thread christoph . seifert
From: Christoph Seifert simpletrace.py does not recognize the tcg option while reading trace-events file. In result simpletrace does not work on binary traces and tcg enabled events. Moved transformation of tcg enabled events to _read_events() which is used by simpletrace. Signed-off-by: Chr

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-11-03 Thread Markus Armbruster
Eric Blake writes: > On 10/30/2014 06:49 AM, Markus Armbruster wrote: > >> You either have to prevent *any* writing of the first 2048 bytes (the >> part that can be examined by a bdrv_probe() method, or your have to >> prevent writing anything a probe recognizes, or the user has to specify >> the

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-11-03 Thread Markus Armbruster
"Richard W.M. Jones" writes: > Can you add something like: > > -drive ...,format=unsafe-probe > > so it does the probing anyway, even though we know it's unsafe? > > This will minimize the churn needed in libguestfs to make this work. Retaining the insecure old default behavior as an explicit

Re: [Qemu-devel] [PATCH] translate-all: wrapped map_exec() in #ifdef

2014-11-03 Thread SeokYeon Hwang
I posted a new patch which your suggestion is applied. Thanks. > -Original Message- > From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: Saturday, November 01, 2014 3:30 AM > To: SeokYeon Hwang > Cc: QEMU Developers > Subject: Re: [Qemu-devel] [PATCH] translate-all: wrapped map

Re: [Qemu-devel] [PATCH] block: changed to proper enum type

2014-11-03 Thread Max Reitz
On 2014-10-31 at 05:52, SeokYeon Hwang wrote: To fix compiler warning on clang > 3.4, changed to proper enum type. Signed-off-by: SeokYeon Hwang --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 88f6d9b..50845a4 100644 --- a/block.c

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-11-03 Thread Max Reitz
On 2014-10-30 at 14:02, Markus Armbruster wrote: Max Reitz writes: So I guess it's my turn to give yet another opinion (or just something in between of what has been already said). First, I'm fine with this patch, or at least the idea as there were yet some quirks. Yes, the patch has (fixabl

Re: [Qemu-devel] [PATCH v4 21/47] Add wrappers and handlers for sending/receiving the postcopy-ram migration messages.

2014-11-03 Thread David Gibson
On Fri, Oct 03, 2014 at 06:47:27PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add state variable showing current incoming postcopy state. This appears to implement a lot more than just adding a state variable... > Signed-off-by: Dr. David Alan Gilbert > ---

Re: [Qemu-devel] [PATCH] virtio-scsi: Fix memory leak when realize failed

2014-11-03 Thread Max Reitz
On 2014-10-30 at 12:50, Fam Zheng wrote: Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index a1725b8..4aae1e8 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -793,6 +793,7

Re: [Qemu-devel] [PATCH 1/3] Start moving migration code into a migration directory

2014-11-03 Thread Dr. David Alan Gilbert
* Gary Hook (gary.h...@nimboxx.com) wrote: > > > On 10/30/14, 7:26 AM, "Amit Shah" wrote: > > >On (Thu) 16 Oct 2014 [08:53:52], Dr. David Alan Gilbert (git) wrote: > >> From: "Dr. David Alan Gilbert" > >> > >> The migration code now occupies a fair chunk of the top level .c > >> files, it see

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-11-03 Thread Markus Armbruster
Kevin Wolf writes: > Am 31.10.2014 um 12:24 hat Stefan Hajnoczi geschrieben: >> On Thu, Oct 30, 2014 at 10:36:35AM +0100, Kevin Wolf wrote: >> > Am 30.10.2014 um 10:27 hat Stefan Hajnoczi geschrieben: >> > > The guest may legitimately use raw devices that contain image format >> > > data. Imagin

Re: [Qemu-devel] [PATCH] icc_bus: rename ICC_BRIGDE to ICC_BRIDGE

2014-11-03 Thread Michael Tokarev
03.11.2014 08:51, Zhu Guihua wrote: > Rename ICC_BRIGDE for better readability. That's a good one... :) Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-11-03 Thread Max Reitz
On 2014-11-03 at 09:54, Markus Armbruster wrote: Kevin Wolf writes: Am 31.10.2014 um 12:24 hat Stefan Hajnoczi geschrieben: On Thu, Oct 30, 2014 at 10:36:35AM +0100, Kevin Wolf wrote: Am 30.10.2014 um 10:27 hat Stefan Hajnoczi geschrieben: The guest may legitimately use raw devices that con

[Qemu-devel] [Bug 1388735] Re: QEMU no longer allows to use full TCP port range for VNC

2014-11-03 Thread Michael Tokarev
I disagree. This is a vnc port number, and by definition it can't really be negative. The fact that some vnc software allows negative port like this, or that some software uses tcp port number in place of vnc port number, does not make it more valid. We're talking about an issue in original vnc

Re: [Qemu-devel] [PATCH] translate-all: wrapped map_exec() in #ifdef

2014-11-03 Thread Michael Tokarev
03.11.2014 11:18, SeokYeon Hwang wrote: >> -Original Message- >> From: Peter Maydell [mailto:peter.mayd...@linaro.org] >> Sent: Saturday, November 01, 2014 3:30 AM >> To: SeokYeon Hwang >> Cc: QEMU Developers >> Subject: Re: [Qemu-devel] [PATCH] translate-all: wrapped map_exec() in >> #ifde

Re: [Qemu-devel] [PATCH] virtio-scsi: Fix memory leak when realize failed

2014-11-03 Thread Max Reitz
On 2014-11-03 at 10:17, Fam Zheng wrote: On Mon, 11/03 09:53, Max Reitz wrote: On 2014-10-30 at 12:50, Fam Zheng wrote: Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index a1725b8..4aae1e8

Re: [Qemu-devel] [PATCH] virtio-scsi: Fix memory leak when realize failed

2014-11-03 Thread Fam Zheng
On Mon, 11/03 09:53, Max Reitz wrote: > On 2014-10-30 at 12:50, Fam Zheng wrote: > >Signed-off-by: Fam Zheng > >--- > > hw/scsi/virtio-scsi.c | 1 + > > 1 file changed, 1 insertion(+) > > > >diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c > >index a1725b8..4aae1e8 100644 > >--- a/hw/sc

[Qemu-devel] [PATCH] pc-bios: petalogix-s3adsp1800.dtb: Use 'xlnx, xps-ethernetlite-2.00.a' instead of 'xlnx, xps-ethernetlite-2.00.b'

2014-11-03 Thread Chen Gang
For Linux upstream kernel (e.g. 3.17-rc7), the related compatible string 'xlnx,xps-ethernetlite-2.00.a' is supported, but 'b' is not supported, so change qemu dtb file to match kernel driver. The related operation for qemu (after this patch): yum install libvirt yum install tunctl tunctl

[Qemu-devel] [PATCH v2 3/5] spice-qemu-char: fix parameter checks for qemu_chr_parse_* functions

2014-11-03 Thread zhanghailiang
For functions qemu_chr_parse_spice_vmc and qemu_chr_parse_spice_port, we should also check the length of parameter name, and it will help findind the wrong configure, such as 'qemu-system-x86_64 -chardev spiceport(or spiceport),id=id,name=' Also remove the superfluous parameter checks in qemu_chr_

[Qemu-devel] [PATCH v2 0/5] Trivial patch about qemu-char

2014-11-03 Thread zhanghailiang
Patch 1~3 fix wrong check about in-parameter. The last two patches convert some open functions to use Error API. v2: - don't use error_setg when followed by exit(), it does not report an error (Eric Blake) - check the parameter in qemu_chr_parse_* functions and remove the check in qemu_chr_open_

[Qemu-devel] [PATCH v2 4/5] qemu-char: convert some open functions to use Error API

2014-11-03 Thread zhanghailiang
Convert several Character backend open functions to use the Error API. Signed-off-by: zhanghailiang --- qemu-char.c | 48 +--- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index e1f0e28..3ebdfe7 100644 --- a

[Qemu-devel] [PATCH v2 2/5] qemu-char: remove unnecessary in-parameter check for qemu_chr_parse_pipe

2014-11-03 Thread zhanghailiang
The check has been done in qemu_chr_parse_pipe, so we don't need to check it again in qemu_chr_parse_pipe. Signed-off-by: zhanghailiang --- qemu-char.c | 5 - 1 file changed, 5 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 04d747a..e1f0e28 100644 --- a/qemu-char.c +++ b/qemu-cha

[Qemu-devel] [PATCH v2 5/5] spice-qemu-char: convert qemu_chr_open_spice_vmc to use Error API

2014-11-03 Thread zhanghailiang
Signed-off-by: zhanghailiang --- include/ui/qemu-spice.h | 2 +- qemu-char.c | 2 +- spice-qemu-char.c | 4 ++-- stubs/qemu-chr-open-spice.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index

[Qemu-devel] [PATCH v2 1/5] qemu-char: fix parameter check for some qemu_chr_parse_* functions

2014-11-03 Thread zhanghailiang
For some qemu_chr_parse_* functions, we just check whether the parameter is NULL or not, not check its length. For example: qemu-system-x86_64 -chardev pipe,id=id,path= It will pass the check of NULL, and finds the error until trying to open it. So we should find the error by check its length, ju

Re: [Qemu-devel] [PATCH v2 0/5] Trivial patch about qemu-char

2014-11-03 Thread Michael Tokarev
03.11.2014 12:44, zhanghailiang wrote: > Patch 1~3 fix wrong check about in-parameter. > The last two patches convert some open functions to use Error API. > > v2: > - don't use error_setg when followed by exit(), it does not report an error > (Eric Blake) > - check the parameter in qemu_chr_pars

Re: [Qemu-devel] [PATCH v2 5/5] spice-qemu-char: convert qemu_chr_open_spice_vmc to use Error API

2014-11-03 Thread Michael Tokarev
03.11.2014 12:44, zhanghailiang wrote: [] > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -4252,7 +4252,7 @@ ChardevReturn *qmp_chardev_add(const char *id, > ChardevBackend *backend, > #endif > #ifdef CONFIG_SPICE > case CHARDEV_BACKEND_KIND_SPICEVMC: > -chr = qemu_chr_open_spice_vmc(b

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-11-03 Thread Kevin Wolf
Am 03.11.2014 um 09:54 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 31.10.2014 um 12:24 hat Stefan Hajnoczi geschrieben: > >> On Thu, Oct 30, 2014 at 10:36:35AM +0100, Kevin Wolf wrote: > >> > Am 30.10.2014 um 10:27 hat Stefan Hajnoczi geschrieben: > >> > > The guest may legit

Re: [Qemu-devel] [PATCH 0/2] vga: demote cirrus

2014-11-03 Thread Michael S. Tsirkin
On Tue, Oct 28, 2014 at 10:09:10AM +0100, Gerd Hoffmann wrote: > Hi, > > Time to flip the default to stdvga. Done for 2.2+ machine types only, > for obvious compatibility reasons. > > https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/ > > Gerd Hoffmann (2): > vga: add

[Qemu-devel] [PATCH] slirp/smbd: disable printer in smb config

2014-11-03 Thread Peter Wu
The file sharing module should not handle printers, so disable it. The options 'load printers' and 'printing' have been available since the beginning (May 1996, commit 0e8fd3398771da2f016d72830179507f3edda51b). Option 'disable spoolss' is available since Samba 2.0.4, commit de5f42c9d9172592779fa250

Re: [Qemu-devel] [PATCH v3 00/19] target-mips: add MSA module

2014-11-03 Thread Leon Alrae
On 02/11/2014 23:08, Peter Maydell wrote: > On 2 November 2014 22:14, Leon Alrae wrote: >> On 01/11/14 05:28, Yongbok Kim wrote: >>> For 2.2 Release. >>> >>> The following patchset implements MIPS SIMD Architecture module. >>> MSA adds new instructions to MIPS Architecture that allow efficient >>>

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-11-03 Thread Kevin Wolf
Am 30.10.2014 um 13:49 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 29.10.2014 um 14:54 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > Instead, let me try once more to sell my old proposal [1] from the > >> > thread you mentioned: > >> > > >> >> What if we

Re: [Qemu-devel] [PATCH] icc_bus: rename ICC_BRIGDE to ICC_BRIDGE

2014-11-03 Thread Igor Mammedov
On Mon, 3 Nov 2014 13:51:34 +0800 Zhu Guihua wrote: Better subj. would be: icc_bus: fix typo ICC_BRIGDE -> ICC_BRIDGE > Rename ICC_BRIGDE for better readability. > > Signed-off-by: Zhu Guihua > --- > hw/cpu/icc_bus.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --g

[Qemu-devel] [Bug 1388735] Re: QEMU no longer allows to use full TCP port range for VNC

2014-11-03 Thread Sergey
Unfortunately, standard (eirther RFB Protocl V 3.X or RFC 6143) doesn't define bahavior with ports different from 5900: Note that the only port number assigned by IANA for RFB is port 5900, so RFB clients and servers should avoid using other port numbers unless they are communicating with

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-11-03 Thread Kevin Wolf
Am 31.10.2014 um 23:45 hat Eric Blake geschrieben: > On 10/30/2014 06:49 AM, Markus Armbruster wrote: > > > You either have to prevent *any* writing of the first 2048 bytes (the > > part that can be examined by a bdrv_probe() method, or your have to > > prevent writing anything a probe recognizes,

Re: [Qemu-devel] [PATCH v2 5/5] spice-qemu-char: convert qemu_chr_open_spice_vmc to use Error API

2014-11-03 Thread zhanghailiang
On 2014/11/3 18:04, Michael Tokarev wrote: 03.11.2014 12:44, zhanghailiang wrote: [] --- a/qemu-char.c +++ b/qemu-char.c @@ -4252,7 +4252,7 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend, #endif #ifdef CONFIG_SPICE case CHARDEV_BACKEND_KIND_SPICEVMC: -

Re: [Qemu-devel] [PATCH] target-i386: add Intel AVX-512 support

2014-11-03 Thread Paolo Bonzini
On 02/11/2014 11:19, Michael S. Tsirkin wrote: > > Add AVX512 feature bits, register definition and corresponding > > xsave/vmstate support. > > > > Signed-off-by: Chao Peng > > Thanks! > > As this was first posted after soft freeze, please > resubmit after 2.2 is out. > > See schedule http:/

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-11-03 Thread Paolo Bonzini
On 03/11/2014 08:48, Chen, Tiejun wrote: > I think the point was mostly to reserve 1f to prevent > devices from using it. > As we populate slots in order it doesn't seem to important ... If we populate slot at !1f GFX driver can't find this ISA bridge. >>> >>> Right, but I mea

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-11-03 Thread Chen, Tiejun
On 2014/11/3 19:35, Paolo Bonzini wrote: On 03/11/2014 08:48, Chen, Tiejun wrote: I think the point was mostly to reserve 1f to prevent devices from using it. As we populate slots in order it doesn't seem to important ... If we populate slot at !1f GFX driver can't find this ISA bridge. Righ

Re: [Qemu-devel] [PATCH v2 0/5] Trivial patch about qemu-char

2014-11-03 Thread zhanghailiang
On 2014/11/3 18:03, Michael Tokarev wrote: 03.11.2014 12:44, zhanghailiang wrote: Patch 1~3 fix wrong check about in-parameter. The last two patches convert some open functions to use Error API. v2: - don't use error_setg when followed by exit(), it does not report an error (Eric Blake) - chec

Re: [Qemu-devel] [PATCH 0/2] block: JSON filenames and relative backing files

2014-11-03 Thread Stefan Hajnoczi
On Thu, Oct 23, 2014 at 04:56:13PM +0200, Max Reitz wrote: > Sometimes, qemu does not have a filename to work with (it then generates > a JSON filename), so it does not know which directory to use for a > backing file specified by a relative filename. > > In this case, qemu should not somehow try

Re: [Qemu-devel] [PATCH] icc_bus: rename ICC_BRIGDE to ICC_BRIDGE

2014-11-03 Thread Zhu Guihua
On Mon, 2014-11-03 at 12:01 +0300, Michael Tokarev wrote: > 03.11.2014 08:51, Zhu Guihua wrote: > > Rename ICC_BRIGDE for better readability. > > That's a good one... :) Applied to -trivial, thank you! > For Igor's opinion, it is better to change the subject. So should I send v2 to fix this? R

Re: [Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices

2014-11-03 Thread Cornelia Huck
On Thu, 30 Oct 2014 23:29:50 +0100 Greg Kurz wrote: > On Thu, 30 Oct 2014 19:02:01 +0100 > Cornelia Huck wrote: > > > On Tue, 28 Oct 2014 16:40:18 +0100 > > Greg Kurz wrote: > > > > > On Tue, 7 Oct 2014 16:40:01 +0200 > > > Cornelia Huck wrote: > > > > > > > Introduce a helper function to

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-11-03 Thread Chen, Tiejun
On 2014/11/3 19:36, Chen, Tiejun wrote: On 2014/11/3 19:35, Paolo Bonzini wrote: On 03/11/2014 08:48, Chen, Tiejun wrote: I think the point was mostly to reserve 1f to prevent devices from using it. As we populate slots in order it doesn't seem to important ... If we populate slot at !1f GFX

[Qemu-devel] [PULL 01/53] util: introduce MIN_NON_ZERO

2014-11-03 Thread Stefan Hajnoczi
From: Peter Lieven at least in block layer we have the case of limits being defined for a BlockDriverState. However, in this context often zero (0) has the special meanining of undefined which means no limit. If two of those limits are combined and the minimum is needed the minimum function shoul

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

2014-11-03 Thread Stefan Hajnoczi
The following changes since commit 0a2923f8488498000eec54871456aa64a4391da4: tcg/mips: fix store softmmu slow path (2014-11-02 13:30:00 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for you to fetch changes up to b112a65c52aa45a23b

[Qemu-devel] [PULL 03/53] block/iscsi: set max_transfer_length

2014-11-03 Thread Stefan Hajnoczi
From: Peter Lieven Copy the max_xfer_len from the BlockLimits VPD or use the maximum value fitting in the CDB. The helper function sector_limits_lun2qemu is introduced to convert and cap the limits from the VPD to the maximum power of two fitting in an integer; integer is the range for nb_sector

[Qemu-devel] [PULL 07/53] ahci: Correct PIO/D2H FIS responses

2014-11-03 Thread Stefan Hajnoczi
From: John Snow Currently, the D2H FIS packets AHCI generates simply parrot back the LBA that the guest sent to us in the cmd_fis. However, some commands (like READ NATIVE MAX) modify the LBA registers as a return value, through which the AHCI D2H FIS is the only response mechanism. Thus, the D2H

[Qemu-devel] [PULL 02/53] BlockLimits: introduce max_transfer_length

2014-11-03 Thread Stefan Hajnoczi
From: Peter Lieven Signed-off-by: Peter Lieven Reviewed-by: Max Reitz Signed-off-by: Stefan Hajnoczi --- block.c | 4 include/block/block_int.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/block.c b/block.c index 88f6d9b..76fcc1d 100644 --- a/block.c +++ b/bl

[Qemu-devel] [PULL 04/53] block: avoid creating oversized writes in multiwrite_merge

2014-11-03 Thread Stefan Hajnoczi
From: Peter Lieven Signed-off-by: Peter Lieven Reviewed-by: Ronnie Sahlberg Reviewed-by: Max Reitz Signed-off-by: Stefan Hajnoczi --- block.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block.c b/block.c index 76fcc1d..4179341 100644 --- a/block.c +++ b/block.c @@ -4446,6 +4446,

[Qemu-devel] [PULL 10/53] snapshot: Reset err to NULL to avoid double free

2014-11-03 Thread Stefan Hajnoczi
From: Chris Spiegel If an error occurs in bdrv_snapshot_delete_by_id_or_name(), "err" is freed. If "err" is not set to NULL before calling bdrv_snapshot_delete_by_id_or_name() again, it will not be updated on error, and will be freed again. This can be triggered by starting a VM with at least t

[Qemu-devel] [PULL 08/53] ahci: Update byte count after DMA completion

2014-11-03 Thread Stefan Hajnoczi
From: John Snow Currently, DMA read/write operations neglect to update the byte count after a successful transfer like ATAPI DMA read or PIO read/write operations do. We correct this oversight by adding another callback into the IDEDMAOps structure. The commit callback is called whenever we are

[Qemu-devel] [PULL 06/53] block/iscsi: check for oversized requests

2014-11-03 Thread Stefan Hajnoczi
From: Peter Lieven Cancel oversized requests early. They would generate an iSCSI protocol error anyway; after having transferred possibly a lot of data over the wire. Suggested-By: Max Reitz Signed-off-by: Peter Lieven Signed-off-by: Stefan Hajnoczi --- block/iscsi.c | 12 1 fil

[Qemu-devel] [PULL 05/53] block/iscsi: use sector_limits_lun2qemu throughout iscsi_refresh_limits

2014-11-03 Thread Stefan Hajnoczi
From: Peter Lieven As Max pointed out there is a hidden cast from int64_t to int for all limits. So use the newly introduced sector_limits_lun2qemu for all limits received from the target. Signed-off-by: Peter Lieven Reviewed-by: Max Reitz Signed-off-by: Stefan Hajnoczi --- block/iscsi.c | 2

[Qemu-devel] [PULL 12/53] iotests: add v2 parallels sample image and simple test for it

2014-11-03 Thread Stefan Hajnoczi
From: "Denis V. Lunev" This is simple test image for the following commit made by me. commit d25d59802021a747812472780d80a0e792078f40 Author: Denis V. Lunev Date: Mon Jul 28 20:23:55 2014 +0400 parallels: 2TB+ parallels images support Signed-off-by: Denis V. Lunev Reviewed-b

[Qemu-devel] [PULL 09/53] ahci: Fix SDB FIS Construction

2014-11-03 Thread Stefan Hajnoczi
From: John Snow The SDB FIS creation was mangled; We were writing the error byte to byte 0, and omitting the SDB FIS magic byte. Though the SDB packet layout states that: byte 0: Must be 0xA1 to indicate SDB FIS. byte 1: Port multiplier select & other flags byte 2: status byte. byte 3: error byt

[Qemu-devel] [PULL 11/53] iotests: replace fake parallels image with authentic one

2014-11-03 Thread Stefan Hajnoczi
From: "Denis V. Lunev" The image was generated using http://openvz.org/Ploop utility and properly filled with the same content as original one. Signed-off-by: Denis V. Lunev Reviewed-by: Paolo Bonzini Message-id: 1412759610-2257-2-git-send-email-...@openvz.org CC: Jeff Cody CC: Kevin Wolf CC

[Qemu-devel] [PULL 14/53] rbd: Add support for bdrv_invalidate_cache

2014-11-03 Thread Stefan Hajnoczi
From: Adam Crume This fixes Ceph issue 2467: ttp://tracker.ceph.com/issues/2467 [Dropped return r in void function as suggested by Josh Durgin . --Stefan] Signed-off-by: Adam Crume Reviewed-by: Josh Durgin Reviewed-by: Stefan Hajnoczi Message-id: 1412880272-3154-1-git-send-email-adamcr...@gm

[Qemu-devel] [PULL 13/53] block/parallels: fix access to not initialized memory in catalog_bitmap

2014-11-03 Thread Stefan Hajnoczi
From: "Denis V. Lunev" found by valgrind. Command: ./qemu-img convert -f parallels -O qcow2 1.hds 1.img Invalid read of size 4 at 0x17D0EF: parallels_co_read (parallels.c:357) by 0x11FEE4: bdrv_aio_rw_vector (block.c:4640) by 0x11FFBF: bdrv_aio_readv_em (block.c:4652) by 0x11F55F: bd

[Qemu-devel] [PULL 23/53] qcow2: Optimize bdrv_make_empty()

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz bdrv_make_empty() is currently only called if the current image represents an external snapshot that has been committed to its base image; it is therefore unlikely to have internal snapshots. In this case, bdrv_make_empty() can be greatly sped up by emptying the L1 and refcount ta

[Qemu-devel] [PULL 16/53] snapshot: add bdrv_drain_all() to bdrv_snapshot_delete() to avoid concurrency problem

2014-11-03 Thread Stefan Hajnoczi
From: Zhang Haoyu If there are still pending i/o while deleting snapshot, because deleting snapshot is done in non-coroutine context, and the pending i/o read/write (bdrv_co_do_rw) is done in coroutine context, so it's possible to cause concurrency problem between above two operations. Add bdrv_d

[Qemu-devel] [PULL 18/53] raw-posix: Fix raw_co_get_block_status() after EOF

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz As its comment states, raw_co_get_block_status() should unconditionally return 0 and set *pnum to 0 for after EOF. An assertion after lseek(..., SEEK_HOLE) tried to catch this case by asserting that errno != -ENXIO (which would indicate a position after the EOF); but it should be

[Qemu-devel] [PULL 15/53] block.c: Fix type of IoOperationType variable in send_qmp_error_event()

2014-11-03 Thread Stefan Hajnoczi
From: Peter Maydell The local variable 'ac' in send_qmp_error_event() is declared with the wrong type, which causes clang to complain when it is initialized and again when it is used: block.c:3655:20: warning: implicit conversion from enumeration type 'enum IoOperationType' to different enumera

[Qemu-devel] [PULL 25/53] blockjob: Add "ready" field

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz When a block job signals readiness, this is currently reported only through QMP. If qemu wants to use block jobs for internal tasks, there needs to be another way to correctly detect when a block job may be completed. For this reason, introduce a bool "ready" which is set when th

[Qemu-devel] [PULL 22/53] qcow2: Implement bdrv_make_empty()

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Implement this function by making all clusters in the image file fall through to the backing file (by using the recently extended discard). Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-id: 1414159063-25977-3-git-send-email-mre...@redhat.com

[Qemu-devel] [PULL 17/53] block/curl: Improve type safety of s->timeout.

2014-11-03 Thread Stefan Hajnoczi
From: "Richard W.M. Jones" qemu_opt_get_number returns a uint64_t, and curl_easy_setopt expects a long (not an int). There is no warning about the latter type error because curl_easy_setopt uses a varargs argument. Store the timeout (which is a positive number of seconds) as a uint64_t. Check

[Qemu-devel] [PULL 21/53] qcow2: Allow "full" discard

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Normally, discarded sectors should read back as zero. However, there are cases in which a sector (or rather cluster) should be discarded as if they were never written in the first place, that is, reading them should fall through to the backing file again. Signed-off-by: Max Reitz

[Qemu-devel] [PULL 28/53] qemu-img: Implement commit like QMP

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz qemu-img should use QMP commands whenever possible in order to ensure feature completeness of both online and offline image operations. As qemu-img itself has no access to QMP (since this would basically require just everything being linked into qemu-img), imitate QMP's implementa

[Qemu-devel] [PULL 30/53] qemu-img: Enable progress output for commit

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Implement progress output for the commit command by querying the progress of the block job. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-id: 1414159063-25977-11-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi --- qemu-img-c

Re: [Qemu-devel] [PATCH 03/11] pc: check if KVM has enough memory slots for DIMM devices

2014-11-03 Thread Paolo Bonzini
On 31/10/2014 17:38, Igor Mammedov wrote: > check amount of available KVM memory slots after all > devices were initialized and exit with error if > there isn't enough free memory slots for DIMMs. > > Signed-off-by: Igor Mammedov > --- > hw/i386/pc.c | 32 > 1 fi

[Qemu-devel] [PULL 19/53] raw-posix: raw_co_get_block_status() return value

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Instead of generating the full return value thrice in try_fiemap(), try_seek_hole() and as a fall-back in raw_co_get_block_status() itself, generate the value only in raw_co_get_block_status(). While at it, also remove the pnum parameter from try_fiemap() and try_seek_hole(). Su

[Qemu-devel] [PULL 29/53] qemu-img: Empty image after commit

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz After the top image has been committed, it should be emptied unless specified otherwise. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-id: 1414159063-25977-10-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi --- qemu-img-cmds

[Qemu-devel] [PULL 20/53] iotests: Add test for external image truncation

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz It should not be happening, but it is possible to truncate an image outside of qemu while qemu is running (or any of the qemu tools using the block layer. raw_co_get_block_status() should not break then. While touching this test, replace the existing "truncate" invocation by "$QE

[Qemu-devel] [PULL 32/53] iotests: Add _filter_qemu_img_map

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz As different image formats most probably map guest addresses to different host addresses, add a filter to filter the host addresses out; also, the image filename should be filtered. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-id: 1414159063

[Qemu-devel] [PULL 24/53] blockjob: Introduce block_job_complete_sync()

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Implement block_job_complete_sync() by doing the exact same thing as block_job_cancel_sync() does, only with calling block_job_complete() instead of block_job_cancel(). Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake Message-id: 1414159063-25977-5-git-

[Qemu-devel] [PULL 31/53] qemu-img: Specify backing file for commit

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Introduce a new parameter for qemu-img commit which may be used to explicitly specify the backing file into which an image should be committed if the backing chain has more than a single layer. [Applied Eric Blake's qemu-img.texi documentation rewording --Stefan] Signed-off-by:

[Qemu-devel] [PULL 35/53] block: qemu-iotest 107 supports NFS

2014-11-03 Thread Stefan Hajnoczi
From: Peter Lieven As discussed during review a follow up for Max's fix. Signed-off-by: Peter Lieven Reviewed-by: Max Reitz Message-id: 1414249537-29257-1-git-send-email...@kamp.de Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/107 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Qemu-devel] [PULL 26/53] iotests: Omit length/offset test in 040 and 041

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz As of a follow-up patch to this one, the length of a mirror block job will no longer directly depend on the size of the block device; therefore, drop these checks from this test. Instead, just check whether the final offset equals the block job length. As 041 uses the wait_until_

[Qemu-devel] [PULL 36/53] block: Add status callback to bdrv_amend_options()

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Depending on the changed options and the image format, bdrv_amend_options() may take a significant amount of time. In these cases, a way to be informed about the operation's status is desirable. Since the operation is rather complex and may fundamentally change the image, impleme

[Qemu-devel] [PULL 33/53] iotests: Add test for backing-chain commits

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Add a test for qemu-img commit on backing chains with more than two images. This test also checks whether the top image is emptied (unless this is prevented by specifying either -d or -b) and does therefore not work for qed and vmdk which requires it to be separate from 020. Sign

[Qemu-devel] [PULL 38/53] qemu-img: Fix insignificant memleak

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz As soon as options is set in img_amend(), it needs to be freed before the function returns. This leak is rather insignificant, as qemu-img will exit subsequently anyway, but there's no point in not fixing it. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Benoit

[Qemu-devel] [PULL 27/53] block/mirror: Improve progress report

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Instead of taking the total length of the block device as the block job's length, use the number of dirty sectors. The progress is now the number of sectors mirrored to the target block device. Note that this may result in the job's length increasing during operation, which is how

[Qemu-devel] [PULL 39/53] block/qcow2: Implement status CB for amend

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz The only really time-consuming operation potentially performed by qcow2_amend_options() is zero cluster expansion when downgrading qcow2 images from compat=1.1 to compat=0.10, so report status of that operation and that operation only through the status CB. For this, approximate

[Qemu-devel] [PULL 37/53] qemu-img: Add progress output for amend

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Now that bdrv_amend_options() supports a status callback, use it to display a progress report. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: BenoƮt Canet Reviewed-by: Kevin Wolf Message-id: 1414404776-4919-3-git-send-email-mre...@redhat.com Signed-off-by: Stef

[Qemu-devel] [PULL 44/53] blockdev: acquire AioContext in do_qmp_query_block_jobs_one()

2014-11-03 Thread Stefan Hajnoczi
Make sure that query-block-jobs acquires the BlockDriverState AioContext so that the blockjob isn't running in another thread while we access its state. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Message-id: 1413889440-32577-3-git-send-email-stefa...@redhat.com --- blockdev.c | 6 +++

[Qemu-devel] [PULL 34/53] iotests: Add test for qcow2's bdrv_make_empty

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Add a test for qcow2's fast bdrv_make_empty implementation on images without internal snapshots. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake Message-id: 1414159063-25977-15-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests

[Qemu-devel] [PULL 40/53] block/qcow2: Make get_refcount() global

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Reading the refcount of a cluster is an operation which can be useful in all of the qcow2 code, so make that function globally available. While touching this function, amend the comment describing the "addend" parameter: It is (no longer, if it ever was) necessary to have it set

Re: [Qemu-devel] [PATCH 01/11] pc: kvm: check if KVM has free memory slots to avoid abort()

2014-11-03 Thread Paolo Bonzini
On 31/10/2014 17:38, Igor Mammedov wrote: > When more memory devices han available KVM memory slots > are used, QEMU crashes with: > > kvm_alloc_slot: no free slot available > Aborted (core dumped) > > Fix this by checking that KVM has a free slot before > attempting to map memory in guest addres

[Qemu-devel] [PULL 45/53] blockdev: acquire AioContext in blockdev_mark_auto_del()

2014-11-03 Thread Stefan Hajnoczi
When an emulated storage controller is unrealized it will call blockdev_mark_auto_del(). This will cancel any running block job (and that eventually releases its reference to the BDS so it can be freed). Since the block job may be executing in another AioContext we must acquire/release to ensure

Re: [Qemu-devel] [PATCH 00/11] pc: kvm: memory hotplug fixes

2014-11-03 Thread Paolo Bonzini
On 31/10/2014 17:38, Igor Mammedov wrote: > Series > * fixes [1/11] QEMU crash when non aligned DIMM is used in KVM mode. > * adds extra checks/enforcement to avoid non aligned DIMM address/sizes > and prevents guest failures when it tries to deal with such DIMMs > * prevents QEMU from s

[Qemu-devel] [PULL 47/53] blockjob: add block_job_defer_to_main_loop()

2014-11-03 Thread Stefan Hajnoczi
Block jobs will run in the BlockDriverState's AioContext, which may not always be the QEMU main loop. There are some block layer APIs that are either not thread-safe or risk lock ordering problems. This includes bdrv_unref(), bdrv_close(), and anything that calls bdrv_drain_all(). The block_job_

[Qemu-devel] [PULL 46/53] blockdev: add note that block_job_cb() must be thread-safe

2014-11-03 Thread Stefan Hajnoczi
This function is correct but we should document the constraint that everything must be thread-safe. Emitting QMP events and scheduling BHs are both thread-safe so nothing needs to be done here. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Message-id: 1413889440-32577-5-git-send-email-s

[Qemu-devel] [PULL 49/53] block: let backup blockjob run in BDS AioContext

2014-11-03 Thread Stefan Hajnoczi
The backup block job must run in the BlockDriverState AioContext so that it works with dataplane. The basics of acquiring the AioContext are easy in blockdev.c. The completion code in block/backup.c must call bdrv_unref() from the main loop. Use block_job_defer_to_main_loop() to achieve that. S

[Qemu-devel] [PULL 41/53] block/qcow2: Simplify shared L2 handling in amend

2014-11-03 Thread Stefan Hajnoczi
From: Max Reitz Currently, we have a bitmap for keeping track of which clusters have been created during the zero cluster expansion process. This was necessary because we need to properly increase the refcount for shared L2 tables. However, now we can simply take the L2 refcount and use it for t

[Qemu-devel] [PULL 51/53] block: let mirror blockjob run in BDS AioContext

2014-11-03 Thread Stefan Hajnoczi
The mirror block job must run in the BlockDriverState AioContext so that it works with dataplane. Acquire the AioContext in blockdev.c so starting the block job is safe. Note that to_replace is treated separately from other BlockDriverStates in that it does not need to be in the same AioContext.

[Qemu-devel] [PULL 48/53] block: add bdrv_drain()

2014-11-03 Thread Stefan Hajnoczi
Now that op blockers are in use, we can ensure that no other sources are generating I/O on a BlockDriverState. Therefore it is possible to drain requests for a single BDS. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Message-id: 1413889440-32577-7-git-send-email-stefa...@redhat.com ---

Re: [Qemu-devel] [Qemu-trivial] [PATCH v6] numa: make 'info numa' take into account hotplugged memory

2014-11-03 Thread zhanghailiang
On 2014/11/2 15:03, Michael Tokarev wrote: 30.10.2014 11:22, zhanghailiang wrote: Hi Michael, Can you help applying this patch to -trivial branch? It has been reviewed, and it mainly fix bug for hmp command of 'info numa'. Which i don't know if it should go qemu-stable, for this is not a blocke

  1   2   3   4   >