Re: [Qemu-devel] [PATCH for-2.1?!?] AioContext: speed up aio_notify

2014-07-03 Thread Paolo Bonzini
Il 03/07/2014 20:17, Stefan Hajnoczi ha scritto: On Thu, Jul 3, 2014 at 6:59 PM, Paolo Bonzini wrote: Looks like a very interesting optimization for the block layer. If we can get some performance results - especially how it improves the virtio-blk dataplane regression - maybe we should merge

Re: [Qemu-devel] [PATCH v1 1/1] char: cadence_uart: Convert to realize()

2014-07-03 Thread Alexander Graf
On 03.07.14 18:59, Andreas Färber wrote: Am 03.07.2014 18:46, schrieb Peter Maydell: On 24 June 2014 07:06, Alistair Francis wrote: SysBusDevice::init is deprecated. Convert to Object::init and Note that there is no Object::init, only TypeInfo::instance_init. Device::realize as prescribed

Re: [Qemu-devel] [PATCH 0/2] coroutine: dynamically scale pool size

2014-07-03 Thread Paolo Bonzini
Il 04/07/2014 07:10, Ming Lei ha scritto: With both the two coroutine patches and the block plug&unplug patches, performance of qemu.git/master virtio-blk dataplane can recover to level of QEMU 2.0. So the excessive writes (to eventfd and irqfd) are not a problem? That'd be a relief. :) Paol

Re: [Qemu-devel] ResettRe: [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-03 Thread Paolo Bonzini
Il 03/07/2014 21:09, Jesse Barnes ha scritto: Practically speaking, we could probably assume specific CPU/PCH combos, as I don't think they're generally mixed across generations, though SNB and IVB did have compatible sockets, so there is the possibility of mixing CPT and PPT PCHs, but those are

Re: [Qemu-devel] [PATCH] ahci: map memory via device's address space instead of address_space_memory

2014-07-03 Thread Jan Kiszka
On 2014-07-03 22:30, Michael S. Tsirkin wrote: > On Thu, Jul 03, 2014 at 06:45:03PM +0200, Jan Kiszka wrote: >> On 2014-07-03 12:02, Michael S. Tsirkin wrote: >>> On Thu, Jul 03, 2014 at 10:43:57AM +0200, Jan Kiszka wrote: On 2014-07-03 10:26, Le Tan wrote: > In map_page() in hw/ide/ahci.c

Re: [Qemu-devel] [PATCH 0/2] coroutine: dynamically scale pool size

2014-07-03 Thread Ming Lei
On Thu, Jul 3, 2014 at 9:51 PM, Stefan Hajnoczi wrote: > The coroutine pool reuses exited coroutines to make qemu_coroutine_create() > cheap. The size of the pool is capped to prevent it from hogging memory after > a period of high coroutine activity. Previously the max size was hardcoded to > 6

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-03 Thread Richard Henderson
On 07/03/2014 05:50 PM, Al Viro wrote: > OK, looks sane. Next (trivial) bug: in translate_one() > case 0xF800: > /* WH64 */ > /* No-op */ > break; > should be followed by > case 0xFC00: > /* WH64EN */ > /* No-op */ >

Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling

2014-07-03 Thread Eric Blake
On 07/03/2014 08:56 PM, Hu Tao wrote: > On Thu, Jul 03, 2014 at 06:33:28AM -0600, Eric Blake wrote: >> On 07/03/2014 12:10 AM, Hu Tao wrote: >>> This patch fixes two problems of memory-backend-file: >>> >>> 1. If user adds a memory-backend-file object using object_add command, >>>specifying a n

[Qemu-devel] [PATCH v5 2/3] linux-aio: implement io plug, unplug and flush io queue

2014-07-03 Thread Ming Lei
This patch implements .bdrv_io_plug, .bdrv_io_unplug and .bdrv_flush_io_queue callbacks for linux-aio Block Drivers, so that submitting I/O as a batch can be supported on linux-aio. Signed-off-by: Ming Lei --- block/linux-aio.c | 93 +++-- block/

[Qemu-devel] [PATCH v5 3/3] dataplane: submit I/O as a batch

2014-07-03 Thread Ming Lei
Before commit 580b6b2aa2(dataplane: use the QEMU block layer for I/O), dataplane for virtio-blk submits block I/O as a batch. This commit 580b6b2aa2 replaces the custom linux AIO implementation(including submit I/O as a batch) with QEMU block layer, but this commit causes ~40% throughput regressio

[Qemu-devel] [PATCH v5 0/3] linux-aio: introduce submit I/O as a batch

2014-07-03 Thread Ming Lei
Hi, The commit 580b6b2aa2(dataplane: use the QEMU block layer for I/O) introduces ~40% throughput regression on virtio-blk dataplane, and one of causes is that submitting I/O as a batch is removed. This patchset trys to introduce this mechanism on block, at least, linux-aio can benefit from that.

[Qemu-devel] [PATCH v5 1/3] block: block: introduce APIs for submitting IO as a batch

2014-07-03 Thread Ming Lei
This patch introduces three APIs so that following patches can support queuing I/O requests and submitting them as a batch for improving I/O performance. Reviewed-by: Paolo Bonzini Signed-off-by: Ming Lei --- block.c | 31 +++ include/block/block.

Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling

2014-07-03 Thread Hu Tao
On Thu, Jul 03, 2014 at 06:33:28AM -0600, Eric Blake wrote: > On 07/03/2014 12:10 AM, Hu Tao wrote: > > This patch fixes two problems of memory-backend-file: > > > > 1. If user adds a memory-backend-file object using object_add command, > >specifying a non-existing directory for property mem-p

Re: [Qemu-devel] [PATCH for 2.1 1/2] memory: introduce memory_region_init_ram_nofail() and memory_region_init_ram_ptr_nofail()

2014-07-03 Thread Hu Tao
On Thu, Jul 03, 2014 at 09:51:13AM +0300, Michael S. Tsirkin wrote: > On Thu, Jul 03, 2014 at 02:10:55PM +0800, Hu Tao wrote: > > Introduce memory_region_init_ram_nofail() and > > memory_region_init_ram_ptr_nofail(), which are the same as > > memory_region_init_ram() and memory_region_init_ram_ptr(

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-03 Thread Al Viro
On Thu, Jul 03, 2014 at 01:19:19PM -0700, Richard Henderson wrote: > I believe I have a tidy solution to these /v insns. New patch set shortly. OK, looks sane. Next (trivial) bug: in translate_one() case 0xF800: /* WH64 */ /* No-op */ break; should be

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-03 Thread Al Viro
On Fri, Jul 04, 2014 at 12:05:37AM +0100, Peter Maydell wrote: > On 3 July 2014 23:47, Al Viro wrote: > > How can that be correct? Suppose a = b = 0. We get > > tcg_gen_eqv_i64(tmp, va, vb); -> tmp = -1 > > tcg_gen_mov_i64(tmp2, va); -> tmp2 = 0 > > tcg_gen_add_i64(vc, va, vb);

Re: [Qemu-devel] [PATCH v1 1/1] char: cadence_uart: Convert to realize()

2014-07-03 Thread Peter Crosthwaite
On Fri, Jul 4, 2014 at 2:59 AM, Andreas Färber wrote: > Am 03.07.2014 18:46, schrieb Peter Maydell: >> On 24 June 2014 07:06, Alistair Francis wrote: >>> SysBusDevice::init is deprecated. Convert to Object::init and > > Note that there is no Object::init, only TypeInfo::instance_init. > So I've

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-03 Thread Peter Maydell
On 3 July 2014 23:47, Al Viro wrote: > How can that be correct? Suppose a = b = 0. We get > tcg_gen_eqv_i64(tmp, va, vb); -> tmp = -1 > tcg_gen_mov_i64(tmp2, va); -> tmp2 = 0 > tcg_gen_add_i64(vc, va, vb);-> c = 0 > tcg_gen_xor_i64(tmp2, tmp2, vc);-> tmp2 = 0 > tcg

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-03 Thread Al Viro
On Thu, Jul 03, 2014 at 01:19:19PM -0700, Richard Henderson wrote: > > Grr... Wrong check, obviously - we want to check that tmp + MSB(tmp2) is 0. > > Something like > > setcond_32 tmp2, tmp2, zero, TCG_COND_LT > > add_i32 tmp, tmp2, tmp > > callhelper_IOV_if_n

[Qemu-devel] [PATCH v4] tests: Functions bus_foreach and device_find from libqos virtio API

2014-07-03 Thread Marc Marí
Virtio header has been changed to compile and work with a real device. Functions bus_foreach and device_find have been implemented for PCI. Virtio-blk test case now opens a fake device. Signed-off-by: Marc Marí --- tests/Makefile|3 +- tests/libqos/virtio-pci.c | 78 +++

Re: [Qemu-devel] [PATCH for-2.1 2/2] qdev: Fix crash when using non-device class name on -global

2014-07-03 Thread Don Slutz
On 07/03/14 16:25, Eric Blake wrote: On 07/03/2014 01:45 PM, Eduardo Habkost wrote: This fixes the following crash: $ qemu-system-x86_64 -global container.xxx=y hw/core/qdev-properties-system.c:399:qdev_add_one_global: Object 0x7f7eff234100 is not an instance of type device Abor

[Qemu-devel] [PATCH v2 8/9] target-alpha: Fix cvttq vs inf

2014-07-03 Thread Richard Henderson
We should raise INV for infinities as well, not OVR+INE. Reported-by: Al Viro Signed-off-by: Richard Henderson --- target-alpha/fpu_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target-alpha/fpu_helper.c b/target-alpha/fpu_helper.c index 2b6c96b..9b297de 100644

Re: [Qemu-devel] [PATCH RFC v11 6/6] qcow2: Add falloc and full preallocation option

2014-07-03 Thread Max Reitz
On 02.07.2014 10:17, Hu Tao wrote: This adds preallocation=falloc and preallocation=full mode to qcow2 image creation. preallocation=full allocates disk space by writing zeros to disk to ensure disk space in any cases. preallocation=falloc likes preallocation=full, but allocates disk space by p

[Qemu-devel] [PATCH v2 9/9] target-alpha: Fix integer overflow checking insns

2014-07-03 Thread Richard Henderson
We need to write the result to the destination register before raising any exception. Thus inline the code for each insn, and check for any exception after we're done. Reported-by: Al Viro Signed-off-by: Richard Henderson --- target-alpha/helper.h | 7 +- target-alpha/int_helper.c | 5

[Qemu-devel] [PATCH v2 4/9] target-alpha: Set fpcr_exc_status even for disabled exceptions

2014-07-03 Thread Richard Henderson
The qualifiers can suppress the raising of exceptions, but real hardware still records that the exceptions occurred. Reported-by: Al Viro Signed-off-by: Richard Henderson --- target-alpha/fpu_helper.c | 67 ++- target-alpha/translate.c | 41 +

[Qemu-devel] [PATCH v2 1/9] target-alpha: Forget installed round mode after MT_FPCR

2014-07-03 Thread Richard Henderson
When we use QUAL_RM_D, we copy fpcr_dyn_round to float_status. When we install a new FPCR value, we update fpcr_dyn_round. Reset the status of the cache so that we re-copy for the next fp insn that requires dynamic rounding. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 5 +

[Qemu-devel] [PATCH v2 6/9] target-alpha: Raise IOV from CVTTQ

2014-07-03 Thread Richard Henderson
Floating-point overflow is a different bit from integer overflow. Reported-by: Al Viro Signed-off-by: Richard Henderson --- target-alpha/fpu_helper.c | 25 ++--- target-alpha/helper.h | 1 - target-alpha/translate.c | 17 - 3 files changed, 14 insertion

[Qemu-devel] [PATCH v2 5/9] target-alpha: Set EXC_M_SWC for exceptions from /S insns

2014-07-03 Thread Richard Henderson
Previously forgotten, the kernel needs the software completion bit to know that it needs to emulate software completion qualified insns. Reported-by: Al Viro Signed-off-by: Richard Henderson --- target-alpha/fpu_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/t

Re: [Qemu-devel] [PATCH] ahci: map memory via device's address space instead of address_space_memory

2014-07-03 Thread Michael S. Tsirkin
On Thu, Jul 03, 2014 at 06:45:03PM +0200, Jan Kiszka wrote: > On 2014-07-03 12:02, Michael S. Tsirkin wrote: > > On Thu, Jul 03, 2014 at 10:43:57AM +0200, Jan Kiszka wrote: > >> On 2014-07-03 10:26, Le Tan wrote: > >>> In map_page() in hw/ide/ahci.c, replace cpu_physical_memory_map() and > >>> cpu_

Re: [Qemu-devel] [Intel-gfx] ResettRe: [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-03 Thread Jesse Barnes
On Thu, 3 Jul 2014 14:26:12 -0400 Konrad Rzeszutek Wilk wrote: > On Thu, Jul 03, 2014 at 10:32:12AM +0300, Michael S. Tsirkin wrote: > > On Wed, Jul 02, 2014 at 12:23:37PM -0400, Konrad Rzeszutek Wilk wrote: > > > On Wed, Jul 02, 2014 at 04:50:15PM +0200, Paolo Bonzini wrote: > > > > Il 02/07/201

Re: [Qemu-devel] [PATCH 00/10] RFC: userfault

2014-07-03 Thread Dave Hansen
On 07/02/2014 09:50 AM, Andrea Arcangeli wrote: > The MADV_USERFAULT feature should be generic enough that it can > provide the userfaults to the Android volatile range feature too, on > access of reclaimed volatile pages. Maybe. I certainly can't keep track of all the versions of the variations

Re: [Qemu-devel] Super nested KVM

2014-07-03 Thread Richard W.M. Jones
On Thu, Jul 03, 2014 at 06:34:33PM +0100, Richard W.M. Jones wrote: > There's also a TCG-only mode, but the test ran so slowly as to be > inconclusive. I might leave it going overnight. Well I got bored with the TCG test after about 4 hours. It appears to hang launching the L3 guest, reproducibl

[Qemu-devel] [PATCH v2 0/9] target-alpha exception improvements

2014-07-03 Thread Richard Henderson
I never got around to actually posting v1, although I sent a link to the branch, buried in another thread. I've rebased the branch and added 3 more patches to cover more issued raised by Al since the v1. I've used this to clean up all of the errors in glibc mainline wrt math/test-double.out, due

[Qemu-devel] [PATCH v2 7/9] target-alpha: Fix cvttq vs large integers

2014-07-03 Thread Richard Henderson
The range +- 2**63 - 2**64 was returning the wrong truncated result. We also incorrectly signaled overflow for -2**63. Reported-by: Al Viro Signed-off-by: Richard Henderson --- target-alpha/fpu_helper.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target-alpha

Re: [Qemu-devel] [PATCH RFC v11 6/6] qcow2: Add falloc and full preallocation option

2014-07-03 Thread Max Reitz
On 02.07.2014 10:17, Hu Tao wrote: This adds preallocation=falloc and preallocation=full mode to qcow2 image creation. preallocation=full allocates disk space by writing zeros to disk to ensure disk space in any cases. preallocation=falloc likes preallocation=full, but allocates disk space by p

Re: [Qemu-devel] [PATCH RFC v11 3/6] rename parse_enum_option to qapi_enum_parse and make it public

2014-07-03 Thread Eric Blake
On 07/02/2014 02:17 AM, Hu Tao wrote: > Suggested-by: Markus Armbruster > Reviewed-by: Max Reitz > Signed-off-by: Hu Tao > --- > blockdev.c | 30 ++ > include/qapi/util.h | 17 + > qapi/Makefile.objs | 1 + > qapi/qapi-util.c| 32 ++

[Qemu-devel] [PATCH v2 3/9] target-alpha: Store IOV exception in fp_status

2014-07-03 Thread Richard Henderson
We were not representing the IOV (integer overflow) exception at all. For ease of implementation, allocate a generic bit in softfloat, even though softfloat will never raise the exception itself. This can be licensed under either the softfloat-2a or -2b license. Reported-by: Al Viro Signed-off-b

[Qemu-devel] [PATCH v2 2/9] target-alpha: Set PC correctly for floating-point exceptions

2014-07-03 Thread Richard Henderson
PC should be one past the faulting insn. Add better commentary for the machine-check exception path. Reported-by: Al Viro Signed-off-by: Richard Henderson --- target-alpha/helper.c | 2 ++ target-alpha/mem_helper.c | 9 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH RFC v11 2/6] raw, qcow2: don't convert file size to sector size

2014-07-03 Thread Eric Blake
On 07/02/2014 02:17 AM, Hu Tao wrote: > and avoid converting it back later. > > Reviewed-by: Max Reitz > Signed-off-by: Hu Tao > --- > block/qcow2.c | 10 +- > block/raw-posix.c | 6 +++--- > block/raw-win32.c | 6 +++--- > 3 files changed, 11 insertions(+), 11 deletions(-) Revie

Re: [Qemu-devel] [Intel-gfx] ResettRe: [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-03 Thread Michael S. Tsirkin
On Thu, Jul 03, 2014 at 12:09:28PM -0700, Jesse Barnes wrote: > On Thu, 3 Jul 2014 14:26:12 -0400 > Konrad Rzeszutek Wilk wrote: > > > On Thu, Jul 03, 2014 at 10:32:12AM +0300, Michael S. Tsirkin wrote: > > > On Wed, Jul 02, 2014 at 12:23:37PM -0400, Konrad Rzeszutek Wilk wrote: > > > > On Wed, J

Re: [Qemu-devel] [PATCH for-2.1 2/2] qdev: Fix crash when using non-device class name on -global

2014-07-03 Thread Eric Blake
On 07/03/2014 01:45 PM, Eduardo Habkost wrote: > This fixes the following crash: > > $ qemu-system-x86_64 -global container.xxx=y > hw/core/qdev-properties-system.c:399:qdev_add_one_global: Object > 0x7f7eff234100 is not an instance of type device > Aborted (core dumped) > > New beha

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-03 Thread Richard Henderson
On 07/03/2014 11:25 AM, Al Viro wrote: > On Thu, Jul 03, 2014 at 07:51:04AM +0100, Al Viro wrote: > >> FWIW, why not just generate >> trunc_i64_i32 tmp, va >> trunc_i64_i32 tmp2, vb >> muls2_i32 tmp2, tmp, tmp, tmp2 >> ext32s_i64 vc, tmp2 >> maybe_overflow_32 tmp >> where

Re: [Qemu-devel] [PATCH] e1000: Delay LSC until mask is active

2014-07-03 Thread Michael S. Tsirkin
On Thu, Jul 03, 2014 at 08:00:04PM +0200, Alexander Graf wrote: > > On 03.07.14 19:57, Peter Maydell wrote: > >On 3 July 2014 18:39, Alexander Graf wrote: > >>Mac OS X reads ICR on every interrupt. When the IRQ line is shared, this may > >>result in a race where LSC is not interpreted yet, but al

Re: [Qemu-devel] [PATCH RFC v11 5/6] raw-posix: Add falloc and full preallocation option

2014-07-03 Thread Max Reitz
On 02.07.2014 10:17, Hu Tao wrote: This patch adds a new option preallocation for raw format, and implements falloc and full preallocation. Signed-off-by: Hu Tao --- block/raw-posix.c | 62 --- 1 file changed, 55 insertions(+), 7 deletions(

Re: [Qemu-devel] [PATCH RFC v11 4/6] qapi: introduce PreallocMode and a new PreallocMode full.

2014-07-03 Thread Max Reitz
On 02.07.2014 10:17, Hu Tao wrote: This patch prepares for the subsequent patches. Reviewed-by: Fam Zheng Reviewed-by: Eric Blake Signed-off-by: Hu Tao --- block/qcow2.c| 16 qapi/block-core.json | 17 + 2 files changed, 25 insertions(+), 8 deletio

[Qemu-devel] [PATCH for-2.1 2/2] qdev: Fix crash when using non-device class name on -global

2014-07-03 Thread Eduardo Habkost
This fixes the following crash: $ qemu-system-x86_64 -global container.xxx=y hw/core/qdev-properties-system.c:399:qdev_add_one_global: Object 0x7f7eff234100 is not an instance of type device Aborted (core dumped) New behavior will be to just warn, just like when non-existing clas nam

[Qemu-devel] [PATCH for-2.1 0/2] Fix crashes related to -global option

2014-07-03 Thread Eduardo Habkost
Patch 1 (which was submitted previously but has fallen through the cracks) fixes: $ qemu-system-x86_64 -global cpu.xxx=y qemu-system-x86_64: Property '.xxx' not found Aborted (core dumped) Patch 2 fixes: $ qemu-system-x86_64 -global container.xxx=y hw/core

[Qemu-devel] [PATCH for-2.1 1/2] qdev: Don't abort() in case globals can't be set

2014-07-03 Thread Eduardo Habkost
It would be much better if we didn't terminate QEMU inside device_post_init(), but at least exiting cleanly is better than aborting and dumping core. Before this patch: $ qemu-system-x86_64 -global cpu.xxx=y qemu-system-x86_64: Property '.xxx' not found Aborted (core dumped) After th

Re: [Qemu-devel] [PATCH 1/2] coroutine: make pool size dynamic

2014-07-03 Thread Stefan Hajnoczi
On Thu, Jul 3, 2014 at 3:59 PM, Eric Blake wrote: > On 07/03/2014 07:52 AM, Stefan Hajnoczi wrote: >> Allow coroutine users to adjust the pool size. For example, if the >> guest has multiple emulated disk drives we should keep around more >> coroutines. >> >> Signed-off-by: Stefan Hajnoczi >> --

Re: [Qemu-devel] ResettRe: [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-03 Thread Konrad Rzeszutek Wilk
On Thu, Jul 03, 2014 at 10:32:12AM +0300, Michael S. Tsirkin wrote: > On Wed, Jul 02, 2014 at 12:23:37PM -0400, Konrad Rzeszutek Wilk wrote: > > On Wed, Jul 02, 2014 at 04:50:15PM +0200, Paolo Bonzini wrote: > > > Il 02/07/2014 16:00, Konrad Rzeszutek Wilk ha scritto: > > > >With this long thread I

Re: [Qemu-devel] [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-07-03 Thread Konrad Rzeszutek Wilk
On Thu, Jul 03, 2014 at 11:00:37AM +0800, Chen, Tiejun wrote: > >> > >>Is that about correct? > >> > >>What are folks timezones and the best days next week to talk about > >>this on either Google Hangout or the phone? > > > >UK timezone. Maybe Friday afternoon so that afterwards we can go have > >e

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-07-03 Thread Al Viro
On Thu, Jul 03, 2014 at 07:51:04AM +0100, Al Viro wrote: > FWIW, why not just generate > trunc_i64_i32 tmp, va > trunc_i64_i32 tmp2, vb > muls2_i32 tmp2, tmp, tmp, tmp2 > ext32s_i64 vc, tmp2 > maybe_overflow_32 tmp > where maybe_overflow throws IOV unless tmp is 0 or

Re: [Qemu-devel] [PATCH for-2.1?!?] AioContext: speed up aio_notify

2014-07-03 Thread Stefan Hajnoczi
On Thu, Jul 3, 2014 at 6:59 PM, Paolo Bonzini wrote: Looks like a very interesting optimization for the block layer. If we can get some performance results - especially how it improves the virtio-blk dataplane regression - maybe we should merge it for 2.1. > @@ -247,9 +248,22 @@ ThreadPool *aio

Re: [Qemu-devel] [PATCH] e1000: Delay LSC until mask is active

2014-07-03 Thread Alexander Graf
On 03.07.14 19:57, Peter Maydell wrote: On 3 July 2014 18:39, Alexander Graf wrote: Mac OS X reads ICR on every interrupt. When the IRQ line is shared, this may result in a race where LSC is not interpreted yet, but already gets cleared. The guest already has a way of telling us that it can i

Re: [Qemu-devel] [PATCH] e1000: Delay LSC until mask is active

2014-07-03 Thread Peter Maydell
On 3 July 2014 18:39, Alexander Graf wrote: > Mac OS X reads ICR on every interrupt. When the IRQ line is shared, this may > result in a race where LSC is not interpreted yet, but already gets cleared. > > The guest already has a way of telling us that it can interpret LSC events > though and that

[Qemu-devel] [PATCH] e1000: Delay LSC until mask is active

2014-07-03 Thread Alexander Graf
Mac OS X reads ICR on every interrupt. When the IRQ line is shared, this may result in a race where LSC is not interpreted yet, but already gets cleared. The guest already has a way of telling us that it can interpret LSC events though and that's via the interrupt mask register (IMS). So if we ju

[Qemu-devel] Super nested KVM

2014-07-03 Thread Richard W.M. Jones
If you have odd Intel or AMD hardware, I'd appreciate if you could test my disk image which recursively launches nested KVM until something breaks: http://rwmj.wordpress.com/2014/07/03/super-nested-kvm/#content FWIW: * AMD FX(tm)-8320 Eight-Core Processor: L3 guest fails to boot with [ 30

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-03 Thread Alexander Graf
On 03.07.14 18:43, Gabriel L. Somlo wrote: On Thu, Jul 03, 2014 at 05:25:04PM +0200, Alexander Graf wrote: Maybe the IRQ line is simply never shared on real Macs :). Who knows. Does this (untested!) patch make it work for you? Yep, it works. Doesn't break OSX on q35, Linux (F20) or windows (7

Re: [Qemu-devel] [PATCH v1 1/1] char: cadence_uart: Convert to realize()

2014-07-03 Thread Andreas Färber
Am 03.07.2014 18:46, schrieb Peter Maydell: > On 24 June 2014 07:06, Alistair Francis wrote: >> SysBusDevice::init is deprecated. Convert to Object::init and Note that there is no Object::init, only TypeInfo::instance_init. >> Device::realize as prescribed by QOM conventions. >> >> Signed-off-by

[Qemu-devel] [PATCH for-2.1?!?] AioContext: speed up aio_notify

2014-07-03 Thread Paolo Bonzini
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 AioContext's event loop does not need any n

Re: [Qemu-devel] [PATCH v1 1/1] char: cadence_uart: Convert to realize()

2014-07-03 Thread Peter Maydell
On 24 June 2014 07:06, Alistair Francis wrote: > SysBusDevice::init is deprecated. Convert to Object::init and > Device::realize as prescribed by QOM conventions. > > Signed-off-by: Alistair Francis > --- > > hw/char/cadence_uart.c | 29 - > 1 files changed, 16 inse

Re: [Qemu-devel] [PATCH] ahci: map memory via device's address space instead of address_space_memory

2014-07-03 Thread Jan Kiszka
On 2014-07-03 12:02, Michael S. Tsirkin wrote: > On Thu, Jul 03, 2014 at 10:43:57AM +0200, Jan Kiszka wrote: >> On 2014-07-03 10:26, Le Tan wrote: >>> In map_page() in hw/ide/ahci.c, replace cpu_physical_memory_map() and >>> cpu_physical_memory_unmap() with dma_memory_map() and dma_memory_unmap(),

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-03 Thread Gabriel L. Somlo
On Thu, Jul 03, 2014 at 05:25:04PM +0200, Alexander Graf wrote: > Maybe the IRQ line is simply never shared on real Macs :). Who knows. > > Does this (untested!) patch make it work for you? Yep, it works. Doesn't break OSX on q35, Linux (F20) or windows (7) either :) Thanks, --Gabriel > diff --

Re: [Qemu-devel] [PATCH 1/2] Rename nb_numa_nodes to num_numa_nodes

2014-07-03 Thread Nishanth Aravamudan
On 03.07.2014 [10:03:10 +0300], Michael S. Tsirkin wrote: > On Tue, Jul 01, 2014 at 01:11:08PM -0700, Nishanth Aravamudan wrote: > > As suggested by Eduardo Habkost, rename nb_numa_nodes to num_numa_nodes > > throughout the code, as that reflects the use of the variable more > > clearly. > > > > S

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-03 Thread Paolo Bonzini
Il 03/07/2014 17:25, Alexander Graf ha scritto: Maybe the IRQ line is simply never shared on real Macs :). That's most likely the case, or else it uses MSI. Consider that QEMU only uses 2 GSIs for the four PCI interrupts (10 11), while real PIIX-era hardware used 4 (5 9 10 11, I think). Pa

Re: [Qemu-devel] virtio-blk-pci hot unplug broken in QEMU 2.0-rc0

2014-07-03 Thread Paolo Bonzini
Il 03/07/2014 18:02, Stefan Hajnoczi ha scritto: Hot unplug is broken in qemu.git/master (92259b7f434b382fc865d1f65f7d5adeed295749 aka 2.0-rc0). It can be bisected but I won't be able to do that today. Here are the details if anyone has ideas: Most likely my fault (memory region QOMification)

[Qemu-devel] virtio-blk-pci hot unplug broken in QEMU 2.0-rc0

2014-07-03 Thread Stefan Hajnoczi
Hot unplug is broken in qemu.git/master (92259b7f434b382fc865d1f65f7d5adeed295749 aka 2.0-rc0). It can be bisected but I won't be able to do that today. Here are the details if anyone has ideas: $ x86_64-softmmu/qemu-system-x86_64 -enable-kvm -cpu host -m 1024 -drive if=virtio,cache=none,file=te

[Qemu-devel] [PATCH trivial] qemu-img: Remove redundancy "ret = -1"

2014-07-03 Thread Chen Gang
In this case, 'ret' is already '-1', so need not do it again. Signed-off-by: Chen Gang --- qemu-img.c | 1 - 1 file changed, 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index c98896b..d4518e7 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -246,7 +246,6 @@ static int read_password(char *buf,

Re: [Qemu-devel] [PATCH v2 0/4] virtio-blk: fix issues with unified virtio-blk request handling

2014-07-03 Thread Stefan Hajnoczi
On Wed, Jul 2, 2014 at 10:25 AM, Christian Borntraeger wrote: > On 01/07/14 17:25, Stefan Hajnoczi wrote: >> This series fixes issues recently introduced when unifying virtio-blk >> dataplane's request handling with non-dataplane virtio-blk. >> >> The problems include broken memory allocation for

[Qemu-devel] [RFC PATCH v6 06/14] icount: make icount extra computed on icount clock as well.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic This takes icount clock in account for icount extra computation so icount clock's timers will be triggered at the exact time. Signed-off-by: KONRAD Frederic Reviewed-by: Paolo Bonzini --- cpus.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/cpus.c b/cpu

[Qemu-devel] [RFC PATCH v6 05/14] icount: check for icount clock deadline when cpu loop exits.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic Notify events on icount clock when CPU loop exits. Signed-off-by: KONRAD Frederic Reviewed-by: Paolo Bonzini --- cpus.c | 5 + 1 file changed, 5 insertions(+) diff --git a/cpus.c b/cpus.c index 6bba30b..dc2dc21 100644 --- a/cpus.c +++ b/cpus.c @@ -992,6 +992,11 @@ s

[Qemu-devel] [RFC PATCH v6 04/14] icount: introduce icount timer.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic This introduces a new timer based only on instruction counter and without any compensation. Signed-off-by: KONRAD Frederic --- cpus.c | 19 --- include/qemu/timer.h | 9 - qemu-timer.c | 8 +++- stubs/cpu-get-icoun

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-03 Thread Alexander Graf
On 03.07.14 16:14, Gabriel L. Somlo wrote: On Thu, Jul 03, 2014 at 04:02:06PM +0200, Alexander Graf wrote: On 03.07.14 15:58, Gabriel L. Somlo wrote: On Thu, Jul 03, 2014 at 03:20:50PM +0200, Alexander Graf wrote: On 03.07.2014, at 15:17, Gabriel L. Somlo wrote: On Thu, Jul 03, 2014 at 10:

[Qemu-devel] [RFC PATCH v6 00/14] Reverse execution.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic Hi everybody, This is the sixth version of this RFC (see the changes below). Those are the two first patch-set we have been worked on for reverse execution. The first part is fully reviewed except the "icount: introduce icount timer" patch maybe we can merge them? The fi

[Qemu-devel] [RFC PATCH v6 02/14] migration: migrate icount fields.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic This fixes a bug where qemu_icount and qemu_icount_bias are not migrated. It adds a subsection "timer/icount" to vmstate_timers so icount is migrated only when needed. Signed-off-by: KONRAD Frederic Reviewed-by: Amit Shah Reviewed-by: Juan Quintela --- cpus.c | 27 +

[Qemu-devel] [RFC PATCH v6 14/14] rexec: allow to enable reverse execution.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic This creates QEMU options for reverse execution. Signed-off-by: KONRAD Frederic --- cpus.c | 15 +++ qemu-options.hx | 6 +- vl.c| 6 ++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/cpus.c b/cpus.c index 740c6e5

[Qemu-devel] [RFC PATCH v6 12/14] cpu-exec: trigger a debug request when rexec stops.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic This allows QEMU to trigger a debug exception when rexec_dbg_requested is set. Signed-off-by: KONRAD Frederic --- cpu-exec.c | 13 + 1 file changed, 13 insertions(+) diff --git a/cpu-exec.c b/cpu-exec.c index 38e5f02..82e2568 100644 --- a/cpu-exec.c +++ b/cpu

[Qemu-devel] [RFC PATCH v6 03/14] migration: make qemu_savevm_state public.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic This makes qemu_savevm_state public for reverse-execution. Signed-off-by: KONRAD Frederic Reviewed-by: Amit Shah Reviewed-by: Juan Quintela --- include/sysemu/sysemu.h | 1 + savevm.c| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/i

Re: [Qemu-devel] [PATCH v2 2.1 1/3] blockjob: Fix recent BLOCK_JOB_READY regression

2014-07-03 Thread Markus Armbruster
Paolo Bonzini writes: > Il 03/07/2014 09:19, Markus Armbruster ha scritto: >>> > I think there is a page with unfinished transition. Can you add this one? >> Do you mean the transition to qdev? >> >> If yes, isn't that covered by "Making all devices QOM objects"? >> Sometimes we create new trans

[Qemu-devel] [RFC PATCH v6 13/14] rexec: synchronize icount on the next event.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic We don't want to warp on host clock as it is not deterministic for replay. So this patch warp icount on the next QEMU_VIRTUAL_CLOCK event if reverse execution is enabled. The normal behaviour is kept when reverse execution is disabled. Signed-off-by: KONRAD Frederic ---

Re: [Qemu-devel] [PATCH 0/2] target-ppc: Merge POWER7+ to POWER7 and POWER8E to POWER8

2014-07-03 Thread Alexander Graf
On 30.06.14 16:30, Alexey Kardashevskiy wrote: Here are 2 patches to simplify handling of the same CPUs with slightly different PVRs. Now with a callback instead of additional levels in PPC CPU QOM class tree. Please comment. Thanks. Thanks, applied to ppc-next (2.1) Alex

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-03 Thread Alexander Graf
On 03.07.14 16:14, Gabriel L. Somlo wrote: On Thu, Jul 03, 2014 at 04:02:06PM +0200, Alexander Graf wrote: On 03.07.14 15:58, Gabriel L. Somlo wrote: On Thu, Jul 03, 2014 at 03:20:50PM +0200, Alexander Graf wrote: On 03.07.2014, at 15:17, Gabriel L. Somlo wrote: On Thu, Jul 03, 2014 at 10:

[Qemu-devel] [PATCH v3] target-ppc: Add pvr_match() callback

2014-07-03 Thread Alexey Kardashevskiy
So far it was enough to have a base PVR value and mask per CPU family such as POWER7 or POWER8. However there CPUs which are completely architecturally compatible but have different PVRs such as POWER7/POWER7+ and POWER8/POWER8E. For these CPUs, top 16 bits are CPU family and low 16 bits are the ve

[Qemu-devel] [RFC PATCH v6 07/14] timer: add cpu_icount_to_ns function.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic This adds cpu_icount_to_ns function which is needed for reverse execution. It returns the time for a specific instruction. Signed-off-by: KONRAD Frederic Reviewed-by: Paolo Bonzini --- cpus.c | 9 +++-- include/qemu/timer.h | 1 + 2 files changed, 8 in

[Qemu-devel] [RFC PATCH v6 10/14] introduce reverse execution mechanism.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic This introduces the basic reverse-execution mechanism. Signed-off-by: KONRAD Frederic --- Makefile.target | 1 + cpus.c | 6 + include/reverse-execution.h | 41 ++ reverse-execution.c | 308

[Qemu-devel] [RFC PATCH v6 01/14] icount: put icount variables into TimerState.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic This puts qemu_icount and qemu_icount_bias into TimerState structure to allow them to be migrated. Signed-off-by: KONRAD Frederic Reviewed-by: Paolo Bonzini --- cpus.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/cpu

[Qemu-devel] [RFC PATCH v6 08/14] icount: Add QemuOpts for icount

2014-07-03 Thread fred . konrad
From: Sebastian Tanase Make icount parameter use QemuOpts style options in order to easily add other suboptions. Signed-off-by: Sebastian Tanase Tested-by: Camille Bégué --- cpus.c| 10 +- include/qemu-common.h | 3 ++- qemu-options.hx | 4 ++-- qtest.c

[Qemu-devel] [RFC PATCH v6 09/14] trace-events: add reverse-execution events.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic This adds some trace-events for reverse execution. Signed-off-by: KONRAD Frederic --- trace-events | 6 ++ 1 file changed, 6 insertions(+) diff --git a/trace-events b/trace-events index 11a17a8..66f9e08 100644 --- a/trace-events +++ b/trace-events @@ -1301,3 +1301,9

[Qemu-devel] [RFC PATCH v6 11/14] gdbstub: allow reverse execution in gdb stub.

2014-07-03 Thread fred . konrad
From: KONRAD Frederic This allows gdb to reverse step QEMU: reverse-stepi and reverse-cont commands are allowed. When step_backward is called, QEMU restores a snapshot before the actual instruction and stops (with a debug exit) when the previous instruction is reached. Signed-off-by: KONRAD Fre

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

2014-07-03 Thread Serge Hallyn
Thanks, that's great to know! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1307473 Title: guest hang due to missing clock interrupt Status in QEMU: New Status in “linux” package in Ubuntu: Co

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-03 Thread Gabriel L. Somlo
On Thu, Jul 03, 2014 at 04:02:06PM +0200, Alexander Graf wrote: > > On 03.07.14 15:58, Gabriel L. Somlo wrote: > >On Thu, Jul 03, 2014 at 03:20:50PM +0200, Alexander Graf wrote: > >>On 03.07.2014, at 15:17, Gabriel L. Somlo wrote: > >> > >>>On Thu, Jul 03, 2014 at 10:04:55AM +0200, Alexander Graf

Re: [Qemu-devel] [PATCH 00/10] RFC: userfault

2014-07-03 Thread Andrea Arcangeli
Hi Christopher, On Thu, Jul 03, 2014 at 09:45:07AM -0400, Christopher Covington wrote: > CRIU uses the soft dirty bit in /proc/pid/clear_refs and /proc/pid/pagemap to > implement its pre-copy memory migration. > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/v

Re: [Qemu-devel] [PATCH 2/2] block: bump coroutine pool size for drives

2014-07-03 Thread Eric Blake
On 07/03/2014 07:52 AM, Stefan Hajnoczi wrote: > When a BlockDriverState is associated with a storage controller > DeviceState we expect guest I/O. Use this opportunity to bump the > coroutine pool size by 64. > > This patch ensures that the coroutine pool size scales with the number > of drives

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-03 Thread Alexander Graf
On 03.07.14 15:58, Gabriel L. Somlo wrote: On Thu, Jul 03, 2014 at 03:20:50PM +0200, Alexander Graf wrote: On 03.07.2014, at 15:17, Gabriel L. Somlo wrote: On Thu, Jul 03, 2014 at 10:04:55AM +0200, Alexander Graf wrote: so Ethernet, SATA, and USB, all sharing IRQ 11. Is there an easy way to

Re: [Qemu-devel] [PATCH 1/2] coroutine: make pool size dynamic

2014-07-03 Thread Eric Blake
On 07/03/2014 07:52 AM, Stefan Hajnoczi wrote: > Allow coroutine users to adjust the pool size. For example, if the > guest has multiple emulated disk drives we should keep around more > coroutines. > > Signed-off-by: Stefan Hajnoczi > --- > include/block/coroutine.h | 11 +++ > qemu-co

Re: [Qemu-devel] [PATCH] pseries: Update SLOF firmware image to qemu-slof-20140630

2014-07-03 Thread Alexander Graf
On 03.07.14 15:25, Alexey Kardashevskiy wrote: The changelog is: > Quieten the grub warning > Add boot menu support > boot from disk having chrp-boot file > fat16: fix read and remove debug messages > dhcparch define missing in compilation > pci-scan: reserve memory for pci-bri

Re: [Qemu-devel] e1000 autoneg timing, piix/osx

2014-07-03 Thread Gabriel L. Somlo
On Thu, Jul 03, 2014 at 03:20:50PM +0200, Alexander Graf wrote: > > On 03.07.2014, at 15:17, Gabriel L. Somlo wrote: > > > On Thu, Jul 03, 2014 at 10:04:55AM +0200, Alexander Graf wrote: > >>> so Ethernet, SATA, and USB, all sharing IRQ 11. Is there an easy way > >>> to force one of those to use

Re: [Qemu-devel] [PATCH] bsd-user: Implement strace support for getcwd syscall

2014-07-03 Thread Peter Maydell
On 16 June 2014 16:05, Sean Bruno wrote: > Signed-off-by: Sean Bruno > --- > bsd-user/freebsd/strace.list | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list > index 2800a2d..f10caaa 100644 > --- a/bsd-user/freebsd/strace.list > ++

Re: [Qemu-devel] [PATCH 4/4] bsd-user: move arch/OS dependent code out of syscall.c

2014-07-03 Thread Peter Maydell
On 20 June 2014 01:19, Sean Bruno wrote: > From: Stacey Son > > This change moves the system call handler for sysctl(2) and > sysarch(2) from syscall.c to the OS and arch dependent directories. > This eliminates many of the #ifdef's in syscall.c. These system > call handlers are now located in t

Re: [Qemu-devel] [PATCH v2] target-ppc: Add pvr_match() callback

2014-07-03 Thread Alexander Graf
On 03.07.14 15:32, Alexey Kardashevskiy wrote: So far it was enough to have a base PVR value and mask per CPU family such as POWER7 or POWER8. However there CPUs which are completely architecturally compatible but have different PVRs such as POWER7/POWER7+ and POWER8/POWER8E. For these CPUs, top

  1   2   >