Re: [Qemu-devel] [PATCH v5 3/4] net/net: Convert parse_host_port() to Error

2017-06-27 Thread Markus Armbruster
Mao Zhongyi writes: > Hi, Markus > > On 06/27/2017 04:04 PM, Markus Armbruster wrote: >> Mao Zhongyi writes: >> >>> Cc: berra...@redhat.com >>> Cc: kra...@redhat.com >>> Cc: pbonz...@redhat.com >>> Cc: jasow...@redhat.com >>> Cc:

[Qemu-devel] [PATCH 2/2] [TEST] Collect TLB and victim TLB hit/miss stats

2017-06-27 Thread Pranith Kumar
I used the following patch to collect hit/miss TLB ratios for a few benchmarks. The results can be found here: http://imgur.com/a/gee1o Please note that these results also include boot/shutdown as the per-region instrumentation patch came later. Signed-off-by: Pranith Kumar

[Qemu-devel] [PATCH 1/2] [TEST] aarch64: Use pmuserenr_el0 register for instrumentation

2017-06-27 Thread Pranith Kumar
We need a way for the benchmark running in the guest to indicate us to start/stop our instrumentation. On x86, we could use the 'cpuid' instruction along with an appropriately populated 'eax' register. However, no such dummy instruction exists for aarch64. So we modify the permission bits for

[Qemu-devel] [TEST PATCH 0/2] Instrumentation and TLB stats

2017-06-27 Thread Pranith Kumar
The following two patches are what I use to instrument guest code and collect TLB hit/miss information. These patches are for informational and discussion purposes only. Pranith Kumar (2): [TEST] aarch64: Use pmuserenr_el0 register for instrumentation [TEST] Collect TLB stats along with

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

2017-06-27 Thread Philippe Mathieu-Daudé
On Tue, Jun 27, 2017 at 5:45 PM, Alistair Francis wrote: > Rename the error_print_loc() function in preperation for using it to preparation > print warnings as well. > > Signed-off-by: Alistair Francis Reviewed-by: Philippe

Re: [Qemu-devel] [PATCH qemu v8 2/2] memory/iommu: introduce IOMMUMemoryRegionClass

2017-06-27 Thread Alexey Kardashevskiy
On 21/06/17 17:26, David Gibson wrote: > On Wed, Jun 21, 2017 at 12:05:08PM +1000, Alexey Kardashevskiy wrote: >> On 14/06/17 16:36, Alexey Kardashevskiy wrote: >>> This finishes QOM'fication of IOMMUMemoryRegion by introducing >>> a IOMMUMemoryRegionClass. This also provides a fastpath analog for

Re: [Qemu-devel] [RFC v1 2/4] util/oslib-win32: Remove invalid check

2017-06-27 Thread Philippe Mathieu-Daudé
On Tue, Jun 27, 2017 at 8:57 PM, Alistair Francis wrote: > There is no way nhandles can be zero in this section so that part of the > if statement will always be false. Let's just remove it to make the code > easier to read. > > Signed-off-by: Alistair Francis

Re: [Qemu-devel] [PATCH v5 3/4] net/net: Convert parse_host_port() to Error

2017-06-27 Thread Mao Zhongyi
Hi, Markus On 06/27/2017 04:04 PM, Markus Armbruster wrote: Mao Zhongyi writes: Cc: berra...@redhat.com Cc: kra...@redhat.com Cc: pbonz...@redhat.com Cc: jasow...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi ---

Re: [Qemu-devel] [PATCH v5 2/4] net/socket: Convert error message to Error

2017-06-27 Thread Mao Zhongyi
Hi, Markus On 06/27/2017 03:43 PM, Markus Armbruster wrote: Suggest "net/socket: Convert several helper functions to Error". OK, I see. Mao Zhongyi writes: Currently, net_socket_mcast_create(), net_socket_fd_init_dgram() and net_socket_fd_init() use the

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

2017-06-27 Thread Wei Wang
This patch enables the virtio-net tx queue size to be configurable between 256 (the default queue size) and 1024 by the user when the vhost-user backend is used. Currently, the maximum tx queue size for other backends is 512 due to the following limitations: - QEMU backend: the QEMU backend

[Qemu-devel] [PATCH] exec: fix access to ram_list.dirty_memory when sync dirty bitmap

2017-06-27 Thread Haozhong Zhang
In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd argument 'start' is relative to the start of the ramblock 'rb'. When it's used to access the dirty memory bitmap of ram_list (i.e. ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]->blocks[]), an offset to the start of all RAM (i.e.

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-27 Thread joserz
On Fri, Jun 23, 2017 at 04:10:55PM +0200, Laurent Vivier wrote: > On 23/06/2017 11:21, David Gibson wrote: > > On Thu, Jun 22, 2017 at 01:31:24PM +0200, Thomas Huth wrote: > >> On 22.06.2017 13:26, Laurent Vivier wrote: > >>> CPU_POWERPC_POWER9_DD1 is 0x004E0100, so this is the POWER9 v1.0. > >>>

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-27 Thread Suraj Jitindar Singh
On Fri, 2017-06-23 at 18:05 +0200, Thomas Huth wrote: > On 23.06.2017 11:21, David Gibson wrote: > > On Thu, Jun 22, 2017 at 01:31:24PM +0200, Thomas Huth wrote: > > > On 22.06.2017 13:26, Laurent Vivier wrote: > > > > CPU_POWERPC_POWER9_DD1 is 0x004E0100, so this is the POWER9 > > > > v1.0. > > >

Re: [Qemu-devel] [PATCH v3 20/20] block: Make bdrv_is_allocated_above() byte-based

2017-06-27 Thread Xie Changlong
在 6/28/2017 3:24 AM, 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

Re: [Qemu-devel] [PATCH v3 15/20] backup: Switch block_backup.h to byte-based

2017-06-27 Thread Xie Changlong
在 6/28/2017 3:24 AM, 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

Re: [Qemu-devel] [RFC v1 3/3] char-socket: Report TCP socket waiting as a warning

2017-06-27 Thread Alistair Francis
On Tue, Jun 27, 2017 at 2:10 PM, Edgar E. Iglesias wrote: > On Tue, Jun 27, 2017 at 01:45:48PM -0700, 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 a warnign so let's change

Re: [Qemu-devel] [RFC v1 2/3] util/qemu-error: Add a warning_report() function

2017-06-27 Thread Alistair Francis
On Tue, Jun 27, 2017 at 3:21 PM, Thomas Huth wrote: > On 27.06.2017 22:45, Alistair Francis wrote: >> Add a functino which can be used similarly to error_report() execpt to >> inform the users about warnings instead of errors. > > s/functino/function/ > s/execpt/except/ Thanks,

Re: [Qemu-devel] Getting rid of xen_init_display() (and its dubious call into main_loop_wait())

2017-06-27 Thread Stefano Stabellini
On Tue, 27 Jun 2017, Peter Maydell wrote: > So, there is exactly one caller of main_loop_wait() in the tree that > passes it 'true' as an argument. That caller is in xen_init_display() > in hw/dispaly/xenfb.c. The function was added in 2009 with the comment > "FIXME/TODO: Kill this. Temporary

[Qemu-devel] [RFC v1 1/4] util/aio-win32: Only select on what we are actually waiting for

2017-06-27 Thread Alistair Francis
Signed-off-by: Alistair Francis Acked-by: Edgar E. Iglesias --- util/aio-win32.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/util/aio-win32.c b/util/aio-win32.c index bca496a47a..949979c2f5 100644

Re: [Qemu-devel] [PATCH v3 1/7] target/m68k: add fscc.

2017-06-27 Thread Laurent Vivier
Le 27/06/2017 à 22:00, Richard Henderson a écrit : > On 06/27/2017 12:12 PM, Laurent Vivier wrote: >> case 3: /* Ordered Greater than or Equal Z || !(A || N) */ >> case 19: /* Greater than or Equal Z || !(A || N) */ >> +g_assert(FPSR_CC_A == (FPSR_CC_N >> 3)); >> +

[Qemu-devel] [RFC v1 0/4] Windows runtime improvements

2017-06-27 Thread Alistair Francis
At Xilinx we have started to run our fork of QEMU on Windows and are starting to distrubute this to customers. As part of this QEMU is launched from an Eclipse based GUI on Windows hosts. This uncovered a few performance issues in QEMU when running on CPU restricted machines. What we see is that

[Qemu-devel] [RFC v1 4/4] util/oslib-win32: Recursivly pass the timeout

2017-06-27 Thread Alistair Francis
Signed-off-by: Alistair Francis Acked-by: Edgar E. Iglesias --- util/oslib-win32.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/util/oslib-win32.c b/util/oslib-win32.c index

[Qemu-devel] [RFC v1 3/4] util/oslib-win32: Fix up if conditional

2017-06-27 Thread Alistair Francis
Signed-off-by: Alistair Francis Acked-by: Edgar E. Iglesias --- util/oslib-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/oslib-win32.c b/util/oslib-win32.c index 7ec0f8e083..a015e1ac96 100644 ---

[Qemu-devel] [RFC v1 2/4] util/oslib-win32: Remove invalid check

2017-06-27 Thread Alistair Francis
There is no way nhandles can be zero in this section so that part of the if statement will always be false. Let's just remove it to make the code easier to read. Signed-off-by: Alistair Francis Acked-by: Edgar E. Iglesias ---

Re: [Qemu-devel] [PATCH v4 3/4] virtio-9p: break device if buffers are misconfigured

2017-06-27 Thread Stefano Stabellini
On Tue, 27 Jun 2017, Greg Kurz wrote: > On Mon, 26 Jun 2017 16:22:23 -0700 (PDT) > Stefano Stabellini wrote: > > > On Fri, 23 Jun 2017, Greg Kurz wrote: > > > The 9P protocol is transport agnostic: if the guest misconfigured the > > > buffers, the best we can do is to set

[Qemu-devel] [PATCH 2/2] block: add default implementations for bdrv_co_get_block_status()

2017-06-27 Thread 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. Future block drivers won't have to duplicate code to implement this. Signed-off-by: Manos Pitsidianakis

[Qemu-devel] [PATCH 1/2] block: pass bdrv_* methods to bs->file by default

2017-06-27 Thread Manos Pitsidianakis
The following functions fail if bs->drv does not implement them: bdrv_probe_blocksizes bdrv_probe_geometry bdrv_truncate bdrv_has_zero_init bdrv_get_info bdrv_media_changed bdrv_eject bdrv_lock_medium bdrv_co_ioctl Instead, the call should be passed to bs->file if it exists, to allow filter

[Qemu-devel] [PATCH 0/2] block: block driver callbacks fixes

2017-06-27 Thread Manos Pitsidianakis
This series makes implementing some of the bdrv_* callbacks easier for block drivers by passing requests to bs->file if bs->drv doesn't implement it instead of failing, and adding default bdrv_co_get_block_status() implementations. This based against Kevin Wolf's block branch, commit

Re: [Qemu-devel] [RFC v1 2/3] util/qemu-error: Add a warning_report() function

2017-06-27 Thread Thomas Huth
On 27.06.2017 22:45, Alistair Francis wrote: > Add a functino which can be used similarly to error_report() execpt to > inform the users about warnings instead of errors. s/functino/function/ s/execpt/except/ And could we maybe call the function "warn_report" or something else instead? I often

Re: [Qemu-devel] [RFC PATCH 01/14] pc-bios/s390-ccw: Add the libc from the SLOF firmware

2017-06-27 Thread Thomas Huth
On 27.06.2017 17:32, David Hildenbrand wrote: > On 27.06.2017 13:48, Thomas Huth wrote: >> To be able to use some more advanced libc functions in the s390-ccw >> firmware, like printf() and malloc(), we need a better libc here. >> This patch adds the C library from the SLOF firmware (taken from >>

[Qemu-devel] [PULL 3/3] xen-disk: add support for multi-page shared rings

2017-06-27 Thread Stefano Stabellini
From: Paul Durrant The blkif protocol has had provision for negotiation of multi-page shared rings for some time now and many guest OS have support in their frontend drivers. This patch makes the necessary modifications to xen-disk support a shared ring up to order 4

Re: [Qemu-devel] [Xen-devel] [PATCH v2 0/3] xen-disk: performance improvements

2017-06-27 Thread Stefano Stabellini
On Wed, 21 Jun 2017, Paul Durrant wrote: > Paul Durrant (3): > xen-disk: only advertize feature-persistent if grant copy is not > available > xen-disk: add support for multi-page shared rings > xen-disk: use an IOThread per instance > > hw/block/trace-events | 7 ++ >

[Qemu-devel] [PULL 2/3] xen-disk: only advertize feature-persistent if grant copy is not available

2017-06-27 Thread Stefano Stabellini
From: Paul Durrant If grant copy is available then it will always be used in preference to persistent maps. In this case feature-persistent should not be advertized to the frontend, otherwise it may needlessly copy data into persistently granted buffers. Signed-off-by:

[Qemu-devel] [PATCH 0/3] please pull xen-20170627-tag

2017-06-27 Thread Stefano Stabellini
-dm.git tags/xen-20170627-tag for you to fetch changes up to 3284fad7283596033cb810b4788fd1bb43312dbd: xen-disk: add support for multi-page shared rings (2017-06-27 15:01:56 -0700) Xen 2017/06/27

[Qemu-devel] [PULL 1/3] xen/disk: don't leak stack data via response ring

2017-06-27 Thread Stefano Stabellini
Rather than constructing a local structure instance on the stack, fill the fields directly on the shared ring, just like other (Linux) backends do. Build on the fact that all response structure flavors are actually identical (aside from alignment and padding at the end). This is XSA-216.

Re: [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS

2017-06-27 Thread Thomas Huth
On 27.06.2017 23:15, Alexander Graf wrote: > > On 27.06.17 13:48, Thomas Huth wrote: [...] >> - The code only supports TFTP (via UDP) ... I think that is OK for >>most use-cases, but if we ever want to support network booting >>via HTTP or something else that is based on TCP, we would

Re: [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS

2017-06-27 Thread Thomas Huth
On 27.06.2017 17:50, Viktor Mihajlovski wrote: > On 27.06.2017 13:48, Thomas Huth wrote: [...] >> The patches are still in a rough shape, but before I continue here, >> I though I'd get some feedback first. Specifically: >> >> - This adds a lot of additional code to the s390-ccw firmware (and >>

Re: [Qemu-devel] [RFC 15/15] [test only] Use 'Error *err[static 1]' instead of 'Error **errp' to catch NULL errp arguments

2017-06-27 Thread Eduardo Habkost
On Tue, Jun 27, 2017 at 03:12:25PM -0500, Eric Blake wrote: > On 06/19/2017 08:26 AM, Eduardo Habkost wrote: > > >> Is gcc's __attribute__((nonnull)) any better? It seems to apply > >> to the whole function prototype rather than an individual argument > >> though so probably not :-( > > > > It's

Re: [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS

2017-06-27 Thread Alexander Graf
On 27.06.17 13:48, Thomas Huth wrote: It's already possible to do a network boot of an s390x guest with an external netboot image (based on a Linux installation), but it would be much more convenient if the s390-ccw firmware supported network booting right out of the box, without the need to

Re: [Qemu-devel] [PATCH] qga:windows os lost ip when network nic change pic order

2017-06-27 Thread Eric Blake
On 06/24/2017 12:39 AM, indiff...@126.com wrote: > From: "yin.zuowei" > > Signed-off-by: yin.zuowei > > bug description: In the windows virtual machine, if there are multiple > network cards, the hypothesis is that A/B/C is equipped with a different IP >

Re: [Qemu-devel] [RFC v1 3/3] char-socket: Report TCP socket waiting as a warning

2017-06-27 Thread Edgar E. Iglesias
On Tue, Jun 27, 2017 at 01:45:48PM -0700, 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 a warnign so let's change the report to > use warning_report() instead. Hi Alistair, Isn't this more like an

Re: [Qemu-devel] [PATCH v3 2/7] target/m68k: add fmovecr

2017-06-27 Thread Philippe Mathieu-Daudé
On 06/27/2017 04:12 PM, Laurent Vivier wrote: fmovecr moves a floating point constant from the FPU ROM to a floating point register. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/fpu_helper.c | 30

Re: [Qemu-devel] [PATCH v2 2/7] target/m68k: add fmovecr

2017-06-27 Thread Philippe Mathieu-Daudé
On 06/27/2017 02:58 PM, Laurent Vivier wrote: Le 27/06/2017 à 17:45, Philippe Mathieu-Daudé a écrit : +static const floatx80 fpu_rom[128] = { +[0x00] = floatx80_pi, /* Pi */ +[0x0b] = make_floatx80(0x3ffd, 0x9a209a84fbcff798ULL), /* Log10(2) */ +

[Qemu-devel] [RFC v1 3/3] char-socket: Report TCP socket waiting as a warning

2017-06-27 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 a warnign so let's change the report to use warning_report() instead. Signed-off-by: Alistair Francis --- chardev/char-socket.c | 2 +- 1 file changed, 1

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

2017-06-27 Thread Alistair Francis
Rename the error_print_loc() function in preperation for using it to print warnings as well. Signed-off-by: Alistair Francis --- util/qemu-error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/qemu-error.c b/util/qemu-error.c index

[Qemu-devel] [RFC v1 2/3] util/qemu-error: Add a warning_report() function

2017-06-27 Thread Alistair Francis
Add a functino which can be used similarly to error_report() execpt to inform the users about warnings instead of errors. The warning print does not include the timestamp and instead will preface the messages with a 'warning: '. Signed-off-by: Alistair Francis ---

[Qemu-devel] [RFC v1 0/3] Implement a warning_report function

2017-06-27 Thread Alistair Francis
QEMU currently has a standard method to report errors with error_repot(). This ensure a sane and standard format when printing errors. This series is attempting to add the same functionality for warnings. At the moment only one error is being converted, I wanted to get the implementation nailed

[Qemu-devel] SPARC64 supported processors

2017-06-27 Thread Pasha Tatashin
Hi, I am trying to evaluate the current qemu support for sparc64 processors. First, it seems -smp is not supported for any processor, is this correct? When I set -smp greater than 1, I am getting: qemu-system-sparc64: Number of SMP CPUs requested (2) exceeds max CPUs supported by machine

Re: [Qemu-devel] [RFC 00/15] Error API: Flag errors in *errp even if errors are being ignored

2017-06-27 Thread Eric Blake
On 06/13/2017 11:52 AM, Eduardo Habkost wrote: > The Proposal > > > I'm proposing replacing NULL errp with a special macro: > IGNORE_ERRORS. The macro will trigger special behavior in the > error API that will make it not save any error information in the > error pointer, but still

Re: [Qemu-devel] [PATCH v3 4/7] softfloat: define floatx80_round()

2017-06-27 Thread Aurelien Jarno
On 2017-06-27 21:12, Laurent Vivier wrote: > Add a function to round a floatx80 to the defined precision > (floatx80_rounding_precision) > > Signed-off-by: Laurent Vivier > Reviewed-by: Richard Henderson > --- > fpu/softfloat.c | 15 +++

Re: [Qemu-devel] [RFC 15/15] [test only] Use 'Error *err[static 1]' instead of 'Error **errp' to catch NULL errp arguments

2017-06-27 Thread Eric Blake
On 06/19/2017 08:26 AM, Eduardo Habkost wrote: >> Is gcc's __attribute__((nonnull)) any better? It seems to apply >> to the whole function prototype rather than an individual argument >> though so probably not :-( > > It's possible to specify which arguments are non-null with > nonnull(, ...).

Re: [Qemu-devel] [PATCH] vcpu_dirty: share the same field in CPUState for all accelerators

2017-06-27 Thread Paolo Bonzini
On 27/06/2017 20:36, Eric Blake wrote: > On 06/19/2017 11:35 AM, Paolo Bonzini wrote: >> >> >> On 18/06/2017 21:11, Sergio Andres Gomez Del Real wrote: >>> This patch simply replaces the separate boolean field in CPUState that >>> kvm, hax (and upcoming hvf) have for keeping track of vcpu

Re: [Qemu-devel] [PATCH v3 5/7] target/m68k: add fsglmul and fsgldiv

2017-06-27 Thread Richard Henderson
On 06/27/2017 12:12 PM, Laurent Vivier wrote: fsglmul and fsgldiv truncate data to single precision before computing results. Signed-off-by: Laurent Vivier --- target/m68k/fpu_helper.c | 28 target/m68k/helper.h | 2 ++

Re: [Qemu-devel] [PATCH 1/1] Add support for custom fmasks/dmasks in 9ps mapped mode

2017-06-27 Thread Eric Blake
On 06/18/2017 03:28 AM, Tobias Schramm wrote: > Signed-off-by: Tobias Schramm > --- > fsdev/file-op-9p.h | 4 > fsdev/qemu-fsdev-opts.c | 12 > hw/9pfs/9p-local.c | 33 + > hw/9pfs/9p.c| 3 +++ > 4

Re: [Qemu-devel] [PATCH v3 1/7] target/m68k: add fscc.

2017-06-27 Thread Richard Henderson
On 06/27/2017 12:12 PM, Laurent Vivier wrote: case 3: /* Ordered Greater than or Equal Z || !(A || N) */ case 19: /* Greater than or Equal Z || !(A || N) */ +g_assert(FPSR_CC_A == (FPSR_CC_N >> 3)); +c->v1 = tcg_temp_new(); +c->g1 = 0; +

Re: [Qemu-devel] [PATCH] iotests: Add test for failing qemu-img commit

2017-06-27 Thread Eric Blake
On 06/16/2017 08:58 AM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > In order to pass, this depends on "fix: avoid an infinite loop or a > dangling pointer problem in img_commit" > (http://lists.nongnu.org/archive/html/qemu-block/2017-06/msg00443.html) Looks like that

Re: [Qemu-devel] [PATCH] nbd: fix NBD over TLS

2017-06-27 Thread Eric Blake
On 06/15/2017 02:51 PM, Paolo Bonzini wrote: > When attaching the NBD QIOChannel to an AioContext, the TLS channel should > be used, not the underlying socket channel. This is because, trivially, > the TLS channel will be the one that we read/write to and thus the one > that will get the

Re: [Qemu-devel] [PATCH v2] Add chardev-send-break monitor command

2017-06-27 Thread Eric Blake
On 06/11/2017 02:48 AM, Stefan Fritsch wrote: > Sending a break on a serial console can be useful for debugging the > guest. But not all chardev backends support sending breaks (only telnet > and mux do). The chardev-send-break command allows to send a break even > if using other backends. > >

Re: [Qemu-devel] [RFC 5/5] vifo: introduce new VFIO ioctl VFIO_DEVICE_PCI_GET_DIRTY_BITMAP

2017-06-27 Thread Alex Williamson
On Tue, 27 Jun 2017 08:56:01 + "Zhang, Yulei" wrote: > > -Original Message- > > From: Qemu-devel [mailto:qemu-devel- > > bounces+yulei.zhang=intel@nongnu.org] On Behalf Of Alex Williamson > > Sent: Tuesday, June 27, 2017 4:19 AM > > To: Zhang, Yulei

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

2017-06-27 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 v3 17/20] backup: Switch backup_run() to byte-based

2017-06-27 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 v3 15/20] backup: Switch block_backup.h to byte-based

2017-06-27 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

Re: [Qemu-devel] [PATCH v2] scripts: add "git.orderfile" for ordering diff hunks by pathname patterns

2017-06-27 Thread Emilio G. Cota
On Tue, Jun 27, 2017 at 22:16:39 +0300, Michael S. Tsirkin wrote: > On Tue, Jun 27, 2017 at 02:51:52PM -0400, Emilio G. Cota wrote: > > On Fri, Dec 02, 2016 at 22:01:52 +0100, Laszlo Ersek wrote: > > > When passed to git-diff (and to every other git command producing diffs > > > and/or diffstats)

[Qemu-devel] [PATCH v3 13/20] block: Drop unused bdrv_round_sectors_to_clusters()

2017-06-27 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 --- v2: hoist to earlier series, no change --- include/block/block.h | 4

[Qemu-devel] [PATCH v3 20/20] block: Make bdrv_is_allocated_above() byte-based

2017-06-27 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 v3 09/20] mirror: Update signature of mirror_clip_sectors()

2017-06-27 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 v3 18/20] block: Make bdrv_is_allocated() byte-based

2017-06-27 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 v3 14/20] backup: Switch BackupBlockJob to byte-based

2017-06-27 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

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

2017-06-27 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. [checkpatch has a false positive on use of MIN() in this patch] Signed-off-by:

[Qemu-devel] [PATCH v3 16/20] backup: Switch backup_do_cow() to byte-based

2017-06-27 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 --- v2: no change --- block/backup.c | 62

[Qemu-devel] [PATCH v3 08/20] mirror: Switch mirror_do_zero_or_discard() to byte-based

2017-06-27 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 --- v2: no change --- block/mirror.c | 20

[Qemu-devel] [PATCH v3 12/20] mirror: Switch mirror_iteration() to byte-based

2017-06-27 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 v3 10/20] mirror: Switch mirror_cow_align() to byte-based

2017-06-27 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 v3 03/20] stream: Switch stream_populate() to byte-based

2017-06-27 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 --- v2: no change ---

[Qemu-devel] [PATCH v3 11/20] mirror: Switch mirror_do_read() to byte-based

2017-06-27 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 --- v2: rebase to earlier changes ---

[Qemu-devel] [PATCH v3 04/20] stream: Switch stream_run() to byte-based

2017-06-27 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 v3 05/20] commit: Switch commit_populate() to byte-based

2017-06-27 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 --- v2: no change ---

[Qemu-devel] [PATCH v3 00/20] make bdrv_is_allocated[_above] byte-based

2017-06-27 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 v3 06/20] commit: Switch commit_run() to byte-based

2017-06-27 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 v3 02/20] trace: Show blockjob actions via bytes, not sectors

2017-06-27 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 v3 01/20] blockjob: Track job ratelimits via bytes, not sectors

2017-06-27 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] [PATCH v3 7/7] target/m68k: add fmovem

2017-06-27 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/fpu_helper.c | 120 +++ target/m68k/helper.h | 6 +++ target/m68k/translate.c | 93 3 files

Re: [Qemu-devel] [PATCH v2] scripts: add "git.orderfile" for ordering diff hunks by pathname patterns

2017-06-27 Thread Michael S. Tsirkin
On Tue, Jun 27, 2017 at 02:51:52PM -0400, Emilio G. Cota wrote: > On Fri, Dec 02, 2016 at 22:01:52 +0100, Laszlo Ersek wrote: > > When passed to git-diff (and to every other git command producing diffs > > and/or diffstats) with "-O" or "diff.orderFile", this list of patterns > > will place the

[Qemu-devel] [PATCH v3 3/7] target/m68k: add explicit single and double precision operations

2017-06-27 Thread Laurent Vivier
Add fssqrt, fdsqrt, fsadd, fdadd, fssub, fdsub, fsmul, fdmul, fsdiv, fddiv. The precision is managed using set_floatx80_rounding_precision(). Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/fpu_helper.c | 80

[Qemu-devel] [PATCH v3 0/7] target/m68k: implement 680x0 FPU (part 2)

2017-06-27 Thread Laurent Vivier
Second part of patches submitted in the v3. This series adds a subset of single precision and double precision instructions using set_floatx80_rounding_precision() to round the result. For some other instructions, we introduce a new function, floatx80_round(), to round them manually. It also

[Qemu-devel] [PATCH v3 5/7] target/m68k: add fsglmul and fsgldiv

2017-06-27 Thread Laurent Vivier
fsglmul and fsgldiv truncate data to single precision before computing results. Signed-off-by: Laurent Vivier --- target/m68k/fpu_helper.c | 28 target/m68k/helper.h | 2 ++ target/m68k/translate.c | 6 ++ 3 files changed, 36

[Qemu-devel] [PATCH v3 1/7] target/m68k: add fscc.

2017-06-27 Thread Laurent Vivier
use DisasCompare with FPU conditions in fscc and fbcc. Signed-off-by: Laurent Vivier --- target/m68k/translate.c | 211 ++-- 1 file changed, 132 insertions(+), 79 deletions(-) diff --git a/target/m68k/translate.c

[Qemu-devel] [PATCH v3 2/7] target/m68k: add fmovecr

2017-06-27 Thread Laurent Vivier
fmovecr moves a floating point constant from the FPU ROM to a floating point register. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/fpu_helper.c | 30 ++ target/m68k/helper.h | 1 +

[Qemu-devel] [PATCH v3 6/7] target/m68k: add explicit single and double precision operations (part 2)

2017-06-27 Thread Laurent Vivier
Add fsabs, fdabs, fsneg, fdneg, fsmove and fdmove. The value is converted using the new floatx80_round() function. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/fpu_helper.c | 48

[Qemu-devel] [PATCH v3 4/7] softfloat: define floatx80_round()

2017-06-27 Thread Laurent Vivier
Add a function to round a floatx80 to the defined precision (floatx80_rounding_precision) Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- fpu/softfloat.c | 15 +++ include/fpu/softfloat.h | 1 + 2 files changed, 16

Re: [Qemu-devel] [PATCH v2] scripts: add "git.orderfile" for ordering diff hunks by pathname patterns

2017-06-27 Thread Emilio G. Cota
On Fri, Dec 02, 2016 at 22:01:52 +0100, Laszlo Ersek wrote: > When passed to git-diff (and to every other git command producing diffs > and/or diffstats) with "-O" or "diff.orderFile", this list of patterns > will place the more declarative / abstract hunks first, while changes to > imperative

Re: [Qemu-devel] [PATCH v1 1/1] char-socket: Don't report TCP socket waiting as an error

2017-06-27 Thread Alistair Francis
On Thu, Jun 8, 2017 at 10:16 PM, Markus Armbruster wrote: > Alistair Francis writes: > >> On Thu, Jun 8, 2017 at 10:56 AM, Markus Armbruster wrote: >>> Alistair Francis writes: >>> On Wed, Jun

Re: [Qemu-devel] [Qemu-block] [PATCH v4 0/4] more blkdebug tweaks

2017-06-27 Thread Kevin Wolf
Am 27.06.2017 um 18:01 hat Eric Blake geschrieben: > On 06/06/2017 07:26 AM, Kevin Wolf wrote: > > Am 05.06.2017 um 22:38 hat Eric Blake geschrieben: > >> I found a crasher and some odd behavior while rebasing my > >> bdrv_get_block_status series, so I figured I'd get these things > >> fixed

Re: [Qemu-devel] [PATCH] vcpu_dirty: share the same field in CPUState for all accelerators

2017-06-27 Thread Eric Blake
On 06/19/2017 11:35 AM, Paolo Bonzini wrote: > > > On 18/06/2017 21:11, Sergio Andres Gomez Del Real wrote: >> This patch simply replaces the separate boolean field in CPUState that >> kvm, hax (and upcoming hvf) have for keeping track of vcpu dirtiness >> with a single shared field. >> >>

Re: [Qemu-devel] [Qemu-block] [RFC] QMP design: Fixing query-block and friends

2017-06-27 Thread John Snow
On 06/27/2017 12:31 PM, Kevin Wolf wrote: > Hi, > > I haven't really liked query-block for a long time, but now that > blockdev-add and -blockdev have settled, it might finally be the time to > actually do something about it. In fact, if used together with these > modern interfaces, our query

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

2017-06-27 Thread Paolo Bonzini
On 27/06/2017 17:22, 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] NVDIMM live migration broken?

2017-06-27 Thread Juan Quintela
Juan Quintela wrote: > Haozhong Zhang wrote: > > > > Hi > > I am trying to see what is going on. > >>> >> >> I managed to reproduce this bug. After bisect between good v2.8.0 and >> bad edf8bc984, it looks a regression introduced by >>

Re: [Qemu-devel] [PATCH v3 1/2] tests/test-char.c: Don't use main_loop_wait()'s return value

2017-06-27 Thread Marc-André Lureau
On Tue, Jun 27, 2017 at 7:57 PM Peter Maydell wrote: > In QEMU's main_loop() we used to check whether we should do > a nonblocking call to main_loop(); this was deleted in commit e330c118f2a5, > because now that vCPUs always drop the I/O thread lock it is an unnecessary

Re: [Qemu-devel] [PATCH] linux-user: Put PPC AT_IGNOREPPC auxv entries in the right place

2017-06-27 Thread Richard Henderson
On 06/27/2017 09:49 AM, Peter Maydell wrote: The 32-bit PPC auxv is a bit complicated because in the mists of time it used to be 16-aligned rather than directly after the environment. Older glibc versions had code to try to probe for whether it needed alignment or not:

Re: [Qemu-devel] [PATCH v2 2/7] target/m68k: add fmovecr

2017-06-27 Thread Laurent Vivier
Le 27/06/2017 à 17:45, Philippe Mathieu-Daudé a écrit : > I find this patch aesthetically very nice :) > > On Tue, 27 Jun 2017 00:03:25 +0200 > Laurent Vivier wrote: >> fmovecr moves a floating point constant from the >> FPU ROM to a floating point register. >> >>

  1   2   3   4   >