Re: [Qemu-devel] [PATCH v5 08/22] s390x: move sclp_service_call() to sclp.h

2017-09-13 Thread David Hildenbrand
On 13.09.2017 17:21, Cornelia Huck wrote: > On Wed, 13 Sep 2017 16:29:23 +0200 > Thomas Huth wrote: > >> On 13.09.2017 15:24, David Hildenbrand wrote: >>> Implemented in sclp.c, so let's move it to the right include file. >>> Fix up one include. Do a forward declaration of

Re: [Qemu-devel] [libvirt] QEMU -M nvdimm=on and hotplug

2017-09-13 Thread Michal Privoznik
On 09/13/2017 03:54 PM, Stefan Hajnoczi wrote: > Hi Michal, > You asked how NVDIMM hotplug should work if the domain was launched > without -M nvdimm=on. I'm not very familiar with ACPI so this may be > incorrect. > > Hotplug relies on the presence of ACPI tables (SSDT Device=NVDR >

[Qemu-devel] [PATCH v4 07/23] block: Convert bdrv_get_block_status() to bytes

2017-09-13 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. In the common case, allocation is unlikely to ever use values that are not naturally sector-aligned, but it is possible that byte-based values will let us be more precise about allocation at the end of an unaligned

[Qemu-devel] [PATCH v4 09/23] block: Switch BdrvCoGetBlockStatusData to byte-based

2017-09-13 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal type (no semantic change), and rename it to match the corresponding public function rename. Signed-off-by: Eric Blake Reviewed-by: Fam Zheng

[Qemu-devel] [PATCH v4 16/23] qemu-img: Drop redundant error message in compare

2017-09-13 Thread Eric Blake
If a read error is encountered during 'qemu-img compare', we were printing the "Error while reading offset ..." message twice. Update the testsuite for the improved output. Further simplify the code by hoisting the error code conversion into the helper function, rather than repeating it at the

[Qemu-devel] [PATCH v2 1/5] qom: cpus: split cpu_generic_init() on feature parsing and cpu creation parts

2017-09-13 Thread Igor Mammedov
it would allow to reuse feature parsing part in various machines that have CPU features instead of re-implementing the same feature parsing each time. Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- v2: - squash in "cpu: rename

[Qemu-devel] [PATCH v4 21/23] block: Align block status requests

2017-09-13 Thread Eric Blake
Any device that has request_alignment greater than 512 should be unable to report status at a finer granularity; it may also be simpler for such devices to be guaranteed that the block layer has rounded things out to the granularity boundary (the way the block layer already rounds all other I/O

Re: [Qemu-devel] [PATCH v5 11/22] s390x: allow only 1 CPU with TCG

2017-09-13 Thread Alex Bennée
David Hildenbrand writes: > Specifying more than 1 CPU (e.g. -smp 5) leads to SIGP errors (the > guest tries to bring these CPUs up but fails), because we don't support > multiple CPUs on s390x under TCG. > > Let's bail out if more than 1 is specified, so we don't raise

Re: [Qemu-devel] [PATCH] throttle: Assert that bkt->max is valid in throttle_compute_wait()

2017-09-13 Thread Philippe Mathieu-Daudé
Hi Alberto, On 09/13/2017 05:28 AM, Alberto Garcia wrote: If bkt->max == 0 and bkt->burst_length > 1 then we could have a division by 0 in throttle_do_compute_wait(). That configuration is however not permitted and is already detected by throttle_is_valid(), but let's assert it in

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription

2017-09-13 Thread Greg Kurz
On Wed, 13 Sep 2017 17:44:54 +0100 Mark Cave-Ayland wrote: > On 13/09/17 07:02, David Gibson wrote: > > >>> Alexey - do you recall from your analysis why these fields were no > >>> longer deemed necessary, and how your TCG tests were configured? > >> > >> I most

Re: [Qemu-devel] [PATCH v5 07/22] target/s390x: move some s390x typedefs to cpu-qom.h

2017-09-13 Thread Thomas Huth
On 13.09.2017 16:44, David Hildenbrand wrote: > On 13.09.2017 16:27, Thomas Huth wrote: >> On 13.09.2017 15:24, David Hildenbrand wrote: >>> This allows us to drop inclusion of cpu_models.h in cpu-qom.h, and >>> prepares for using cpu-qom.h as a s390 specific version of typedefs.h >>> >>>

Re: [Qemu-devel] [PATCH v5 17/22] s390x: CPU hot unplug via device_del cannot work for now

2017-09-13 Thread Cornelia Huck
On Wed, 13 Sep 2017 15:24:12 +0200 David Hildenbrand wrote: > device_del on a CPU will currently do nothing. Let's emmit an error s/emmit/emit/ (fixing while applying) > telling that this is will currently not work (there is no architecture > support on s390x). Error message

[Qemu-devel] [PATCH v4 05/23] block: Switch bdrv_make_zero() to byte-based

2017-09-13 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Change the internal loop iteration of zeroing a device to track by bytes instead of sectors (although we are still guaranteed that we iterate by steps that are sector-aligned).

[Qemu-devel] [PATCH v4 10/23] block: Switch bdrv_common_block_status_above() to byte-based

2017-09-13 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal function (no semantic change). Signed-off-by: Eric Blake Reviewed-by: Fam Zheng --- v3: rebase to allocation/mapping sense

[Qemu-devel] [PATCH v4 13/23] qemu-img: Simplify logic in img_compare()

2017-09-13 Thread Eric Blake
As long as we are querying the status for a chunk smaller than the known image size, we are guaranteed that a successful return will have set pnum to a non-zero size (pnum is zero only for queries beyond the end of the file). Use that to slightly simplify the calculation of the current chunk size

[Qemu-devel] [PATCH v4 19/23] qemu-img: Change img_rebase() to be byte-based

2017-09-13 Thread Eric Blake
In the continuing quest to make more things byte-based, change the internal iteration of img_rebase(). We can finally drop the TODO assertion added earlier, now that the entire algorithm is byte-based and no longer has to shift from bytes to sectors. Most of the change is mechanical

[Qemu-devel] [PATCH v4 23/23] qemu-io: Relax 'alloc' now that block-status doesn't assert

2017-09-13 Thread Eric Blake
Previously, the alloc command required that input parameters be sector-aligned and clamped to 32 bits, because the underlying bdrv_is_allocated used a 32-bit parameter and asserted aligned inputs. But now that we have fixed block status to report a 64-bit bytes value, and to properly round

[Qemu-devel] [Bug 1716028] Re: qemu 2.10 locks images with no feature flag

2017-09-13 Thread Kevin Wolf
Note that 'share-rw' was introduced earlier (commit dabd18f6, qemu 2.9) than 'locking' (commit 16b48d5d, qemu 2.10), so if qemu 2.9 is relevant for you, your hacky check doesn't work. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [Qemu-devel] [PATCH 2/7] target/arm: Clear exclusive monitor on v7M reset, exception entry/exit

2017-09-13 Thread Richard Henderson
On 09/11/2017 06:52 AM, Peter Maydell wrote: > For M profile we must clear the exclusive monitor on reset, exception > entry and exception exit. We weren't doing any of these things; fix > this bug. > > Signed-off-by: Peter Maydell > --- > target/arm/internals.h | 10

[Qemu-devel] [PATCH v4 06/23] qemu-img: Switch get_block_status() to byte-based

2017-09-13 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Continue by converting an internal function (no semantic change), and simplifying its caller accordingly. Signed-off-by: Eric Blake Reviewed-by: Fam Zheng

[Qemu-devel] [PATCH v4 04/23] qcow2: Switch is_zero_sectors() to byte-based

2017-09-13 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal function (no semantic change), and rename it to is_zero() in the process. Signed-off-by: Eric Blake Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v5 11/22] s390x: allow only 1 CPU with TCG

2017-09-13 Thread David Hildenbrand
On 13.09.2017 18:13, Alex Bennée wrote: > > David Hildenbrand writes: > >> Specifying more than 1 CPU (e.g. -smp 5) leads to SIGP errors (the >> guest tries to bring these CPUs up but fails), because we don't support >> multiple CPUs on s390x under TCG. >> >> Let's bail out if

[Qemu-devel] [PATCH v2 3/5] vl.c: convert cpu_model to cpu type and set of global properties before machine_init()

2017-09-13 Thread Igor Mammedov
All machines that support user specified cpu_model either call cpu_generic_init() or cpu_class_by_name()/CPUClass::parse_features to parse feature string and to get CPU type to create. Which leads to code duplication and hard-codding default CPU model within machine_foo_init() code. Which makes

Re: [Qemu-devel] [PATCH 5/7] target/arm: Remove unnecessary '| 0xf0000000' from do_v7m_exception_exit()

2017-09-13 Thread Richard Henderson
On 09/11/2017 06:52 AM, Peter Maydell wrote: > In do_v7m_exception_exit(), there's no need to force the high 4 > bits of 'type' to 1 when calling v7m_exception_taken(), because > we know that they're always 1 or we could not have got to this > "handle return to magic exception return address"

Re: [Qemu-devel] [PATCH] virtio-9p: don't break device on marshaling fail

2017-09-13 Thread Greg Kurz
On Wed, 13 Sep 2017 17:16:43 +0300 Jan Dakinevich wrote: > Fix regression from commit 8d37de41cab145cbba250a8f1f1372b0a5cdf26f. > > The situation when pdu_marshal returns an error should be considered > valid. At least `v9fs_do_readdir_with_stat' relies on that to

[Qemu-devel] [PATCH v2 0/5] generalize parsing of cpu_model (x86/arm)

2017-09-13 Thread Igor Mammedov
Changelog since v1: * fix merge conflicts with ignore_memory_transaction_failures * fix couple merge conflicts where SoC type string where replaced by type macro * keep plain prefix string in: strncmp(cpu_type, "pxa27", 5) * s/"%s" ARM_CPU_TYPE_SUFFIX/ARM_CPU_TYPE_NAME("%s")/ * drop not

[Qemu-devel] [PATCH v4 02/23] block: Add flag to avoid wasted work in bdrv_is_allocated()

2017-09-13 Thread Eric Blake
Not all callers care about which BDS owns the mapping for a given range of the file. In particular, bdrv_is_allocated() cares more about finding the largest run of allocated data from the guest perspective, whether or not that data is consecutive from the host perspective. Therefore, doing

[Qemu-devel] [PATCH v4 17/23] qemu-img: Change check_empty_sectors() to byte-based

2017-09-13 Thread Eric Blake
Continue on the quest to make more things byte-based instead of sector-based. Signed-off-by: Eric Blake --- v3: new patch --- qemu-img.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index

Re: [Qemu-devel] [PATCH v5 03/22] s390x: get rid of s390-virtio.c

2017-09-13 Thread David Hildenbrand
On 13.09.2017 15:23, David Hildenbrand wrote: > It is a leftover from the days where we had still the !ccw virtio > machine. As this one is long gone, let's move everything to> > s390-virtio-ccw.c. Whoops, another thing to fix up: hw/s390x/s390-virtio.c is not compiled any more but not

Re: [Qemu-devel] [PATCH 7/7] target/arm: Rename 'type' to 'excret' in do_v7m_exception_exit()

2017-09-13 Thread Richard Henderson
On 09/11/2017 06:52 AM, Peter Maydell wrote: > In the v7M and v8M ARM ARM, the magic exception return values are > referred to as EXC_RETURN values, and in QEMU we use V7M_EXCRET_* > constants to define bits within them. Rename the 'type' variable > which holds the exception return value in

Re: [Qemu-devel] [PATCH 1/7] trace: Add event "guest_bbl_before"

2017-09-13 Thread Richard Henderson
On 09/10/2017 09:15 AM, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > accel/tcg/translator.c |6 ++ > trace-events | 11 +++ > 2 files changed, 17 insertions(+) > > diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c >

Re: [Qemu-devel] [PATCH 2/7] trace: Add event "guest_inst_before"

2017-09-13 Thread Richard Henderson
On 09/10/2017 09:19 AM, Lluís Vilanova wrote: > while (true) { > +target_ulong pc_insn = db->pc_next; Why not just "pc"? > + > db->num_insns++; > ops->insn_start(db, cpu); > tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */ > @@ -96,6 +98,7

Re: [Qemu-devel] [PATCH v1 1/2] virtio_gpu: Handle endian conversion

2017-09-13 Thread Farhan Ali
On 09/13/2017 04:13 AM, Gerd Hoffmann wrote: Please move this to a helper function, maybe by updating the VIRTIO_GPU_FILL_CMD macro. The header fields should be byteswapped too. As most structs have 32bit fields only (with the exception of hdr.fence_id) you should be able to create a generic

Re: [Qemu-devel] [RFC v2 17/32] vhost+postcopy: Stash RAMBlock and offset

2017-09-13 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Aug 24, 2017 at 08:27:15PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Stash the RAMBlock and offset for later use looking up > > addresses. > > > > Signed-off-by: Dr. David Alan

[Qemu-devel] [PATCH v2 2/5] cpu: make cpu_generic_init() abort QEMU on error

2017-09-13 Thread Igor Mammedov
Almost every user of cpu_generic_init() checks for returned NULL and then reports failure in a custom way and aborts process. Some users assume that call can't fail and don't check for failure, though they should have checked for it. In either cases cpu_generic_init() failure is fatal, so instead

[Qemu-devel] [PATCH v4 20/23] qemu-img: Change img_compare() to be byte-based

2017-09-13 Thread Eric Blake
In the continuing quest to make more things byte-based, change the internal iteration of img_compare(). We can finally drop the TODO assertion added earlier, now that the entire algorithm is byte-based and no longer has to shift from bytes to sectors. Most of the change is mechanical

[Qemu-devel] [PATCH v2 5/5] arm: drop intermediate cpu_model -> cpu type parsing and use cpu type directly

2017-09-13 Thread Igor Mammedov
there are 2 use cases to deal with: 1: fixed CPU models per board/soc 2: boards with user configurable cpu_model and fallback to default cpu_model if user hasn't specified one explicitly For the 1st drop intermediate cpu_model parsing and use const cpu type directly, which replaces:

Re: [Qemu-devel] [PATCH 3/4] ppc: add CPU access_type into the migration stream

2017-09-13 Thread Mark Cave-Ayland
On 13/09/17 08:19, David Gibson wrote: >> When pausing a VM, does execution stop at the end of the current TB >> rather than immediately? If so, perhaps someone could confirm that >> guarantee is good enough for access_type? > > I'm pretty sure it has to; we'd have to come up out of an

Re: [Qemu-devel] [PATCH 3/7] target/arm: Get PRECISERR and IBUSERR the right way round

2017-09-13 Thread Richard Henderson
On 09/11/2017 06:52 AM, Peter Maydell wrote: > For a bus fault, the M profile BFSR bit PRECISERR means a bus > fault on a data access, and IBUSERR means a bus fault on an > instruction access. We had these the wrong way around; fix this. > > Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH v4 01/23] block: Allow NULL file for bdrv_get_block_status()

2017-09-13 Thread Eric Blake
Not all callers care about which BDS owns the mapping for a given range of the file. This patch merely simplifies the callers by consolidating the logic in the common call point, while guaranteeing a non-NULL file to all the driver callbacks, for no semantic change. The only caller that does not

Re: [Qemu-devel] [PATCH] tcg/ppc: disable atomic write check on ppc32

2017-09-13 Thread Richard Henderson
On 09/12/2017 02:04 PM, Paolo Bonzini wrote: > I wonder if QEMU_BUILD_BUG_ON (at least in atomics) should not use a > static assertion, but rather the 'error ("MESSAGE")' attribute instead. > This way, if the code is dead it does not cause a build failure. I think that would be an excellent idea.

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription

2017-09-13 Thread Mark Cave-Ayland
On 13/09/17 07:02, David Gibson wrote: >>> Alexey - do you recall from your analysis why these fields were no >>> longer deemed necessary, and how your TCG tests were configured? >> >> I most certainly did not do analysis (my bad. sorry) - I took the patch >> from David as he left the team, fixed

Re: [Qemu-devel] [PATCH 4/4] ppc: ensure we update the decrementer value during migration

2017-09-13 Thread Mark Cave-Ayland
On 13/09/17 08:12, David Gibson wrote: > This is subtly incorrect. It sets the DECR on load to exactly the > value that was saved. That effectively means that the DECR is frozen > for the migration downtime, which probably isn't what we want. > > Instead we need to save the DECR as an offset

Re: [Qemu-devel] [PATCH v5 18/22] s390x: implement query-hotpluggable-cpus

2017-09-13 Thread Cornelia Huck
On Wed, 13 Sep 2017 15:24:13 +0200 David Hildenbrand wrote: > CPU hotplug is only possible on a per core basis on s390x. So let's > add possible_cpus and properly wire everything up. s/properly wire everything up/wire everything up properly/ ? (fixing while... you get the

Re: [Qemu-devel] [PATCH v5 18/22] s390x: implement query-hotpluggable-cpus

2017-09-13 Thread David Hildenbrand
On 13.09.2017 17:49, Cornelia Huck wrote: > On Wed, 13 Sep 2017 15:24:13 +0200 > David Hildenbrand wrote: > >> CPU hotplug is only possible on a per core basis on s390x. So let's >> add possible_cpus and properly wire everything up. > > s/properly wire everything up/wire

[Qemu-devel] [PATCH v4 00/23] make bdrv_get_block_status byte-based

2017-09-13 Thread Eric Blake
There are patches floating around to add NBD_CMD_BLOCK_STATUS, but NBD wants to report status on byte granularity (even if the reporting will probably be naturally aligned to sectors or even much higher levels). I've therefore started the task of converting our block status code to report at a

[Qemu-devel] [PATCH v4 08/23] block: Switch bdrv_co_get_block_status() to byte-based

2017-09-13 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal function (no semantic change); and as with its public counterpart, rename to bdrv_co_block_status() to make the compiler enforce that we catch all uses. For now,

[Qemu-devel] [PATCH v4 14/23] qemu-img: Speed up compare on pre-allocated larger file

2017-09-13 Thread Eric Blake
Compare the following images with all-zero contents: $ truncate --size 1M A $ qemu-img create -f qcow2 -o preallocation=off B 1G $ qemu-img create -f qcow2 -o preallocation=metadata C 1G On my machine, the difference is noticeable for pre-patch speeds, with more than an order of magnitude in

[Qemu-devel] [PATCH v4 22/23] block: Relax bdrv_aligned_preadv() assertion

2017-09-13 Thread Eric Blake
Now that bdrv_is_allocated accepts non-aligned inputs, we can remove the TODO added in commit d6a644bb. Signed-off-by: Eric Blake --- v3: new patch [Kevin] --- block/io.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/block/io.c b/block/io.c

Re: [Qemu-devel] [PATCH v5 00/22] s390x cleanups and CPU hotplug via device_add

2017-09-13 Thread Cornelia Huck
On Wed, 13 Sep 2017 15:23:55 +0200 David Hildenbrand wrote: > The first patches are a bunch of cleanups. I decided to go the > extra mile and implement CPU hotplug via "device_add", as well as > "query-hotpluggable-cpus". > > On s390x, only complete cores can be plugged. CPU

Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for "inlining" regions of code

2017-09-13 Thread Richard Henderson
On 09/10/2017 09:27 AM, Lluís Vilanova wrote: > TCG BBLs and instructions have multiple exit points from where to raise > tracing events, but some of the necessary information in the generic > disassembly infrastructure is not available until after generating these > exit points. > > This patch

Re: [Qemu-devel] [PATCH] accel/tcg: move USER code to user-exec.c

2017-09-13 Thread Richard Henderson
On 09/12/2017 02:19 PM, Philippe Mathieu-Daudé wrote: > Suggested-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé > --- > Based-on: 20170911213328.9701-5-f4...@amsat.org > > accel/tcg/tcg-runtime.c | 54 >

Re: [Qemu-devel] [PATCH v5 08/22] s390x: move sclp_service_call() to sclp.h

2017-09-13 Thread Cornelia Huck
On Wed, 13 Sep 2017 16:29:23 +0200 Thomas Huth wrote: > On 13.09.2017 15:24, David Hildenbrand wrote: > > Implemented in sclp.c, so let's move it to the right include file. > > Fix up one include. Do a forward declaration of struct CPUS390XState to > > fix the two sclp consoles

Re: [Qemu-devel] [Qemu-block] Q: Report of leaked clusters with qcow2 when disk is resized with a live VM

2017-09-13 Thread Darren Kenny
Kevin Wolf wrote: Am 13.09.2017 um 15:32 hat Darren Kenny geschrieben: Hi Kevin, Thanks for getting back to me so quickly. Kevin Wolf wrote: Am 13.09.2017 um 14:00 hat Darren Kenny geschrieben: [Cross-posted from qemu-devel, meant to send here first] Just keep both lists in the CC for the

Re: [Qemu-devel] [PATCH 4/7] nvic: Don't apply group priority mask to negative priorities

2017-09-13 Thread Richard Henderson
On 09/11/2017 06:52 AM, Peter Maydell wrote: > In several places we were unconditionally applying the > nvic_gprio_mask() to a priority value. This is incorrect > if the priority is one of the fixed negative priority > values (for NMI and HardFault), so don't do it. > > This bug would have caused

[Qemu-devel] [PATCH v4 03/23] block: Make bdrv_round_to_clusters() signature more useful

2017-09-13 Thread Eric Blake
In the process of converting sector-based interfaces to bytes, I'm finding it easier to represent a byte count as a 64-bit integer at the block layer (even if we are internally capped by SIZE_MAX or even INT_MAX for individual transactions, it's still nicer to not have to worry about

[Qemu-devel] [PATCH v2 4/5] pc: use generic cpu_model parsing

2017-09-13 Thread Igor Mammedov
define default CPU type in generic way in pc_machine_class_init() and let common machine code to handle cpu_model parsing Patch also introduces TARGET_DEFAULT_CPU_TYPE define for 2 purposes: * make foo_machine_class_init() look uniform on every target * use define in [bsd|linux]-user targets

Re: [Qemu-devel] [PATCH v5 03/22] s390x: get rid of s390-virtio.c

2017-09-13 Thread Cornelia Huck
On Wed, 13 Sep 2017 18:34:27 +0200 David Hildenbrand wrote: > On 13.09.2017 15:23, David Hildenbrand wrote: > > It is a leftover from the days where we had still the !ccw virtio > > machine. As this one is long gone, let's move everything to> > > s390-virtio-ccw.c. > >

[Qemu-devel] [PATCH 05/18] block/mirror: Convert to coroutines

2017-09-13 Thread Max Reitz
In order to talk to the source BDS (and maybe in the future to the target BDS as well) directly, we need to convert our existing AIO requests into coroutine I/O requests. Signed-off-by: Max Reitz --- block/mirror.c | 134

[Qemu-devel] [PATCH 14/18] block/mirror: Distinguish active from passive ops

2017-09-13 Thread Max Reitz
Currently, the mirror block job only knows passive operations. But once we introduce active writes, we need to distinguish between the two; for example, mirror_wait_for_free_in_flight_slot() should wait for a passive operation because active writes will not use the same in-flight slots.

Re: [Qemu-devel] [PATCH v1 0/2] Virtio GPU for S390

2017-09-13 Thread Farhan Ali
On 09/13/2017 03:00 PM, Thomas Huth wrote: On 12.09.2017 16:26, Farhan Ali wrote: These patches wire up the virtio-gpu device for CCW bus for S390. For the S390 architecture which does not natively support any graphics device, virtio gpu in 2D mode could be used to emulate a simple graphics

Re: [Qemu-devel] [PATCH v2] accel: default to an actually available accelerator

2017-09-13 Thread Richard Henderson
On 09/13/2017 10:29 AM, Cornelia Huck wrote: > configure_accelerator() falls back to tcg if no accelerator has > been specified. Formerly, we could be sure that tcg is always > available; however, with --disable-tcg, this is not longer true, > and you are not able to start qemu without explicitly

[Qemu-devel] [PATCH 15/18] block/mirror: Add active mirroring

2017-09-13 Thread Max Reitz
This patch implements active synchronous mirroring. In active mode, the passive mechanism will still be in place and is used to copy all initially dirty clusters off the source disk; but every write request will write data both to the source and the target disk, so the source cannot be dirtied

[Qemu-devel] [PATCH 06/18] block/mirror: Use CoQueue to wait on in-flight ops

2017-09-13 Thread Max Reitz
Attach a CoQueue to each in-flight operation so if we need to wait for any we can use it to wait instead of just blindly yielding and hoping for some operation to wake us. A later patch will use this infrastructure to allow requests accessing the same area of the virtual disk to specifically wait

Re: [Qemu-devel] [PATCH] pixman: drop submodule

2017-09-13 Thread Konrad Rzeszutek Wilk
On Fri, Sep 01, 2017 at 12:50:23PM +0200, Gerd Hoffmann wrote: > Drop pixman submodule and support for the "internal" pixman build. > pixman should be reasonable well established meanwhile that we don't > need the fallback submodule any more. While being at it also drop > some #ifdefs for pixman

[Qemu-devel] [PATCH 04/18] block/mirror: Pull out mirror_perform()

2017-09-13 Thread Max Reitz
When converting mirror's I/O to coroutines, we are going to need a point where these coroutines are created. mirror_perform() is going to be that point. Signed-off-by: Max Reitz --- block/mirror.c | 53 ++--- 1 file changed, 30

Re: [Qemu-devel] [PATCH v1 2/2] virtio-gpu-ccw: Create a virtio gpu device for the ccw bus

2017-09-13 Thread Thomas Huth
On 13.09.2017 14:09, David Hildenbrand wrote: > On 12.09.2017 16:26, Farhan Ali wrote: >> Wire up the virtio-gpu device for the CCW bus. The virtio-gpu >> is a virtio-1 device, so disable revision 0. >> >> Signed-off-by: Farhan Ali >> Acked-by: Christian Borntraeger

[Qemu-devel] [PATCH 12/18] block/dirty-bitmap: Add bdrv_dirty_iter_next_area

2017-09-13 Thread Max Reitz
This new function allows to look for a consecutively dirty area in a dirty bitmap. Signed-off-by: Max Reitz --- include/block/dirty-bitmap.h | 2 ++ block/dirty-bitmap.c | 52 2 files changed, 54 insertions(+) diff --git

Re: [Qemu-devel] [Qemu devel v8 PATCH 4/5] msf2: Add Smartfusion2 SoC

2017-09-13 Thread Philippe Mathieu-Daudé
Hi Sundeep, On 09/13/2017 06:21 AM, sundeep subbaraya wrote: All patches got Reviewed-by. Do you want me to change alias to remap and send This is just cosmetic for the "alias MSF2.eNVM.alias": (qemu) info mtree address-space: cpu-memory - (prio 0, i/o):

Re: [Qemu-devel] [PATCH v2] accel: default to an actually available accelerator

2017-09-13 Thread Thomas Huth
On 13.09.2017 19:29, Cornelia Huck wrote: > configure_accelerator() falls back to tcg if no accelerator has > been specified. Formerly, we could be sure that tcg is always > available; however, with --disable-tcg, this is not longer true, > and you are not able to start qemu without explicitly

Re: [Qemu-devel] [PATCH 4/4] ppc: ensure we update the decrementer value during migration

2017-09-13 Thread Laurent Vivier
On 13/09/2017 19:11, Mark Cave-Ayland wrote: > On 13/09/17 08:12, David Gibson wrote: > >> This is subtly incorrect. It sets the DECR on load to exactly the >> value that was saved. That effectively means that the DECR is frozen >> for the migration downtime, which probably isn't what we want.

[Qemu-devel] [PATCH 03/18] blockjob: Make drained_{begin, end} public

2017-09-13 Thread Max Reitz
When a block job decides to be represented as a BDS and track its associated child nodes itself instead of having the BlockJob object track them, it needs to implement the drained_begin/drained_end child operations. In order to do that, it has to be able to control drainage of the block job (i.e.

[Qemu-devel] [PATCH 00/18] block/mirror: Add active-sync mirroring

2017-09-13 Thread Max Reitz
This series implements an active and synchronous mirroring mode. Currently, the mirror block job is passive an asynchronous: Depending on your start conditions, some part of the source disk starts as "dirty". Then, the block job will (as a background operation) continuously copy dirty parts to

[Qemu-devel] [PATCH 01/18] block: Add BdrvDeletedStatus

2017-09-13 Thread Max Reitz
Sometimes an operation may delete a BDS. It may then not be trivial to determine this because the BDS object itself cannot be accessed afterwards. With this patch, one can attach a BdrvDeletedStatus object to a BDS which can be used to safely query whether the BDS still exists even after it has

[Qemu-devel] [PATCH 02/18] block: BDS deletion during bdrv_drain_recurse

2017-09-13 Thread Max Reitz
Drainined a BDS child may lead to both the original BDS and/or its other children being deleted (e.g. if the original BDS represents a block job). We should prepare for this in both bdrv_drain_recurse() and bdrv_drained_begin() by monitoring whether the BDS we are about to drain still exists at

Re: [Qemu-devel] [PATCH v1 0/2] Virtio GPU for S390

2017-09-13 Thread Thomas Huth
On 12.09.2017 16:26, Farhan Ali wrote: > These patches wire up the virtio-gpu device for CCW bus for > S390. > > For the S390 architecture which does not natively support any graphics > device, virtio gpu in 2D mode could be used to emulate a simple graphics > card and use VNC as the display. >

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Clean up some bad code in the vvfat driver

2017-09-13 Thread John Snow
On 09/13/2017 06:21 AM, Thomas Huth wrote: > Remove the unnecessary home-grown redefinition of the assert() macro here, > and remove the unusable debug code at the end of the checkpoint() function. > The code there uses assert() with side-effects (assignment to the "mapping" > variable), which

[Qemu-devel] [PATCH v2] accel: default to an actually available accelerator

2017-09-13 Thread Cornelia Huck
configure_accelerator() falls back to tcg if no accelerator has been specified. Formerly, we could be sure that tcg is always available; however, with --disable-tcg, this is not longer true, and you are not able to start qemu without explicitly specifying another accelerator on those builds.

Re: [Qemu-devel] [RFC 0/8] virtio-crypto: add multiplexing mode support

2017-09-13 Thread Halil Pasic
On 09/11/2017 03:10 AM, Longpeng(Mike) wrote: > *NOTE* > The code realization is based on the latest virtio crypto spec: > [PATCH v19 0/2] virtio-crypto: virtio crypto device specification >https://lists.nongnu.org/archive/html/qemu-devel/2017-08/msg05217.html > > In session mode, the

[Qemu-devel] [PATCH 17/18] qemu-io: Add background write

2017-09-13 Thread Max Reitz
Add a new parameter -B to qemu-io's write command. When used, qemu-io will not wait for the result of the operation and instead execute it in the background. Signed-off-by: Max Reitz --- qemu-io-cmds.c | 83 +- 1 file

[Qemu-devel] [PATCH 13/18] block/mirror: Keep write perm for pending writes

2017-09-13 Thread Max Reitz
The owner of the mirror BDS might retire its write permission; but there may still be pending mirror operations so the mirror BDS cannot necessarily retire its write permission for its child then. Signed-off-by: Max Reitz --- block/mirror.c | 6 -- 1 file changed, 4

[Qemu-devel] [Bug 1716767] Re: file(1) fails with "Invalid argument" on qemu-sh4-user

2017-09-13 Thread James Clarke
With the attached patch, qemu-sh4-static now works for file: root@debian:/# /usr/bin/qemu-sh4-static.new2 /usr/bin/file /bin/bash /bin/bash: ELF 32-bit LSB executable, Renesas SH, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2,

Re: [Qemu-devel] [PATCH v4 21/23] block: Align block status requests

2017-09-13 Thread Eric Blake
On 09/13/2017 11:03 AM, Eric Blake wrote: > Any device that has request_alignment greater than 512 should be > unable to report status at a finer granularity; it may also be > simpler for such devices to be guaranteed that the block layer > has rounded things out to the granularity boundary (the

Re: [Qemu-devel] [PATCH 6/7] trace: Add event "guest_inst_after"

2017-09-13 Thread Richard Henderson
On 09/10/2017 09:35 AM, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > accel/tcg/translator.c | 23 ++- > trace-events |8 > 2 files changed, 26 insertions(+), 5 deletions(-) > > diff --git a/accel/tcg/translator.c

Re: [Qemu-devel] [PATCH 5/7] trace: Add event "guest_bbl_after"

2017-09-13 Thread Richard Henderson
On 09/10/2017 09:31 AM, Lluís Vilanova wrote: > +void translator__gen_goto_tb(TCGContext *ctx) > +{ > +if (ctx->disas.in_guest_code && > +(TRACE_GUEST_BBL_AFTER_ENABLED)) { > +if (ctx->disas.inline_label == NULL) { > +ctx->disas.inline_label =

[Qemu-devel] [PATCH 08/18] block/mirror: Use source as a BdrvChild

2017-09-13 Thread Max Reitz
With this, the mirror_top_bs is no longer just a technically required node in the BDS graph but actually represents the block job operation. Signed-off-by: Max Reitz --- block/mirror.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git

[Qemu-devel] [PATCH 07/18] block/mirror: Wait for in-flight op conflicts

2017-09-13 Thread Max Reitz
This patch makes the mirror code differentiate between simply waiting for any operation to complete (mirror_wait_for_free_in_flight_slot()) and specifically waiting for all operations touching a certain range of the virtual disk to complete (mirror_wait_on_conflicts()). Signed-off-by: Max Reitz

[Qemu-devel] [PATCH 09/18] block: Generalize should_update_child() rule

2017-09-13 Thread Max Reitz
Currently, bdrv_replace_node() refuses to create loops from one BDS to itself if the BDS to be replaced is the backing node of the BDS to replace it: Say there is a node A and a node B. Replacing B by A means making all references to B point to A. If B is a child of A (i.e. A has a reference to

[Qemu-devel] [PATCH 10/18] block/mirror: Make source the file child

2017-09-13 Thread Max Reitz
Regarding the source BDS, the mirror BDS is arguably a filter node. Therefore, the source BDS should be its "file" child. Signed-off-by: Max Reitz --- block/mirror.c | 127 ++--- block/qapi.c | 25 ++---

[Qemu-devel] [PATCH 18/18] iotests: Add test for active mirroring

2017-09-13 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/151 | 111 + tests/qemu-iotests/151.out | 5 ++ tests/qemu-iotests/group | 1 + 3 files changed, 117 insertions(+) create mode 100755 tests/qemu-iotests/151 create mode

[Qemu-devel] [PATCH 16/18] block/mirror: Add copy mode QAPI interface

2017-09-13 Thread Max Reitz
This patch allows the user to specify whether to use active or only passive mode for mirror block jobs. Currently, this setting will remain constant for the duration of the entire block job. Signed-off-by: Max Reitz --- qapi/block-core.json | 11 +--

Re: [Qemu-devel] [PATCH 7/7] trace: Add event "guest_inst_info_after"

2017-09-13 Thread Richard Henderson
On 09/10/2017 09:39 AM, Lluís Vilanova wrote: > if (TRACE_GUEST_INST_AFTER_ENABLED && translated_insn) { > trace_guest_inst_after_tcg(cpu, tcg_ctx.tcg_env, pc_insn); > } > +if (TRACE_GUEST_INST_INFO_AFTER_ENABLED && translated_insn) { > +

[Qemu-devel] [PATCH 11/18] hbitmap: Add @advance param to hbitmap_iter_next()

2017-09-13 Thread Max Reitz
This new parameter allows the caller to just query the next dirty position without moving the iterator. Signed-off-by: Max Reitz --- include/qemu/hbitmap.h | 4 +++- block/dirty-bitmap.c | 2 +- tests/test-hbitmap.c | 26 +- util/hbitmap.c

[Qemu-devel] [PATCH v2] tests: Introduce generic device hot-plug/hot-unplug functions

2017-09-13 Thread Thomas Huth
A lot of tests provide code for adding and removing a device via the device_add and device_del QMP commands. Maintaining this code in so many places is cumbersome and error-prone (some of the code parts check the responses for device deletion in an incorrect way, for example, we've got to deal

Re: [Qemu-devel] [PATCH] rbd: Detect rbd image resizes and propagate them

2017-09-13 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Subject: [Qemu-devel] [PATCH] rbd: Detect rbd image resizes and propagate them Message-id: 20170913164424.32129-1-...@digitalocean.com Type: series === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be

Re: [Qemu-devel] [PATCH v4 2/3] backup: Adds Backup Tool

2017-09-13 Thread John Snow
On 09/11/2017 01:02 AM, Fam Zheng wrote: > On Fri, 09/08 22:11, Ishani Chugh wrote: >> +def build_parser(): >> +backup_tool = BackupTool() >> +parser = ArgumentParser() >> +subparsers = parser.add_subparsers(title='Subcommands', >> +

[Qemu-devel] [PATCH] rbd: Detect rbd image resizes and propagate them

2017-09-13 Thread Adam Wolfe Gordon via Qemu-devel
Register a watcher with rbd so that we get notified when an image is resized. Propagate resizes to parent block devices so that guest devices get resized without user intervention. Signed-off-by: Adam Wolfe Gordon --- Hello! We are using this patch in production at

[Qemu-devel] [Bug 932490] Re: Qemu fails on -fda /dev/fd0 when no medium is present

2017-09-13 Thread Herbert Poetzl
Sorry, it has been more than five years and I don't have a system with a floppy disk to test anymore. Best, Herbert -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/932490 Title: Qemu fails on -fda

Re: [Qemu-devel] [PATCH v4 00/23] make bdrv_get_block_status byte-based

2017-09-13 Thread Eric Blake
On 09/13/2017 11:03 AM, Eric Blake wrote: > There are patches floating around to add NBD_CMD_BLOCK_STATUS, > but NBD wants to report status on byte granularity (even if the > reporting will probably be naturally aligned to sectors or even > much higher levels). I've therefore started the task of

Re: [Qemu-devel] [PATCH] hw/isa/pc87312: Mark the device with user_creatable = false

2017-09-13 Thread Hervé Poussineau
Le 13/09/2017 à 11:07, Thomas Huth a écrit : QEMU currently aborts if you try to use the device at the command line: $ ppc64-softmmu/qemu-system-ppc64 -S -machine prep -device pc87312 Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222: qemu-system-ppc64: -device pc87312: Device

  1   2   3   4   5   >