Re: [Qemu-devel] [PATCH v2 00/13] vvfat: misc fixes for read-only mode

2017-07-05 Thread Hervé Poussineau
Hi, Thanks to have taken this patch series. However, I already have in my repository the v3 patch series, whose changelog is: Changes v2->v3: - added patches 5, 12, 16 - fixed warning (unused variable) (patch 11) - added #defines for constants for deleted byte following Philippe remarks

Re: [Qemu-devel] [Qemu-arm] [PATCH] target-arm: v7M: ignore writes to CONTROL.SPSEL from Thread mode

2017-07-05 Thread Philippe Mathieu-Daudé
Hi Peter, On 06/30/2017 08:06 AM, Peter Maydell wrote: For v7M, writes to the CONTROL register are only permitted for privileged code. However even if the code is privileged, the write must not affect the SPSEL bit in the CONTROL register if the CPU is in Thread mode (as documented in the

Re: [Qemu-devel] [PATCH 1/3] include/hw/boards.h: Document memory_region_allocate_system_memory()

2017-07-05 Thread Philippe Mathieu-Daudé
Hi Peter, Paolo, On 07/04/2017 02:02 PM, Peter Maydell wrote: Add a documentation comment for memory_region_allocate_system_memory(). In particular, the reason for this function's existence and the requirement on board code to call it exactly once are non-obvious. Signed-off-by: Peter Maydell

Re: [Qemu-devel] [RFC v3 3/3] char-socket: Report TCP socket waiting as information

2017-07-05 Thread Thomas Huth
On 05.07.2017 19:36, Alistair Francis wrote: > When QEMU is waiting for a TCP socket connection it reports that message as > an error. This isn't an error it is just information so let's change the > report to use info_report() instead. > > Signed-off-by: Alistair Francis

Re: [Qemu-devel] [RFC v3 2/3] qemu-error: Implement a more generic error reporting

2017-07-05 Thread Thomas Huth
On 05.07.2017 19:36, Alistair Francis wrote: > This patch converts the existing error_vreport() function into a generic > qmesg_vreport() function that takes an enum describing the s/qmesg/qmsg/ > information to be reported. > > As part of this change a new qmesg_report() function is added as

Re: [Qemu-devel] [RFC v3 1/3] util/qemu-error: Rename error_print_loc() to be more generic

2017-07-05 Thread Thomas Huth
On 05.07.2017 19:36, Alistair Francis wrote: > Rename the error_print_loc() function in preparation for using it to > print warnings as well. > > Signed-off-by: Alistair Francis > Reviewed-by: Philippe Mathieu-Daudé > --- > > util/qemu-error.c | 4

Re: [Qemu-devel] [PATCH v2 03/15] block: Add flag to avoid wasted work in bdrv_is_allocated()

2017-07-05 Thread Eric Blake
On 07/03/2017 05:14 PM, Eric Blake wrote: > 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

Re: [Qemu-devel] [PATCH v4 0/1] virtio-scsi-ccw: fix iotest 068 for s390x

2017-07-05 Thread QingFeng Hao
在 2017/7/5 23:15, Stefan Hajnoczi 写道: On Tue, Jul 04, 2017 at 03:23:49PM +0200, QingFeng Hao wrote: This commit fixes iotest 068 for s390x as s390x uses virtio-scsi-ccw. It's based on commit c324fd0a39c by Stefan Hajnoczi. Thanks! Change history: v4: Got Cornelia Huck's Reviewed-by and

[Qemu-devel] [PATCH v2.1 3/4] doc: add item for "-M enforce-config-section"

2017-07-05 Thread Peter Xu
It's never documented, and now we have one more parameter for it (which obsoletes this one). Document it properly. Although now when enforce-config-section is set, it'll override the other "-global" parameter, that is not necessarily a rule. Forbid that usage in the document. Suggested-by:

Re: [Qemu-devel] [PATCH 3/4] doc: add item for "-M enforce-config-section"

2017-07-05 Thread Peter Xu
On Wed, Jul 05, 2017 at 05:31:22PM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > (CCing Greg, the original author of the code that added the > > enforce-config-section option) > > > > On Tue, Jul 04, 2017 at 10:06:54AM +0200, Markus Armbruster wrote: > >>

Re: [Qemu-devel] [PATCH 07/11] target/sh4: Unify cpu_fregs into FREG

2017-07-05 Thread Philippe Mathieu-Daudé
On 07/05/2017 09:23 PM, Richard Henderson wrote: We were treating FREG as an index and REG as a TCGv. Making FREG return a TCGv is both less confusing and a step toward cleaner banking of cpu_fregs. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé

Re: [Qemu-devel] [PATCH 00/11] target/sh4 improvments

2017-07-05 Thread Laurent Vivier
Le 06/07/2017 à 02:23, Richard Henderson a écrit : > This fixes two problems with atomic operations on sh4, > including an attempt at supporting the user-space atomics > technique used by most sh-linux-user binaries. I tried some time ago to support gUSA hack by decoding the instruction[1] the

Re: [Qemu-devel] [PATCH 05/11] linux-user/sh4: Notice gUSA regions during signal delivery

2017-07-05 Thread Laurent Vivier
Le 06/07/2017 à 02:23, Richard Henderson a écrit : > We translate gUSA regions atomically in a parallel context. > But in a serial context a gUSA region may be interrupted. > In that case, restart the region as the kernel would. > > Signed-off-by: Richard Henderson > --- >

[Qemu-devel] [PATCH 08/11] target/sh4: Pass DisasContext to fpr64 routines

2017-07-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sh4/translate.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index e4fd6f2..05657a9 100644 --- a/target/sh4/translate.c +++

[Qemu-devel] [PATCH 05/11] linux-user/sh4: Notice gUSA regions during signal delivery

2017-07-05 Thread Richard Henderson
We translate gUSA regions atomically in a parallel context. But in a serial context a gUSA region may be interrupted. In that case, restart the region as the kernel would. Signed-off-by: Richard Henderson --- linux-user/signal.c | 21 + 1 file changed, 21

[Qemu-devel] [PATCH 09/11] target/sh4: Avoid a potential translator crash for malformed FPR64

2017-07-05 Thread Richard Henderson
Produce valid, but nonsensical, code given an odd register index. Signed-off-by: Richard Henderson --- target/sh4/translate.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index

[Qemu-devel] [PATCH 11/11] target/sh4: Eliminate DREG macro

2017-07-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sh4/translate.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index a45d0ee..7e3de74 100644 --- a/target/sh4/translate.c +++

[Qemu-devel] [PATCH 10/11] target/sh4: Hoist fp bank selection

2017-07-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sh4/translate.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 7f015c3..a45d0ee 100644 --- a/target/sh4/translate.c +++

[Qemu-devel] [PATCH 02/11] target/sh4: Consolidate end-of-TB tests

2017-07-05 Thread Richard Henderson
We can fold 3 different tests within the decode loop into a more accurate computation of max_insns to start. Signed-off-by: Richard Henderson --- target/sh4/translate.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH 07/11] target/sh4: Unify cpu_fregs into FREG

2017-07-05 Thread Richard Henderson
We were treating FREG as an index and REG as a TCGv. Making FREG return a TCGv is both less confusing and a step toward cleaner banking of cpu_fregs. Signed-off-by: Richard Henderson --- target/sh4/translate.c | 123 + 1 file

[Qemu-devel] [PATCH 04/11] target/sh4: Recognize common gUSA sequences

2017-07-05 Thread Richard Henderson
For many of the sequences produced by gcc or glibc, we can translate these as host atomic operations. Which saves the need to acquire the exclusive lock. Signed-off-by: Richard Henderson --- target/sh4/translate.c | 300 +++-- 1 file

[Qemu-devel] [PATCH 06/11] target/sh4: Hoist register bank selection

2017-07-05 Thread Richard Henderson
Compute which register bank to use once at the start of translation. Signed-off-by: Richard Henderson --- target/sh4/translate.c | 43 ++- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/target/sh4/translate.c

[Qemu-devel] [PATCH 01/11] target/sh4: Use cmpxchg for movco

2017-07-05 Thread Richard Henderson
As for other targets, cmpxchg isn't quite right for ll/sc, suffering from an ABA race, but is sufficient to implement portable atomic operations. Signed-off-by: Richard Henderson --- target/sh4/cpu.h | 3 ++- target/sh4/translate.c | 56

[Qemu-devel] [PATCH 03/11] target/sh4: Handle user-space atomics

2017-07-05 Thread Richard Henderson
For uniprocessors, SH4 uses optimistic restartable atomic sequences. Upon an interrupt, a real kernel would simply notice magic values in the registers and reset the PC to the start of the sequence. For QEMU, we cannot do this in quite the same way. Instead, we notice the normal start of such a

[Qemu-devel] [PATCH 00/11] target/sh4 improvments

2017-07-05 Thread Richard Henderson
This fixes two problems with atomic operations on sh4, including an attempt at supporting the user-space atomics technique used by most sh-linux-user binaries. This is good enough to run the one occurrence in linux-user-test-0.3. I'm still downloading enough of a cross environment to be able to

Re: [Qemu-devel] [PATCH v4 20/21] block: Minimize raw use of bds->total_sectors

2017-07-05 Thread John Snow
On 07/05/2017 05:08 PM, Eric Blake wrote: > bdrv_is_allocated_above() was relying on intermediate->total_sectors, > which is a field that can have stale contents depending on the value > of intermediate->has_variable_length. An audit shows that we are safe > (we were first calling through

Re: [Qemu-devel] [PATCH v4 08/21] mirror: Switch MirrorBlockJob to byte-based

2017-07-05 Thread John Snow
On 07/05/2017 05:08 PM, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Continue by converting an > internal structure (no semantic change), and all references to the > buffer size. > > Add an assertion that our

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v4] virtio-net: enable configurable tx queue size

2017-07-05 Thread Michael S. Tsirkin
On Tue, Jul 04, 2017 at 07:03:51PM +0800, Wei Wang wrote: > On 07/04/2017 03:18 AM, Michael S. Tsirkin wrote: > > On Wed, Jun 28, 2017 at 10:37:59AM +0800, Wei Wang wrote: > > > This patch enables the virtio-net tx queue size to be configurable > > > between 256 (the default queue size) and 1024

Re: [Qemu-devel] [PATCH v4 04/21] stream: Drop reached_end for stream_complete()

2017-07-05 Thread John Snow
On 07/05/2017 05:08 PM, Eric Blake wrote: > stream_complete() skips the work of rewriting the backing file if > the job was cancelled, if data->reached_end is false, or if there > was an error detected (non-zero data->ret) during the streaming. > But note that in stream_run(), data->reached_end

Re: [Qemu-devel] [PATCH 2/2 v2] xenfb: Allow vkbd to connect without a DisplayState

2017-07-05 Thread Stefano Stabellini
On Mon, 3 Jul 2017, Owen Smith wrote: > If the vkbd device model is registered and the vfb device model > is not registered, the backend will not transition to connected. > If there is no DisplayState, then the absolute coordinates cannot > be scaled, and will remain in the range [0, 0x7fff]. >

Re: [Qemu-devel] [PATCH v1 1/2] target-arm: Move the regime_xxx helpers

2017-07-05 Thread Alistair Francis
On Fri, Jun 30, 2017 at 6:45 AM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Move the regime_xxx helpers in preparation for future code > that will reuse them. > > No functional change. > > Signed-off-by: Edgar E. Iglesias

Re: [Qemu-devel] [PATCH v2 0/2] Add global device ID in virt machine

2017-07-05 Thread Michael S. Tsirkin
On Wed, May 31, 2017 at 12:02:56PM +, Diana Madalina Craciun wrote: > On 05/25/2017 01:12 AM, Michael S. Tsirkin wrote: > > On Tue, May 23, 2017 at 02:12:43PM +0300, Diana Craciun wrote: > >> The NXP DPAA2 is a hardware architecture designed for high-speeed network > >> packet processing. The

Re: [Qemu-devel] [PATCH 1/2 v2] xenfb: Use qemu_input_handler_* calls directly

2017-07-05 Thread Stefano Stabellini
On Mon, 3 Jul 2017, Owen Smith wrote: > The xenvkbd input device uses functions from input-legacy.c > Use the appropriate qemu_input_handler_* functions instead > of calling functions in input-legacy.c that in turn call > the correct functions. > The bulk of this patch removes the extra layer of

Re: [Qemu-devel] [RFC 25/29] vhu: enable = false on get_vring_base

2017-07-05 Thread Michael S. Tsirkin
On Wed, Jul 05, 2017 at 06:16:17PM +0100, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Wed, Jun 28, 2017 at 08:00:43PM +0100, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > When we receive a

Re: [Qemu-devel] [PATCH v2 3/4] xen/mapcache: introduce xen_replace_cache_entry()

2017-07-05 Thread Stefano Stabellini
On Wed, 5 Jul 2017, Paul Durrant wrote: > > -Original Message- > > From: Igor Druzhinin > > Sent: 04 July 2017 17:47 > > To: Paul Durrant ; xen-de...@lists.xenproject.org; > > qemu-devel@nongnu.org > > Cc: sstabell...@kernel.org; Anthony Perard

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/5] spapr: DRC cleanups (part VI)

2017-07-05 Thread Michael Roth
Quoting Daniel Henrique Barboza (2017-07-05 16:53:57) > > > On 07/05/2017 08:04 AM, David Gibson wrote: > > On Tue, Jul 04, 2017 at 06:13:31PM -0300, Daniel Henrique Barboza wrote: > >> I just tested this patch set on top of current ppc-for-2.10 branch (which > >> contains > >> the patches from

Re: [Qemu-devel] [PATCH v2 3/4] xen/mapcache: introduce xen_replace_cache_entry()

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Igor Druzhinin wrote: > This new call is trying to update a requested map cache entry > according to the changes in the physmap. The call is searching > for the entry, unmaps it and maps again at the same place using > a new guest address. If the mapping is dummy this call will

Re: [Qemu-devel] [PATCH v2 4/4] xen: don't use xenstore to save/restore physmap anymore

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Igor Druzhinin wrote: > If we have a system with xenforeignmemory_map2() implemented > we don't need to save/restore physmap on suspend/restore > anymore. In case we resume a VM without physmap - try to > recreate the physmap during memory region restore phase and > remap map

Re: [Qemu-devel] [PATCH v2 2/4] xen/mapcache: add an ability to create dummy mappings

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Igor Druzhinin wrote: > Dummys are simple anonymous mappings that are placed instead > of regular foreign mappings in certain situations when we need > to postpone the actual mapping but still have to give a > memory region to QEMU to play with. > > This is planned to be used

Re: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-07-05 Thread Tian, Kevin
> From: Jean-Philippe Brucker > Sent: Wednesday, July 5, 2017 8:42 PM > > On 05/07/17 07:45, Tian, Kevin wrote: > >> From: Liu, Yi L > >> Sent: Monday, July 3, 2017 6:31 PM > >> > >> Hi Jean, > >> > >> > >>> > 2. Define a structure in include/uapi/linux/iommu.h(newly added > header > >>

Re: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-07-05 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Thursday, July 6, 2017 1:28 AM > > On Wed, 5 Jul 2017 13:42:03 +0100 > Jean-Philippe Brucker wrote: > > > On 05/07/17 07:45, Tian, Kevin wrote: > > >> From: Liu, Yi L > > >> Sent: Monday, July 3,

Re: [Qemu-devel] [PATCH v2 1/4] xen: move physmap saving into a separate function

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Igor Druzhinin wrote: > Non-functional change. > > Signed-off-by: Igor Druzhinin Unless you change something from a previous version, please retain the acked-by and reviewed-by that were given (see

Re: [Qemu-devel] [PATCH v2 01/15] block: add default implementations for bdrv_co_get_block_status()

2017-07-05 Thread Eric Blake
On 07/03/2017 05:14 PM, Eric Blake wrote: > From: Manos Pitsidianakis > > bdrv_co_get_block_status_from_file() and > bdrv_co_get_block_status_from_backing() set *file to bs->file and > bs->backing respectively, so that bdrv_co_get_block_status() can recurse > to them.

Re: [Qemu-devel] [Qemu-block] [PATCH v2 00/11] Block layer thread-safety, part 2

2017-07-05 Thread Paolo Bonzini
On 29/06/2017 15:27, Paolo Bonzini wrote: > This part takes care of drivers and devices, making sure that they can > accept concurrent I/O from multiple AioContext. > > The following drivers are thread-safe without using any QemuMutex/CoMutex: > crypto, gluster, null, rbd, win32-aio. NBD has

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/5] spapr: DRC cleanups (part VI)

2017-07-05 Thread Daniel Henrique Barboza
On 07/05/2017 08:04 AM, David Gibson wrote: On Tue, Jul 04, 2017 at 06:13:31PM -0300, Daniel Henrique Barboza wrote: I just tested this patch set on top of current ppc-for-2.10 branch (which contains the patches from part V). It applied cleanly but required a couple of trivial fixes to build

Re: [Qemu-devel] [PATCH 4/7] dump: add vmcoreinfo ELF note

2017-07-05 Thread Marc-André Lureau
Hi On Wed, Jul 5, 2017 at 1:48 AM, Laszlo Ersek wrote: > On 06/29/17 15:23, Marc-André Lureau wrote: >> Read the vmcoreinfo ELF PT_NOTE from guest memory when vmcoreinfo >> device provides the location, and write it as an ELF note in the dump. >> >> There are now 2 possible

Re: [Qemu-devel] qemu_system_reset_request() broken w.r.t BQL locking regime

2017-07-05 Thread Alex Bennée
Peter Maydell writes: > On 5 July 2017 at 20:30, Alex Bennée wrote: >> >> Peter Maydell writes: >> >>> On 5 July 2017 at 17:01, Alex Bennée wrote: An interesting bug was reported on #qemu

Re: [Qemu-devel] [PATCH 12/17] migration: add postcopy migration of dirty bitmaps

2017-07-05 Thread John Snow
On 07/05/2017 05:24 AM, Vladimir Sementsov-Ogievskiy wrote: > 16.02.2017 16:04, Fam Zheng wrote: >>> +dbms->node_name = bdrv_get_node_name(bs); >>> +if (!dbms->node_name || dbms->node_name[0] == '\0') { >>> +dbms->node_name = bdrv_get_device_name(bs); >>>

Re: [Qemu-devel] [PATCH v5 03/13] char: chardevice hotswap

2017-07-05 Thread Paolo Bonzini
> So instead we'll need to use proper locks in each of the front-ends? Hi, the only front-end actually writing from multiple threads is the monitor. You can skip everything else, as it will be locked on the "big QEMU lock". Paolo > Or do you mean that it can be skipped for the most of them? I

[Qemu-devel] [PATCH v4 20/21] block: Minimize raw use of bds->total_sectors

2017-07-05 Thread Eric Blake
bdrv_is_allocated_above() was relying on intermediate->total_sectors, which is a field that can have stale contents depending on the value of intermediate->has_variable_length. An audit shows that we are safe (we were first calling through bdrv_co_get_block_status() which in turn calls

[Qemu-devel] [PATCH v4 18/21] backup: Switch backup_run() to byte-based

2017-07-05 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 backups to track by bytes instead of sectors (although we are still guaranteed that we iterate by steps that are cluster-aligned). Signed-off-by: Eric

[Qemu-devel] [PATCH v4 15/21] backup: Switch BackupBlockJob to byte-based

2017-07-05 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 structure (no semantic change), and all references to tracking progress. Drop a redundant local variable bytes_per_cluster. Signed-off-by: Eric Blake

Re: [Qemu-devel] [PATCH v11 6/6] trace: [trivial] Statically enable all guest events

2017-07-05 Thread Eric Blake
On 07/04/2017 03:54 AM, Lluís Vilanova wrote: > The existing optimizations makes it feasible to have them available on all > builds. While this change may feel trivial, I think it is a misnomer to include "[trivial]" in the subject line, and I also think it should not go in through qemu-trivial.

[Qemu-devel] [PATCH v4 17/21] backup: Switch backup_do_cow() to byte-based

2017-07-05 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: John Snow Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH v4 14/21] block: Drop unused bdrv_round_sectors_to_clusters()

2017-07-05 Thread Eric Blake
Now that the last user [mirror_iteration()] has converted to using bytes, we no longer need a function to round sectors to clusters. Signed-off-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Jeff Cody --- v3-v4: no change v2: hoist to

[Qemu-devel] [PATCH v4 11/21] mirror: Switch mirror_cow_align() to byte-based

2017-07-05 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 add mirror_clip_bytes() as a counterpart to mirror_clip_sectors(). Some of the conversion is a bit tricky, requiring temporaries

[Qemu-devel] [PATCH v4 16/21] backup: Switch block_backup.h to byte-based

2017-07-05 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Continue by converting the public interface to backup jobs (no semantic change), including a change to CowRequest to track by bytes instead of cluster indices. Note that this does not

[Qemu-devel] [PATCH v4 12/21] mirror: Switch mirror_do_read() to byte-based

2017-07-05 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: John Snow Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH v4 08/21] mirror: Switch MirrorBlockJob to byte-based

2017-07-05 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 structure (no semantic change), and all references to the buffer size. Add an assertion that our use of s->granularity >> BDRV_SECTOR_BITS (necessary for

[Qemu-devel] [PATCH v4 19/21] block: Make bdrv_is_allocated() byte-based

2017-07-05 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 13/21] mirror: Switch mirror_iteration() to byte-based

2017-07-05 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 mirroring to track by bytes instead of sectors (although we are still guaranteed that we iterate by steps that are both sector-aligned and multiples of

[Qemu-devel] [PATCH v4 21/21] block: Make bdrv_is_allocated_above() byte-based

2017-07-05 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 00/21] make bdrv_is_allocated[_above] byte-based

2017-07-05 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 05/21] stream: Switch stream_run() to byte-based

2017-07-05 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 streaming to track by bytes instead of sectors (although we are still guaranteed that we iterate by steps that are sector-aligned). Signed-off-by:

[Qemu-devel] [PATCH v4 02/21] trace: Show blockjob actions via bytes, not sectors

2017-07-05 Thread Eric Blake
Upcoming patches are going to switch to byte-based interfaces instead of sector-based. Even worse, trace_backup_do_cow_enter() had a weird mix of cluster and sector indices. The trace interface is low enough that there are no stability guarantees, and therefore nothing wrong with changing our

[Qemu-devel] [PATCH v4 06/21] commit: Switch commit_populate() to byte-based

2017-07-05 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Start by converting an internal function (no semantic change). Signed-off-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH v4 03/21] stream: Switch stream_populate() to byte-based

2017-07-05 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Start by converting an internal function (no semantic change). Signed-off-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH v4 10/21] mirror: Update signature of mirror_clip_sectors()

2017-07-05 Thread Eric Blake
Rather than having a void function that modifies its input in-place as the output, change the signature to reduce a layer of indirection and return the result. Suggested-by: John Snow Signed-off-by: Eric Blake Reviewed-by: John Snow

[Qemu-devel] [PATCH v4 07/21] commit: Switch commit_run() to byte-based

2017-07-05 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 committing to track by bytes instead of sectors (although we are still guaranteed that we iterate by steps that are sector-aligned). Signed-off-by:

[Qemu-devel] [PATCH v4 04/21] stream: Drop reached_end for stream_complete()

2017-07-05 Thread Eric Blake
stream_complete() skips the work of rewriting the backing file if the job was cancelled, if data->reached_end is false, or if there was an error detected (non-zero data->ret) during the streaming. But note that in stream_run(), data->reached_end is only set if the loop ran to completion, and

[Qemu-devel] [PATCH v4 09/21] mirror: Switch mirror_do_zero_or_discard() to byte-based

2017-07-05 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: John Snow Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH v4 01/21] blockjob: Track job ratelimits via bytes, not sectors

2017-07-05 Thread Eric Blake
The user interface specifies job rate limits in bytes/second. It's pointless to have our internal representation track things in sectors/second, particularly since we want to move away from sector-based interfaces. Fix up a doc typo found while verifying that the ratelimit code handles the

[Qemu-devel] Modular hardware emulation

2017-07-05 Thread Tom Cook
I'm using qemu to emulate a certain fruit-flavoured single-board computer - which is fantastic for testing changes configuration, by the way. We have a bit of custom hardware attached to that single-board computer - essentially an SPI-slave 8-channel ADC with some analog electronics attached.

Re: [Qemu-devel] trigonometric functions in softfloat

2017-07-05 Thread Aurelien Jarno
Hi, On 2017-07-05 10:25, Laurent Vivier wrote: > Hi, > > Thomas has pointed out that WinUAE[1] has an updated softfloat library > implementing missing operations for 680x0. > > Do you think these changes can be merged in QEMU? From the licensing point of view, they seems to use the

Re: [Qemu-devel] [PATCH v3 07/20] mirror: Switch MirrorBlockJob to byte-based

2017-07-05 Thread Eric Blake
On 07/05/2017 06:42 AM, Kevin Wolf wrote: > Am 27.06.2017 um 21:24 hat Eric Blake geschrieben: >> We are gradually converting to byte-based interfaces, as they are >> easier to reason about than sector-based. Continue by converting an >> internal structure (no semantic change), and all references

Re: [Qemu-devel] qemu_system_reset_request() broken w.r.t BQL locking regime

2017-07-05 Thread Alex Bennée
Peter Maydell writes: > On 5 July 2017 at 20:30, Alex Bennée wrote: >> >> Peter Maydell writes: >> >>> On 5 July 2017 at 17:01, Alex Bennée wrote: An interesting bug was reported on #qemu

Re: [Qemu-devel] [PATCH v4 5/5] tests: Add check-qobject for equality tests

2017-07-05 Thread Eric Blake
On 07/05/2017 02:04 PM, Max Reitz wrote: > Add a new test file (check-qobject.c) for unit tests that concern > QObjects as a whole. > > Its only purpose for now is to test the qobject_is_equal() function. > > Signed-off-by: Max Reitz > --- > tests/Makefile.include | 4 +- >

Re: [Qemu-devel] [PATCH v4 3/5] block: qobject_is_equal() in bdrv_reopen_prepare()

2017-07-05 Thread Eric Blake
On 07/05/2017 02:04 PM, Max Reitz wrote: > Currently, bdrv_reopen_prepare() assumes that all BDS options are > strings. However, this is not the case if the BDS has been created > through the json: pseudo-protocol or blockdev-add. > > Note that the user-invokable reopen command is an HMP command,

Re: [Qemu-devel] [PATCH v4 2/5] qapi: Add qobject_is_equal()

2017-07-05 Thread Eric Blake
On 07/05/2017 02:04 PM, Max Reitz wrote: > This generic function (along with its implementations for different > types) determines whether two QObjects are equal. > > Signed-off-by: Max Reitz > --- > Markus also proposed just reporting two values as unequal if they have a >

Re: [Qemu-devel] qemu_system_reset_request() broken w.r.t BQL locking regime

2017-07-05 Thread Peter Maydell
On 5 July 2017 at 20:30, Alex Bennée wrote: > > Peter Maydell writes: > >> On 5 July 2017 at 17:01, Alex Bennée wrote: >>> An interesting bug was reported on #qemu today. It was bisected to >>> 8d04fb55 (drop global lock

Re: [Qemu-devel] qemu_system_reset_request() broken w.r.t BQL locking regime

2017-07-05 Thread Alex Bennée
Paolo Bonzini writes: > On 05/07/2017 18:14, Peter Maydell wrote: >>> - Guest resets board, writing to some hw address (e.g. >>> arm_sysctl_write) >>> - This triggers qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET) >>> - We exit iowrite and drop the BQL >>>

Re: [Qemu-devel] qemu_system_reset_request() broken w.r.t BQL locking regime

2017-07-05 Thread Alex Bennée
Peter Maydell writes: > On 5 July 2017 at 17:01, Alex Bennée wrote: >> An interesting bug was reported on #qemu today. It was bisected to >> 8d04fb55 (drop global lock for TCG) and only occurred when QEMU was run >> with taskset -c 0.

[Qemu-devel] [PATCH v4 5/5] tests: Add check-qobject for equality tests

2017-07-05 Thread Max Reitz
Add a new test file (check-qobject.c) for unit tests that concern QObjects as a whole. Its only purpose for now is to test the qobject_is_equal() function. Signed-off-by: Max Reitz --- tests/Makefile.include | 4 +- qobject/qnum.c | 16 +- tests/check-qobject.c |

[Qemu-devel] [PATCH v4 4/5] iotests: Add test for non-string option reopening

2017-07-05 Thread Max Reitz
Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- tests/qemu-iotests/133 | 9 + tests/qemu-iotests/133.out | 5 + 2 files changed, 14 insertions(+) diff --git a/tests/qemu-iotests/133 b/tests/qemu-iotests/133 index 9d35a6a..af6b3e1 100755

[Qemu-devel] [PATCH v4 1/5] qapi/qnull: Add own header

2017-07-05 Thread Max Reitz
Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- include/qapi/qmp/qnull.h | 26 ++ include/qapi/qmp/qobject.h | 8 include/qapi/qmp/types.h | 1 + qobject/qnull.c

[Qemu-devel] [PATCH v4 3/5] block: qobject_is_equal() in bdrv_reopen_prepare()

2017-07-05 Thread Max Reitz
Currently, bdrv_reopen_prepare() assumes that all BDS options are strings. However, this is not the case if the BDS has been created through the json: pseudo-protocol or blockdev-add. Note that the user-invokable reopen command is an HMP command, so you can only specify strings there. Therefore,

[Qemu-devel] [PATCH v4 2/5] qapi: Add qobject_is_equal()

2017-07-05 Thread Max Reitz
This generic function (along with its implementations for different types) determines whether two QObjects are equal. Signed-off-by: Max Reitz --- Markus also proposed just reporting two values as unequal if they have a different internal representation (i.e. a different QNum

[Qemu-devel] [PATCH v4 0/5] block: Don't compare strings in bdrv_reopen_prepare()

2017-07-05 Thread Max Reitz
bdrv_reopen_prepare() assumes that all BDS options are strings, which is not necessarily correct. This series introduces a new qobject_is_equal() function which can be used to test whether any options have changed, independently of their type. v4: - Patch 1: Kept, because Markus gave his R-b

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

2017-07-05 Thread Alistair Francis
On Sun, Jul 2, 2017 at 9:45 PM, Subbaraya Sundeep wrote: The patch title shouldn't end in a full stop. > Smartfusion2 SoC has hardened Microcontroller subsystem > and flash based FPGA fabric. This patch adds support for > Microcontroller subsystem in the SoC. > >

Re: [Qemu-devel] [Qemu devel v6 PATCH 3/5] msf2: Add Smartfusion2 SPI controller

2017-07-05 Thread Alistair Francis
On Sun, Jul 2, 2017 at 9:45 PM, Subbaraya Sundeep wrote: > Modelled Microsemi's Smartfusion2 SPI controller. > > Signed-off-by: Subbaraya Sundeep > --- > hw/ssi/Makefile.objs | 1 + > hw/ssi/mss-spi.c | 414 >

Re: [Qemu-devel] [Qemu devel v6 PATCH 2/5] msf2: Microsemi Smartfusion2 System Register block.

2017-07-05 Thread Alistair Francis
On Sun, Jul 2, 2017 at 9:45 PM, Subbaraya Sundeep wrote: > Added Sytem register block of Smartfusion2. > This block has PLL registers which are accessed by guest. > > Signed-off-by: Subbaraya Sundeep > --- > hw/misc/Makefile.objs | 1 + >

Re: [Qemu-devel] Managing architectural restrictions with -device and libvirt

2017-07-05 Thread Markus Armbruster
Mark Cave-Ayland writes: > On 05/07/17 16:46, Markus Armbruster wrote: > > I've been working on a patchset that brings the sun4u machine on > qemu-system-sparc64 much closer to a real Ultra 5, however due to > various design restrictions I need to be

Re: [Qemu-devel] [Qemu devel v6 PATCH 1/5] msf2: Add Smartfusion2 System timer

2017-07-05 Thread Alistair Francis
On Wed, Jul 5, 2017 at 10:56 AM, Alistair Francis wrote: > On Sun, Jul 2, 2017 at 9:45 PM, Subbaraya Sundeep > wrote: >> Modelled System Timer in Microsemi's Smartfusion2 Soc. >> Timer has two 32bit down counters and two interrupts. >> >>

Re: [Qemu-devel] [Qemu devel v6 PATCH 1/5] msf2: Add Smartfusion2 System timer

2017-07-05 Thread Alistair Francis
On Sun, Jul 2, 2017 at 9:45 PM, Subbaraya Sundeep wrote: > Modelled System Timer in Microsemi's Smartfusion2 Soc. > Timer has two 32bit down counters and two interrupts. > > Signed-off-by: Subbaraya Sundeep > --- > hw/timer/Makefile.objs |

Re: [Qemu-devel] [PATCH v3 3/5] block: qobject_is_equal() in bdrv_reopen_prepare()

2017-07-05 Thread Max Reitz
On 2017-07-05 09:14, Markus Armbruster wrote: > Max Reitz writes: > >> Currently, bdrv_reopen_prepare() assumes that all BDS options are >> strings. However, this is not the case if the BDS has been created >> through the json: pseudo-protocol or blockdev-add. >> >> Note that

Re: [Qemu-devel] [PATCH] hw/s390x/ipl: Fix endianness problem with netboot_start_addr

2017-07-05 Thread Christian Borntraeger
On 07/05/2017 05:25 PM, Thomas Huth wrote: > The start address has to be stored in big endian byte order > in the iplb.ccw block for the guest. > > Signed-off-by: Thomas Huth > --- > hw/s390x/ipl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [Qemu-devel] [PATCH v5 03/13] char: chardevice hotswap

2017-07-05 Thread Anton Nefedov
On 07/05/2017 06:09 PM, Paolo Bonzini wrote: On 05/07/2017 16:01, Anton Nefedov wrote: This patch adds a possibility to change a char device without a frontend removal. 1. Ideally, it would have to happen transparently to a frontend, i.e. frontend would continue its regular operation.

[Qemu-devel] [RFC v3 2/3] qemu-error: Implement a more generic error reporting

2017-07-05 Thread Alistair Francis
This patch converts the existing error_vreport() function into a generic qmesg_vreport() function that takes an enum describing the information to be reported. As part of this change a new qmesg_report() function is added as well with the same capability. To maintain full compatibility the

Re: [Qemu-devel] [RFC 25/29] vhu: enable = false on get_vring_base

2017-07-05 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Wed, Jun 28, 2017 at 08:00:43PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > When we receive a GET_VRING_BASE message set enable = false > > to stop any new received packets modifying

[Qemu-devel] [RFC v3 3/3] char-socket: Report TCP socket waiting as information

2017-07-05 Thread Alistair Francis
When QEMU is waiting for a TCP socket connection it reports that message as an error. This isn't an error it is just information so let's change the report to use info_report() instead. Signed-off-by: Alistair Francis --- chardev/char-socket.c | 4 ++-- 1 file

  1   2   3   4   >