[Qemu-devel] [PATCH v8 10/11] block-backend: Add blk_co_copy_range

2018-05-31 Thread Fam Zheng
It's a BlockBackend wrapper of the BDS interface. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/block-backend.c | 18 ++ include/sysemu/block-backend.h | 4 2 files changed, 22 insertions(+) diff --git a/block/block-backend.c b/block/block-backe

[Qemu-devel] [PATCH v8 11/11] qemu-img: Convert with copy offloading

2018-05-31 Thread Fam Zheng
The new blk_co_copy_range interface offers a more efficient way in the case of network based storage. Make use of it to allow faster convert operation. Since copy offloading cannot do zero detection ('-S') and compression (-c), only try it when these options are not used. Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v8 04/11] raw: Implement copy offloading

2018-05-31 Thread Fam Zheng
Just pass down to ->file. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/raw-format.c | 32 1 file changed, 32 insertions(+) diff --git a/block/raw-format.c b/block/raw-format.c index b69a0674b3..f2e468df6f 100644 --- a/block/raw-format.c +++ b

[Qemu-devel] [PATCH v8 06/11] file-posix: Implement bdrv_co_copy_range

2018-05-31 Thread Fam Zheng
With copy_file_range(2), we can implement the bdrv_co_copy_range semantics. Signed-off-by: Fam Zheng --- block/file-posix.c | 98 +++-- configure | 17 +++ include/block/raw-aio.h | 10 - 3 files changed, 120 insertions(+), 5 deletio

[Qemu-devel] [PATCH v8 03/11] raw: Check byte range uniformly

2018-05-31 Thread Fam Zheng
We don't verify the request range against s->size in the I/O callbacks except for raw_co_pwritev. This is inconsistent (especially for raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them, in the meanwhile make the helper reusable by the coming new callbacks. Note that in most cases the block la

[Qemu-devel] [PATCH v8 08/11] iscsi: Create and use iscsi_co_wait_for_task

2018-05-31 Thread Fam Zheng
This loop is repeated a growing number times. Make a helper. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- block/iscsi.c | 54 --- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/block/iscsi.c b

[Qemu-devel] [PATCH v8 05/11] qcow2: Implement copy offloading

2018-05-31 Thread Fam Zheng
The two callbacks are implemented quite similarly to the read/write functions: bdrv_co_copy_range_from maps for read and calls into bs->file or bs->backing depending on the allocation status; bdrv_co_copy_range_to maps for write and calls into bs->file. Reviewed-by: Stefan Hajnoczi Signed-off-by:

[Qemu-devel] [PATCH v8 02/11] block: Introduce API for copy offloading

2018-05-31 Thread Fam Zheng
Introduce the bdrv_co_copy_range() API for copy offloading. Block drivers implementing this API support efficient copy operations that avoid reading each block from the source device and writing it to the destination devices. Examples of copy offload primitives are SCSI EXTENDED COPY and Linux co

[Qemu-devel] [PATCH v8 07/11] iscsi: Query and save device designator when opening

2018-05-31 Thread Fam Zheng
The device designator data returned in INQUIRY command will be useful to fill in source/target fields during copy offloading. Do this when connecting to the target and save the data for later use. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/iscsi.c | 41 +

[Qemu-devel] [PATCH v8 09/11] iscsi: Implement copy offloading

2018-05-31 Thread Fam Zheng
Issue EXTENDED COPY (LID1) command to implement the copy_range API. The parameter data construction code is modified from libiscsi's iscsi-dd.c. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/iscsi.c| 219 +++ include/scsi/consta

[Qemu-devel] [PATCH v8 01/11] docker: Update fedora image to 28

2018-05-31 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/fedora.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index b706f42405..65d7761cf5 100644 --- a/tests/docker/dockerfiles/fedora.docker

[Qemu-devel] [PATCH v8 00/11] qemu-img convert with copy offloading

2018-05-31 Thread Fam Zheng
v8: Fix compiling against new glibc and libiscsi on Fedora 28 where v7 had conflict definitions. [Stefan, myself] - Add HAVE_COPY_FILE_RANGE in configure. - Drop IDENT_DESCR_TGT_DESCR from scsi constants header. v7: Fix qcow2. v6: Pick up rev-by from Stefan and Eric. Tweak patch 2

Re: [Qemu-devel] Questions about the flow of interrupt simulation

2018-05-31 Thread Eva Chen
​​ Thanks deeply for your clear explanation! Let me try to conclude what I learned from your description. qemu_set_irq() qemu_set_irq() [ device ] -> [ GIC ] -> [ CPU ] Detailed: [device] =>qemu_set_irq() [GIC] =>

[Qemu-devel] [PATCH v4] qga: add mountpoint usage to GuestFilesystemInfo

2018-05-31 Thread Chen Hanxiao
From: Chen Hanxiao This patch adds support for getting the usage of mounted filesystem. It's very useful when we try to monitor guest's filesystem. Cc: Michael Roth Cc: Eric Blake Signed-off-by: Chen Hanxiao --- v2: add description in qapi-schema and version numbers v3: use float for u

Re: [Qemu-devel] [PATCH 2/3] pc-bios/s390-ccw/net: Add support for pxelinux-style config files

2018-05-31 Thread Thomas Huth
On 30.05.2018 13:07, Viktor VM Mihajlovski wrote: > On 30.05.2018 11:16, Thomas Huth wrote: >> Since it is quite cumbersome to manually create a combined kernel with >> initrd image for network booting, we now support loading via pxelinux >> configuration files, too. In these files, the kernel, ini

Re: [Qemu-devel] Recording I/O activity after KVM does a VMEXIT

2018-05-31 Thread Pavel Dovgalyuk
Hi, I’m not familiar with KVM, but I know successful attempts of replaying the execution by logging IO and MMIO in TCG mode. The difference in CPU I/O and VM I/O is the following. In icount we record anything coming into the VM, but not into the CPU. It means that the whole packet is record

Re: [Qemu-devel] [PATCH 2/9 V5] hostmem-file: add the 'pmem' option

2018-05-31 Thread Junyan He
Because we have disk backend imitation for NVDimm kind memory, I think it is more flexible for user to specify the real or not real pmem rather than we check in qemu using the pmem_is_pmem API From: Stefan Hajnoczi Sent: Thursday, May 31, 2018 1:09:42 PM To: j

Re: [Qemu-devel] [qemu PATCH v4 0/4] support NFIT platform capabilities

2018-05-31 Thread Elliott, Robert (Persistent Memory)
> Ping on this series. Rob, I think I've addressed all your feedback. > Can you please verify? I haven't tested it, but it reads OK. I'm OK with just extending the valid count for bits set to one for now; we can add a new argument later if a need arises for extending it to express new bits set t

Re: [Qemu-devel] [PATCH v7 0/5] virtio-balloon: free page hint reporting support

2018-05-31 Thread Peter Xu
On Fri, Jun 01, 2018 at 12:58:24PM +0800, Peter Xu wrote: > On Tue, Apr 24, 2018 at 02:13:43PM +0800, Wei Wang wrote: > > This is the deivce part implementation to add a new feature, > > VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device > > receives the guest free page hints

Re: [Qemu-devel] [PATCH v7 0/5] virtio-balloon: free page hint reporting support

2018-05-31 Thread Peter Xu
On Tue, Apr 24, 2018 at 02:13:43PM +0800, Wei Wang wrote: > This is the deivce part implementation to add a new feature, > VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device > receives the guest free page hints from the driver and clears the > corresponding bits in the dirty b

Re: [Qemu-devel] [PATCH v7 3/5] migration: API to clear bits of guest free pages from the dirty bitmap

2018-05-31 Thread Peter Xu
On Tue, Apr 24, 2018 at 02:13:46PM +0800, Wei Wang wrote: > This patch adds an API to clear bits corresponding to guest free pages > from the dirty bitmap. Spilt the free page block if it crosses the QEMU > RAMBlock boundary. > > Signed-off-by: Wei Wang > CC: Dr. David Alan Gilbert > CC: Juan Qu

Re: [Qemu-devel] [Qemu-block] [PATCH v2 8/8] block: Remove unused sector-based vectored I/O

2018-05-31 Thread Jeff Cody
On Thu, May 31, 2018 at 03:50:46PM -0500, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Now that all callers of vectored I/O have been converted > to use our preferred byte-based bdrv_co_p{read,write}v(), we can > delete the unused bdrv_co_{re

Re: [Qemu-devel] [Qemu-block] [PATCH v2 6/8] replication: Switch to byte-based calls

2018-05-31 Thread Jeff Cody
On Thu, May 31, 2018 at 03:50:44PM -0500, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Make the change for the last few sector-based calls > into the block layer from the replication driver. > > Ideally, the replication driver should switch

[Qemu-devel] vIOMMU Posted-interrupt implementation - atomic operation?

2018-05-31 Thread Jintack Lim
Hi, I'm implementing Posted-interrupt functionality in vIOMMU. According to Vt-d spec 5.2.3, IOMMU performs a coherent atomic read-modify-write operation of the posted-interrupt descriptor. I wonder how can we achieve this considering the guest can modify the same posted-interrupt descriptor anyti

Re: [Qemu-devel] [PATCH v7 2/5] migration: use bitmap_mutex in migration_bitmap_clear_dirty

2018-05-31 Thread Peter Xu
On Tue, Apr 24, 2018 at 02:13:45PM +0800, Wei Wang wrote: > The bitmap mutex is used to synchronize threads to update the dirty > bitmap and the migration_dirty_pages counter. This patch makes > migration_bitmap_clear_dirty update the bitmap and counter under the > mutex. > > Signed-off-by: Wei Wa

Re: [Qemu-devel] [PATCH 2/3] pc-bios/s390-ccw/net: Add support for pxelinux-style config files

2018-05-31 Thread Thomas Huth
On 31.05.2018 23:25, Farhan Ali wrote: > > > On 05/30/2018 05:16 AM, Thomas Huth wrote: >> Since it is quite cumbersome to manually create a combined kernel with >> initrd image for network booting, we now support loading via pxelinux >> configuration files, too. In these files, the kernel, initr

Re: [Qemu-devel] [PATCH RFC] qemu-error: introduce error_report_once

2018-05-31 Thread Peter Xu
On Thu, May 31, 2018 at 12:03:17PM +0100, Stefan Hajnoczi wrote: > On Tue, May 15, 2018 at 05:13:56PM +0800, Peter Xu wrote: > > I stole the printk_once() macro. > > > > I always wanted to be able to print some error directly if there is a > > buffer to dump, however we can't use error_report() re

Re: [Qemu-devel] [PATCH v7 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-05-31 Thread Wei Wang
On 06/01/2018 01:42 AM, Michael S. Tsirkin wrote: On Thu, May 31, 2018 at 10:27:00AM +0800, Wei Wang wrote: On 05/30/2018 08:47 PM, Michael S. Tsirkin wrote: On Wed, May 30, 2018 at 05:12:09PM +0800, Wei Wang wrote: On 05/29/2018 11:24 PM, Michael S. Tsirkin wrote: On Tue, Apr 24, 2018 at 02:

Re: [Qemu-devel] [PATCH v2 7/8] vhdx: Switch to byte-based calls

2018-05-31 Thread Jeff Cody
On Thu, May 31, 2018 at 03:50:45PM -0500, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Make the change for the last few sector-based calls > into the block layer from the vhdx driver. > > Ideally, the vhdx driver should switch to doing every

[Qemu-devel] [PATCH] docker: Update fedora image to 28

2018-05-31 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/fedora.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index b706f42405..65d7761cf5 100644 --- a/tests/docker/dockerfiles/fedora.docker

Re: [Qemu-devel] [PATCH v7 00/10] qemu-img convert with copy offloading

2018-05-31 Thread Fam Zheng
On Wed, 05/30 17:06, Stefan Hajnoczi wrote: > On Tue, May 29, 2018 at 01:59:49PM +0800, Fam Zheng wrote: > > v7: Fix qcow2. > > > > v6: Pick up rev-by from Stefan and Eric. > > Tweak patch 2 commit message. > > > > v5: - Fix raw offset/bytes check for read. [Eric] > > - Fix qcow2_handle_l

Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/8] parallels: Switch to byte-based calls

2018-05-31 Thread Jeff Cody
On Thu, May 31, 2018 at 03:50:39PM -0500, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Make the change for the last few sector-based calls > into the block layer from the parallels driver. > > Ideally, the parallels driver should switch to d

[Qemu-devel] [PATCH v2 16/20] 9p: darwin: Compatibility for f/l*xattr

2018-05-31 Thread Keno Fischer
On darwin `fgetxattr` takes two extra optional arguments, and the l* variants are not defined (in favor of an extra flag to the regular variants. Signed-off-by: Keno Fischer --- Changes from v1: New patch, qemu_fgetxattr had previously been moved to 9p-util as fgetxattr_follow. The remaining fu

[Qemu-devel] [PATCH v2 20/20] 9p: darwin: configure: Allow VirtFS on Darwin

2018-05-31 Thread Keno Fischer
Signed-off-by: Keno Fischer --- Changes from v1: Now builds the proxy-helper on Darwin. Makefile.objs | 1 + configure | 22 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index c6c3554..a2245c9 100644 --- a/Makefile.obj

[Qemu-devel] [PATCH v2 18/20] 9p: darwin: Implement compatibility for mknodat

2018-05-31 Thread Keno Fischer
Darwin does not support mknodat. However, to avoid race conditions with later setting the permissions, we must avoid using mknod on the full path instead. We could try to fchdir, but that would cause problems if multiple threads try to call mknodat at the same time. However, luckily there is a solu

[Qemu-devel] [PATCH v6] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-31 Thread Shannon Zhao
While we skip the GIC_INTERNAL irqs, we don't change the register offset accordingly. This will overlap the GICR registers value and leave the last GIC_INTERNAL irq's registers out of update. Fix this by skipping the registers banked by GICR. Also for migration compatibility if the migration sour

[Qemu-devel] [PATCH v2 19/20] 9p: darwin: virtfs-proxy: Implement setuid code for darwin

2018-05-31 Thread Keno Fischer
Darwin does not have linux capabilities, so make that code linux-only. Darwin also does not have setresuid/gid. The correct way to temporarily drop capabilities is to call seteuid/gid. Also factor out the code that acquires acquire_dac_override into a separate function in the linux implementation.

[Qemu-devel] [PATCH v2 12/20] 9p: darwin: Explicitly cast comparisons of mode_t with -1

2018-05-31 Thread Keno Fischer
Comparisons of mode_t with -1 require an explicit cast, since mode_t is unsigned on Darwin. Signed-off-by: Keno Fischer --- Changes from v1: Split from strchrnul change hw/9pfs/9p-local.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-lo

[Qemu-devel] [PATCH v2 15/20] 9p: darwin: *xattr_nofollow implementations

2018-05-31 Thread Keno Fischer
This implements the darwin equivalent of the functions that were moved to 9p-util(-linux) earlier in this series in the new 9p-util-darwin file. Signed-off-by: Keno Fischer --- Changes from v1: * New 9p-util-darwin.c rather than ifdefs in 9p-util.c * Drop incorrect AT_NOFOLLOW from the actual

[Qemu-devel] [PATCH v2 17/20] 9p: darwin: Provide a fallback implementation for utimensat

2018-05-31 Thread Keno Fischer
This function is new in Mac OS 10.13. Provide a fallback implementation when building against older SDKs. The complication in the definition comes having to separately handle the used SDK version and the target OS version. - If the SDK version is too low (__MAC_10_13 not defined), utimensat is not

[Qemu-devel] [PATCH v2 10/20] 9p: darwin: Handle struct stat(fs) differences

2018-05-31 Thread Keno Fischer
Signed-off-by: Keno Fischer --- Changes since v1: * Now also covers fsdev/virtfs-proxy-helper.c fsdev/virtfs-proxy-helper.c | 14 +++--- hw/9pfs/9p-proxy.c | 17 ++--- hw/9pfs/9p-synth.c | 2 ++ hw/9pfs/9p.c| 16 ++-- 4 files c

[Qemu-devel] [PATCH v2 09/20] 9p: Properly check/translate flags in unlinkat

2018-05-31 Thread Keno Fischer
This code previously relied on P9_DOTL_AT_REMOVEDIR and AT_REMOVEDIR having the same numerical value and deferred any errorchecking to the syscall itself. However, while the former assumption is true on Linux, it is not true in general. Thus, add appropriate error checking and translation to the 9p

[Qemu-devel] [PATCH v2 14/20] 9p: darwin: Provide a compatibility definition for XATTR_SIZE_MAX

2018-05-31 Thread Keno Fischer
Signed-off-by: Keno Fischer --- No change from v1. hw/9pfs/9p.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 70cfab9..24802b9 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -3374,6 +3374,13 @@ out_nofid: v9fs_string_free(&name); } +#if de

[Qemu-devel] [PATCH v2 08/20] 9p: Rename 9p-util -> 9p-util-linux

2018-05-31 Thread Keno Fischer
The current file only has the Linux versions of these functions. Rename the file accordingly and update the Makefile to only build it on Linux. A Darwin version of these will follow later in the series. Signed-off-by: Keno Fischer --- Changes since v1: New patch hw/9pfs/9p-util-linux.c | 59 ++

[Qemu-devel] [PATCH v2 13/20] 9p: darwin: Ignore O_{NOATIME, DIRECT}

2018-05-31 Thread Keno Fischer
Darwin doesn't have either of these flags. Darwin does have F_NOCACHE, which is similar to O_DIRECT, but has different enough semantics that other projects don't generally map them automatically. In any case, we don't support O_DIRECT on Linux at the moment either. Signed-off-by: Keno Fischer ---

[Qemu-devel] [PATCH v2 07/20] 9p: Move a couple xattr functions to 9p-util

2018-05-31 Thread Keno Fischer
These functions will need custom implementations on Darwin. Since the implementation is very similar among all of them, and 9p-util already has the _nofollow version of fgetxattrat, let's move them all there. Signed-off-by: Keno Fischer --- Changes since v1: * fgetxattr_follow is dropped in fav

[Qemu-devel] [PATCH v2 05/20] 9p: Properly set errp in fstatfs error path

2018-05-31 Thread Keno Fischer
In the review of 9p: Avoid warning if FS_IOC_GETVERSION is not defined Grep Kurz noted this error path was failing to set errp. Fix that. Signed-off-by: Keno Fischer --- Changes since v1: New patch hw/9pfs/9p-local.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/9pfs/9p-local.

[Qemu-devel] [PATCH v2 11/20] 9p: darwin: Handle struct dirent differences

2018-05-31 Thread Keno Fischer
On darwin d_seekoff exists, but is optional and does not seem to be commonly used by file systems. Use `telldir` instead to obtain the seek offset. Signed-off-by: Keno Fischer --- Changes since v1: * Drop setting d_seekoff in synth_direntry * Factor telldir vs d_off logic into v9fs_dent_telldi

[Qemu-devel] [PATCH v2 06/20] 9p: Avoid warning if FS_IOC_GETVERSION is not defined

2018-05-31 Thread Keno Fischer
Both `stbuf` and `local_ioc_getversion` where unused when FS_IOC_GETVERSION was not defined, causing a compiler warning. Reorgnaize the code to avoid this warning. Signed-off-by: Keno Fischer --- Changes since v1: * As request in review, logic is factored into a local_ioc_getversion_init fu

[Qemu-devel] [PATCH v2 02/20] 9p: proxy: Fix size passed to `connect`

2018-05-31 Thread Keno Fischer
The size to pass to the `connect` call is the size of the entire `struct sockaddr_un`. Passing anything shorter than this causes errors on darwin. Signed-off-by: Keno Fischer --- Changes since v1: New patch hw/9pfs/9p-proxy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --g

[Qemu-devel] [PATCH v2 04/20] 9p: linux: Fix a couple Linux assumptions

2018-05-31 Thread Keno Fischer
- Guard Linux only headers. - Add qemu/statfs.h header to abstract over the which headers are needed for struct statfs - Define `ENOATTR` only if not only defined (it's defined in system headers on Darwin). Signed-off-by: Keno Fischer --- Changes since v1: * New qemu/statfs.h header to

[Qemu-devel] [PATCH v2 03/20] 9p: xattr: Fix crash due to free of uninitialized value

2018-05-31 Thread Keno Fischer
If the size returned from llistxattr is 0, we skipped the malloc call, leaving xattr.value uninitialized. However, this value is later passed to `g_free` without any further checks, causing an error. Fix that by always calling g_malloc unconditionally. If `size` is 0, it will return a pointer that

[Qemu-devel] [PATCH v2 01/20] cutils: Provide strchrnul

2018-05-31 Thread Keno Fischer
strchrnul is a GNU extension and thus unavailable on a number of targets. In the review for a commit removing strchrnul from 9p, I was asked to create a qemu_strchrnul helper to factor out this functionality. Do so, and use it in a number of other places in the code base that inlined the replacemen

[Qemu-devel] [PATCH v2 00/20] 9p: Add support for Darwin

2018-05-31 Thread Keno Fischer
This is v2 of my patch series to provide 9p server support for Darwin. The patches in this series address review from v1, now support building the virtfs proxy, as well as fix bugs found since v1. Keno Fischer (20): cutils: Provide strchrnul 9p: proxy: Fix size passed to `connect` 9p: xattr

Re: [Qemu-devel] [PATCH 1/6] gdbstub: Return the fd from gdbserver_start

2018-05-31 Thread Richard Henderson
On 05/31/2018 04:15 PM, Philippe Mathieu-Daudé wrote: > Hi Richard, > > On 05/31/2018 07:49 PM, Richard Henderson wrote: >> This will allow us to protect gdbserver_fd from the guest. >> >> Signed-off-by: Richard Henderson >> --- >> gdbstub.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 delet

Re: [Qemu-devel] [PATCH v3 0/4] Add new CD-ROM related qtests

2018-05-31 Thread John Snow
On 04/27/2018 05:40 AM, Thomas Huth wrote: > With one of my clean-up patches (see commit 1454509726719e0933c800), I > recently accidentially broke the "-cdrom" parameter (more precisely > "-drive if=scsi") on a couple of boards, since there was no error > detected during the "make check" regress

Re: [Qemu-devel] [PATCH v2 00/16] AHCI: tracing improvements

2018-05-31 Thread John Snow
On 05/31/2018 06:28 PM, John Snow wrote: > This set just adds register names so that the read/write traces make > more sense on their own without having to memorize register offsets. > It also splits read/write traces into supported/unsupported subsets, > so you can just monitor for things that

Re: [Qemu-devel] [PATCH 0/3] ahci: fix completion race condition

2018-05-31 Thread John Snow
On 05/30/2018 08:43 PM, John Snow wrote: > Commit d759c951f changed the main thread lock release/reacquisition, > and in so doing apparently jostled loose a race condition in the AHCI > code. > > Patch 2 should be sufficient to fix this, and patches 1 and 3 are just > little trivial fixes. > >

Re: [Qemu-devel] [PATCH v2 00/16] AHCI: tracing improvements

2018-05-31 Thread John Snow
On 05/31/2018 06:49 PM, no-re...@patchew.org wrote: > Hi, > > This series failed docker-mingw@fedora build test. Please find the testing > commands and > their output below. If you have Docker installed, you can probably reproduce > it > locally. > [ blah blah blah ] > In file included fro

Re: [Qemu-devel] [PATCH v2 00/16] AHCI: tracing improvements

2018-05-31 Thread John Snow
On 05/31/2018 06:47 PM, no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Type: series > Message-id: 20180531222835.16558-1-js...@redhat.com > Subject: [Qemu-devel] [PATCH v2 00/16] AHCI: tracing improvement

Re: [Qemu-devel] [PATCH v2 00/16] AHCI: tracing improvements

2018-05-31 Thread John Snow
On 05/31/2018 07:24 PM, Philippe Mathieu-Daudé wrote: > On 05/31/2018 07:28 PM, John Snow wrote: >> This set just adds register names so that the read/write traces make >> more sense on their own without having to memorize register offsets. >> It also splits read/write traces into supported/unsu

Re: [Qemu-devel] [PATCH v2 00/16] AHCI: tracing improvements

2018-05-31 Thread Philippe Mathieu-Daudé
On 05/31/2018 07:28 PM, John Snow wrote: > This set just adds register names so that the read/write traces make > more sense on their own without having to memorize register offsets. > It also splits read/write traces into supported/unsupported subsets, > so you can just monitor for things that QEM

Re: [Qemu-devel] [PATCH 11/13] 9p: darwin: Mark mknod as unsupported

2018-05-31 Thread Keno Fischer
On Thu, May 31, 2018 at 7:06 PM, Keno Fischer wrote: > On Thu, May 31, 2018 at 6:56 PM, Keno Fischer wrote: My concern was that allowing this would cause unexpected behavior, since the device numbers will differ between OS X and Linux. Though maybe this isn't the place to worry abo

Re: [Qemu-devel] [PATCH 1/6] gdbstub: Return the fd from gdbserver_start

2018-05-31 Thread Philippe Mathieu-Daudé
Hi Richard, On 05/31/2018 07:49 PM, Richard Henderson wrote: > This will allow us to protect gdbserver_fd from the guest. > > Signed-off-by: Richard Henderson > --- > gdbstub.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/gdbstub.c b/gdbstub.c > index 6081e719c

Re: [Qemu-devel] [PATCH v1 4/8] docker: update Travis docker image

2018-05-31 Thread Philippe Mathieu-Daudé
On 05/31/2018 05:14 PM, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > >> Hi Alex, >> >> On 05/30/2018 08:06 AM, Alex Bennée wrote: >>> This is still poorly documented by Travis but according to: >>> >>> >>> https://docs.travis-ci.com/user/common-build-problems/#Running-a-Container-B

Re: [Qemu-devel] [PATCH 11/13] 9p: darwin: Mark mknod as unsupported

2018-05-31 Thread Keno Fischer
On Thu, May 31, 2018 at 6:56 PM, Keno Fischer wrote: >>> My concern was that allowing this would cause unexpected >>> behavior, since the device numbers will differ between OS X >>> and Linux. Though maybe this isn't the place to worry about >>> that. >> >> The numbers may differ indeed but we don

Re: [Qemu-devel] [PATCH v5 0/6] linux-user: Reorg interp_prefix handling

2018-05-31 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180531224911.23725-1-richard.hender...@linaro.org Subject: [Qemu-devel] [PATCH v5 0/6] linux-user: Reorg interp_prefix handling === TEST SCRIPT BEGIN === #!/bin/bash BASE=

Re: [Qemu-devel] [PATCHv2] slirp: Fix spurious error report when sending directly

2018-05-31 Thread Philippe Mathieu-Daudé
On 05/31/2018 05:31 PM, Samuel Thibault wrote: > Move check to where it actually is useful, and reduce scope of 'len' > variable along the way. > > Signed-off-by: Samuel Thibault Thanks! Reviewed-by: Philippe Mathieu-Daudé > --- > > Difference from v1: > - move check instead of initializing

Re: [Qemu-devel] [PATCH 11/13] 9p: darwin: Mark mknod as unsupported

2018-05-31 Thread Keno Fischer
>> My concern was that allowing this would cause unexpected >> behavior, since the device numbers will differ between OS X >> and Linux. Though maybe this isn't the place to worry about >> that. > > The numbers may differ indeed but we don't really care since the > server never opens device files.

[Qemu-devel] [PATCH 3/6] linux-user: Check is_hostfd in do_syscall

2018-05-31 Thread Richard Henderson
This is the vast majority of all fd inputs, but not all. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 303 +++ 1 file changed, 280 insertions(+), 23 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d02c16bbc6..533

Re: [Qemu-devel] [PATCH v2 00/16] AHCI: tracing improvements

2018-05-31 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180531222835.16558-1-js...@redhat.com Subject: [Qemu-devel] [PATCH v2 00/16] AHCI: traci

[Qemu-devel] [PATCH 6/6] linux-user: Use *at functions to implement interp_prefix

2018-05-31 Thread Richard Henderson
If the interp_prefix is a complete chroot, it may have a *lot* of files. Setting up the cache for this is quite expensive. For the most part, we can use the *at versions of various syscalls to attempt the operation in the prefix. For the few cases that remain, attempt the operation in the prefix

[Qemu-devel] [PATCH 4/6] linux-user: Check contains_hostfd in select syscalls

2018-05-31 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5339f0bc1c..b98125829b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1506,6 +1506,11 @@ static abi_long do

[Qemu-devel] [PATCH 2/6] linux-user: Add host_fds and manipulators

2018-05-31 Thread Richard Henderson
This allows emulation of guest syscalls to reject manipulations to fds used by the host. Signed-off-by: Richard Henderson --- linux-user/qemu.h | 30 ++ linux-user/main.c | 27 ++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/

[Qemu-devel] [PATCH v5 0/6] linux-user: Reorg interp_prefix handling

2018-05-31 Thread Richard Henderson
Changes since v4 (2018-01-28) * Protect host fds from guest manipulation. * Rename the interp_dirfd macro to TRY_INTERP_FD * Add TRY_INTERP_PATH for acct, statfs, inotify_add_watch Changes since v3 (2017-12-29) * Use DO/WHILE as the control construct; wrap it in a macro. * Introduce linu

[Qemu-devel] [PATCH 5/6] linux-user: Check is_hostfd in mmap syscalls

2018-05-31 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall.c | 9 + 1 file changed, 9 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b98125829b..d7513d5dac 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -9605,11 +9605,17 @@ abi_long do_syscall(

[Qemu-devel] [PATCH 1/6] gdbstub: Return the fd from gdbserver_start

2018-05-31 Thread Richard Henderson
This will allow us to protect gdbserver_fd from the guest. Signed-off-by: Richard Henderson --- gdbstub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 6081e719c5..057d0d65c5 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1890,15 +1890,16 @@ sta

Re: [Qemu-devel] [PATCH v2 00/16] AHCI: tracing improvements

2018-05-31 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180531222835.16558-1-js...@redhat.com Subject: [Qemu-devel] [PATCH v2 00/16] AHCI: tracing improvements === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log

[Qemu-devel] [PATCH v2 16/16] ahci: make ahci_mem_write traces more descriptive

2018-05-31 Thread John Snow
Signed-off-by: John Snow --- hw/ide/ahci.c | 13 - hw/ide/trace-events | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 1309f80458..6cab853741 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -494,13 +494,24 @@ stati

[Qemu-devel] [PATCH v2 12/16] ahci: make mem_read_32 traces more descriptive

2018-05-31 Thread John Snow
Signed-off-by: John Snow --- hw/ide/ahci.c | 7 +-- hw/ide/trace-events | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 7edbb30f60..5e902c6615 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -47,7 +47,6 @@ static bool ahci_ma

[Qemu-devel] [PATCH v2 11/16] ahci: modify ahci_mem_read_32 to work on register numbers

2018-05-31 Thread John Snow
Signed-off-by: John Snow --- hw/ide/ahci.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index f2e8bce797..7edbb30f60 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -386,22 +386,27 @@ static uint64_t ahci_mem_read_32(void *

[Qemu-devel] [PATCH v2 01/16] ahci: add port register enumeration

2018-05-31 Thread John Snow
Instead of tracking offsets, lets count the registers. Signed-off-by: John Snow --- hw/ide/ahci.c | 25 + hw/ide/ahci_internal.h | 29 + 2 files changed, 54 insertions(+) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index e22d7be05f..48

[Qemu-devel] [PATCH v2 14/16] ahci: adjust ahci_mem_write to work on registers

2018-05-31 Thread John Snow
Actually, this function looks pretty broken, but for now, let's finish up what this series of commits came here to do. Signed-off-by: John Snow --- hw/ide/ahci.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 568e6b848a..13

[Qemu-devel] [PATCH v2 03/16] ahci: make port read traces more descriptive

2018-05-31 Thread John Snow
A trace is added to let us watch unimplemented registers specifically, as these are more likely to cause us trouble. Otherwise, the port read traces now tell us what register is getting hit, which is nicer. Signed-off-by: John Snow --- hw/ide/ahci.c | 5 +++-- hw/ide/trace-events | 3 ++-

[Qemu-devel] [PATCH v2 15/16] ahci: delete old host register address definitions

2018-05-31 Thread John Snow
Signed-off-by: John Snow --- hw/ide/ahci_internal.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h index f9dcf8b6e6..2953243929 100644 --- a/hw/ide/ahci_internal.h +++ b/hw/ide/ahci_internal.h @@ -55,12 +55,6 @@ #define RX_FIS_UNK

[Qemu-devel] [PATCH v2 09/16] ahci: add host register enumeration

2018-05-31 Thread John Snow
Signed-off-by: John Snow --- hw/ide/ahci.c | 15 +++ hw/ide/ahci_internal.h | 15 +++ 2 files changed, 30 insertions(+) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 01463f0f51..f2e8bce797 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -47,6 +47,21 @@ stati

[Qemu-devel] [PATCH v2 02/16] ahci: modify ahci_port_read to use register numbers

2018-05-31 Thread John Snow
Signed-off-by: John Snow --- hw/ide/ahci.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 48130c6439..5187bf34ad 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -93,41 +93,42 @@ static const char *

[Qemu-devel] [PATCH v2 13/16] ahci: fix spacing damage on ahci_mem_write

2018-05-31 Thread John Snow
Signed-off-by: John Snow --- hw/ide/ahci.c | 47 +++ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 5e902c6615..568e6b848a 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -469,37 +469,36 @@ static v

[Qemu-devel] [PATCH v2 00/16] AHCI: tracing improvements

2018-05-31 Thread John Snow
This set just adds register names so that the read/write traces make more sense on their own without having to memorize register offsets. It also splits read/write traces into supported/unsupported subsets, so you can just monitor for things that QEMU is likely doing wrong. v2: - Added qemu_log_m

[Qemu-devel] [PATCH v2 10/16] ahci: fix host register max address

2018-05-31 Thread John Snow
Yes, comment, it ought to be 0x2C. Signed-off-by: John Snow --- hw/ide/ahci_internal.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h index af366db6f3..f9dcf8b6e6 100644 --- a/hw/ide/ahci_internal.h +++ b/hw/ide/ahci_internal

[Qemu-devel] [PATCH v2 04/16] ahci: fix spacing damage on ahci_port_write

2018-05-31 Thread John Snow
Churn. Signed-off-by: John Snow --- hw/ide/ahci.c | 142 +- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 5b5ab823f4..92780990a3 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -279,85

[Qemu-devel] [PATCH v2 05/16] ahci: combine identical clauses in port write

2018-05-31 Thread John Snow
Signed-off-by: John Snow --- hw/ide/ahci.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 92780990a3..476841df58 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -330,11 +330,7 @@ static void ahci_port_write(AHCIState *s, int port, int offset, uint32_

[Qemu-devel] [PATCH v2 08/16] ahci: delete old port register address definitions

2018-05-31 Thread John Snow
They're now unused. Signed-off-by: John Snow --- hw/ide/ahci_internal.h | 18 -- 1 file changed, 18 deletions(-) diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h index eb7e1eefc0..db00c9aa39 100644 --- a/hw/ide/ahci_internal.h +++ b/hw/ide/ahci_internal.h @@ -102,24

[Qemu-devel] [PATCH v2 06/16] ahci: modify ahci_port_write to use register numbers

2018-05-31 Thread John Snow
Signed-off-by: John Snow --- hw/ide/ahci.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 476841df58..efecf849a9 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -282,30 +282,32 @@ static int ahci_cond_st

[Qemu-devel] [PATCH v2 07/16] ahci: make port write traces more descriptive

2018-05-31 Thread John Snow
Signed-off-by: John Snow --- hw/ide/ahci.c | 8 +++- hw/ide/trace-events | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index efecf849a9..01463f0f51 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -27,6 +27,7 @@ #include "hw/pci/

Re: [Qemu-devel] [qemu PATCH v4 0/4] support NFIT platform capabilities

2018-05-31 Thread Ross Zwisler
On Fri, May 25, 2018 at 08:51:22PM +0300, Michael S. Tsirkin wrote: > On Mon, May 21, 2018 at 10:31:59AM -0600, Ross Zwisler wrote: > > Changes since v3: > > * Updated the text in docs/nvdimm.txt to make it clear that the value > >being passed in on the command line in an integer made up of va

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Ignore generated job QAPI files

2018-05-31 Thread Jeff Cody
On Thu, May 31, 2018 at 04:24:35PM -0500, Eric Blake wrote: > Commit bf42508f introduced new generated files; make sure they > don't get accidentally committed from an in-tree build. > > Signed-off-by: Eric Blake Reviewed-by: Jeff Cody > --- > .gitignore | 4 > 1 file changed, 4 insertio

Re: [Qemu-devel] [PATCH 2/3] pc-bios/s390-ccw/net: Add support for pxelinux-style config files

2018-05-31 Thread Farhan Ali
On 05/30/2018 05:16 AM, Thomas Huth wrote: Since it is quite cumbersome to manually create a combined kernel with initrd image for network booting, we now support loading via pxelinux configuration files, too. In these files, the kernel, initrd and command line parameters can be specified sepe

[Qemu-devel] [PATCH] block: Ignore generated job QAPI files

2018-05-31 Thread Eric Blake
Commit bf42508f introduced new generated files; make sure they don't get accidentally committed from an in-tree build. Signed-off-by: Eric Blake --- .gitignore | 4 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 81e1f2fb0f1..9da3b3e6267 100644 --- a/.gitignore +

[Qemu-devel] [PATCH 1/5] block: Add blklogwrites

2018-05-31 Thread Ari Sundholm
From: Aapo Vienamo Implements a block device write logging system, similar to Linux kernel device mapper dm-log-writes. The write operations that are performed on a block device are logged to a file or another block device. The write log format is identical to the dm-log-writes format. Currently,

  1   2   3   4   >