Re: [Qemu-devel] [PATCH 3/5] PPC: mac_nvram: Allow 2 and 4 byte accesses

2014-07-14 Thread Paolo Bonzini
Il 13/07/2014 18:17, Alexander Graf ha scritto: The NVRAM in our Core99 machine really supports 2byte and 4byte accesses just as well as 1byte accesses. In fact, Mac OS X uses those. Add support for higher register size granularities. Signed-off-by: Alexander Graf ag...@suse.de ---

Re: [Qemu-devel] [PATCH] scsi: Report error when lun number is in use

2014-07-14 Thread Paolo Bonzini
Il 14/07/2014 04:42, Fam Zheng ha scritto: On Tue, 06/10 14:55, Fam Zheng wrote: In the case that the lun number is taken by another scsi device, don't release the existing device siliently, but report an error to user. Signed-off-by: Fam Zheng f...@redhat.com Do we want this in 2.1? Fam

Re: [Qemu-devel] qemu qmp [info usb] and [info hostusb]

2014-07-14 Thread Markus Armbruster
Pascal Heinrich pascalheinrich...@googlemail.com writes: Hi, I am trying to implement a qtprogram to bind and unbind usb devices from an qemu instance. Via device_add I am able to bind a device to the vm but there is no command in qmp to list binded devices or I do not find them. I am

Re: [Qemu-devel] [PULL 3/3] cirrus: Fix host CPU blits

2014-07-14 Thread Peter Lieven
Hi Benjamin, On 11.07.2014 12:24, Gerd Hoffmann wrote: From: Benjamin Herrenschmidt b...@kernel.crashing.org Commit b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef CVE-2007-1320 - Cirrus LGD-54XX bitblt heap overflow broke cpu to video blits. When the ROP function is called from

[Qemu-devel] [PULL for-2.1 1/1] s390x/kvm: synchronize guest floating point registers

2014-07-14 Thread Cornelia Huck
From: Jason J. Herne jjhe...@us.ibm.com Add code to kvm_arch_get_registers and kvm_arch_put_registers to save/restore floating point registers. This missing sync was unnoticed until migration of userspace that uses fprs. Signed-off-by: Jason J. Herne jjhe...@us.ibm.com Signed-off-by: Christian

[Qemu-devel] [PULL for-2.1 0/1] s390x/kvm: bugfix

2014-07-14 Thread Cornelia Huck
The following changes since commit ab6d3749c4915cd5692633e321f7745dce06fe77: Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20140711-1' into staging (2014-07-11 17:50:38 +0100) are available in the git repository at: git://github.com/cohuck/qemu.git tags/s390x-20140714

Re: [Qemu-devel] [PULL 3/3] cirrus: Fix host CPU blits

2014-07-14 Thread Benjamin Herrenschmidt
On Mon, 2014-07-14 at 09:24 +0200, Peter Lieven wrote: it seems you have digged into the cirrus code recently. Have you an idea how to fix the issue with the graphics corruption for cirrus vga and recent X Server versions? E.g. take an Ubuntu 14.04 Desktop CD, boot it into live mode and

Re: [Qemu-devel] [PULL 3/3] cirrus: Fix host CPU blits

2014-07-14 Thread Benjamin Herrenschmidt
On Mon, 2014-07-14 at 17:29 +1000, Benjamin Herrenschmidt wrote: On Mon, 2014-07-14 at 09:24 +0200, Peter Lieven wrote: it seems you have digged into the cirrus code recently. Have you an idea how to fix the issue with the graphics corruption for cirrus vga and recent X Server versions?

[Qemu-devel] [Bug 1307473] Re: guest hang due to missing clock interrupt

2014-07-14 Thread Ondergetekende
We've resolved our issues by disabling KSM on the affected nodes. All of the non-affected nodes didn't have KSM enabled (due to a packaging bug elsewhere). After disabling KSM, our problems went away gradually in ~3 days. This means we're no longer affected by this issue (and given the other

Re: [Qemu-devel] [PATCH v2 for-2.1] linux-aio: Fix laio resource leak

2014-07-14 Thread Stefan Hajnoczi
On Sat, Jul 12, 2014 at 11:43:37AM +0800, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com when hotplug virtio-scsi disks using laio, the aio_nr will increase in laio_init() by io_setup(), we can see the number by # cat /proc/sys/fs/aio-nr 128 if the aio_nr attach

Re: [Qemu-devel] [PATCH] qom: Make object_child_foreach safe for objects removal

2014-07-14 Thread Paolo Bonzini
Il 13/07/2014 16:41, Alexey Kardashevskiy ha scritto: Current object_child_foreach() uses QTAILQ_FOREACH() to walk through children and that makes children removal from the callback impossible. This makes object_child_foreach() use QTAILQ_FOREACH_SAFE(). Signed-off-by: Alexey Kardashevskiy

Re: [Qemu-devel] [PULL 3/3] cirrus: Fix host CPU blits

2014-07-14 Thread Peter Lieven
On 14.07.2014 09:29, Benjamin Herrenschmidt wrote: On Mon, 2014-07-14 at 09:24 +0200, Peter Lieven wrote: it seems you have digged into the cirrus code recently. Have you an idea how to fix the issue with the graphics corruption for cirrus vga and recent X Server versions? E.g. take an Ubuntu

Re: [Qemu-devel] [PATCH for-2.1? 2/2] thread-pool: avoid deadlock in nested aio_poll() calls

2014-07-14 Thread Paolo Bonzini
Il 11/07/2014 13:20, Stefan Hajnoczi ha scritto: The thread pool has a race condition if two elements complete before thread_pool_completion_bh() runs: If element A's callback waits for element B using aio_poll() it will deadlock since pool-completion_bh is not marked scheduled when the

Re: [Qemu-devel] [PATCH] Tap: fix vcpu long time io blocking on tap

2014-07-14 Thread Stefan Hajnoczi
On Mon, Jul 14, 2014 at 01:55:05AM +, Wangkai (Kevin,C) wrote: -Original Message- From: Stefan Hajnoczi [mailto:stefa...@redhat.com] Sent: Friday, July 11, 2014 9:04 PM To: Wangkai (Kevin,C) Cc: qemu-devel@nongnu.org; aligu...@amazon.com; Lee yang Subject: Re: [PATCH]

[Qemu-devel] [PATCH 1/4 v8] ppc: debug stub: Get trap instruction opcode from KVM

2014-07-14 Thread Bharat Bhushan
Get trap instruction opcode from KVM and this opcode will be used for setting software breakpoint in following patch Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v7-v8 - No change target-ppc/kvm.c | 4 1 file changed, 4 insertions(+) diff --git a/target-ppc/kvm.c

[Qemu-devel] [PATCH 2/4 v8] ppc: synchronize excp_vectors for injecting exception

2014-07-14 Thread Bharat Bhushan
This patch synchronizes env-excp_vectors[] with env-iovr[]. This is required for using the existing interrupt injection mechanism for kvm. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v7-v8 - No change target-ppc/kvm.c | 27 +++ 1 file changed, 27

[Qemu-devel] [PATCH 3/4 v8] ppc: Add software breakpoint support

2014-07-14 Thread Bharat Bhushan
This patch allow insert/remove software breakpoint. When QEMU is not able to handle debug exception then we inject program exception to guest because for software breakpoint QEMU uses a ehpriv-1 instruction; So there cannot be any reason that we are in qemu with exit reason KVM_EXIT_DEBUG for

[Qemu-devel] [PATCH 0/4 v8] ppc: Add debug stub support

2014-07-14 Thread Bharat Bhushan
This patchset add support for - software breakpoint - h/w breakpoint - h/w watchpoint Please find description in individual patch. v7-v8 - Decrement nip by 4 before calling ppc_cpu_do_interrupt() as pointed by Madhavan Srinivasan - Also added missing cpu_sync() v6-v7 - Removed

[Qemu-devel] [PATCH 4/4 v8] ppc: Add hw breakpoint watchpoint support

2014-07-14 Thread Bharat Bhushan
This patch adds hardware breakpoint and hardware watchpoint support for ppc. On BOOKE architecture we cannot share debug resources between QEMU and guest because: When QEMU is using debug resources then debug exception must be always enabled. To achieve this we set MSR_DE and also set

Re: [Qemu-devel] [PULL 3/3] cirrus: Fix host CPU blits

2014-07-14 Thread Gerd Hoffmann
Hi, Do you see a way to work around this in the graphics driver. E.g. blacklisting 24bpp modes etc. Even if X.Org people actually merge the fixes there are 2 years of Linux releases out there that have corrupted graphics. For anything using kernel 3.14+ IMO the answer to pretty much

[Qemu-devel] [PATCH 01/20] target-mips: add MSA defines and data structure

2014-07-14 Thread Yongbok Kim
add defines and data structure for MIPS SIMD Architecture Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/cpu.h | 79 +-- target-mips/mips-defs.h |1 + target-mips/op_helper.c |1 + 3 files changed, 78 insertions(+), 3

[Qemu-devel] [PATCH 03/20] target-mips: move common funcs to cpu.h

2014-07-14 Thread Yongbok Kim
move commonly used functions to cpu.h Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/cpu.h | 72 +++ target-mips/gdbstub.c |7 target-mips/op_helper.c | 60 +- 3 files changed,

[Qemu-devel] [PATCH 00/20] target-mips: add MSA module

2014-07-14 Thread Yongbok Kim
The following patchset implements MIPS SIMD Architecture module. MSA adds new instructions to MIPS Architecture that allow efficient parallel processing of vector operations. For more information refer to: MIPS Architecture Reference Manual Volume IV-j: The MIPS32 SIMD Architecture Module The

[Qemu-devel] [PATCH 19/20] disas/mips.c: disassemble MSA instructions

2014-07-14 Thread Yongbok Kim
disassemble MIPS SIMD Architecture instructions Signed-off-by: Yongbok Kim yongbok@imgtec.com --- disas/mips.c | 721 +- 1 files changed, 719 insertions(+), 2 deletions(-) diff --git a/disas/mips.c b/disas/mips.c index

[Qemu-devel] [PATCH 05/20] target-mips: stop translation after ctc1

2014-07-14 Thread Yongbok Kim
stop translation as ctc1 instruction can change hflags Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/translate.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 994e85d..cccbc44 100644 ---

[Qemu-devel] [PATCH 04/20] target-mips: add 8, 16, 32, 64 bits load and store

2014-07-14 Thread Yongbok Kim
add 8, 16, 32, 64 bits load and store Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/cpu.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 68ce383..51d1c88 100644 --- a/target-mips/cpu.h +++

[Qemu-devel] [PATCH 10/20] target-mips: add MSA I8 format instructions

2014-07-14 Thread Yongbok Kim
add MSA I8 format instructions Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/helper.h | 11 target-mips/msa_helper.c | 140 ++ target-mips/translate.c | 94 ++- 3 files changed, 243

[Qemu-devel] [PATCH 02/20] target-mips: add MSA exceptions

2014-07-14 Thread Yongbok Kim
add MSA exceptions Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/helper.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/target-mips/helper.c b/target-mips/helper.c index 8a997e4..ed796ff 100644 --- a/target-mips/helper.c +++

[Qemu-devel] [PATCH 08/20] target-mips: add msa_helper.c

2014-07-14 Thread Yongbok Kim
add msa_helper.c Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/Makefile.objs |2 +- target-mips/msa_helper.c | 196 + 2 files changed, 197 insertions(+), 1 deletions(-) create mode 100644 target-mips/msa_helper.c diff --git

[Qemu-devel] [PATCH 11/20] target-mips: add MSA I5 format instructions

2014-07-14 Thread Yongbok Kim
add MSA I5 format instructions: Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/helper.h | 12 ++ target-mips/msa_helper.c | 273 ++ target-mips/translate.c | 91 +++ 3 files changed, 376 insertions(+), 0

[Qemu-devel] [PATCH 20/20] target-mips: add MSA support to mips32r5-generic

2014-07-14 Thread Yongbok Kim
add MSA support to mips32r5-generic core definition Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/translate_init.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c index 9e0f67b..034a3f8

[Qemu-devel] [PATCH 07/20] target-mips: add msa_reset(), global msa register

2014-07-14 Thread Yongbok Kim
add msa_reset() and global msa register (d type only) Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/translate.c | 74 ++ target-mips/translate_init.c | 45 + 2 files changed, 119 insertions(+), 0

[Qemu-devel] [PATCH 12/20] target-mips: add MSA BIT format instructions

2014-07-14 Thread Yongbok Kim
add MSA BIT format instructions Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/helper.h | 12 ++ target-mips/msa_helper.c | 292 ++ target-mips/translate.c | 100 3 files changed, 404 insertions(+), 0

[Qemu-devel] [PATCH 09/20] target-mips: add MSA branch instructions

2014-07-14 Thread Yongbok Kim
add MSA branch instructions Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/translate.c | 107 ++- 1 files changed, 105 insertions(+), 2 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index

[Qemu-devel] [PATCH 14/20] target-mips: add MSA ELM format instructions

2014-07-14 Thread Yongbok Kim
add MSA ELM format instructions Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/helper.h |9 ++ target-mips/msa_helper.c | 239 ++ target-mips/translate.c | 136 ++ 3 files changed, 384

[Qemu-devel] [PATCH 06/20] target-mips: add MSA opcode enum

2014-07-14 Thread Yongbok Kim
add MSA opcode enum Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/translate.c | 248 +++ 1 files changed, 248 insertions(+), 0 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index cccbc44..6b4a82c

[Qemu-devel] [PATCH 16/20] target-mips: add MSA VEC/2R format instructions

2014-07-14 Thread Yongbok Kim
add MSA VEC/2R format instructions Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/helper.h | 11 ++ target-mips/msa_helper.c | 244 ++ target-mips/translate.c | 98 ++ 3 files changed, 353 insertions(+), 0

[Qemu-devel] [PATCH 18/20] target-mips: add MSA MI10 format instructions

2014-07-14 Thread Yongbok Kim
add MSA MI10 format instructions Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/helper.h |2 + target-mips/msa_helper.c | 75 ++ target-mips/translate.c | 43 ++ 3 files changed, 120

[Qemu-devel] [PATCH 17/20] target-mips: add MSA 2RF format instructions

2014-07-14 Thread Yongbok Kim
add MSA 2RF format instructions Signed-off-by: Yongbok Kim yongbok@imgtec.com --- target-mips/helper.h | 16 ++ target-mips/msa_helper.c | 656 ++ target-mips/translate.c | 76 ++ 3 files changed, 748 insertions(+), 0 deletions(-)

[Qemu-devel] [Bug 1303926] Re: qemu-system-x86_64 crashed with SIGABRT

2014-07-14 Thread Sunding Wei
I have the similar issue, the KVM 2.0 keeps crashing, here is the stack I captured with GDB (gdb) c Continuing. Program received signal SIGABRT, Aborted. [Switching to Thread 0x7ffede1f9700 (LWP )] 0x7ffeee4d4f79 in __GI_raise (sig=sig@entry=6) at

Re: [Qemu-devel] [PATCH 3/5] PPC: mac_nvram: Allow 2 and 4 byte accesses

2014-07-14 Thread Alexander Graf
On 14.07.14 08:41, Paolo Bonzini wrote: Il 13/07/2014 18:17, Alexander Graf ha scritto: The NVRAM in our Core99 machine really supports 2byte and 4byte accesses just as well as 1byte accesses. In fact, Mac OS X uses those. Add support for higher register size granularities. Signed-off-by:

[Qemu-devel] [PATCH v2 3/5] PPC: mac_nvram: Allow 2 and 4 byte accesses

2014-07-14 Thread Alexander Graf
The NVRAM in our Core99 machine really supports 2byte and 4byte accesses just as well as 1byte accesses. In fact, Mac OS X uses those. Add support for higher register size granularities. Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2: - Leave single-byte accesses, but mark the MMIO

[Qemu-devel] [PATCH for 2.1] virtio-scsi: fix with -M pc-i440fx-2.0

2014-07-14 Thread Paolo Bonzini
Right now starting a machine with virtio-scsi and a = 2.0 machine type fails with: qemu-system-x86_64: -device virtio-scsi-pci: Property .any_layout not found This is because the any_layout bit was actually never set after virtio-scsi was changed to support arbitrary layout for virtio

Re: [Qemu-devel] [PATCH] Tap: fix vcpu long time io blocking on tap

2014-07-14 Thread Wangkai (Kevin,C)
-Original Message- From: Stefan Hajnoczi [mailto:stefa...@redhat.com] Sent: Monday, July 14, 2014 4:43 PM To: Wangkai (Kevin,C) Cc: qemu-devel@nongnu.org; aligu...@amazon.com; Lee yang Subject: Re: [PATCH] Tap: fix vcpu long time io blocking on tap On Mon, Jul 14, 2014 at

Re: [Qemu-devel] [PATCH for-2.1? 2/2] thread-pool: avoid deadlock in nested aio_poll() calls

2014-07-14 Thread Paolo Bonzini
Il 14/07/2014 10:36, Paolo Bonzini ha scritto: to /* In case elem-common.cb() makes a nested aio_poll() call, * next may become invalid as well. Instead of just * restarting the QLIST_FOREACH_SAFE, go through the BH * once more, which also

Re: [Qemu-devel] [PULL for-2.1 0/1] s390x/kvm: bugfix

2014-07-14 Thread Peter Maydell
repository at: git://github.com/cohuck/qemu.git tags/s390x-20140714 for you to fetch changes up to 85ad6230b3af048109b3e949ca95ade4dd9a0bfa: s390x/kvm: synchronize guest floating point registers (2014-07-14 09:15:38 +0200

[Qemu-devel] Hot unplug of pci-serial-2x fails assertion

2014-07-14 Thread Markus Armbruster
Watch this: (qemu) chardev-add file,path=foo2,id=foo2 (qemu) chardev-add file,path=foo3,id=foo3 (qemu) device_add id=gg,driver=pci-serial-2x,chardev1=foo2,chardev2=foo3 (qemu) device_del gg (qemu) upstream-qemu: /work/armbru/qemu/memory.c:1259: memory_region_finalize:

Re: [Qemu-devel] hw/arm: add Lego NXT board

2014-07-14 Thread Peter Crosthwaite
On Mon, Jul 14, 2014 at 12:20 AM, Alexander Graf a...@antistatix.de wrote: Hi, I developed a software in the loop simulator for the Lego Mindstorms NXT brick. It uses the Qemu ARM emulator to run the Robot's Firmware. I plan to release the simulator as an open source project. Now, I wonder if

Re: [Qemu-devel] [PATCH for 2.1] virtio-scsi: fix with -M pc-i440fx-2.0

2014-07-14 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: Right now starting a machine with virtio-scsi and a = 2.0 machine type fails with: qemu-system-x86_64: -device virtio-scsi-pci: Property .any_layout not found This is because the any_layout bit was actually never set after virtio-scsi was

[Qemu-devel] [PULL v2 for-2.1 00/22] Block patches for 2.1.0-rc2

2014-07-14 Thread Kevin Wolf
v2: - Fixed assertion failure on 32 bit hosts triggered by qtests (32 bit truncation of image file size in patch block: Make qiov match the request size until EOF) The following changes since commit 675879f6f3c9463e103735a4e41e9deb0bee9b39: Update version for v2.1.0-rc1 release

[Qemu-devel] [PULL v2 for-2.1 03/22] block: prefer aio_poll to qemu_aio_wait

2014-07-14 Thread Kevin Wolf
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c| 2 +- blockjob.c | 2 +- qemu-io-cmds.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index

[Qemu-devel] [PULL v2 for-2.1 04/22] block: drop aio functions that operate on the main AioContext

2014-07-14 Thread Kevin Wolf
From: Paolo Bonzini pbonz...@redhat.com The main AioContext should be accessed explicitly via qemu_get_aio_context(). Most of the time, using it is not the right thing to do. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- aio-posix.c

[Qemu-devel] [PULL v2 for-2.1 12/22] dataplane: do not free VirtQueueElement in vring_push()

2014-07-14 Thread Kevin Wolf
From: Stefan Hajnoczi stefa...@redhat.com VirtQueueElement is allocated in vring_pop() so it seems to make sense that vring_push() should free it. Alas, virtio-blk frees VirtQueueElement itself in virtio_blk_free_request(). This patch solves a double-free assertion in glib's g_slice_free().

[Qemu-devel] [PULL v2 for-2.1 01/22] block/backup: Fix hang for unaligned image size

2014-07-14 Thread Kevin Wolf
When doing a block backup of an image with an unaligned size (with respect to the BACKUP_CLUSTER_SIZE), qemu would check the allocation status of sectors after the end of the image. bdrv_is_allocated() returns a result that is valid for 0 sectors in this case, so the backup job ran into an endless

[Qemu-devel] [PULL v2 for-2.1 17/22] qtest: fix vhost-user-test compilation with old GLib

2014-07-14 Thread Kevin Wolf
From: Nikolay Nikolaev n.nikol...@virtualopensystems.com Mising G_TIME_SPAN_SECOND definition breaks the RHEL6 compilation as GLib version before 2.26 does not have it. In such case just define it. Reported-by: Kevin Wolf kw...@redhat.com Signed-off-by: Nikolay Nikolaev

[Qemu-devel] [PULL v2 for-2.1 02/22] block: Fix bdrv_is_allocated() return value

2014-07-14 Thread Kevin Wolf
bdrv_is_allocated() should return either 0 or 1 in successful cases. We're lucky that currently, the callers that rely on this (e.g. because they check for ret == 1) don't seem to break badly. They just might skip some optimisation or in the case of qemu-io 'map' print separate lines where a

[Qemu-devel] [PULL v2 for-2.1 09/22] qed: Make qiov match request size until backing file EOF

2014-07-14 Thread Kevin Wolf
If a QED image has a shorter backing file and a read request to unallocated clusters goes across EOF of the backing file, the backing file sees a shortened request and the rest is filled with zeros. However, the original too long qiov was used with the shortened request. This patch makes the qiov

[Qemu-devel] [PULL v2 for-2.1 10/22] block: Assert qiov length matches request length

2014-07-14 Thread Kevin Wolf
At least raw-posix relies on this because it can allocate bounce buffers based on the request length, but access it using all of the qiov entries later. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- block.c | 2 ++ block/raw-posix.c | 15

[Qemu-devel] [PULL v2 for-2.1 05/22] test-aio: fix GSource-based timer test

2014-07-14 Thread Kevin Wolf
From: Paolo Bonzini pbonz...@redhat.com The current test depends too much on the implementation of the AioContext GSource. Just iterate on the main loop until the callback has been invoked the right number of times. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Kevin Wolf

[Qemu-devel] [PULL v2 for-2.1 15/22] AioContext: do not rely on aio_poll(ctx, true) result to end a loop

2014-07-14 Thread Kevin Wolf
From: Paolo Bonzini pbonz...@redhat.com Currently, whenever aio_poll(ctx, true) has completed all pending work it returns true *and* the next call to aio_poll(ctx, true) will not block. This invariant has its roots in qemu_aio_flush()'s implementation as while (qemu_aio_wait()) {}. However,

[Qemu-devel] [PULL v2 for-2.1 06/22] AioContext: speed up aio_notify

2014-07-14 Thread Kevin Wolf
From: Paolo Bonzini pbonz...@redhat.com In many cases, the call to event_notifier_set in aio_notify is unnecessary. In particular, if we are executing aio_dispatch, or if aio_poll is not blocking, we know that we will soon get to the next loop iteration (if necessary); the thread that hosts the

[Qemu-devel] [PULL v2 for-2.1 07/22] block: Make qiov match the request size until EOF

2014-07-14 Thread Kevin Wolf
If a read request goes across EOF, the block driver sees a shortened request that stops at EOF (the rest is memsetted in block.c), however the original qiov was used for this request. This patch makes the qiov size match the request size, avoiding a potential buffer overflow in raw-posix.

[Qemu-devel] [PULL v2 for-2.1 11/22] virtio-blk: avoid dataplane VirtIOBlockReq early free

2014-07-14 Thread Kevin Wolf
From: Stefan Hajnoczi stefa...@redhat.com VirtIOBlockReq is freed later by virtio_blk_free_request() in hw/block/virtio-blk.c. Remove this extraneous g_slice_free(). This patch fixes the following segfault: 0x556373af in virtio_blk_rw_complete (opaque=0x565ff5e0, ret=0) at

[Qemu-devel] [PULL v2 for-2.1 08/22] qcow2: Make qiov match request size until backing file EOF

2014-07-14 Thread Kevin Wolf
If a qcow2 image has a shorter backing file and a read request to unallocated clusters goes across EOF of the backing file, the backing file sees a shortened request and the rest is filled with zeros. However, the original too long qiov was used with the shortened request. This patch makes the

[Qemu-devel] [PULL v2 for-2.1 21/22] virtio-blk: Treat read/write beyond end as invalid

2014-07-14 Thread Kevin Wolf
From: Markus Armbruster arm...@redhat.com The block layer fails such reads and writes just fine. However, they then get treated like valid operations that fail: the error action gets executed. Unwanted; reporting the error to the guest is the only sensible action. Reject them before passing

[Qemu-devel] [PULL v2 for-2.1 13/22] virtio-blk: avoid g_slice_new0() for VirtIOBlockReq and VirtQueueElement

2014-07-14 Thread Kevin Wolf
From: Stefan Hajnoczi stefa...@redhat.com In commit de6c8042ec55da18702fa51f09072fcaa315edc3 (virtio-blk: Avoid zeroing every request structure) we avoided the 40 KB memset when allocating VirtIOBlockReq. The memset was reintroduced in commit 671ec3f056559f22a2531a91dce3a258b9b5eb8a (virtio-blk:

[Qemu-devel] [PULL v2 for-2.1 22/22] ide: Treat read/write beyond end as invalid

2014-07-14 Thread Kevin Wolf
From: Markus Armbruster arm...@redhat.com The block layer fails such reads and writes just fine. However, they then get treated like valid operations that fail: the error action gets executed. Unwanted; reporting the error to the guest is the only sensible action. Reject them before passing

[Qemu-devel] [PULL v2 for-2.1 16/22] tests: Fix unterminated string output visitor enum human string

2014-07-14 Thread Kevin Wolf
From: Andreas Färber afaer...@suse.de The buffer was being allocated of size string length plus two. Around the string two quotes were being added, but no terminating NUL. It was then compared using g_assert_cmpstr(), resulting in fairly random assertion failures:

[Qemu-devel] [PULL v2 for-2.1 14/22] virtio-blk: embed VirtQueueElement in VirtIOBlockReq

2014-07-14 Thread Kevin Wolf
From: Stefan Hajnoczi stefa...@redhat.com The memory allocation between hw/block/virtio-blk.c, hw/block/dataplane/virtio-blk.c, and hw/virtio/dataplane/vring.c is messy. Structs are allocated in different files than they are freed in. This is risky and makes memory leaks easier. Embed

Re: [Qemu-devel] hw/arm: add Lego NXT board

2014-07-14 Thread Paolo Bonzini
Il 13/07/2014 16:20, Alexander Graf ha scritto: The problem is that the qemu board I designed is not self-contained. It allows the firmware to read/write IO memory in order to read back sensor values from the simulated environment and to control actuators. The environment simulator is an

[Qemu-devel] [PULL v2 for-2.1 18/22] dma-helpers: Fix too long qiov

2014-07-14 Thread Kevin Wolf
If the size of the scatter/gather list isn't a multiple of 512, the number of sectors for the block layer request is rounded down, resulting in a qiov that doesn't match the request length. Truncate the qiov to the new length of the request. This fixes the IDE qtest case

Re: [Qemu-devel] Hot unplug of pci-serial-2x fails assertion

2014-07-14 Thread Peter Crosthwaite
On Mon, Jul 14, 2014 at 9:10 PM, Markus Armbruster arm...@redhat.com wrote: Watch this: (qemu) chardev-add file,path=foo2,id=foo2 (qemu) chardev-add file,path=foo3,id=foo3 (qemu) device_add id=gg,driver=pci-serial-2x,chardev1=foo2,chardev2=foo3 (qemu) device_del gg

[Qemu-devel] [PULL v2 for-2.1 19/22] virtio-blk: Factor common checks out of virtio_blk_handle_read/write()

2014-07-14 Thread Kevin Wolf
From: Markus Armbruster arm...@redhat.com Signed-off-by: Markus Armbruster arm...@redhat.com Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- hw/block/virtio-blk.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git

[Qemu-devel] [PULL v2 for-2.1 20/22] virtio-blk: Bypass error action and I/O accounting on invalid r/w

2014-07-14 Thread Kevin Wolf
From: Markus Armbruster arm...@redhat.com When a device model's I/O operation fails, we execute the error action. This lets layers above QEMU implement thin provisioning, or attempt to correct errors before they reach the guest. But when the I/O operation fails because it's invalid, reporting

Re: [Qemu-devel] Hot unplug of pci-serial-2x fails assertion

2014-07-14 Thread Paolo Bonzini
Il 14/07/2014 13:10, Markus Armbruster ha scritto: Watch this: (qemu) chardev-add file,path=foo2,id=foo2 (qemu) chardev-add file,path=foo3,id=foo3 (qemu) device_add id=gg,driver=pci-serial-2x,chardev1=foo2,chardev2=foo3 (qemu) device_del gg (qemu) upstream-qemu:

Re: [Qemu-devel] [PATCH 3/4 v8] ppc: Add software breakpoint support

2014-07-14 Thread Madhavan Srinivasan
On Monday 14 July 2014 02:45 PM, Bharat Bhushan wrote: This patch allow insert/remove software breakpoint. When QEMU is not able to handle debug exception then we inject program exception to guest because for software breakpoint QEMU uses a ehpriv-1 instruction; So there cannot be any

Re: [Qemu-devel] [PATCH 1/4 v8] ppc: debug stub: Get trap instruction opcode from KVM

2014-07-14 Thread Madhavan Srinivasan
On Monday 14 July 2014 02:45 PM, Bharat Bhushan wrote: Get trap instruction opcode from KVM and this opcode will be used for setting software breakpoint in following patch Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v7-v8 - No change Reviewed By: Madhavan Srinivasan

[Qemu-devel] [PATCH] sPAPR/IOMMU: Fix TCE entry permission

2014-07-14 Thread Gavin Shan
The permission of TCE entry should exclude physical base address. Otherwise, unmapping TCE entry can be interpreted to mapping TCE entry wrongly for VFIO devices. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com --- hw/misc/vfio.c | 2 +- hw/ppc/spapr_iommu.c | 4 ++-- 2 files changed,

Re: [Qemu-devel] Hot unplug of pci-serial-2x fails assertion

2014-07-14 Thread Markus Armbruster
Peter Crosthwaite peter.crosthwa...@xilinx.com writes: On Mon, Jul 14, 2014 at 9:10 PM, Markus Armbruster arm...@redhat.com wrote: Watch this: (qemu) chardev-add file,path=foo2,id=foo2 (qemu) chardev-add file,path=foo3,id=foo3 (qemu) device_add

Re: [Qemu-devel] Hot unplug of pci-serial-2x fails assertion

2014-07-14 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 14/07/2014 13:10, Markus Armbruster ha scritto: Watch this: (qemu) chardev-add file,path=foo2,id=foo2 (qemu) chardev-add file,path=foo3,id=foo3 (qemu) device_add id=gg,driver=pci-serial-2x,chardev1=foo2,chardev2=foo3 (qemu)

Re: [Qemu-devel] [PATCH] serial-pci: remove memory regions from BAR before destroying them

2014-07-14 Thread Peter Crosthwaite
On Thu, Jun 26, 2014 at 5:32 PM, Markus Armbruster arm...@redhat.com wrote: Paolo Bonzini pbonz...@redhat.com writes: Otherwise, hot-unplug of pci-serial-2x trips the assertion in memory_region_destroy: (qemu) device_del gg (qemu) qemu-system-x86_64:

Re: [Qemu-devel] [PULL 3/3] cirrus: Fix host CPU blits

2014-07-14 Thread Peter Lieven
On 14.07.2014 11:53, Gerd Hoffmann wrote: Hi, Do you see a way to work around this in the graphics driver. E.g. blacklisting 24bpp modes etc. Even if X.Org people actually merge the fixes there are 2 years of Linux releases out there that have corrupted graphics. For anything using

Re: [Qemu-devel] [PATCH] qom: Make object_child_foreach safe for objects removal

2014-07-14 Thread Alexey Kardashevskiy
On 07/14/2014 06:14 PM, Paolo Bonzini wrote: Il 13/07/2014 16:41, Alexey Kardashevskiy ha scritto: Current object_child_foreach() uses QTAILQ_FOREACH() to walk through children and that makes children removal from the callback impossible. This makes object_child_foreach() use

Re: [Qemu-devel] [PATCH v3 0/2] spapr: Enable huge pages again

2014-07-14 Thread Alexey Kardashevskiy
On 07/11/2014 01:03 AM, Alexey Kardashevskiy wrote: This does small RMA allocation rework and enables huge pages. Please comment, especially commit logs. Thanks! Changes: v3: * split to 2 patches, one mechanical * tested on PPC970 v2: * moved RMA memory region out of KVM code This

Re: [Qemu-devel] [Bug 1307473] Re: guest hang due to missing clock interrupt

2014-07-14 Thread Serge Hallyn
Quoting Ondergetekende (1307...@bugs.launchpad.net): We've resolved our issues by disabling KSM on the affected nodes. All of the non-affected nodes didn't have KSM enabled (due to a packaging bug elsewhere). After disabling KSM, our problems went away gradually in ~3 days. This means we're

Re: [Qemu-devel] [PATCH v3 0/2] spapr: Enable huge pages again

2014-07-14 Thread Paolo Bonzini
Il 14/07/2014 15:13, Alexey Kardashevskiy ha scritto: On 07/11/2014 01:03 AM, Alexey Kardashevskiy wrote: This does small RMA allocation rework and enables huge pages. Please comment, especially commit logs. Thanks! Changes: v3: * split to 2 patches, one mechanical * tested on PPC970 v2: *

Re: [Qemu-devel] [PATCH v5 00/12] KVM Support for MIPS32 Processors

2014-07-14 Thread James Hogan
Hi Peter, On 10/07/14 13:17, Peter Maydell wrote: On 17 June 2014 23:10, James Hogan james.ho...@imgtec.com wrote: The patchset depends on v4 of target-mips: implement UserLocal Register. I'm aiming for QEMU 2.1, hopefully it isn't too late to get some final review. Thanks to everybody who

Re: [Qemu-devel] [PATCH] qemu-char: fix deadlock with -monitor pty

2014-07-14 Thread Fam Zheng
On Fri, 07/11 12:11, Paolo Bonzini wrote: qemu_chr_be_generic_open cannot be called with the write lock taken, because it calls client code that may call qemu_chr_fe_write. This actually happens for the monitor: 0x727dbf79 in __GI_raise (sig=sig@entry=6) 0x727df388

Re: [Qemu-devel] [PATCH] tcg: add ability to dump /tmp/perf-pid.map files

2014-07-14 Thread Alex Bennée
Richard Henderson writes: On 07/11/2014 09:43 AM, Alex Bennée wrote: +/* if I could put this in a header easily */ +void tb_enable_perfmap(void); How about next to tb_flush in exec/exec-all.h? Including exec/exec-all.h trips up some sort of include prevention magic: CCvl.o In

Re: [Qemu-devel] [PATCH 0/5] PPC: Mac99 emulation fixes

2014-07-14 Thread Mark Cave-Ayland
On 13/07/14 17:17, Alexander Graf wrote: While trying to get Mac OS X booting with our -M mac99 emulation I stumbled over a few issues that prevented it from doing so. With these patches applied I still can't properly boot Mac OS X with -M mac99, but I get a lot further than before. The

Re: [Qemu-devel] [PATCH 0/5] PPC: Mac99 emulation fixes

2014-07-14 Thread Alexander Graf
On 14.07.14 15:58, Mark Cave-Ayland wrote: On 13/07/14 17:17, Alexander Graf wrote: While trying to get Mac OS X booting with our -M mac99 emulation I stumbled over a few issues that prevented it from doing so. With these patches applied I still can't properly boot Mac OS X with -M mac99,

Re: [Qemu-devel] [PATCH 2/2] PPC: Cuda: Use cuda timer to expose tbfreq to guest

2014-07-14 Thread Mark Cave-Ayland
On 13/07/14 21:36, Alexander Graf wrote: Mac OS X calibrates a number of frequencies on bootup based on reading tb values on bootup and comparing them to via cuda timer values. The only variable we can really steer well (thanks to KVM) is the cuda frequency. So let's use that one to fake Mac

Re: [Qemu-devel] [PATCH 0/5] PPC: Mac99 emulation fixes

2014-07-14 Thread Mark Cave-Ayland
On 14/07/14 15:00, Alexander Graf wrote: On 14.07.14 15:58, Mark Cave-Ayland wrote: On 13/07/14 17:17, Alexander Graf wrote: While trying to get Mac OS X booting with our -M mac99 emulation I stumbled over a few issues that prevented it from doing so. With these patches applied I still

Re: [Qemu-devel] [PATCH] serial-pci: remove memory regions from BAR before destroying them

2014-07-14 Thread Paolo Bonzini
Il 14/07/2014 14:36, Peter Crosthwaite ha scritto: On Thu, Jun 26, 2014 at 5:32 PM, Markus Armbruster arm...@redhat.com wrote: Paolo Bonzini pbonz...@redhat.com writes: Otherwise, hot-unplug of pci-serial-2x trips the assertion in memory_region_destroy: (qemu) device_del gg (qemu)

Re: [Qemu-devel] [PATCH] serial-pci: remove memory regions from BAR before destroying them

2014-07-14 Thread Peter Crosthwaite
On Tue, Jul 15, 2014 at 12:20 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 14/07/2014 14:36, Peter Crosthwaite ha scritto: On Thu, Jun 26, 2014 at 5:32 PM, Markus Armbruster arm...@redhat.com wrote: Paolo Bonzini pbonz...@redhat.com writes: Otherwise, hot-unplug of pci-serial-2x trips

[Qemu-devel] [PATCH] target-i386/FPU: wrong conversion infinity from float80 to int32/int64

2014-07-14 Thread Dmitry Poletaev
I executed test-i386 from tests folder from QEMU rep and according to the result, instructions fistl and fistpll returns maximum positive result (0x7fff...), if a FPU register stores a positive infinity, and minimum negative result (0x80...), if a negative infinity stores in a register. Real

Re: [Qemu-devel] [PATCH v5 00/12] KVM Support for MIPS32 Processors

2014-07-14 Thread Peter Maydell
On 14 July 2014 14:33, James Hogan james.ho...@imgtec.com wrote: On 10/07/14 13:17, Peter Maydell wrote: More generally, there doesn't really seem to be provision in the KVM KVM_EXIT_MMIO API for returning this access failed. I guess in theory userspace could do all the figure out how to

[Qemu-devel] [PATCH] linux-user: Add binfmt wrapper

2014-07-14 Thread Joakim Tjernlund
The popular binfmt-wrapper patch adds an additional executable which mangle argv suitable for binfmt flag P. In a chroot you need the both (statically linked) qemu-$arch and qemu-$arch-binfmt-wrapper. This is sub optimal and a better approach is to recognize the -binfmt-wrapper extension within

Re: [Qemu-devel] [PULL v2 for-2.1 00/22] Block patches for 2.1.0-rc2

2014-07-14 Thread Peter Maydell
On 14 July 2014 12:42, Kevin Wolf kw...@redhat.com wrote: v2: - Fixed assertion failure on 32 bit hosts triggered by qtests (32 bit truncation of image file size in patch block: Make qiov match the request size until EOF) The following changes since commit

Re: [Qemu-devel] [PATCH] target-i386/FPU: wrong conversion infinity from float80 to int32/int64

2014-07-14 Thread Peter Maydell
On 14 July 2014 15:35, Dmitry Poletaev poletaev-q...@yandex.ru wrote: I executed test-i386 from tests folder from QEMU rep and according to the result, instructions fistl and fistpll returns maximum positive result (0x7fff...), if a FPU register stores a positive infinity, and minimum

  1   2   >