[PATCH] hostmem: Add clear option to file backend

2023-03-02 Thread Fam Zheng
This adds a memset to clear the backing memory. This is useful in the case of PMEM DAX to drop dirty data, if the backing memory is handed over from a previous application or firmware which didn't clean up before exiting. Signed-off-by: Fam Zheng --- backends/hostmem-file.c | 20

Re: Attaching qcow2 images to containers

2022-05-19 Thread Fam Zheng
On 2022-05-18 07:30, Stefan Hajnoczi wrote: > Hi Kirill, > I saw your "[PATCH 0/4] dm: Introduce dm-qcow2 driver to attach QCOW2 > files as block device" patch series: > https://lore.kernel.org/linux-kernel/ykme5zs2cpxun...@infradead.org/T/ > > There has been recent work in vDPA (VIRTIO Data Path

Re: [PATCH] Remove Ubuntu 18.04 support from the repository

2022-05-11 Thread Fam Zheng
On 2022-05-11 13:13, Philippe Mathieu-Daudé via wrote: > +Fam > On Wed, May 11, 2022 at 1:03 PM Thomas Huth wrote: > > On 11/05/2022 12.46, Philippe Mathieu-Daudé wrote: > > > +Robert > > > > > > On Wed, May 11, 2022 at 11:30 AM Daniel P. Berrangé > > > wrote: > > >> > > >> On Tue, May 10,

Re: [PATCH v4] Use io_uring_register_ring_fd() to skip fd operations

2022-04-22 Thread Fam Zheng
On 2022-04-22 09:52, Daniel P. Berrangé wrote: > On Fri, Apr 22, 2022 at 09:34:28AM +0100, Fam Zheng wrote: > > On 2022-04-22 00:36, Sam Li wrote: > > > Linux recently added a new io_uring(7) optimization API that QEMU > > > doesn't take advantage of yet. The libu

Re: [PATCH v4] Use io_uring_register_ring_fd() to skip fd operations

2022-04-22 Thread Fam Zheng
On 2022-04-22 00:36, Sam Li wrote: > Linux recently added a new io_uring(7) optimization API that QEMU > doesn't take advantage of yet. The liburing library that QEMU uses > has added a corresponding new API calling io_uring_register_ring_fd(). > When this API is called after creating the ring,

Re: [PATCH v3] Use io_uring_register_ring_fd() to skip fd operations

2022-04-21 Thread Fam Zheng
On 2022-04-19 07:33, Sam Li wrote: > Linux recently added a new io_uring(7) optimization API that QEMU > doesn't take advantage of yet. The liburing library that QEMU uses > has added a corresponding new API calling io_uring_register_ring_fd(). > When this API is called after creating the ring,

Re: [PATCH 3/6] scsi-disk: add MODE_PAGE_APPLE quirk for Macintosh

2022-04-21 Thread Fam Zheng
On 2022-04-21 07:51, Mark Cave-Ayland wrote: > One of the mechanisms MacOS uses to identify drives compatible with MacOS is > to > send a custom MODE SELECT command for page 0x30 to the drive. The response to > this is a hard-coded manufacturer string which must match in order for the > drive to

Re: [PATCH V6 21/27] vfio-pci: cpr part 3 (intx)

2022-04-12 Thread Fam Zheng
On 2022-04-11 12:23, Steven Sistare wrote: > On 3/29/2022 7:03 AM, Fam Zheng wrote: > > On 2021-08-06 14:43, Steve Sistare wrote: > >> Preserve vfio INTX state across cpr restart. Preserve VFIOINTx fields as > >> follows: > >> pin : Recover this

Re: [PATCH V6 21/27] vfio-pci: cpr part 3 (intx)

2022-03-29 Thread Fam Zheng
of the kernel changes if this patch makes any sense): commit f8951e58be86bd6e37f816394a9a73f28d8059fc Author: Fam Zheng Date: Mon Mar 21 13:19:49 2022 + cpr: Add live-update support to vfio-pci devices In cpr-save, always serialize the vfio-pci states. In cpr-load, add a '-restore' mode that will do

Re: [PATCH 3/4] python/qmp-shell: relicense as LGPLv2+

2022-03-29 Thread Fam Zheng
asking permission from the current authors of this > tool to loosen the license. At present, those people are: > > - John Snow (me!), 411/609 > - Luiz Capitulino, Author, 97/609 > - Daniel Berrangé, 81/609 > - Eduardo Habkost, 10/609 > - Marc-André Lureau, 6/609 > - Fam Zh

Re: [PATCH v2] block/nvme: Fix VFIO_MAP_DMA failed: No space left on device

2021-06-22 Thread Fam Zheng
> On 22 Jun 2021, at 13:42, Philippe Mathieu-Daudé wrote: > > On 6/22/21 10:06 AM, Philippe Mathieu-Daudé wrote: >> On 6/22/21 9:29 AM, Philippe Mathieu-Daudé wrote: >>> On 6/21/21 5:36 PM, Fam Zheng wrote: >>>>> On 21 Jun 2021, at 16:13, Philippe Mathie

Re: [PATCH v2] block/nvme: Fix VFIO_MAP_DMA failed: No space left on device

2021-06-21 Thread Fam Zheng
> On 21 Jun 2021, at 16:13, Philippe Mathieu-Daudé wrote: > > On 6/21/21 3:18 PM, Fam Zheng wrote: >> >> >>> On 21 Jun 2021, at 10:32, Philippe Mathieu-Daudé wrote: >>> >>> When the NVMe block driver was introduced (see commit bdd6a90a9e5, &

Re: [PATCH v2] block/nvme: Fix VFIO_MAP_DMA failed: No space left on device

2021-06-21 Thread Fam Zheng
: blk_get_aio_context: > Assertion `ctx == blk->ctx' failed. Hi Phil, The diff looks good to me, but I’m not sure what exactly caused the assertion failure. There is `if (r) { goto fail; }` that handles -ENOSPC before, so it should be treated as a general case. What am I missing? Reviewed-b

Re: [PATCH 0/2] util/async: print leaked BH name when AioContext finalizes

2021-04-15 Thread Fam Zheng
| 25 + > util/main-loop.c | 4 ++-- > 5 files changed, 55 insertions(+), 11 deletions(-) > > -- > 2.30.2 > Reviewed-by: Fam Zheng

Re: [PATCH v2] MAINTAINERS: Merge the Gitlab-CI section into the generic CI section

2021-03-10 Thread Fam Zheng
My time on QEMU is rather limited and I could hardly look at testing patches for long. So it makes sense to drop me. Acked-by: Fam Zheng Thanks! Fam On Mon, 8 Mar 2021 at 15:50, Thomas Huth wrote: > The status of the gitlab-CI files is currently somewhat confusing, and > it is

Re: [PATCH] block: Introduce zero-co:// and zero-aio://

2021-03-10 Thread Fam Zheng
On Wed, 10 Mar 2021 at 15:02, Max Reitz wrote: > On 10.03.21 15:17, f...@euphon.net wrote: > > From: Fam Zheng > > > > null-co:// has a read-zeroes=off default, when used to in security > > analysis, this can cause false positives because the driver doesn't &

Re: [PATCH] block: Introduce zero-co:// and zero-aio://

2021-03-10 Thread Fam Zheng
On Wed, 10 Mar 2021 at 14:41, Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > 10.03.2021 17:17, f...@euphon.net wrote: > > From: Fam Zheng > > > > null-co:// has a read-zeroes=off default, when used to in security > > analysis, this can cause f

Re: [PATCH] block: Introduce zero-co:// and zero-aio://

2021-03-10 Thread Fam Zheng
On Wed, 10 Mar 2021 at 14:51, Philippe Mathieu-Daudé wrote: > On 3/10/21 3:28 PM, Fam Zheng wrote: > > On Wed, 10 Mar 2021 at 14:24, Philippe Mathieu-Daudé > <mailto:phi...@redhat.com>> wrote: > > > > On 3/10/21 3:17 PM, f...@euphon.net <mailto:f...@eu

Re: [PATCH] block: Introduce zero-co:// and zero-aio://

2021-03-10 Thread Fam Zheng
On Wed, 10 Mar 2021 at 14:24, Philippe Mathieu-Daudé wrote: > On 3/10/21 3:17 PM, f...@euphon.net wrote: > > From: Fam Zheng > > > > null-co:// has a read-zeroes=off default, when used to in security > > analysis, this can cause false positives because the driver do

Re: [PATCH 0/3] block: Introduce the 'zeroes-co' driver to help security reports

2021-03-10 Thread Fam Zheng
On Wed, 10 Mar 2021 at 12:38, Philippe Mathieu-Daudé wrote: > On 3/10/21 1:32 PM, Fam Zheng wrote: > > On Wed, 10 Mar 2021 at 11:44, Philippe Mathieu-Daudé > <mailto:phi...@redhat.com>> wrote: > > > > Hi, > > > > This is an alternative approa

Re: [PATCH 0/3] block: Introduce the 'zeroes-co' driver to help security reports

2021-03-10 Thread Fam Zheng
On Wed, 10 Mar 2021 at 11:44, Philippe Mathieu-Daudé wrote: > Hi, > > This is an alternative approach to changing null-co driver > default 'read-zeroes' option to true: > https://www.mail-archive.com/qemu-block@nongnu.org/msg80873.html > > Instead we introduce yet another block driver with an

Re: [PATCH v2 0/2] block: Use 'read-zeroes=true' mode by default with 'null-co' driver

2021-02-23 Thread Fam Zheng
On 2021-02-23 17:01, Max Reitz wrote: > On 23.02.21 10:21, Fam Zheng wrote: > > On 2021-02-22 18:55, Philippe Mathieu-Daudé wrote: > > > On 2/22/21 6:35 PM, Fam Zheng wrote: > > > > On 2021-02-19 15:09, Philippe Mathieu-Daudé wrote: > > > &

Re: [PATCH v2 0/2] block: Use 'read-zeroes=true' mode by default with 'null-co' driver

2021-02-23 Thread Fam Zheng
On 2021-02-22 18:55, Philippe Mathieu-Daudé wrote: > On 2/22/21 6:35 PM, Fam Zheng wrote: > > On 2021-02-19 15:09, Philippe Mathieu-Daudé wrote: > >> On 2/19/21 12:07 PM, Max Reitz wrote: > >>> On 13.02.21 22:54, Fam Zheng wrote: > >>>> On 2

Re: [PATCH v2 0/2] block: Use 'read-zeroes=true' mode by default with 'null-co' driver

2021-02-22 Thread Fam Zheng
On 2021-02-19 15:09, Philippe Mathieu-Daudé wrote: > On 2/19/21 12:07 PM, Max Reitz wrote: > > On 13.02.21 22:54, Fam Zheng wrote: > >> On 2021-02-11 15:26, Philippe Mathieu-Daudé wrote: > >>> The null-co driver doesn't zeroize buffer in its default config, > >&

Re: [PATCH v2 0/2] block: Use 'read-zeroes=true' mode by default with 'null-co' driver

2021-02-13 Thread Fam Zheng
On 2021-02-11 15:26, Philippe Mathieu-Daudé wrote: > The null-co driver doesn't zeroize buffer in its default config, > because it is designed for testing and tests want to run fast. > However this confuses security researchers (access to uninit > buffers). I'm a little surprised. Is changing

Re: [PATCH] scsi: allow user to set werror as report

2020-11-03 Thread Fam Zheng
to me, it matches what we actually (always) do. Is the idea to allow users to spell it out explicitly in the command line? Reviewed-by: Fam Zheng

Re: [PATCH] pci: check bus pointer before dereference

2020-10-30 Thread Fam Zheng
On Fri, 2020-10-30 at 05:01 -0400, Michael S. Tsirkin wrote: > On Wed, Sep 30, 2020 at 10:32:42AM +0530, P J P wrote: > > > > [+Paolo, +Fam Zheng - for scsi] > > > > +-- On Mon, 28 Sep 2020, P J P wrote --+ > > > +-- On Wed, 16 Sep 2020, Peter Maydell wrote -

Re: [PATCH v1 0/2] Add timeout mechanism to qmp actions

2020-10-22 Thread Fam Zheng
On Tue, 2020-10-20 at 09:34 +0800, Zhenyu Ye wrote: > On 2020/10/19 21:25, Paolo Bonzini wrote: > > On 19/10/20 14:40, Zhenyu Ye wrote: > > > The kernel backtrace for io_submit in GUEST is: > > > > > > guest# ./offcputime -K -p `pgrep -nx fio` > > > b'finish_task_switch' > > >

Re: [PATCH 0/9] util/vfio-helpers: Improve debugging experience

2020-10-14 Thread Fam Zheng
On Wed, 2020-10-14 at 14:42 +0200, Philippe Mathieu-Daudé wrote: > On 10/14/20 2:34 PM, Fam Zheng wrote: > > On Wed, 2020-10-14 at 13:52 +0200, Philippe Mathieu-Daudé wrote: > > > A bunch of boring patches that have been proven helpful > > > while debugging. > > &

Re: [PATCH 0/9] util/vfio-helpers: Improve debugging experience

2020-10-14 Thread Fam Zheng
++ > > util/trace-events | 10 -- > 4 files changed, 54 insertions(+), 38 deletions(-) > > -- > 2.26.2 > > > Modular the g_strdup_printf() memleak I pointed out: Reviewed-by: Fam Zheng

Re: [PATCH 3/9] util/vfio-helpers: Trace PCI BAR region info

2020-10-14 Thread Fam Zheng
On Wed, 2020-10-14 at 13:52 +0200, Philippe Mathieu-Daudé wrote: > For debug purpose, trace BAR regions info. > > Signed-off-by: Philippe Mathieu-Daudé > --- > util/vfio-helpers.c | 8 > util/trace-events | 1 + > 2 files changed, 9 insertions(+) > > diff --git a/util/vfio-helpers.c

Re: [PATCH v2] gitlab: move linux-user plugins test across to gitlab

2020-10-02 Thread Fam Zheng
On Fri, 2020-10-02 at 11:32 +0100, Alex Bennée wrote: > Even with the recent split moving beefier plugins into contrib and > dropping them from the check-tcg tests we are still hitting time > limits. This possibly points to a slow down of --debug-tcg but seeing > as we are migrating stuff to

Re: [PATCH 1/4] vmdk: fix maybe uninitialized warnings

2020-09-30 Thread Fam Zheng
; > -VmdkExtent *extent; > +VmdkExtent *extent = NULL; > BDRVVmdkState *s = bs->opaque; > int64_t l1_backup_offset = 0; > bool compressed; > @@ -1088,7 +1088,7 @@ static int vmdk_parse_extents(const char *desc, > BlockDriverState *bs, > BdrvChild *extent_file; > BdrvChildRole extent_role; > BDRVVmdkState *s = bs->opaque; > -VmdkExtent *extent; > +VmdkExtent *extent = NULL; > char extent_opt_prefix[32]; > Error *local_err = NULL; > Looks trivial, and correct. Reviewed-by: Fam Zheng

Re: [RFC 1/3] util/vfio-helpers: Collect IOVA reserved regions

2020-09-25 Thread Fam Zheng
On Fri, 2020-09-25 at 17:23 +0200, Auger Eric wrote: > > > @@ -365,8 +430,12 @@ static int qemu_vfio_init_pci(QEMUVFIOState > > > *s, const char *device, > > > if (ret) { > > > goto fail; > > > } > > > +g_free(iommu_info); > > > return 0; > > > fail: > > > +

Re: [RFC 1/3] util/vfio-helpers: Collect IOVA reserved regions

2020-09-25 Thread Fam Zheng
On 2020-09-25 15:48, Eric Auger wrote: > The IOVA allocator currently ignores host reserved regions. > As a result some chosen IOVAs may collide with some of them, > resulting in VFIO MAP_DMA errors later on. This happens on ARM > where the MSI reserved window quickly is encountered: > [0x800,

Re: [PATCH v2 0/6] block/nvme: Map doorbells pages write-only, remove magic from nvme_init

2020-09-22 Thread Fam Zheng
> util/vfio-helpers.c | 4 +- > 3 files changed, 44 insertions(+), 35 deletions(-) > Reviewed-by: Fam Zheng

Re: [PATCH 2/6] block/nvme: Map doorbells pages write-only

2020-09-22 Thread Fam Zheng
On Tue, 2020-09-22 at 10:41 +0200, Philippe Mathieu-Daudé wrote: > Hi Fam, > > +Paolo? > > On 9/22/20 10:18 AM, Fam Zheng wrote: > > On Mon, 2020-09-21 at 18:29 +0200, Philippe Mathieu-Daudé wrote: > > > Per the datasheet sections 3.1.13/3.1.14: > > >

Re: [PATCH 2/6] block/nvme: Map doorbells pages write-only

2020-09-22 Thread Fam Zheng
On Mon, 2020-09-21 at 18:29 +0200, Philippe Mathieu-Daudé wrote: > Per the datasheet sections 3.1.13/3.1.14: > "The host should not read the doorbell registers." > > As we don't need read access, map the doorbells with write-only > permission. We keep a reference to this mapped address in the >

Re: [PATCH v1 0/2] Add timeout mechanism to qmp actions

2020-09-21 Thread Fam Zheng
On 2020-09-19 10:22, Zhenyu Ye wrote: > On 2020/9/18 22:06, Fam Zheng wrote: > > > > I can see how blocking in a slow io_submit can cause trouble for main > > thread. I think one way to fix it (until it's made truly async in new > > kernels) is moving the io

Re: [PATCH v1 0/2] Add timeout mechanism to qmp actions

2020-09-18 Thread Fam Zheng
On 2020-09-18 19:23, Zhenyu Ye wrote: > Thread 5 (LWP 4802): > #0 0x83086b54 in syscall () at /lib64/libc.so.6 > #1 0x834598b8 in io_submit () at /lib64/libaio.so.1 > #2 0xe851e89c in ioq_submit (s=0xfffd3c001bb0) at > ../block/linux-aio.c:299 >

Re: [PATCH v1 0/2] Add timeout mechanism to qmp actions

2020-09-17 Thread Fam Zheng
On 2020-09-17 16:44, Stefan Hajnoczi wrote: > On Thu, Sep 17, 2020 at 03:36:57PM +0800, Zhenyu Ye wrote: > > When the hang occurs, the QEMU is blocked at: > > > > #0 0x95762b64 in ?? () from target:/usr/lib64/libpthread.so.0 > > #1 0x9575bd88 in pthread_mutex_lock ()

Re: [PATCH v1 0/2] Add timeout mechanism to qmp actions

2020-09-17 Thread Fam Zheng
On 2020-09-17 15:36, Zhenyu Ye wrote: > Hi Stefan, > > On 2020/9/14 21:27, Stefan Hajnoczi wrote: > >> > >> Theoretically, everything running in an iothread is asynchronous. However, > >> some 'asynchronous' actions are not non-blocking entirely, such as > >> io_submit(). This will block while

Re: [RFC PATCH v5 4/4] block/nvme: Use qemu_vfio_pci_init_msix_irqs() to initialize our IRQ

2020-09-09 Thread Fam Zheng
On 2020-09-08 20:03, Philippe Mathieu-Daudé wrote: > Instead of initializing one MSIX IRQ with the generic > qemu_vfio_pci_init_irq() function, use the MSIX specific one which > ill allow us to use multiple IRQs. For now we provide an array of s/ill/will/ > a single IRQ. > > Signed-off-by:

Re: [RFC PATCH v5 0/4] util/vfio-helpers: Add support for multiple IRQs

2020-09-09 Thread Fam Zheng
irqs > function to initialize multiple MSIX IRQs and attach eventfd to > them. > > Since RFC v4: > - addressed Alex review comment: > check ioctl(VFIO_DEVICE_SET_IRQS) return value Reviewed-by: Fam Zheng

Re: [RFC PATCH v5 2/4] util/vfio-helpers: Report error when IOMMU page size is not supported

2020-09-09 Thread Fam Zheng
On 2020-09-08 20:03, Philippe Mathieu-Daudé wrote: > This driver uses the host page size to align its memory regions, > but this size is not always compatible with the IOMMU. Add a > check if the size matches, and bails out with listing the sizes > the IOMMU supports. > > Example on Aarch64: > >

Re: [PATCH] MAINTAINERS: add Stefan Hajnoczi as block/nvme.c maintainer

2020-09-08 Thread Fam Zheng
On 2020-09-07 12:16, Stefan Hajnoczi wrote: > Development of the userspace NVMe block driver picked up again recently. > After talking with Fam I am stepping up as block/nvme.c maintainer. > Patches will be merged through my 'block' tree. > > Cc: Kevin Wolf > Cc: Klaus Jense

Re: [PATCH 0/3] block/nvme: Use NvmeBar structure from "block/nvme.h"

2020-09-04 Thread Fam Zheng
hieu-Daudé (3): > block/nvme: Group controller registers in NVMeRegs structure > block/nvme: Use generic NvmeBar structure > block/nvme: Pair doorbell registers > > block/nvme.c | 43 +++ > 1 file changed, 15 insertions(+), 28 deletions(-) > > -- > 2.26.2 > > Reviewed-by: Fam Zheng

Re: [PATCH v2 00/20] nvme: support NVMe v1.3d, SGLs and multiple namespaces

2019-10-16 Thread Fam Zheng
d > NvmeCmd struct. Yeah, that part looks sane to me. For the block/nvme.c bit: Acked-by: Fam Zheng

Re: [Qemu-devel] [PATCH] docker: add sanitizers back to clang build

2019-09-17 Thread Fam Zheng
On Thu, 09/12 19:07, John Snow wrote: > > > On 9/11/19 9:52 PM, no-re...@patchew.org wrote: > > Patchew URL: > > https://patchew.org/QEMU/20190912014442.5757-1-js...@redhat.com/ > > > > > > > > Hi, > > > > This series seems to have some coding style problems. See output below for > > more

Re: [Qemu-devel] [Patchew-devel] [PATCH v15 0/5] linux-user: A set of miscellaneous patches

2019-06-28 Thread Fam Zheng
On Fri, 06/28 14:15, Laurent Vivier wrote: > Dear Patchew developers, > > Le 28/06/2019 à 11:49, no-re...@patchew.org a écrit : > > Patchew URL: > > https://patchew.org/QEMU/1561712082-31441-1-git-send-email-aleksandar.marko...@rt-rk.com/ > > > > > > > > Hi, > > > > This series failed build

Re: [Qemu-devel] [PATCH v5 09/12] block: add trace events for io_uring

2019-06-11 Thread Fam Zheng
On Mon, 06/10 19:19, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > block/io_uring.c | 14 -- > block/trace-events | 8 > 2 files changed, 20 insertions(+), 2 deletions(-) > > diff --git a/block/io_uring.c b/block/io_uring.c > index f327c7ef96..47e027364a

Re: [Qemu-devel] [PATCH v5 11/12] qemu-io: adds support for io_uring

2019-06-11 Thread Fam Zheng
On Mon, 06/10 19:19, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > qemu-io.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/qemu-io.c b/qemu-io.c > index 8d5d5911cb..54b82151c4 100644 > --- a/qemu-io.c > +++ b/qemu-io.c > @@ -129,6 +129,7 @@ static void

Re: [Qemu-devel] [PATCH v5 04/12] block/io_uring: implements interfaces for io_uring

2019-06-11 Thread Fam Zheng
On Mon, 06/10 19:18, Aarushi Mehta wrote: > Aborts when sqe fails to be set as sqes cannot be returned to the ring. > > Signed-off-by: Aarushi Mehta > --- > MAINTAINERS | 7 + > block/Makefile.objs | 3 + > block/io_uring.c| 314

Re: [Qemu-devel] [PATCH v5 02/12] qapi/block-core: add option for io_uring

2019-06-11 Thread Fam Zheng
On Mon, 06/10 19:18, Aarushi Mehta wrote: > Option only enumerates for hosts that support it. > > Signed-off-by: Aarushi Mehta > Reviewed-by: Stefan Hajnoczi > --- > qapi/block-core.json | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/qapi/block-core.json

Re: [Qemu-devel] [PATCH v2 5/5] block/nvme: add support for discard

2019-06-05 Thread Fam Zheng
On Wed, 04/17 22:53, Maxim Levitsky wrote: > Signed-off-by: Maxim Levitsky > --- > block/nvme.c | 80 ++ > block/trace-events | 2 ++ > 2 files changed, 82 insertions(+) > > diff --git a/block/nvme.c b/block/nvme.c > index

Re: [Qemu-devel] [PATCH v2 4/5] block/nvme: add support for write zeros

2019-06-05 Thread Fam Zheng
On Wed, 04/17 22:53, Maxim Levitsky wrote: > Signed-off-by: Maxim Levitsky > --- > block/nvme.c | 69 +++- > block/trace-events | 1 + > include/block/nvme.h | 19 +++- > 3 files changed, 87 insertions(+), 2 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH] block/file-posix: ignore fail on unlock bytes

2019-03-28 Thread Fam Zheng
ret = raw_apply_lock_bytes(s, s->fd, s->perm | new_perm, > ~s->shared_perm | ~new_shared, > false, errp); > -- > 2.18.0 > > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH] docker: trivial changes to `make docker` help

2019-03-24 Thread Fam Zheng
name.' > @echo 'docker-image:Build all images.' > @echo 'docker-image-IMAGE: Build image "IMAGE".' > - @echo 'docker-run: For manually running a "TEST" with > "IMAGE"' > + @echo ' docker-run: For manually running a "TEST" with > "IMAGE".' > @echo > @echo 'Available container images:' > @echo '$(DOCKER_IMAGES)' > -- > 2.20.1 > > Reviewed-by: Fam Zheng

Re: [Qemu-devel] Combining synchronous and asynchronous IO

2019-03-17 Thread Fam Zheng
> On Mar 15, 2019, at 01:31, Sergio Lopez wrote: > > Hi, > > Our current AIO path does a great job at unloading the work from the VM, > and combined with IOThreads provides a good performance in most > scenarios. But it also comes with its costs, in both a longer execution > path and the

Re: [Qemu-devel] State of QEMU CI as we enter 4.0

2019-03-17 Thread Fam Zheng
> On Mar 15, 2019, at 23:12, Stefan Hajnoczi wrote: > > On Thu, Mar 14, 2019 at 03:57:06PM +, Alex Bennée wrote: >> As we approach stabilisation for 4.0 I thought it would be worth doing a >> review of the current state of CI and stimulate some discussion of where >> it is working for us

Re: [Qemu-devel] [PATCH] ci: store Patchew configuration in the tree

2019-03-15 Thread Fam Zheng
> + script: | > +#!/bin/bash > +INSTALL=$PWD/install > +BUILD=$PWD/build > +mkdir -p $BUILD $INSTALL > +SRC=$PWD > +cd $BUILD > +$SRC/configure --prefix=$INSTALL > +make -j14 > + > +ppcbe: > + enabled: false > + requirements: ppcbe > + script: | > +#!/bin/bash > +INSTALL=$PWD/install > +BUILD=$PWD/build > +mkdir -p $BUILD $INSTALL > +SRC=$PWD > +cd $BUILD > +$SRC/configure --prefix=$INSTALL > +make -j14 > + > +s390x: > + enabled: false > + requirements: ppcle > + script: | > +#!/bin/bash > +INSTALL=$PWD/install > +BUILD=$PWD/build > +mkdir -p $BUILD $INSTALL > +SRC=$PWD > +cd $BUILD > +$SRC/configure --prefix=$INSTALL > +make -j14 > -- > 2.20.1 > > Reviewed-by: Fam Zheng

Re: [Qemu-devel] State of QEMU CI as we enter 4.0

2019-03-15 Thread Fam Zheng
> On Mar 15, 2019, at 17:58, Alex Bennée wrote: > > > Fam Zheng writes: > >>> On Mar 15, 2019, at 16:57, Alex Bennée wrote: >>> >>> I had installed the gitlab-runner from the Debian repo but it was out >>> of date and didn't seem to w

Re: [Qemu-devel] State of QEMU CI as we enter 4.0

2019-03-15 Thread Fam Zheng
> On Mar 15, 2019, at 16:57, Alex Bennée wrote: > > I had installed the gitlab-runner from the Debian repo but it was out > of date and didn't seem to work correctly. If there can be a sidecar x86 box next to the test bot, it can be the controller node which runs gitlab-runner, the test

Re: [Qemu-devel] State of QEMU CI as we enter 4.0

2019-03-14 Thread Fam Zheng
> On Mar 15, 2019, at 02:22, Peter Maydell wrote: > > On Thu, 14 Mar 2019 at 15:57, Alex Bennée wrote: >> Testing in the Cloud >> >> >> After BuildBot went out-of-service we have been relying heavily on Travis >> as our primary CI platform. This has been creaking

Re: [Qemu-devel] [Qemu-block] [PATCH] tcmu: Introduce qemu-tcmu utility

2019-03-12 Thread Fam Zheng
> On Mar 12, 2019, at 18:03, Kevin Wolf wrote: > > Am 12.03.2019 um 03:18 hat Fam Zheng geschrieben: >>> On Mar 11, 2019, at 19:06, Kevin Wolf wrote: >>> Am 09.03.2019 um 02:46 hat Yaowei Bai geschrieben: >>>> Thanks for explaining the backgroun

Re: [Qemu-devel] [Qemu-block] [PATCH] tcmu: Introduce qemu-tcmu utility

2019-03-11 Thread Fam Zheng
> On Mar 11, 2019, at 19:06, Kevin Wolf wrote: > > Am 09.03.2019 um 02:46 hat Yaowei Bai geschrieben: >> Thanks for explaining the background. It comes to my mind that actually we >> talked about these two cases with Fam a bit long time ago and decided to >> support both these two cases. The

Re: [Qemu-devel] [PATCH v4] tests: vm: auto_install OpenBSD

2019-02-27 Thread Fam Zheng
On Tue, 01/22 16:12, Daniel P. Berrangé wrote: > > can't you just refresh that pre-built image to have SDL 2, based on your > > auto-install patches, so we don't have to wait for that to merge. > > Please could we just get this pre-built img updated so that we are > not blocked on the SDL 1

Re: [Qemu-devel] [PATCH v4] tests: vm: auto_install OpenBSD

2019-02-27 Thread Fam Zheng
On Tue, 01/22 16:12, Daniel P. Berrangé wrote: > > can't you just refresh that pre-built image to have SDL 2, based on your > > auto-install patches, so we don't have to wait for that to merge. > > Please could we just get this pre-built img updated so that we are > not blocked on the SDL 1

Re: [Qemu-devel] [PATCH v4] tests: vm: auto_install OpenBSD

2019-01-13 Thread Fam Zheng
> On Jan 9, 2019, at 21:59, Daniel P. Berrangé wrote: > > On Wed, Jan 09, 2019 at 01:55:04PM +, Daniel P. Berrangé wrote: >> On Wed, Nov 14, 2018 at 05:58:07PM +0800, Fam Zheng wrote: >>> On Sun, 11/11 18:20, Brad Smith wrote: >>>> ping. >>&g

[Qemu-devel] [PULL 1/2] block/nvme: optimize the performance of nvme driver based on vfio-pci

2019-01-08 Thread Fam Zheng
com> Signed-off-by: Fam Zheng --- block/nvme.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index 29294038fc..982097b5b1 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -837,7 +837,7 @@ try_map: } for (j = 0; j

[Qemu-devel] [PULL 2/2] docker: Use a stable snapshot for Debian Sid

2019-01-08 Thread Fam Zheng
going to be installed E: Unable to correct problems, you have held broken packages. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181101183705.5422-1-phi...@redhat.com> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/debian-sid.docker | 4 1 file changed, 4 inserti

[Qemu-devel] [PULL 0/2] Block/testing patches

2019-01-08 Thread Fam Zheng
The following changes since commit 147923b1a901a0370f83a0f4c58ec1baffef22f0: Merge remote-tracking branch 'remotes/kraxel/tags/usb-20190108-pull-request' into staging (2019-01-08 16:07:32 +) are available in the git repository at: https://github.com/famz/qemu.git

[Qemu-devel] [PULL 3/3] tests: vm: auto_install OpenBSD

2019-01-05 Thread Fam Zheng
From: Fam Zheng Upgrade OpenBSD to 6.4 using auto_install. Especially, drop SDL1, include SDL2. Also do the build in $HOME since both /var/tmp and /tmp are tmpfs with limited capacities. Signed-off-by: Fam Zheng Message-Id: <20181031025712.18602-1-f...@redhat.com> Signed-off-by: Fam

[Qemu-devel] [PULL 1/3] block/nvme: optimize the performance of nvme driver based on vfio-pci

2019-01-05 Thread Fam Zheng
com> Signed-off-by: Fam Zheng --- block/nvme.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index 29294038fc..982097b5b1 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -837,7 +837,7 @@ try_map: } for (j = 0; j

[Qemu-devel] [PULL 2/3] docker: Use a stable snapshot for Debian Sid

2019-01-05 Thread Fam Zheng
going to be installed E: Unable to correct problems, you have held broken packages. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181101183705.5422-1-phi...@redhat.com> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/debian-sid.docker | 4 1 file changed, 4 inserti

[Qemu-devel] [PULL 0/3] Block and testing patches

2019-01-05 Thread Fam Zheng
-request for you to fetch changes up to 3baa6942169cce0f58b88484ad010742c382480a: tests: vm: auto_install OpenBSD (2019-01-02 20:51:15 +0800) Pull request Fam Zheng

Re: [Qemu-devel] [PATCH] docker: Use a stable snapshot for Debian Sid

2019-01-01 Thread Fam Zheng
> On Dec 20, 2018, at 19:20, Philippe Mathieu-Daudé wrote: > > Hi Fam, > > On 11/2/18 8:24 AM, Fam Zheng wrote: >> On Fri, Nov 2, 2018 at 3:20 PM Philippe Mathieu-Daudé >> wrote: >>> >>> Hi Fam, >>> >>> Thanks for picking

Re: [Qemu-devel] Patchew down?

2019-01-01 Thread Fam Zheng
> On Dec 30, 2018, at 08:09, Philippe Mathieu-Daudé wrote: > > Hi, > > I think patchew is having some trouble since at least 1 week: > new series aren't added. Thanks for the reminder, Phil. I fixed https on patches.org but forgot to switch the importer back from http. Now it’s back to

Re: [Qemu-devel] Question about aio_poll and glib aio_ctx_dispatch

2018-12-19 Thread Fam Zheng
> On Dec 20, 2018, at 06:58, Li Qiang wrote: > > Hello Paolo > > Thanks for your kind reply. > > Yes, aio_poll and aio_ctx_dispatch mostly run in different threads, though > Sometimes they can run in a thread nested from Fam’s slides: >

Re: [Qemu-devel] patchew.org using expired https certificate

2018-12-14 Thread Fam Zheng
> On Dec 14, 2018, at 18:13, Stefan Hajnoczi wrote: > > On Fri, Dec 14, 2018 at 09:54:06AM +, Peter Maydell wrote: >> Connecting to https://patchew.org/ makes my browser complain: >> >> # patchew.org uses an invalid security certificate. >> # The certificate expired on 19 November 2017,

Re: [Qemu-devel] [PATCH v6 00/37] ppc: support for the XIVE interrupt controller (POWER9)

2018-12-06 Thread Fam Zheng
> On Dec 6, 2018, at 14:14, Cédric Le Goater wrote: > > Hello, > >> Your patch has style problems, please review. If any of these errors >> are false positives report them to the maintainer, see >> CHECKPATCH in MAINTAINERS. >> Checking PATCH 25/37: spapr/xive: add state synchronization

[Qemu-devel] [PATCH] MAINTAINERS: Update email address for Fam Zheng

2018-11-21 Thread Fam Zheng
and replace. Signed-off-by: Fam Zheng Signed-off-by: Fam Zheng --- MAINTAINERS | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1032406c56..906d40d06d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1252,7 +1252,7 @@ T: git

Re: [Qemu-devel] When AioHandler->is_external=true?

2018-11-20 Thread Fam Zheng
On Tue, 11/20 20:34, Dongli Zhang wrote: > Hi, > > Would you please help explain in which case AioHandler->is_external is true, > and > when it is false? > > I read about iothread and mainloop and I am little bit confused about it. VirtIO's ioeventfd is an example of is_external == true. It

Re: [Qemu-devel] [PATCH v4] tests: vm: auto_install OpenBSD

2018-11-14 Thread Fam Zheng
On Sun, 11/11 18:20, Brad Smith wrote: > ping. Queued. Will send a pull request soon. Fam > > On 10/30/2018 10:57 PM, Fam Zheng wrote: > > Upgrade OpenBSD to 6.4 using auto_install. Especially, drop SDL1, > > include SDL2. > > > > Also do the build in $

Re: [Qemu-devel] [PATCH v5 0/3] file-posix: Simplifications on image locking

2018-11-07 Thread Fam Zheng
On Thu, 10/11 15:21, Fam Zheng wrote: > v5: Address Max's comments (Thanks for reviewing): > - Clean up after test done. > - Add rev-by to patch 1 and 2. Ping? Fam

Re: [Qemu-devel] [PATCH 0/2] target/arm: fix some ATS* bugs

2018-11-06 Thread Fam Zheng
On Tue, 11/06 01:50, no-re...@patchew.org wrote: > ERROR: unknown option --with-gtkabi=3.0 Patchew is testing old series branches of which are heavily lagging behind. This configure option in the mingw docker testing is recently dropped, so it's a false positive. Fam > Try

Re: [Qemu-devel] [PATCH] docker: Use a stable snapshot for Debian Sid

2018-11-02 Thread Fam Zheng
On Fri, Nov 2, 2018 at 3:20 PM Philippe Mathieu-Daudé wrote: > > Hi Fam, > > Thanks for picking this. > > On Fri, Nov 2, 2018 at 7:48 AM Fam Zheng wrote: > > On Thu, 11/01 19:37, Philippe Mathieu-Daudé wrote: > > > The Debian Sid repository is not garanteed to

Re: [Qemu-devel] [PATCH] docker: Use a stable snapshot for Debian Sid

2018-11-02 Thread Fam Zheng
On Thu, 11/01 19:37, Philippe Mathieu-Daudé wrote: > The Debian Sid repository is not garanteed to be stable, as his > 'unstable' name suggest :) > To allow quick testing, packages are pushed various time a day, > which my be annoying when trying to use it for stable development > (which is not

Re: [Qemu-devel] [PATCH] block/nvme: optimize the performance of nvme driver based on vfio-pci

2018-11-02 Thread Fam Zheng
On Thu, 11/01 18:38, Li Feng wrote: > When the IO size is larger than 2 pages, we move the the pointer one by > one in the pagelist, this is inefficient. > > This is a simple benchmark result: > > Before: > $ qemu-io -c 'write 0 1G' nvme://:00:04.0/1 > > wrote 1073741824/1073741824 bytes at

Re: [Qemu-devel] [PATCH] tests/vm: Use subprocess.Popen() with to uncompress XZ files

2018-11-01 Thread Fam Zheng
On Sat, 10/13 02:30, Philippe Mathieu-Daudé wrote: > Avoiding the file copy greatly speeds the process up. > > Comparison with network file already cached, stopping after build_image(): > > Before: > $ time make vm-build-freebsd > real1m38.153s > user1m16.871s > sys 0m19.325s

[Qemu-devel] [PATCH v3] file-posix: Use error API properly

2018-11-01 Thread Fam Zheng
. Suggested-by: Markus Armbruster Signed-off-by: Fam Zheng --- v3: Use error_setg_errno. [Eric] v2: Add Error ** to raw_normalize_devicepath. [Markus] Use error_printf for splitting multi-sentence message. [Markus] --- block/file-posix.c | 39 --- 1 file

Re: [Qemu-devel] [PATCH v2] file-posix: Use error API properly

2018-11-01 Thread Fam Zheng
On Wed, 10/31 15:51, Markus Armbruster wrote: > Fam Zheng writes: > > > Use error_report for situations that affect user operation (i.e. we're > > actually returning error), and warn_report/warn_report_err when some > > less critical error happened but the user o

Re: [Qemu-devel] [PATCH] iotests: 082: Update output

2018-10-31 Thread Fam Zheng
On Wed, 10/31 16:04, Fam Zheng wrote: > Commit 9cbef9d68e (qemu-option: improve qemu_opts_print_help() output) > affected qemu-img help output, and broke this test case. > > Update the output reference to fix it. > > Signed-off-by: Fam Zheng > > --- > > I'm

[Qemu-devel] [PATCH] iotests: 082: Update output

2018-10-31 Thread Fam Zheng
Commit 9cbef9d68e (qemu-option: improve qemu_opts_print_help() output) affected qemu-img help output, and broke this test case. Update the output reference to fix it. Signed-off-by: Fam Zheng --- I'm once again looking at enabling iotests on patchew (via vm based tests), but immediately got

[Qemu-devel] [PATCH v2] file-posix: Use error API properly

2018-10-30 Thread Fam Zheng
. Suggested-by: Markus Armbruster Signed-off-by: Fam Zheng --- v2: Add Error ** to raw_normalize_devicepath. [Markus] Use error_printf for splitting multi-sentence message. [Markus] --- block/file-posix.c | 39 --- 1 file changed, 16 insertions(+), 23 deletions

[Qemu-devel] [PATCH v4] tests: vm: auto_install OpenBSD

2018-10-30 Thread Fam Zheng
Upgrade OpenBSD to 6.4 using auto_install. Especially, drop SDL1, include SDL2. Also do the build in $HOME since both /var/tmp and /tmp are tmpfs with limited capacities. Signed-off-by: Fam Zheng --- v4: Use 6.4. [Brad] --- tests/vm/basevm.py | 6 ++-- tests/vm/openbsd | 85

[Qemu-devel] [PULL 7/9] tests/vm: Let kvm_available() work in cross environments

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-7-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- scripts/qemu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py

[Qemu-devel] [PULL 8/9] tests/vm: Do not use -enable-kvm if HOST != TARGET architecture

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-8-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b

[Qemu-devel] [PULL 0/9] Testing patches

2018-10-26 Thread Fam Zheng
The following changes since commit 808ebd66e467f77c0d1f8c6346235f81e9c99cf2: Merge remote-tracking branch 'remotes/riscv/tags/riscv-for-master-3.1-sf0' into staging (2018-10-25 17:41:03 +0100) are available in the Git repository at: git://github.com/famz/qemu.git tags/testing-pull-request

[Qemu-devel] [PULL 4/9] tests/vm: Do not use the -smp option with a single cpu

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-4-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b

  1   2   3   4   5   6   7   8   9   10   >