Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-10 Thread Markus Armbruster
Max Reitz mre...@redhat.com writes: On 2014-11-07 at 15:52, Markus Armbruster wrote: Max Reitz mre...@redhat.com writes: On 2014-11-06 at 15:56, Jeff Cody wrote: On Thu, Nov 06, 2014 at 01:53:35PM +0100, Max Reitz wrote: On 2014-11-06 at 13:26, Markus Armbruster wrote: Max Reitz

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-10 Thread Markus Armbruster
Jeff Cody jc...@redhat.com writes: On Fri, Nov 07, 2014 at 04:21:38PM +0100, Markus Armbruster wrote: [...] let me refine / vary the hybrid approach I mentioned under Don't guess format from untrusted image contents some. I think I can trace some inspiration to Max here.

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-10 Thread Markus Armbruster
Markus Armbruster arm...@redhat.com writes: [...] let me refine / vary the hybrid approach I mentioned under Don't guess format from untrusted image contents some. I think I can trace some inspiration to Max here. Say we use trusted meta-data to compute a set of admissible

Re: [Qemu-devel] [PATCH] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf

2014-11-10 Thread Markus Armbruster
Peter Maydell peter.mayd...@linaro.org writes: On 8 November 2014 03:51, Willem Pinckaers willem_q...@lekkertech.net wrote: This is a simple patch to change the type of old_env from jmp_buf to sigjmp_buf. old_env is used by sigsetjmp and as such should be a sigjmp_buf. This fixes a

Re: [Qemu-devel] [PATCH] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-11-10 Thread Jun Li
On Fri, 11/07 16:34, Max Reitz wrote: On 2014-11-07 at 15:48, Jun Li wrote: When bs-filename and bs-backing_file are relative pathname and not under the same directory, path_combine() can not give the correct path for bs-backing_file. So add get_localfile_absolute_path to get absolute path

Re: [Qemu-devel] [PATCH 1/2] virtio-scsi-dataplane: fix allocation for 'cmd_vrings'

2014-11-10 Thread Markus Armbruster
Ming Lei ming@canonical.com writes: The size of each element should be sizeof(VirtIOSCSIVring *). Signed-off-by: Ming Lei ming@canonical.com --- hw/scsi/virtio-scsi-dataplane.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi-dataplane.c

Re: [Qemu-devel] [PATCH] pci: fixed mismatch of error-handling between pci_qdev_init() and qdev

2014-11-10 Thread SeokYeon Hwang
-Original Message- From: Markus Armbruster [mailto:arm...@redhat.com] Sent: Friday, November 07, 2014 4:45 PM To: SeokYeon Hwang Cc: 'Michael S. Tsirkin'; 'Paolo Bonzini'; qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH] pci: fixed mismatch of error-handling between

Re: [Qemu-devel] [PATCH] block: Fix max nb_sectors in bdrv_make_zero

2014-11-10 Thread Markus Armbruster
Fam Zheng f...@redhat.com writes: In bdrv_rw_co we report -EINVAL for nb_sectors INT_MAX / BDRV_SECTOR_SIZE, so a caller shouldn't exceed it. It's not obvious to me why we do that there. iovec member iov_len is size_t, not int. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 4

Re: [Qemu-devel] [PATCH v3] error: passing a negative value to an os_errno is wrong

2014-11-10 Thread Max Reitz
On 2014-11-10 at 06:54, SeokYeon Hwang wrote: Added 'assert(os_errno 0)' in 'error_set_errno()'. Fixed errno since it passes wrong value to 'error_set_errno()'. Signed-off-by: SeokYeon Hwang syeon.hw...@samsung.com --- hw/pci/pcie.c | 2 +- util/error.c | 1 + 2 files changed, 2

Re: [Qemu-devel] [PATCH v5 0/3] qcow2: Patch for shrinking qcow2 disk image

2014-11-10 Thread Jun Li
Ping Stefan and Kevin, Could anyone help to review this version of patch ? Thx. Regards, Jun Li On Sun, 10/26 23:20, Jun Li wrote: v5: Add qemu-iotests for qcow2 shrinking. Do some modifications based on MAX's suggestions in v4. v4: Add deal with COW clusters in l2 table. When

Re: [Qemu-devel] [PATCH] pci: fixed mismatch of error-handling between pci_qdev_init() and qdev

2014-11-10 Thread Markus Armbruster
SeokYeon Hwang syeon.hw...@samsung.com writes: -Original Message- From: Markus Armbruster [mailto:arm...@redhat.com] Sent: Friday, November 07, 2014 4:45 PM To: SeokYeon Hwang Cc: 'Michael S. Tsirkin'; 'Paolo Bonzini'; qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH] pci:

Re: [Qemu-devel] [PATCH] block: Fix max nb_sectors in bdrv_make_zero

2014-11-10 Thread Fam Zheng
On Mon, 11/10 09:33, Markus Armbruster wrote: Fam Zheng f...@redhat.com writes: In bdrv_rw_co we report -EINVAL for nb_sectors INT_MAX / BDRV_SECTOR_SIZE, so a caller shouldn't exceed it. I noticed this while testing unmap / zero write with scsi_debug: # dd if=/dev/zero of=/tmp/a bs=1M

[Qemu-devel] KVM call for agenda for 2014-11-11

2014-11-10 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. Thanks, Juan. Call details: 15:00 CEST 13:00 UTC 09:00 EDT Every two weeks By popular demand, a google calendar public entry with it

[Qemu-devel] [PATCH] block: Fix comment for bdrv_co_get_block_status

2014-11-10 Thread Fam Zheng
It returns more information than binary, fix the comment. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index dacd881..42c914e 100644 --- a/block.c +++ b/block.c @@ -3903,9 +3903,9 @@ typedef

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-10 Thread Kevin Wolf
Am 10.11.2014 um 09:12 hat Markus Armbruster geschrieben: Jeff Cody jc...@redhat.com writes: So that would mean .img would always require format=, right? That also implies to me that the only extensions for raw that might not require format= would be .iso and .raw. .img means what we

Re: [Qemu-devel] [PATCH 1/2] virtio-scsi-dataplane: fix allocation for 'cmd_vrings'

2014-11-10 Thread Ming Lei
On Mon, Nov 10, 2014 at 4:24 PM, Markus Armbruster arm...@redhat.com wrote: Ming Lei ming@canonical.com writes: The size of each element should be sizeof(VirtIOSCSIVring *). Signed-off-by: Ming Lei ming@canonical.com --- hw/scsi/virtio-scsi-dataplane.c |2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH v5 0/3] qcow2: Patch for shrinking qcow2 disk image

2014-11-10 Thread Kevin Wolf
Am 10.11.2014 um 09:36 hat Jun Li geschrieben: Ping Stefan and Kevin, Could anyone help to review this version of patch ? Thx. Please try to get a non-maintainer review first, especially from the people who commented on the earlier versions of your series. Kevin

Re: [Qemu-devel] [PULL 0/5] s390x fixes for 2.2

2014-11-10 Thread Christian Borntraeger
Am 05.11.2014 um 16:48 schrieb Cornelia Huck: The following changes since commit 6e76d125f244e10676b917208f2a074729820246: Update version for v2.2.0-rc0 release (2014-11-05 15:21:04 +) are available in the git repository at: git://github.com/cohuck/qemu tags/s390x-20141105 for

Re: [Qemu-devel] [PATCH 1/2] virtio-scsi-dataplane: fix allocation for 'cmd_vrings'

2014-11-10 Thread Kevin Wolf
Am 10.11.2014 um 10:14 hat Ming Lei geschrieben: On Mon, Nov 10, 2014 at 4:24 PM, Markus Armbruster arm...@redhat.com wrote: Ming Lei ming@canonical.com writes: The size of each element should be sizeof(VirtIOSCSIVring *). Signed-off-by: Ming Lei ming@canonical.com ---

Re: [Qemu-devel] [PATCH v3] error: passing a negative value to an os_errno is wrong

2014-11-10 Thread Markus Armbruster
SeokYeon Hwang syeon.hw...@samsung.com writes: Added 'assert(os_errno 0)' in 'error_set_errno()'. Fixed errno since it passes wrong value to 'error_set_errno()'. Signed-off-by: SeokYeon Hwang syeon.hw...@samsung.com --- hw/pci/pcie.c | 2 +- util/error.c | 1 + 2 files changed, 2

Re: [Qemu-devel] What #034;opaque#034; stand for?

2014-11-10 Thread Peter Maydell
On 10 November 2014 07:33, Kaiyuan kaiyu...@tju.edu.cn wrote: Thanks for your explanation, Peter. In this case of timer_read(void *opaque, hwaddr addr, unsigned int size), could I think that opaque is a pointer to a register located in mmio address? If I cast opaque pointer to corresponding

Re: [Qemu-devel] [PATCH] block: Fix max nb_sectors in bdrv_make_zero

2014-11-10 Thread Markus Armbruster
Fam Zheng f...@redhat.com writes: On Mon, 11/10 09:33, Markus Armbruster wrote: Fam Zheng f...@redhat.com writes: In bdrv_rw_co we report -EINVAL for nb_sectors INT_MAX / BDRV_SECTOR_SIZE, so a caller shouldn't exceed it. I noticed this while testing unmap / zero write with scsi_debug:

Re: [Qemu-devel] [PATCH] block: Fix comment for bdrv_co_get_block_status

2014-11-10 Thread Max Reitz
On 2014-11-10 at 10:10, Fam Zheng wrote: It returns more information than binary, fix the comment. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index dacd881..42c914e 100644 --- a/block.c +++

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-10 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 10.11.2014 um 09:12 hat Markus Armbruster geschrieben: Jeff Cody jc...@redhat.com writes: So that would mean .img would always require format=, right? That also implies to me that the only extensions for raw that might not require format= would be

Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux

2014-11-10 Thread Paolo Bonzini
On 10/11/2014 08:02, Hannes Reinecke wrote: On 11/09/2014 10:44 AM, Mark Cave-Ayland wrote: On 07/11/14 12:22, Hannes Reinecke wrote: A linux guest will be issuing messages: [ 32.124042] DC390: Deadlock in DataIn_0: DMA aborted unfinished: 00 bytes remain!! [ 32.126348] DC390:

[Qemu-devel] seabios 1.7.5.1 stable release -- last call for patches

2014-11-10 Thread Gerd Hoffmann
Hi, I'm busy preparing a 1.7.5.1 stable release for seabios, to be released within the next few days, so we can include it into the upcoming qemu 2.2 release. Currently the 1.7.5-stable branch has these patches (git shortlog): Hannes Reinecke (1): megasas: read addional PCI I/O bar

[Qemu-devel] [PULL 5/5] block/vdi: Limit maximum size even futher

2014-11-10 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com The block layer read and write functions do not like requests which are bigger than INT_MAX bytes. Since the VDI bmap is read and written in a single operation, its size is therefore limited accordingly. This reduces the maximum VDI image size supported by QEMU

[Qemu-devel] [PULL 3/5] iotests: Add test for non-existing backing file

2014-11-10 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com Test the error message when a COW file is about to be created which is supposed to inherit the size of its backing file, while the backing file given does not actually exist. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Kevin Wolf kw...@redhat.com

[Qemu-devel] [PULL 4/5] qapi: Complete BlkdebugEvent

2014-11-10 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com Several events were missing from the QAPI enum, add them. Reported-by: Kevin Wolf kw...@redhat.com Signed-off-by: Max Reitz mre...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- qapi/block-core.json | 4 +++- 1 file changed, 3 insertions(+), 1

[Qemu-devel] [PULL 0/5] Block patches for 2.2

2014-11-10 Thread Kevin Wolf
The following changes since commit 6e76d125f244e10676b917208f2a074729820246: Update version for v2.2.0-rc0 release (2014-11-05 15:21:04 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch changes up to

[Qemu-devel] [PULL 2/5] block: Propagate error in bdrv_img_create()

2014-11-10 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com If the specified backing file could not be opened, do not generate a new error message which contains the message which has been generated by bdrv_open(), but just propagate the latter. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Kevin Wolf

[Qemu-devel] [PULL 1/5] qemu-img: Omit error_report() after img_open()

2014-11-10 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com img_open() already prints an error if the operation failed, so there should not be another error_report() afterwards. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com ---

Re: [Qemu-devel] [PATCH] block: Fix comment for bdrv_co_get_block_status

2014-11-10 Thread Markus Armbruster
Max Reitz mre...@redhat.com writes: On 2014-11-10 at 10:10, Fam Zheng wrote: It returns more information than binary, fix the comment. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index

[Qemu-devel] [PATCH] usb-host: fix usb_host_speed_compat tyops

2014-11-10 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/host-libusb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 032a0e4..a5f9dab 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -749,13 +749,13 @@

[Qemu-devel] [PATCH] spice: rework mirror allocation, add no-resize fast path

2014-11-10 Thread Gerd Hoffmann
Add fast path to qemu_spice_display_switch in case old and new displaysurface have identical size (happens with display panning and page flipping). We just swap the backing store then and don't go through the whole process of deleting and creating the primary surface. To simplify the code a mit

Re: [Qemu-devel] 答复: Add CMP2 instruction

2014-11-10 Thread Laurent Vivier
Le 10/11/2014 04:21, Guo, Lei a écrit : Hi Andreas Thanks a lot for your patients. Because I'm a newer to this , I'll follow your advices and pay much more attention to these details. Besides ,I have replied to Thomas' question on my previous submission. If the question was Have you

Re: [Qemu-devel] [PATCH] pc: piix4_pm: init legacy PCI hotplug when running on Xen

2014-11-10 Thread Stefano Stabellini
On Mon, 10 Nov 2014, Zhang, Yang Z wrote: Igor Mammedov wrote on 2014-05-23: if user starts QEMU with -machine pc,accel=xen, then compat property in xenfv won't work and it would cause error: Unsupported bus. Bus doesn't have property 'acpi-pcihp-bsel' set when PCI device is added with

Re: [Qemu-devel] guest sync and bdrv_co_flush

2014-11-10 Thread Kevin Wolf
Am 07.11.2014 um 09:39 hat lihuiba geschrieben: Hi, all I'm a user of qemu/kvm, and I'm wondering some internals of qemu/kvm, so I'd better post it in this developer's mailing list. To be specific, I'm wondering how data is flushed to disk. Intuitively, when the guest issues a

Re: [Qemu-devel] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Igor Mammedov
On Fri, 7 Nov 2014 22:18:45 +0100 Alexander Graf ag...@suse.de wrote: Memory slots have to be page aligned to get entered into KVM. There is existing logic that tries to ensure that we pad memory slots that are not page aligned to the biggest region that would still fit in the alignment

Re: [Qemu-devel] [PATCH] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-11-10 Thread Max Reitz
On 2014-11-10 at 09:19, Jun Li wrote: On Fri, 11/07 16:34, Max Reitz wrote: On 2014-11-07 at 15:48, Jun Li wrote: When bs-filename and bs-backing_file are relative pathname and not under the same directory, path_combine() can not give the correct path for bs-backing_file. So add

Re: [Qemu-devel] [PULL] virtio-serial: crash fix

2014-11-10 Thread Peter Maydell
On 7 November 2014 05:00, Amit Shah amit.s...@redhat.com wrote: The following changes since commit 6e76d125f244e10676b917208f2a074729820246: Update version for v2.2.0-rc0 release (2014-11-05 15:21:04 +) are available in the git repository at:

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi-dataplane: notify guest as batch

2014-11-10 Thread Paolo Bonzini
On 09/11/2014 16:50, Ming Lei wrote: It isn't necessery to notify guest each time when one request is completed, and it should be enough to just notify one time for each running of virtio_scsi_iothread_handle_cmd(). This patch supresses about 30K/sec write on eventfd. Signed-off-by:

Re: [Qemu-devel] [PATCH v3] error: passing a negative value to an os_errno is wrong

2014-11-10 Thread SeokYeon Hwang
-Original Message- From: Markus Armbruster [mailto:arm...@redhat.com] Sent: Monday, November 10, 2014 6:33 PM To: SeokYeon Hwang Cc: qemu-devel@nongnu.org; kongjian...@gmail.com; paolo.bonz...@gmail.com; mre...@redhat.com Subject: Re: [Qemu-devel] [PATCH v3] error: passing a

Re: [Qemu-devel] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Alexander Graf
On 10.11.14 13:31, Igor Mammedov wrote: On Fri, 7 Nov 2014 22:18:45 +0100 Alexander Graf ag...@suse.de wrote: Memory slots have to be page aligned to get entered into KVM. There is existing logic that tries to ensure that we pad memory slots that are not page aligned to the biggest

Re: [Qemu-devel] [PATCH v3] error: passing a negative value to an os_errno is wrong

2014-11-10 Thread Markus Armbruster
SeokYeon Hwang syeon.hw...@samsung.com writes: -Original Message- From: Markus Armbruster [mailto:arm...@redhat.com] Sent: Monday, November 10, 2014 6:33 PM To: SeokYeon Hwang Cc: qemu-devel@nongnu.org; kongjian...@gmail.com; paolo.bonz...@gmail.com; mre...@redhat.com Subject: Re:

[Qemu-devel] [PATCH] mips: Correct the handling of writes to CP0.Status for MIPSr6

2014-11-10 Thread Maciej W. Rozycki
Correct these issues with the handling of CP0.Status for MIPSr6: * only ignore the bit pattern of 0b11 on writes to CP0.Status.KSU, that is for processors that do implement Supervisor Mode, let the bit pattern be written to CP0.Status.UM:R0 freely (of course the value written to read-only

[Qemu-devel] [PATCH 01/21] qcow2: Add two new fields to BDRVQcowState

2014-11-10 Thread Max Reitz
Add two new fields regarding refcount information (the bit width of every entry and the maximum refcount value) to the BDRVQcowState. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-refcount.c | 2 +- block/qcow2.c | 9 + block/qcow2.h | 2 ++ 3 files

[Qemu-devel] [PATCH 02/21] qcow2: Add refcount_width to format-specific info

2014-11-10 Thread Max Reitz
Add the bit width of every refcount entry to the format-specific information. This breaks some test outputs, fix them. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 4 +++- qapi/block-core.json | 5 - tests/qemu-iotests/060.out | 1 +

[Qemu-devel] [PATCH 03/21] qcow2: Use 64 bits for refcount values

2014-11-10 Thread Max Reitz
Refcounts may have a width of up to 64 bit, so qemu should use the same width to represent refcount values internally. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-cluster.c | 9 ++--- block/qcow2-refcount.c | 37 - block/qcow2.h |

[Qemu-devel] [PATCH 00/21] qcow2: Support refcount orders != 4

2014-11-10 Thread Max Reitz
This should not need much of a cover letter, but here goes anyway: As of version 3, the qcow2 file format supports different widths for refcount entries, ranging from 1 to 64 bit (only powers of two). Currently, qemu only supports 16 bit, which is the only width supported by version 2

[Qemu-devel] [PATCH 05/21] qcow2: Refcount overflow and qcow2_alloc_bytes()

2014-11-10 Thread Max Reitz
qcow2_alloc_bytes() may reuse a cluster multiple times, in which case the refcount is increased accordingly. However, if this would lead to an overflow the function should instead just not reuse this cluster and allocate a new one. Signed-off-by: Max Reitz mre...@redhat.com ---

[Qemu-devel] [PATCH 09/21] qcow2: Open images with refcount order != 4

2014-11-10 Thread Max Reitz
No longer refuse to open images with a different refcount entry width than 16 bits; only reject images with a refcount width larger than 64 bits (which is prohibited by the specification). Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 8 1 file changed, 4 insertions(+),

[Qemu-devel] [PATCH 08/21] qcow2: More helpers for refcount modification

2014-11-10 Thread Max Reitz
Add helper functions for getting and setting refcounts in a refcount array for any possible refcount order, and choose the correct one during refcount initialization. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-refcount.c | 143 - 1

[Qemu-devel] [PATCH 07/21] qcow2: Helper for refcount array size calculation

2014-11-10 Thread Max Reitz
Add a helper function which correctly calculates the byte size of a refcount array for any refcount order, and use that function. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-refcount.c | 39 --- 1 file changed, 28 insertions(+), 11 deletions(-)

[Qemu-devel] [PATCH 13/21] block: Add opaque value to the amend CB

2014-11-10 Thread Max Reitz
Add an opaque value which is to be passed to the bdrv_amend_options() status callback. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 4 ++-- block/qcow2-cluster.c | 14 -- block/qcow2.c | 9 + block/qcow2.h | 3 ++-

[Qemu-devel] [PATCH 10/21] qcow2: refcount_order parameter for qcow2_create2

2014-11-10 Thread Max Reitz
Add a refcount_order parameter to qcow2_create2(), use that value for the image header and for calculating the size required for preallocation. For now, always pass 4. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 41 ++--- 1 file changed, 30

[Qemu-devel] [PATCH 12/21] qcow2: Allow creation with refcount order != 4

2014-11-10 Thread Max Reitz
Add a creation option to qcow2 for setting the refcount order of images to be created, and respect that option's value. This breaks some test outputs, fix them. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 20 include/block/block_int.h | 1 +

[Qemu-devel] [PATCH 14/21] qcow2: Use error_report() in qcow2_amend_options()

2014-11-10 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 14 ++ tests/qemu-iotests/061.out | 14 +++--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 21a1883..beb7187 100644 --- a/block/qcow2.c +++

[Qemu-devel] [PATCH 17/21] qcow2: Use intermediate helper CB for amend

2014-11-10 Thread Max Reitz
If there is more than one time-consuming operation to be performed for qcow2_amend_options(), we need an intermediate CB which coordinates the progress of the individual operations and passes the result to the original status callback. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c

[Qemu-devel] [PATCH 06/21] qcow2: Helper function for refcount modification

2014-11-10 Thread Max Reitz
Since refcounts do not always have to be a uint16_t, all refcount blocks and arrays in memory should not have a specific type (thus they become pointers to void) and for accessing them, two helper functions are used (a getter and a setter). Those functions are called indirectly through function

[Qemu-devel] [PATCH 18/21] qcow2: Add function for refcount order amendment

2014-11-10 Thread Max Reitz
Add a function qcow2_change_refcount_order() which allows changing the refcount order of a qcow2 image. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2-refcount.c | 424 + block/qcow2.h | 4 + 2 files changed, 428

[Qemu-devel] [PATCH] mips: Correct the writes to CP0 Status and Cause registers via gdbstub

2014-11-10 Thread Maciej W. Rozycki
Make writes to CP0.Status and CP0.Cause have the same effect as executing corresponding MTC0 instructions would in Kernel Mode. Also ignore writes in the user emulation mode. Currently for requests from the GDB stub we write all the bits across both registers, ignoring any read-only locations,

[Qemu-devel] [PATCH 11/21] iotests: Prepare for refcount_width option

2014-11-10 Thread Max Reitz
Some tests do not work well with certain refcount widths (i.e. you cannot create internal snapshots with refcount_width=1), so make those widths unsupported. Furthermore, add another filter to _filter_img_create in common.filter which filters out the refcount_width value. Signed-off-by: Max

[Qemu-devel] [PATCH 19/21] qcow2: Invoke refcount order amendment function

2014-11-10 Thread Max Reitz
Make use of qcow2_change_refcount_order() to support changing the refcount order with qemu-img amend. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/block/qcow2.c

[Qemu-devel] [PATCH 15/21] qcow2: Use abort() instead of assert(false)

2014-11-10 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index beb7187..ebf843f 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2718,9 +2718,9 @@ static int

[Qemu-devel] [PATCH 20/21] qcow2: Point to amend function in check

2014-11-10 Thread Max Reitz
If a reference count is not representable with the current refcount order, the image check should point to qemu-img amend for increasing the refcount order. However, qemu-img amend needs write access to the image which cannot be provided if the image is marked corrupt; and the image check will not

Re: [Qemu-devel] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Igor Mammedov
On Mon, 10 Nov 2014 14:16:58 +0100 Alexander Graf ag...@suse.de wrote: On 10.11.14 13:31, Igor Mammedov wrote: On Fri, 7 Nov 2014 22:18:45 +0100 Alexander Graf ag...@suse.de wrote: Memory slots have to be page aligned to get entered into KVM. There is existing logic that tries to

[Qemu-devel] [PATCH 16/21] qcow2: Split upgrade/downgrade paths for amend

2014-11-10 Thread Max Reitz
If the image version should be upgraded, that is the first we should do; if it should be downgraded, that is the last we should do. So split the version change block into an upgrade part at the start and a downgrade part at the end. Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c |

Re: [Qemu-devel] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Paolo Bonzini
On 10/11/2014 14:16, Alexander Graf wrote: No, because in that case you would map something as RAM that really isn't RAM. Imagine you have the following memory layout: 0x1000 page size 1) 0x0 - 0x1 RAM 2) 0x1 - 0x10100 MMIO 3) 0x10100 - 0x2 RAM Then you want to

[Qemu-devel] [PATCH 21/21] iotests: Add test for different refcount widths

2014-11-10 Thread Max Reitz
Add a test for conversion between different refcount widths and errors specific to certain widths (i.e. snapshots with refcount_width=1). Signed-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/112 | 225 + tests/qemu-iotests/112.out |

Re: [Qemu-devel] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Peter Maydell
On 10 November 2014 13:16, Alexander Graf ag...@suse.de wrote: Sorry, I don't understand this paragraph. Memory slots in general are accelerations for memory access - for MMIO (RAM is usually aligned), KVM can always exit to QEMU and just do a manual MMIO exit. ...you're a bit stuck if you

Re: [Qemu-devel] [PATCH v2 1/9] qemu-io: Allow explicitly specifying format

2014-11-10 Thread Max Reitz
On 2014-11-07 at 20:39, Kevin Wolf wrote: This adds a -f option to qemu-io which allows to explicitly specify the block driver to use for the given image. Signed-off-by: Kevin Wolf kw...@redhat.com --- qemu-io.c | 28 1 file changed, 20 insertions(+), 8

Re: [Qemu-devel] [PATCH v2 1/9] qemu-io: Allow explicitly specifying format

2014-11-10 Thread Max Reitz
On 2014-11-10 at 15:07, Max Reitz wrote: On 2014-11-07 at 20:39, Kevin Wolf wrote: This adds a -f option to qemu-io which allows to explicitly specify the block driver to use for the given image. Signed-off-by: Kevin Wolf kw...@redhat.com --- qemu-io.c | 28 1

[Qemu-devel] [PATCH 3/3] kvm: extend kvm_irqchip_add_msi_route to work on s390

2014-11-10 Thread Frank Blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com on s390 MSI-X irqs are presented as thin or adapter interrupts for this we have to reorganize the routing entry to contain valid information for the adapter interrupt code on s390. To minimize impact on existing code we introduce an architecture

[Qemu-devel] [PATCH 0/3] add PCI support for the s390 platform

2014-11-10 Thread Frank Blaschka
This set of patches implemets PCI support for the s390 platform. Now it is possible to run virtio-net-pci and potentially all virtual pci devices conforming to s390 platform constrains. Please review and consider for integration into 2.3 Thanks, Frank Blaschka (3): s390: Add PCI bus support

[Qemu-devel] [PULL 0/2] seccomp branch queue

2014-11-10 Thread Eduardo Otubo
) are available in the git repository at: git://github.com/otubo/qemu.git tags/pull-seccomp-20141110 for you to fetch changes up to f5c76d3eb66a63604d9d8b47ce94268f9babea10: seccomp: change configure to avoid arm 32 to break (2014-11-07 16:42:18 +0100

[Qemu-devel] [PULL 1/2] seccomp: whitelist syscalls fallocate(), fadvise64(), inotify_init1() and inotify_add_watch()

2014-11-10 Thread Eduardo Otubo
From: Philipp Gesang philipp.ges...@intra2net.com fallocate() is needed for snapshotting. If it isn’t whitelisted $ qemu-img create -f qcow2 x.qcow 1G Formatting 'x.qcow', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off $ qemu-kvm -display none

[Qemu-devel] [PATCH 1/3] s390: Add PCI bus support

2014-11-10 Thread Frank Blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch implements a pci bus for s390x together with infrastructure to generate and handle hotplug events, to configure/unconfigure via sclp instruction, to do iommu translations and provide s390 support for MSI/MSI-X notification processing.

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-10 Thread Jeff Cody
On Mon, Nov 10, 2014 at 11:30:25AM +0100, Markus Armbruster wrote: Kevin Wolf kw...@redhat.com writes: Am 10.11.2014 um 09:12 hat Markus Armbruster geschrieben: Jeff Cody jc...@redhat.com writes: So that would mean .img would always require format=, right? That also implies to me

Re: [Qemu-devel] [PATCH v2 3/9] qemu-iotests: Add qemu-io format option in Python tests

2014-11-10 Thread Max Reitz
On 2014-11-07 at 20:39, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- tests/qemu-iotests/030 | 22 +++--- tests/qemu-iotests/040 | 32 tests/qemu-iotests/055 | 18 +- 3 files changed, 36 insertions(+), 36

Re: [Qemu-devel] [PATCH v2 3/9] qemu-iotests: Add qemu-io format option in Python tests

2014-11-10 Thread Kevin Wolf
Am 10.11.2014 um 15:29 hat Max Reitz geschrieben: On 2014-11-07 at 20:39, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- tests/qemu-iotests/030 | 22 +++--- tests/qemu-iotests/040 | 32 tests/qemu-iotests/055 | 18

Re: [Qemu-devel] [PATCH v2 4/9] qtests: Specify image format explicitly

2014-11-10 Thread Max Reitz
On 2014-11-07 at 20:39, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- tests/ahci-test.c | 3 ++- tests/bios-tables-test.c | 2 +- tests/drive_del-test.c| 2 +- tests/fdc-test.c | 2 +- tests/hd-geo-test.c | 2 +- tests/i440fx-test.c | 5

Re: [Qemu-devel] [PATCH v2 16/16] hw/intc/arm_gic: add gic_update() for grouping

2014-11-10 Thread Greg Bellows
Thanks Daniel. I see what you are saying, but historically the code looks like it has always returned so I'd have to investigate it more as I am still learning the code myself. If this is a regression, it would be one inherited from the previous gic_update() function. I'll look further into it

Re: [Qemu-devel] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Alexander Graf
On 10.11.14 14:55, Igor Mammedov wrote: On Mon, 10 Nov 2014 14:16:58 +0100 Alexander Graf ag...@suse.de wrote: On 10.11.14 13:31, Igor Mammedov wrote: On Fri, 7 Nov 2014 22:18:45 +0100 Alexander Graf ag...@suse.de wrote: Memory slots have to be page aligned to get entered into KVM.

Re: [Qemu-devel] [PATCH v2 5/9] block: Factor bdrv_probe_all() out of find_image_format()

2014-11-10 Thread Max Reitz
On 2014-11-07 at 20:39, Kevin Wolf wrote: From: Markus Armbruster arm...@redhat.com Signed-off-by: Markus Armbruster arm...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 45 - 1 file changed, 32 insertions(+), 13 deletions(-)

Re: [Qemu-devel] [PATCH v2 6/9] block: Read only one sector for format probing

2014-11-10 Thread Max Reitz
On 2014-11-07 at 20:39, Kevin Wolf wrote: The only image format driver that even potentially accesses anything after 512 bytes in its bdrv_probe() implementation is VMDK, which reads a plain-text descriptor file. In practice, the field it's looking for seems to come first and will be well within

Re: [Qemu-devel] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-10 Thread Alexander Graf
On 10.11.14 14:55, Peter Maydell wrote: On 10 November 2014 13:16, Alexander Graf ag...@suse.de wrote: Sorry, I don't understand this paragraph. Memory slots in general are accelerations for memory access - for MMIO (RAM is usually aligned), KVM can always exit to QEMU and just do a manual

Re: [Qemu-devel] [PULL 0/7] target-mips queue

2014-11-10 Thread Peter Maydell
On 7 November 2014 16:56, Leon Alrae leon.al...@imgtec.com wrote: Hi, A bunch of bug fixes for 2.2, please pull. Thanks, Leon Cc: Peter Maydell peter.mayd...@linaro.org Cc: Aurelien Jarno aurel...@aurel32.net The following changes since commit 6e76d125f244e10676b917208f2a074729820246:

Re: [Qemu-devel] [PATCH v2 7/9] raw: Prohibit dangerous writes for probed images

2014-11-10 Thread Max Reitz
On 2014-11-07 at 20:39, Kevin Wolf wrote: If the user neglects to specify the image format, QEMU probes the image to guess it automatically, for convenience. Relying on format probing is insecure for raw images (CVE-2008-2004). If the guest writes a suitable header to the device, the next probe

Re: [Qemu-devel] [PULL 0/7] target-mips queue

2014-11-10 Thread Peter Maydell
On 10 November 2014 14:57, Peter Maydell peter.mayd...@linaro.org wrote: Applied, thanks. PS: you might like to look at suppressing these relatively new clang warnings: target-mips/translate.c:1968:15: warning: no case matching constant switch condition '16' FOP_CONDNS(s, FMT_S, 32,

[Qemu-devel] [PULL 2.2 0/2] target-xtensa: fix entry opcode

2014-11-10 Thread Max Filippov
/OSLL/qemu-xtensa.git tags/20141110-xtensa for you to fetch changes up to 09c7fbef766b43f6edb46b30546bd1b32ee12921: target-xtensa: add entry overflow test (2014-11-10 17:59:13 +0300) Xtensa fixes for 2.2: - fix entry opcode

Re: [Qemu-devel] [PATCH 1/3] s390: Add PCI bus support

2014-11-10 Thread Alexander Graf
On 10.11.14 15:20, Frank Blaschka wrote: From: Frank Blaschka frank.blasc...@de.ibm.com This patch implements a pci bus for s390x together with infrastructure to generate and handle hotplug events, to configure/unconfigure via sclp instruction, to do iommu translations and provide s390

[Qemu-devel] [PATCH] esp: Do not overwrite ESP_TCHI after reset

2014-11-10 Thread Hannes Reinecke
After a reset ESP_TCHI should contain the unique ID of the chip. This value will be overwritten with the current tranfer count if the transfer count has previously been set. The code never checks if the transfer count has been set, so the unique ID will always be overwritten if the driver sends a

Re: [Qemu-devel] [PATCH] esp: Do not overwrite ESP_TCHI after reset

2014-11-10 Thread Hannes Reinecke
On 11/10/2014 04:37 PM, Hannes Reinecke wrote: After a reset ESP_TCHI should contain the unique ID of the chip. This value will be overwritten with the current tranfer count if the transfer count has previously been set. The code never checks if the transfer count has been set, so the unique

[Qemu-devel] [PATCHv2] esp: Do not overwrite ESP_TCHI after reset

2014-11-10 Thread Hannes Reinecke
After a reset ESP_TCHI should contain the unique ID of the chip. This value will be overwritten with the current tranfer count if the transfer count has previously been set. So we should always return the chip id if ESP_TCHI has never been written to. Signed-off-by: Hannes Reinecke h...@suse.de

Re: [Qemu-devel] [PATCH v2 9/9] qemu-iotests: Test writing non-raw image headers to raw image

2014-11-10 Thread Max Reitz
On 2014-11-07 at 20:39, Kevin Wolf wrote: This is forbidden if the raw driver was probed. Signed-off-by: Kevin Wolf kw...@redhat.com --- tests/qemu-iotests/109 | 100 ++ tests/qemu-iotests/109.out | 149 +

Re: [Qemu-devel] [PATCH 2/3] s390: implement pci instructions

2014-11-10 Thread Alexander Graf
On 10.11.14 15:20, Frank Blaschka wrote: From: Frank Blaschka frank.blasc...@de.ibm.com This patch implements the s390 pci instructions in qemu. It allows to access and drive pci devices attached to the s390 pci bus. Because of platform constrains devices using IO BARs are not supported.

Re: [Qemu-devel] [PATCH] spice: rework mirror allocation, add no-resize fast path

2014-11-10 Thread Eric Blake
On 11/10/2014 04:23 AM, Gerd Hoffmann wrote: Add fast path to qemu_spice_display_switch in case old and new displaysurface have identical size (happens with display panning and page flipping). We just swap the backing store then and don't go through the whole process of deleting and creating

Re: [Qemu-devel] [PATCH v2 16/16] hw/intc/arm_gic: add gic_update() for grouping

2014-11-10 Thread Christoffer Dall
On Mon, Nov 10, 2014 at 3:43 PM, Greg Bellows greg.bell...@linaro.org wrote: [...] On 7 November 2014 06:44, Daniel Thompson daniel.thomp...@linaro.org wrote: On 30/10/14 22:12, Greg Bellows wrote: From: Fabian Aggeler aggel...@ethz.ch GICs with grouping (GICv2 or GICv1 with Security

Re: [Qemu-devel] [PATCH v3] error: passing a negative value to an os_errno is wrong

2014-11-10 Thread Eric Blake
On 11/09/2014 10:54 PM, SeokYeon Hwang wrote: Added 'assert(os_errno 0)' in 'error_set_errno()'. Commit message... Fixed errno since it passes wrong value to 'error_set_errno()'. Signed-off-by: SeokYeon Hwang syeon.hw...@samsung.com --- hw/pci/pcie.c | 2 +- +++ b/util/error.c @@

  1   2   >