Re: [Qemu-devel] [PATCH 0/2] convert device initialization functions

2016-07-13 Thread Wei, Jiangang
cc qemu-trivial The following patches had been reviewed one month ago, But so far, It haven't been merged. May I trouble any maintainer give me some feedback? hw/pci-bridge: Convert pxb initialization functions to Error apb: convert init to realize Thanks, wei On Thu, 2016-07-07 at 01:39 +,

Re: [Qemu-devel] [PATCH v10 01/10] target-avr: AVR cores support is added.

2016-07-13 Thread Richard Henderson
On 07/12/2016 08:32 PM, Michael Rolnik wrote: Hi Richard, Please explain why I am not accessing fullacc correctly. You can't examine fields of env, which vary, during translate.c. You must only examine fields of TB, which are invariant. r~

Re: [Qemu-devel] [PATCH v10 09/10] target-avr: updating translate.c to use instructions translation

2016-07-13 Thread Richard Henderson
On 07/12/2016 08:49 PM, Michael Rolnik wrote: if I fold this patch into previous ones, they will become non buildable, because this patch assumes existance of functions from the preceding patch. Is this acceptable? All patches need to be buildable, so that git bisect works. The previous patche

Re: [Qemu-devel] ext4 error when testing virtio-scsi & vhost-scsi

2016-07-13 Thread Zhangfei Gao
Dear Ted On Wed, Jul 13, 2016 at 12:43 AM, Theodore Ts'o wrote: > On Tue, Jul 12, 2016 at 03:14:38PM +0800, Zhangfei Gao wrote: >> Some update: >> >> If test with ext2, no problem in iblock. >> If test with ext4, ext4_mb_generate_buddy reported error in the >> removing files after reboot. >> >> >

Re: [Qemu-devel] [PULL 00/18] Clean up #include "..." vs <...> and header guards

2016-07-13 Thread Markus Armbruster
Peter Maydell writes: > On 12 July 2016 at 15:31, Markus Armbruster wrote: >> The following changes since commit b35399bb4e9968296a12303b00f9f2066470e987: >> >> Fix confusing argument names in some common functions (2016-07-12 13:06:08 >> +0100) >> >> are available in the git repository at: >

Re: [Qemu-devel] [PATCH 2/2] hostmem: detect host backend memory is being used properly

2016-07-13 Thread Igor Mammedov
On Wed, 13 Jul 2016 12:18:06 +0800 Xiao Guangrong wrote: > Currently, we use memory_region_is_mapped() to detect if the host > backend memory is being used. This works if the memory is directly > mapped into guest's address space, however, it is not true for > nvdimm as it uses aliased memory reg

Re: [Qemu-devel] [PATCH v3 01/11] util/qht: Document memory ordering assumptions

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 01:19, Emilio G. Cota wrote: > I wouldn't put those comments in the source--seqlock callers should > know what they're doing, and what barriers seqlocks imply. In general I'd agree with you, however in this case the "begin" calls are what implements QHT's guarantee *for the caller*

Re: [Qemu-devel] [PATCH v3 00/11] Reduce lock contention on TCG hot-path

2016-07-13 Thread Paolo Bonzini
On 12/07/2016 22:13, Sergey Fedorov wrote: > From: Sergey Fedorov > > Hi, > > This is my respin of Alex's v2 series [1]. > > The first 8 patches are preparation for the patch 9, the subject matter > of this series, which enables lockless translation block lookup. The > main change here is tha

Re: [Qemu-devel] [PATCH] slirp: use exit notifier for slirp_smb_cleanup

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 04:34, Jason Wang wrote: > > > On 2016年07月12日 18:15, Marc-André Lureau wrote: >> Hi >> >> On Tue, Jul 12, 2016 at 11:23 AM, Paolo Bonzini >> wrote: >>> We would like to move back net_cleanup() at the end of main function, >>> like it used to be until f30dbae63a46f23116715dff8d130

Re: [Qemu-devel] [PATCH 1/1] spapr: Ensure CPU cores are added contiguously and removed in LIFO order

2016-07-13 Thread Igor Mammedov
On Wed, 13 Jul 2016 12:20:20 +0530 Bharata B Rao wrote: > If CPU core addition or removal is allowed in random order leading to > holes in the core id range (and hence in the cpu_index range), migration > can fail as migration with holes in cpu_index range isn't yet handled > correctly. > > Prev

Re: [Qemu-devel] [PATCH 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Paolo Bonzini
On 12/07/2016 19:51, Roman Pen wrote: > +if (s->io_q.in_flight >= MAX_EVENTS) > +break; > QSIMPLEQ_FOREACH(aiocb, &s->io_q.pending, next) { > iocbs[len++] = &aiocb->iocb; > -if (len == MAX_QUEUED_IO) { > +if (s->io_q.in_flight + le

Re: [Qemu-devel] [PATCH v3 09/19] pc: delay setting number of boot CPUs to machine_done time

2016-07-13 Thread Igor Mammedov
On Tue, 12 Jul 2016 14:19:25 -0300 Eduardo Habkost wrote: > On Tue, Jul 12, 2016 at 03:42:58PM +0200, Igor Mammedov wrote: > > On Tue, 12 Jul 2016 14:48:43 +0200 > > Igor Mammedov wrote: > > > > > On Tue, 12 Jul 2016 00:29:08 -0300 > > > Eduardo Habkost wrote: > > [...] > > > > 1) x86_c

Re: [Qemu-devel] [PATCH] build: Work around SIZE_MAX bug in OSX headers

2016-07-13 Thread Markus Armbruster
Peter Maydell writes: > On 12 July 2016 at 19:23, Eric Blake wrote: >> This violates POSIX, which requires that: >> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html#tag_13_48 >> "Each instance of these macros shall be replaced by a constant >> expression suitable for use in

Re: [Qemu-devel] [PATCH 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Roman Penyaev
On Wed, Jul 13, 2016 at 9:43 AM, Paolo Bonzini wrote: > > > On 12/07/2016 19:51, Roman Pen wrote: >> +if (s->io_q.in_flight >= MAX_EVENTS) >> +break; >> QSIMPLEQ_FOREACH(aiocb, &s->io_q.pending, next) { >> iocbs[len++] = &aiocb->iocb; >> -if (l

Re: [Qemu-devel] [PATCH v3 09/19] pc: delay setting number of boot CPUs to machine_done time

2016-07-13 Thread Igor Mammedov
On Tue, 12 Jul 2016 14:18:22 -0300 Eduardo Habkost wrote: > On Tue, Jul 12, 2016 at 02:48:43PM +0200, Igor Mammedov wrote: > > On Tue, 12 Jul 2016 00:29:08 -0300 > > Eduardo Habkost wrote: > > > > > On Wed, Jul 06, 2016 at 08:20:45AM +0200, Igor Mammedov wrote: > > > > currently present CPU

Re: [Qemu-devel] [PATCH v5 01/10] block: Hide HBitmap in block dirty bitmap interface

2016-07-13 Thread Vladimir Sementsov-Ogievskiy
On 13.07.2016 01:49, John Snow wrote: On 06/03/2016 12:32 AM, Fam Zheng wrote: HBitmap is an implementation detail of block dirty bitmap that should be hidden from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying HBitmapIter. A small difference in the interface is, before,

[Qemu-devel] [PATCH V2 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Roman Pen
v1..v2: o comment tweaks. o fix QEMU coding style. Invoking io_setup(MAX_EVENTS) we ask kernel to create ring buffer for us with specified number of events. But kernel ring buffer allocation logic is a bit tricky (ring buffer is page size aligned + some percpu allocation are required) so eve

Re: [Qemu-devel] [PATCH 1/1] mirror: double performance of the bulk stage if the disc is full

2016-07-13 Thread Vladimir Sementsov-Ogievskiy
On 12.07.2016 16:51, Kevin Wolf wrote: Am 12.07.2016 um 11:36 hat Denis V. Lunev geschrieben: From: Vladimir Sementsov-Ogievskiy Mirror can do up to 16 in-flight requests, but actually on full copy (the whole source disk is non-zero) in-flight is always 1. This happens as the request is not li

[Qemu-devel] [PATCH] ppc: parse cpu features once

2016-07-13 Thread Greg Kurz
Considering that features are converted to global properties and global properties are automatically applied to every new instance of created CPU (at object_new() time), there is no point in parsing cpu_model string every time a CPU created. So move parsing outside CPU creation loop and do it only

Re: [Qemu-devel] [PATCH 1/1] spapr: Ensure CPU cores are added contiguously and removed in LIFO order

2016-07-13 Thread Igor Mammedov
On Wed, 13 Jul 2016 09:42:54 +0200 Igor Mammedov wrote: > On Wed, 13 Jul 2016 12:20:20 +0530 > Bharata B Rao wrote: > > > If CPU core addition or removal is allowed in random order leading to > > holes in the core id range (and hence in the cpu_index range), migration > > can fail as migration

Re: [Qemu-devel] [PATCH 1/1] spapr: Ensure CPU cores are added contiguously and removed in LIFO order

2016-07-13 Thread Igor Mammedov
On Wed, 13 Jul 2016 10:19:00 +0200 Igor Mammedov wrote: > On Wed, 13 Jul 2016 09:42:54 +0200 > Igor Mammedov wrote: > > > On Wed, 13 Jul 2016 12:20:20 +0530 > > Bharata B Rao wrote: > > > > > If CPU core addition or removal is allowed in random order leading to > > > holes in the core id ra

[Qemu-devel] [PATCH] qemu-timer: remove unnecessary code

2016-07-13 Thread Cao jin
When passed argument 'ns' is 0, macro DIV_ROUND_UP will return 0 also. Cc: Paolo Bonzini Signed-off-by: Cao jin --- qemu-timer.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index eb22e92..cfe0893 100644 --- a/qemu-timer.c +++ b/qemu-timer

Re: [Qemu-devel] [PATCH v4 0/6] virtio: Merge virtio-{blk, scsi} host notifier handling paths

2016-07-13 Thread Cornelia Huck
On Wed, 13 Jul 2016 13:09:42 +0800 Fam Zheng wrote: > v4: Drop patch 1. [Cornelia] > Add the last trivial patch. > > v3: Rebase to master. > Squash 4 into 3. [Paolo] > Add comment and commit message. [Stefan] > Add Stefan's r-b in patch 1 and 2. > > v2: Only convert virtio-{blk,

Re: [Qemu-devel] [PATCH v4 1/6] virtio: Add typedef for handle_output

2016-07-13 Thread Cornelia Huck
On Wed, 13 Jul 2016 13:09:43 +0800 Fam Zheng wrote: > The function pointer signature has been repeated a few times, using a > typedef may make coding easier. > > Signed-off-by: Fam Zheng > Reviewed-by: Stefan Hajnoczi > --- > hw/virtio/virtio.c | 9 - > include/hw/virtio/virti

Re: [Qemu-devel] [PATCH v4 2/6] virtio: Introduce virtio_add_queue_aio

2016-07-13 Thread Cornelia Huck
On Wed, 13 Jul 2016 13:09:44 +0800 Fam Zheng wrote: > Using this function instead of virtio_add_queue marks the vq as aio > based. This differentiation will be useful in later patches. > > Distinguish between virtqueue processing in the iohandler context and main > loop > AioContext. iohandler

Re: [Qemu-devel] [PATCH v4 3/6] virtio-blk: Call virtio_add_queue_aio

2016-07-13 Thread Cornelia Huck
On Wed, 13 Jul 2016 13:09:45 +0800 Fam Zheng wrote: > AIO based handler is more appropriate here because it will then > cooperate with bdrv_drained_begin/end. It is needed by the coming > revert patch. Not sure whether you really need to refer to an upcoming patch: I think it is enough for the r

Re: [Qemu-devel] [PATCH v4 5/6] Revert "mirror: Workaround for unexpected iohandler events during completion"

2016-07-13 Thread Cornelia Huck
On Wed, 13 Jul 2016 13:09:47 +0800 Fam Zheng wrote: > This reverts commit ab27c3b5e7408693dde0b565f050aa55c4a1bcef. > > The virtio storage device host notifiers now work with > bdrv_drained_begin/end, so we don't need this hack any more. > > Signed-off-by: Fam Zheng > --- > block/mirror.c | 9

[Qemu-devel] [PATCH] ppc: exit if compat mode is unknown

2016-07-13 Thread Greg Kurz
Now that properties are set with -global, if we pass a bogus value for compat mode, a warning is printed and the property is simply ignored. For example, if the host is POWER8 and we pass compat=POWER7 instead of compat=power7 the guest will see a POWER8 cpu. While here, this patch also changes th

Re: [Qemu-devel] [PATCH v4 6/6] virtio-scsi: Replace HandleOutput typedef

2016-07-13 Thread Cornelia Huck
On Wed, 13 Jul 2016 13:09:48 +0800 Fam Zheng wrote: > There is a new common one in virtio.h, use it. > > Signed-off-by: Fam Zheng > --- > hw/scsi/virtio-scsi.c | 5 +++-- > include/hw/virtio/virtio-scsi.h | 6 ++ > 2 files changed, 5 insertions(+), 6 deletions(-) I think you can

Re: [Qemu-devel] [PATCH v4 4/6] virtio-scsi: Call virtio_add_queue_aio

2016-07-13 Thread Cornelia Huck
On Wed, 13 Jul 2016 13:09:46 +0800 Fam Zheng wrote: > AIO based handler is more appropriate here because it will then > cooperate with bdrv_drained_begin/end. It is needed by the coming > revert patch. > > Signed-off-by: Fam Zheng > --- > hw/scsi/virtio-scsi.c | 9 +++-- > 1 file changed,

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] spapr: Ensure CPU cores are added contiguously and removed in LIFO order

2016-07-13 Thread Greg Kurz
On Wed, 13 Jul 2016 09:42:54 +0200 Igor Mammedov wrote: > On Wed, 13 Jul 2016 12:20:20 +0530 > Bharata B Rao wrote: > > > If CPU core addition or removal is allowed in random order leading to > > holes in the core id range (and hence in the cpu_index range), migration > > can fail as migration

Re: [Qemu-devel] [Qemu-block] [PATCH v3 01/11] block: Accept node-name for block-stream

2016-07-13 Thread Kevin Wolf
Am 07.07.2016 um 16:17 hat Kevin Wolf geschrieben: > Am 07.07.2016 um 14:59 hat Alberto Garcia geschrieben: > > On Thu 07 Jul 2016 02:11:27 PM CEST, Kevin Wolf wrote: > > > In order to remove the necessity to use BlockBackend names in the > > > external API, we want to allow node-names everywhere.

Re: [Qemu-devel] [PATCH 6/9] Convert cpu_memory_rw_debug to use MMUAccessType

2016-07-13 Thread Peter Maydell
On 13 July 2016 at 01:54, David Gibson wrote: > On Tue, Jul 12, 2016 at 09:05:24AM -0700, Andrey Smirnov wrote: >> Please let me know how I should proceed with this series. > > My preference would be to start the series with something which > renames MMUAccessType and its individual values to some

[Qemu-devel] [PATCH] ppc: abort if compat property contains an unknown value

2016-07-13 Thread Greg Kurz
It is not possible to set the compat property to an unknown value with powerpc_set_compat(). Something must have gone terribly wrong in QEMU, if we detect an "Internal error" in powerpc_get_compat(). Let's abort then. This patch also drops the "max_compat ? *max_compat : -1" construct. It is usele

Re: [Qemu-devel] [PATCH v5 01/10] block: Hide HBitmap in block dirty bitmap interface

2016-07-13 Thread Max Reitz
On 13.07.2016 09:57, Vladimir Sementsov-Ogievskiy wrote: > On 13.07.2016 01:49, John Snow wrote: >> >> On 06/03/2016 12:32 AM, Fam Zheng wrote: >>> HBitmap is an implementation detail of block dirty bitmap that should >>> be hidden >>> from users. Introduce a BdrvDirtyBitmapIter to encapsulate the

Re: [Qemu-devel] [PATCH] qemu-timer: remove unnecessary code

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 11:06, Cao jin wrote: > When passed argument 'ns' is 0, macro DIV_ROUND_UP will return 0 also. It's potentially slower though. Paolo > Cc: Paolo Bonzini > Signed-off-by: Cao jin > --- > qemu-timer.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a

[Qemu-devel] [PATCH] vnc: make sure we finish disconnect

2016-07-13 Thread Gerd Hoffmann
It may happen that vnc connections linger in disconnecting state forever because VncState happens to be in a state where vnc_update_client() exists early and never reaches the vnc_disconnect_finish() call at the bottom of the function. Fix that by doing an additinal check at the start of the funct

Re: [Qemu-devel] [PATCH 13/15] exec: use mmap for PhysPageMap->nodes

2016-07-13 Thread Paolo Bonzini
On 12/07/2016 16:34, Peter Lieven wrote: > Am 11.07.2016 um 12:37 schrieb Paolo Bonzini: >> >> On 11/07/2016 11:31, Peter Lieven wrote: >>> Am 28.06.2016 um 12:43 schrieb Paolo Bonzini: On 28/06/2016 11:01, Peter Lieven wrote: > this was causing serious framentation in conjunction with t

Re: [Qemu-devel] [PATCH V2 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 09:57, Roman Pen wrote: > v1..v2: > > o comment tweaks. > o fix QEMU coding style. > > Invoking io_setup(MAX_EVENTS) we ask kernel to create ring buffer for us > with specified number of events. But kernel ring buffer allocation logic > is a bit tricky (ring buffer is page si

Re: [Qemu-devel] [PATCH v4 0/6] virtio: Merge virtio-{blk, scsi} host notifier handling paths

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 07:09, Fam Zheng wrote: > v4: Drop patch 1. [Cornelia] > Add the last trivial patch. > > v3: Rebase to master. > Squash 4 into 3. [Paolo] > Add comment and commit message. [Stefan] > Add Stefan's r-b in patch 1 and 2. > > v2: Only convert virtio-{blk,scsi}. [Paolo]

Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 06:18, Xiao Guangrong wrote: > > Return MAX_NODES under this case to fix this bug > > Signed-off-by: Xiao Guangrong > --- > backends/hostmem.c | 22 ++ > 1 file changed, 14 insertions(+), 8 deletions(-) > > diff --git a/backends/hostmem.c b/backends/hostmem.

Re: [Qemu-devel] [PATCH 2/2] hostmem: detect host backend memory is being used properly

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 09:30, Igor Mammedov wrote: > I wonder if it could be cleaner to extend QOM API with > > object_get_refcount(); > > and then add > > bool hostmem_is_busy() > { > return object_get_refcount() > 1; > } > > that would work as not used used hostmem would have ref counter == 1 >

Re: [Qemu-devel] [PATCH v10 01/10] target-avr: AVR cores support is added.

2016-07-13 Thread Michael Rolnik
So how do I get this flag unset? On Wed, Jul 13, 2016, 12:17 AM Richard Henderson wrote: > On 07/12/2016 08:32 PM, Michael Rolnik wrote: > > Hi Richard, > > > > Please explain why I am not accessing fullacc correctly. > > You can't examine fields of env, which vary, during translate.c. > You mus

[Qemu-devel] [PATCH v10] Add optionrom compatible with fw_cfg DMA version

2016-07-13 Thread Paolo Bonzini
From: Marc Marí This optionrom is based on linuxboot.S. Signed-off-by: Marc Marí Signed-off-by: Richard W.M. Jones Message-Id: <1464027093-24073-2-git-send-email-rjo...@redhat.com> [Add -fno-toplevel-reorder, support clang without -m16. - Paolo] Signed-off-by: Paolo Bonzini --- .gitignore

Re: [Qemu-devel] [PATCH v3 01/11] util/qht: Document memory ordering assumptions

2016-07-13 Thread Paolo Bonzini
On 12/07/2016 22:13, Sergey Fedorov wrote: > diff --git a/include/qemu/qht.h b/include/qemu/qht.h > index 70bfc68b8d67..5f633e5d8100 100644 > --- a/include/qemu/qht.h > +++ b/include/qemu/qht.h > @@ -69,6 +69,9 @@ void qht_destroy(struct qht *ht); > * Attempting to insert a NULL @p is a bug. >

[Qemu-devel] [PATCH] usbredir: add streams property

2016-07-13 Thread Gerd Hoffmann
Enabled by default, can be used to turn off (usb3) streams support. xhci has a such a property too (same name, same default). Signed-off-by: Gerd Hoffmann --- hw/usb/redirect.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 8e

Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'

2016-07-13 Thread Markus Armbruster
Paolo Bonzini writes: > On 13/07/2016 06:18, Xiao Guangrong wrote: >> >> Return MAX_NODES under this case to fix this bug >> >> Signed-off-by: Xiao Guangrong >> --- >> backends/hostmem.c | 22 ++ >> 1 file changed, 14 insertions(+), 8 deletions(-) >> >> diff --git a/backe

Re: [Qemu-devel] [PATCH] qemu-timer: remove unnecessary code

2016-07-13 Thread Cao jin
On 07/13/2016 06:21 PM, Paolo Bonzini wrote: On 13/07/2016 11:06, Cao jin wrote: When passed argument 'ns' is 0, macro DIV_ROUND_UP will return 0 also. It's potentially slower though. Is it because the function in the i/o loop path, so the potentially extra arithmetical instructions ma

Re: [Qemu-devel] [PATCH V2 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Roman Penyaev
On Wed, Jul 13, 2016 at 12:31 PM, Paolo Bonzini wrote: > > > On 13/07/2016 09:57, Roman Pen wrote: >> v1..v2: >> >> o comment tweaks. >> o fix QEMU coding style. >> >> Invoking io_setup(MAX_EVENTS) we ask kernel to create ring buffer for us >> with specified number of events. But kernel ring

[Qemu-devel] [PATCH v4 1/6] block/qdev: Allow node name for drive properties

2016-07-13 Thread Kevin Wolf
If a node name instead of a BlockBackend name is specified as the driver for a guest device, an anonymous BlockBackend is created now. The order of operations in release_drive() must be reversed in order to avoid a use-after-free bug because now blk_detach_dev() frees the last reference if an anon

Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 13:29, Markus Armbruster wrote: >> > I'm curious about one thing. Eric/Markus, it would be nice to open code >> > the visit of the list with >> > >> > visit_start_list(v, name, NULL, 0, &err); >> > if (err) { >> > goto out; >> > } >> > ... >> > visit_typ

Re: [Qemu-devel] [PATCH] qemu-timer: remove unnecessary code

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 13:40, Cao jin wrote: > > > On 07/13/2016 06:21 PM, Paolo Bonzini wrote: >> >> >> On 13/07/2016 11:06, Cao jin wrote: >>> When passed argument 'ns' is 0, macro DIV_ROUND_UP will return 0 also. >> >> It's potentially slower though. >> > > Is it because the function in the i/o loop

Re: [Qemu-devel] [PATCH V2 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Kevin Wolf
Am 13.07.2016 um 13:33 hat Roman Penyaev geschrieben: > Just to be sure that we are on the same page: > > 1. We have this commit "linux-aio: Cancel BH if not needed" which > >a) introduces performance regression on my fio workloads on the > following config: "iothread=1, VCPU=8, MQ=8".

Re: [Qemu-devel] [PATCH] ppc: abort if compat property contains an unknown value

2016-07-13 Thread Thomas Huth
On 13.07.2016 12:00, Greg Kurz wrote: > It is not possible to set the compat property to an unknown value with > powerpc_set_compat(). Something must have gone terribly wrong in QEMU, > if we detect an "Internal error" in powerpc_get_compat(). Let's abort then. > > This patch also drops the "max_c

Re: [Qemu-devel] [PATCH] qemu-timer: remove unnecessary code

2016-07-13 Thread Cao jin
On 07/13/2016 07:40 PM, Paolo Bonzini wrote: On 13/07/2016 13:40, Cao jin wrote: On 07/13/2016 06:21 PM, Paolo Bonzini wrote: On 13/07/2016 11:06, Cao jin wrote: When passed argument 'ns' is 0, macro DIV_ROUND_UP will return 0 also. It's potentially slower though. Is it because th

Re: [Qemu-devel] [PATCH V2 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Eric Blake
On 07/13/2016 01:57 AM, Roman Pen wrote: > v1..v2: > > o comment tweaks. > o fix QEMU coding style. The above comments should be delayed... > > Invoking io_setup(MAX_EVENTS) we ask kernel to create ring buffer for us > with specified number of events. But kernel ring buffer allocation logi

Re: [Qemu-devel] [PATCH v10] Add optionrom compatible with fw_cfg DMA version

2016-07-13 Thread Richard W.M. Jones
Thanks for reposting this Paolo. I tested it by applying it on top of qemu. In libguestfs sources we have a benchmark program called utils/boot-benchmark/boot-benchmark. Using the qemu package from Fedora (qemu-2.6.0-3.fc24.x86_64): $ killall -STOP firefox $ ./boot-benchmark Result: 2341.

[Qemu-devel] [PATCH] xen: remove xenstore watches of backends when terminating qemu

2016-07-13 Thread Juergen Gross
Xenstore watches of the /local/domain//backend/ directories are never removed. This can lead to a memory leak in xenstored, especially when xenstored is running in another domain (this will be the case either for a system with xenstore-stubdom, or with driver domains running qemu-based backends).

[Qemu-devel] [PATCH] qxl: fix qxl_set_dirty call in qxl_dirty_one_surface

2016-07-13 Thread Gerd Hoffmann
qxl_set_dirty() expects start and end as range specification. qxl_dirty_one_surface passes 'size' instead of 'offset + size' as end parameter. Fix that. Also use uint64_t everywhere while being at it. Bug was added by "e25139b qxl: set only off-screen surfaces dirty instead of the whole vram" an

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: exit if compat mode is unknown

2016-07-13 Thread Greg Kurz
On Wed, 13 Jul 2016 11:10:21 +0200 Greg Kurz wrote: > Now that properties are set with -global, if we pass a bogus value for > compat mode, a warning is printed and the property is simply ignored. > For example, if the host is POWER8 and we pass compat=POWER7 instead of > compat=power7 the guest

Re: [Qemu-devel] [PATCH v10 01/10] target-avr: AVR cores support is added.

2016-07-13 Thread Michael Rolnik
a. a helper function sets a flag within env b. cpu_get_tb_cpu_state introduces this flag, though tb.flags, for code generation by gen_intermediate_code c. the code is generated d. the flag remains to be set within env. Who clear it? On Wed, Jul 13, 2016 at 3:54 AM, Michael Rolnik wrote: > So how

Re: [Qemu-devel] [PATCH] qxl: fix qxl_set_dirty call in qxl_dirty_one_surface

2016-07-13 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > qxl_set_dirty() expects start and end as range specification. > qxl_dirty_one_surface passes 'size' instead of 'offset + size' as end > parameter. Fix that. Also use uint64_t everywhere while being at it. > > Bug was added by "e25139b qxl: set only of

[Qemu-devel] [PULL v2 03/34] blockjob: Add block_job_get()

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia Currently the way to look for a specific block job is to iterate the list manually using block_job_next(). Since we want to be able to identify a job primarily by its ID it makes sense to have a function that does just that. Signed-off-by: Alberto Garcia Reviewed-by: Max R

[Qemu-devel] [PULL v2 04/34] block: Use block_job_get() in find_block_job()

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia find_block_job() looks for a block backend with a specified name, checks whether it has a block job and acquires its AioContext. We want to identify jobs by their ID and not by the block backend they're attached to, so this patch ignores the backends altogether and gets the

[Qemu-devel] [PULL v2 02/34] blockjob: Update description of the 'id' field

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia The 'id' field of the BlockJob structure will be able to hold any ID, not only a device name. This patch updates the description of that field and the error messages where it is being used. Soon we'll add the ability to set an arbitrary ID when creating a block job. Signed-

[Qemu-devel] [PULL v2 00/34] Block layer patches

2016-07-13 Thread Kevin Wolf
The following changes since commit ca3d87d4c84032f19478010b5604cac88b045c25: Merge remote-tracking branch 'remotes/armbru/tags/pull-include-2016-07-12' into staging (2016-07-12 16:04:36 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for yo

[Qemu-devel] [PULL v2 08/34] stream: Add 'job-id' parameter to 'block-stream'

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia This patch adds a new optional 'job-id' parameter to 'block-stream', allowing the user to specify the ID of the block job to be created. The HMP 'block_stream' command remains unchanged. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Max Reitz Signed-

[Qemu-devel] [PULL v2 05/34] blockjob: Add 'job_id' parameter to block_job_create()

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia When a new job is created, the job ID is taken from the device name of the BDS. This patch adds a new 'job_id' parameter to let the caller provide one instead. This patch also verifies that the ID is always unique and well-formed. This causes problems in a couple of places w

[Qemu-devel] [PULL v2 10/34] qemu-img: Set the ID of the block job in img_commit()

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia img_commit() creates a block job without an ID. This is no longer allowed now that we require it to be unique and well-formed. We were solving this by having a fallback in block_job_create(), but now that we extended the API of commit_active_start() we can finally set an expl

[Qemu-devel] [PULL v2 01/34] stream: Fix prototype of stream_start()

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia 'stream-start' has a parameter called 'backing-file', which is the string to be written to bs->backing when the job finishes. In the stream_start() implementation it is called 'backing_file_str', but it the prototype in the header file it is called 'base_id'. This patch fix

[Qemu-devel] [PULL v2 15/34] test-coroutine: prepare for the next patch

2016-07-13 Thread Kevin Wolf
From: Paolo Bonzini The next patch moves the coroutine argument from first-enter to creation time. In this case, coroutine has not been initialized yet when the coroutine is created, so change to a pointer. Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- te

[Qemu-devel] [PULL v2 12/34] osdep: Introduce qemu_dup

2016-07-13 Thread Kevin Wolf
From: Fam Zheng And use it in qemu_dup_flags. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: John Snow Signed-off-by: Kevin Wolf --- include/qemu/osdep.h | 3 +++ util/osdep.c | 23 +++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git

[Qemu-devel] [PULL v2 06/34] mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror'

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia This patch adds a new optional 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror', allowing the user to specify the ID of the block job to be created. The HMP 'drive_mirror' command remains unchanged. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-

[Qemu-devel] [PULL v2 11/34] blockjob: Update description of the 'device' field in the QMP API

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia The 'device' field in all BLOCK_JOB_* events and 'block-job-*' command is no longer the device name, but the ID of the job. This patch updates the documentation to clarify that. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Ke

[Qemu-devel] [PULL v2 13/34] raw-posix: Use qemu_dup

2016-07-13 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: John Snow Signed-off-by: Kevin Wolf --- block/raw-posix.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index c979ac3..d

[Qemu-devel] [PULL v2 17/34] block/qdev: Allow node name for drive properties

2016-07-13 Thread Kevin Wolf
If a node name instead of a BlockBackend name is specified as the driver for a guest device, an anonymous BlockBackend is created now. The order of operations in release_drive() must be reversed in order to avoid a use-after-free bug because now blk_detach_dev() frees the last reference if an anon

[Qemu-devel] [PULL v2 07/34] backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup'

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia This patch adds a new optional 'job-id' parameter to 'blockdev-backup' and 'drive-backup', allowing the user to specify the ID of the block job to be created. The HMP 'drive_backup' command remains unchanged. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-

[Qemu-devel] [PULL v2 25/34] qemu-io: Use correct range limitations

2016-07-13 Thread Kevin Wolf
From: Max Reitz create_iovec() has a comment lamenting the lack of SIZE_T_MAX. Since there actually is a SIZE_MAX, use it. Two places use INT_MAX for checking the upper bound of a sector count that is used as an argument for a blk_*() function (blk_discard() and blk_write_compressed(), respectiv

[Qemu-devel] [PULL v2 14/34] coroutine: use QSIMPLEQ instead of QTAILQ

2016-07-13 Thread Kevin Wolf
From: Paolo Bonzini CoQueue do not need to remove any element but the head of the list; processing is always strictly FIFO. Therefore, the simpler singly-linked QSIMPLEQ can be used instead. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Signed-off-by: Kevin

[Qemu-devel] [PULL v2 22/34] block: Remove BB options from blockdev-add

2016-07-13 Thread Kevin Wolf
werror/rerror are now available as qdev options. The stats-* options are removed without an existing replacement; they should probably be configurable with a separate QMP command like I/O throttling settings. Removing id is left for another day because this involves updating qemu-iotests cases to

[Qemu-devel] [PULL v2 26/34] qcow2: Fix qcow2_get_cluster_offset()

2016-07-13 Thread Kevin Wolf
From: Max Reitz Recently, qcow2_get_cluster_offset() has been changed to work with bytes instead of sectors. This invalidated some assertions and introduced a possible integer multiplication overflow. This could be reproduced using e.g. $ qemu-img create -f qcow2 -o cluster_size=1M blub.qcow2 8

[Qemu-devel] [PULL v2 09/34] commit: Add 'job-id' parameter to 'block-commit'

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia This patch adds a new optional 'job-id' parameter to 'block-commit', allowing the user to specify the ID of the block job to be created. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/commit.c

[Qemu-devel] [PULL v2 18/34] block/qdev: Allow configuring WCE with qdev properties

2016-07-13 Thread Kevin Wolf
As cache.writeback is a BlockBackend property and as such more related to the guest device than the BlockDriverState, we already removed it from the blockdev-add interface. This patch adds the new way to set it, as a qdev property of the corresponding guest device. For example: -drive if=none,file

[Qemu-devel] [PULL v2 19/34] commit: Fix use of error handling policy

2016-07-13 Thread Kevin Wolf
Commit implemented the 'enospc' policy as 'ignore' if the error was not ENOSPC. The QAPI documentation promises that it's treated as 'stop'. Using the common block job error handling function fixes this and also adds the missing QMP event. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- bl

[Qemu-devel] [PULL v2 24/34] qcow2: Avoid making the L1 table too big

2016-07-13 Thread Kevin Wolf
From: Max Reitz We refuse to open images whose L1 table we deem "too big". Consequently, we should not produce such images ourselves. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz Message-id: 20160615153630.2116-3-mre...@redhat.com Reviewed-by: Eric Blake [mreitz: Added QEMU_BUILD_BUG_ON

[Qemu-devel] [PULL v2 27/34] Improve block job rate limiting for small bandwidth values

2016-07-13 Thread Kevin Wolf
From: Sascha Silbe ratelimit_calculate_delay() previously reset the accounting every time slice, no matter how much data had been processed before. This had (at least) two consequences: 1. The minimum speed is rather large, e.g. 5 MiB/s for commit and stream. Not sure if there are real-world

[Qemu-devel] [PULL v2 20/34] block/qdev: Allow configuring rerror/werror with qdev properties

2016-07-13 Thread Kevin Wolf
The rerror/werror policies are implemented in the devices, so that's where they should be configured. In comparison to the old options in -drive, the qdev properties are only added to those devices that actually support them. If the option isn't given (or "auto" is specified), the setting of the B

[Qemu-devel] [PULL v2 29/34] blockdev: Fix regression with the default naming of throttling groups

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia When I/O limits are set for a block device, the name of the throttling group is taken from the BlockBackend if the user doesn't specify one. Commit efaa7c4eeb7490c6f37f3 moved the naming of the BlockBackend in blockdev_init() to the end of the function, after I/O limits are

[Qemu-devel] [PULL v2 23/34] qemu-img: Use strerror() for generic resize error

2016-07-13 Thread Kevin Wolf
From: Max Reitz Emitting the plain error number is not very helpful. Use strerror() instead. Signed-off-by: Max Reitz Message-id: 20160615153630.2116-2-mre...@redhat.com Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[Qemu-devel] [PULL v2 32/34] hmp: show all of snapshot info on every block dev in output of 'info snapshots'

2016-07-13 Thread Kevin Wolf
From: Lin Ma Currently, the output of 'info snapshots' shows fully available snapshots. It's opaque, hides some snapshot information to users. It's not convenient if users want to know more about all of snapshot information on every block device via monitor. Follow Kevin's and Max's proposals, T

[Qemu-devel] [PULL v2 21/34] qemu-iotests: Test setting WCE with qdev

2016-07-13 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/157 | 88 ++ tests/qemu-iotests/157.out | 22 tests/qemu-iotests/group | 1 + 3 files changed, 111 insertions(+) create mode 100755 tests/qemu-iotests/157 cre

[Qemu-devel] [PULL 0/1] updated fw_cfg option ROM 2016-07-13

2016-07-13 Thread Paolo Bonzini
The following changes since commit a91a4e7d8cfe6ece610aacf7c52738188f5b5cb5: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-07-11 15:08:47 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream-fwcfg for

[Qemu-devel] [PULL v2 31/34] hmp: use snapshot name to determine whether a snapshot is 'fully available'

2016-07-13 Thread Kevin Wolf
From: Lin Ma Currently qemu uses snapshot id to determine whether a snapshot is fully available, It causes incorrect output in some scenario. For instance: (qemu) info block drive_image1 (#block113): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk0.qcow2 (qcow2) Cache mode: writeback drive_im

[Qemu-devel] [PULL v2 34/34] iotests: Make 157 actually format-agnostic

2016-07-13 Thread Kevin Wolf
From: Max Reitz iotest 157 pretends not to care about the image format used, but in fact it does due to the format name not being filtered in its output. This patch adds filtering and changes the reference output accordingly. Signed-off-by: Max Reitz Message-id: 20160711132246.3152-1-mre...@red

[Qemu-devel] [PULL 1/1] Add optionrom compatible with fw_cfg DMA version

2016-07-13 Thread Paolo Bonzini
From: Marc Marí This optionrom is based on linuxboot.S. Signed-off-by: Marc Marí Signed-off-by: Richard W.M. Jones Message-Id: <1464027093-24073-2-git-send-email-rjo...@redhat.com> [Add -fno-toplevel-reorder, support clang without -m16. - Paolo] Signed-off-by: Paolo Bonzini --- .gitignore

[Qemu-devel] [PULL v2 28/34] vmdk: fix metadata write regression

2016-07-13 Thread Kevin Wolf
From: Reda Sallahi Commit "cdeaf1f vmdk: add bdrv_co_write_zeroes" causes a regression on writes. It writes metadata after every write instead of doing it only once for each cluster. vmdk_pwritev() writes metadata whenever m_data is set as valid so this patch sets m_data as valid only when we ha

[Qemu-devel] [PATCH v3 1/1] linux-aio: prevent submitting more than MAX_EVENTS

2016-07-13 Thread Roman Pen
Invoking io_setup(MAX_EVENTS) we ask kernel to create ring buffer for us with specified number of events. But kernel ring buffer allocation logic is a bit tricky (ring buffer is page size aligned + some percpu allocation are required) so eventually more than requested events number is allocated.

[Qemu-devel] [PULL v2 16/34] coroutine: move entry argument to qemu_coroutine_create

2016-07-13 Thread Kevin Wolf
From: Paolo Bonzini In practice the entry argument is always known at creation time, and it is confusing that sometimes qemu_coroutine_enter is used with a non-NULL argument to re-enter a coroutine (this happens in block/sheepdog.c and tests/test-coroutine.c). So pass the opaque value at creatio

[Qemu-devel] [PULL 04/14] main-loop: check return value before using pointer

2016-07-13 Thread Paolo Bonzini
From: Cao jin pointer 'qemu_aio_context' should be checked first before it is used. qemu_bh_new() will use it. Signed-off-by: Cao jin Message-Id: <1467799740-26079-2-git-send-email-caoj.f...@cn.fujitsu.com> Signed-off-by: Paolo Bonzini --- main-loop.c | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-devel] [PULL v2 30/34] qemu-iotests: Test naming of throttling groups

2016-07-13 Thread Kevin Wolf
From: Alberto Garcia Throttling groups are named using the 'group' parameter of the block_set_io_throttle command and the throttling.group command-line option. If that parameter is unspecified the groups get the name of the block device. This patch adds a new test to check the naming of throttli

  1   2   3   >