Re: [PATCH v3 2/3] block: introduce zone append write for zoned devices

2022-10-12 Thread Damien Le Moal
On 10/10/22 11:33, Sam Li wrote: > A zone append command is a write operation that specifies the first > logical block of a zone as the write position. When writing to a zoned > block device using zone append, the byte offset of writes is pointing > to the write pointer of that zone. Upon

[PATCH] tests/qtest/libqos/e1000e: Use e1000_regs.h

2022-10-12 Thread Akihiko Odaki
The register definitions in tests/qtest/libqos/e1000e.c had names different from hw/net/e1000_regs.h, which made it hard to understand what test codes corresponds to the implementation. Use hw/net/e1000_regs.h from tests/qtest/libqos/e1000e.c to remove these duplications. E1000E_CTRL_EXT_TXLSFLOW

Re: [PATCH v11 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-12 Thread Damien Le Moal
On 10/13/22 14:33, Sam Li wrote: > Damien Le Moal 于2022年10月13日周四 12:41写道: >> >> On 10/10/22 11:21, Sam Li wrote: >>> Add a new zoned_host_device BlockDriver. The zoned_host_device option >>> accepts only zoned host block devices. By adding zone management >>> operations in this new BlockDriver,

Re: [PATCH v11 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-12 Thread Sam Li
Damien Le Moal 于2022年10月13日周四 13:45写道: > > On 10/13/22 14:33, Sam Li wrote: > > Damien Le Moal 于2022年10月13日周四 12:41写道: > >> > >> On 10/10/22 11:21, Sam Li wrote: > >>> Add a new zoned_host_device BlockDriver. The zoned_host_device option > >>> accepts only zoned host block devices. By adding

Re: [PATCH v2] pci: Assert that capabilities never overlap

2022-10-12 Thread Akihiko Odaki
On Thu, Sep 29, 2022 at 7:55 PM Markus Armbruster wrote: > > Akihiko Odaki writes: > > > On Mon, Sep 5, 2022 at 6:26 PM Markus Armbruster wrote: > >> > >> Akihiko Odaki writes: > >> > >> > On Fri, Sep 2, 2022 at 7:23 PM Markus Armbruster > >> > wrote: > >> >> > >> >> Akihiko Odaki writes: >

Re: [PATCH v11 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-12 Thread Sam Li
Damien Le Moal 于2022年10月13日周四 12:41写道: > > On 10/10/22 11:21, Sam Li wrote: > > Add a new zoned_host_device BlockDriver. The zoned_host_device option > > accepts only zoned host block devices. By adding zone management > > operations in this new BlockDriver, users can use the new block > > layer

Re: [PATCH v3 1/3] file-posix:add the tracking of the zones write pointers

2022-10-12 Thread Damien Le Moal
On 10/10/22 11:33, Sam Li wrote: > Since Linux doesn't have a user API to issue zone append operations to > zoned devices from user space, the file-posix driver is modified to add > zone append emulation using regular writes. To do this, the file-posix > driver tracks the wp location of all zones

Re: FAILED: libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o

2022-10-12 Thread Warner Losh
On Mon, Oct 10, 2022 at 11:01 AM Warner Losh wrote: > > > On Mon, Oct 10, 2022 at 1:13 AM Thomas Huth wrote: > >> On 10/10/2022 08.18, Dennis Clarke wrote: >> > >> > On FreeBSD 14.0 CURRENT amd64 everything seems to go swimmingly until : >> > >> > [5679/6848] Compiling C object >>

Re: [PATCH 3/4] qtest: Improve error messages when property can not be set right now

2022-10-12 Thread Markus Armbruster
Thomas Huth writes: > On 12/10/2022 17.38, Markus Armbruster wrote: >> When you try to set qtest property "log" while the qtest object is >> active, the error message blames "insufficient permission": >> >> $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio >> -chardev

Re: [PATCH v2] vhost-vdpa: allow passing opened vhostfd to vhost-vdpa

2022-10-12 Thread Jason Wang
在 2022/10/12 13:59, Si-Wei Liu 写道: On 10/11/2022 8:09 PM, Jason Wang wrote: On Tue, Oct 11, 2022 at 1:18 AM Si-Wei Liu wrote: On 10/8/2022 10:43 PM, Jason Wang wrote: On Sat, Oct 8, 2022 at 5:04 PM Si-Wei Liu wrote: Similar to other vhost backends, vhostfd can be passed to vhost-vdpa

Re: [PATCH v11 7/7] docs/zoned-storage: add zoned device documentation

2022-10-12 Thread Damien Le Moal
On 10/10/22 11:21, Sam Li wrote: > Add the documentation about the zoned device support to virtio-blk > emulation. > > Signed-off-by: Sam Li > Reviewed-by: Stefan Hajnoczi > --- > docs/devel/zoned-storage.rst | 40 ++ > docs/system/qemu-block-drivers.rst.inc |

Re: [PATCH v11 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-12 Thread Damien Le Moal
On 10/10/22 11:21, Sam Li wrote: > Add a new zoned_host_device BlockDriver. The zoned_host_device option > accepts only zoned host block devices. By adding zone management > operations in this new BlockDriver, users can use the new block > layer APIs including Report Zone and four zone management

[PATCH v2] tcg/loongarch64: Add direct jump support

2022-10-12 Thread Qi Hu
Similar to the ARM64, LoongArch has PC-relative instructions such as PCADDU18I. These instructions can be used to support direct jump for LoongArch. Additionally, if instruction "B offset" can cover the target address(target is within ±128MB range), a single "B offset" plus a nop will be used by

Re: ublk-qcow2: ublk-qcow2 is available

2022-10-12 Thread Ming Lei
On Wed, Oct 12, 2022 at 10:15:28AM -0400, Stefan Hajnoczi wrote: > On Thu, 6 Oct 2022 at 06:14, Richard W.M. Jones wrote: > > > > On Tue, Oct 04, 2022 at 09:53:32AM -0400, Stefan Hajnoczi wrote: > > > qemu-nbd doesn't use io_uring to handle the backend IO, > > > > Would this be fixed by your (not

Re: [PATCH 2/2] tcg/loongarch64: Add direct jump support

2022-10-12 Thread Qi Hu
On 2022/10/12 19:34, WANG Xuerui wrote: Hi, Thanks for the improvement! Some room for improvement though... On 2022/10/12 17:13, Qi Hu wrote: Similar to the ARM64, LoongArch has PC-relative instructions such as PCADDU18I. These instructions can be used to support direct jump for LoongArch.

Re: [PATCH 1/2] tcg/loongarch64: Implement INDEX_op_neg_i{32,64}

2022-10-12 Thread Qi Hu
On 2022/10/12 17:41, WANG Xuerui wrote: Hi, On 2022/10/12 17:13, Qi Hu wrote: Signed-off-by: Qi Hu ---   tcg/loongarch64/tcg-target.c.inc | 9 +   tcg/loongarch64/tcg-target.h | 4 ++--   2 files changed, 11 insertions(+), 2 deletions(-) diff --git

CXL emulation in QEMU contribution

2022-10-12 Thread Viacheslav A.Dubeyko
Hi Jonathan, As we agreed, I am moving our discussion into public mailing list. So, I would like to contribute to QEMU emulation of CXL memory support. And I would like to see a TODO list. I hope this list could be useful not only for me. As far as I can see, we can summarize: 1) Moving

[PATCH v2] Properly sign extend BBIT branch offset during calculation

2022-10-12 Thread Christopher Wrogg
The Octeon specific BBIT instruction incorrectly computes the branch offset. The 16 bit value is not sign extended. Signed-off-by: Christopher Wrogg Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1251 --- target/mips/tcg/octeon_translate.c | 5 - 1 file changed, 4 insertions(+), 1

Re: [PULL 00/50] Block layer patches

2022-10-12 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/28] target-arm queue

2022-10-12 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/55] pc,virtio: features, tests, fixes, cleanups

2022-10-12 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/55] pc,virtio: features, tests, fixes, cleanups

2022-10-12 Thread Stefan Hajnoczi
On Wed, 12 Oct 2022 at 17:00, Michael S. Tsirkin wrote: > > On Wed, Oct 12, 2022 at 04:04:31PM -0400, Stefan Hajnoczi wrote: > > On Mon, 10 Oct 2022 at 13:46, Michael S. Tsirkin wrote: > > > > > > The following changes since commit > > > f1d33f55c47dfdaf8daacd618588ad3ae4c452d1: > > > > > >

Re: [PULL 00/55] pc,virtio: features, tests, fixes, cleanups

2022-10-12 Thread Michael S. Tsirkin
On Wed, Oct 12, 2022 at 04:04:31PM -0400, Stefan Hajnoczi wrote: > On Mon, 10 Oct 2022 at 13:46, Michael S. Tsirkin wrote: > > > > The following changes since commit f1d33f55c47dfdaf8daacd618588ad3ae4c452d1: > > > > Merge tag 'pull-testing-gdbstub-plugins-gitdm-061022-3' of > >

Re: [PULL 00/55] pc,virtio: features, tests, fixes, cleanups

2022-10-12 Thread Stefan Hajnoczi
On Mon, 10 Oct 2022 at 13:46, Michael S. Tsirkin wrote: > > The following changes since commit f1d33f55c47dfdaf8daacd618588ad3ae4c452d1: > > Merge tag 'pull-testing-gdbstub-plugins-gitdm-061022-3' of > https://github.com/stsquad/qemu into staging (2022-10-06 07:11:56 -0400) > > are available

MultiFD and default channel out of order mapping on receive side.

2022-10-12 Thread manish.mishra
Hi Everyone, Hope everyone is doing great. I have seen some live migration issues with qemu-4.2 when using multiFD. Signature of issue is something like this. 2022-10-01T09:57:53.972864Z qemu-kvm: failed to receive packet via multifd channel 0: multifd: received packet magic 5145564d expected

Re: [PATCH 2/3] target/s390x: Fix emulation of the VISTR instruction

2022-10-12 Thread David Hildenbrand
On 12.10.22 20:27, Thomas Huth wrote: The element size is encoded in the M3 field, not in the M4 field. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1248 Fixes: be6324c6b734 ("s390x/tcg: Implement VECTOR ISOLATE STRING") Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth ---

Re: [PATCH 1/4] qom: Improve error messages when property has no getter or setter

2022-10-12 Thread David Hildenbrand
On 12.10.22 17:37, Markus Armbruster wrote: When you try to set a property that has no setter, the error message blames "insufficient permission": $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio QEMU 7.1.50 monitor - type 'help' for more information (qemu)

Re: [PATCH 3/3] tests/tcg/s390x: Add a test for the vistr instruction

2022-10-12 Thread David Hildenbrand
On 12.10.22 20:27, Thomas Huth wrote: This test can be used to verify that the change in the previous commit is indeed fixing the problem with the M3 vs. M4 field mixup. Signed-off-by: Thomas Huth --- Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH 1/3] tests/tcg/s390x: Test compiler flags only once, not every time

2022-10-12 Thread David Hildenbrand
On 12.10.22 20:27, Thomas Huth wrote: This is common practice, see the Makefile.target in the aarch64 folder for example. Suggested-by: Alex Bennée Signed-off-by: Thomas Huth --- tests/tcg/s390x/Makefile.target | 27 +-- 1 file changed, 17 insertions(+), 10

Re: [PATCH 3/4] qtest: Improve error messages when property can not be set right now

2022-10-12 Thread David Hildenbrand
On 12.10.22 20:05, Thomas Huth wrote: On 12/10/2022 17.38, Markus Armbruster wrote: When you try to set qtest property "log" while the qtest object is active, the error message blames "insufficient permission": $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio -chardev

Re: [PATCH] bsd-user: Catch up with sys/param.h requirement for machine/pmap.h

2022-10-12 Thread Warner Losh
Note: This is my first patch that someone else wrote that I'm trying to accept and land as the bsd-user maintainer unrelated to the other upstreaming work. Please be let me know if I'm doing something wrong. I'll queue it to this month's bsd-user pull request (which likely will only include this

[PATCH] bsd-user: Catch up with sys/param.h requirement for machine/pmap.h

2022-10-12 Thread Warner Losh
From: Muhammad Moinur Rahman Some versions of FreeBSD now require sys/param.h for machine/pmap.h on x86. Include them here to meet that requirement. It does no harm on older versions, so there's no need to #ifdef it. Signed-off-by: Muhammad Moinur Rahman Reviewed-by:John Baldwin

[PATCH 1/3] tests/tcg/s390x: Test compiler flags only once, not every time

2022-10-12 Thread Thomas Huth
This is common practice, see the Makefile.target in the aarch64 folder for example. Suggested-by: Alex Bennée Signed-off-by: Thomas Huth --- tests/tcg/s390x/Makefile.target | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git

[PATCH 3/3] tests/tcg/s390x: Add a test for the vistr instruction

2022-10-12 Thread Thomas Huth
This test can be used to verify that the change in the previous commit is indeed fixing the problem with the M3 vs. M4 field mixup. Signed-off-by: Thomas Huth --- tests/tcg/s390x/vistr.c | 45 + tests/tcg/s390x/Makefile.target | 4 +++ 2 files changed,

[PATCH 2/3] target/s390x: Fix emulation of the VISTR instruction

2022-10-12 Thread Thomas Huth
The element size is encoded in the M3 field, not in the M4 field. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1248 Fixes: be6324c6b734 ("s390x/tcg: Implement VECTOR ISOLATE STRING") Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- target/s390x/tcg/translate_vx.c.inc |

[PATCH 4/5] hw/mem/cxl_type3: Change the CDAT allocation/free strategy

2022-10-12 Thread Gregory Price
The existing code allocates a subtable for SLBIS entries, uses a local variable to avoid a g_autofree footgun, and the cleanup code causes heap corruption. Rather than allocate a table, explicitly allocate each individual entry and make the sub-table size static. Signed-off-by: Gregory Price

[PATCH 0/3] s390x: Fix for vistr instruction & addition to TCG tests

2022-10-12 Thread Thomas Huth
1) Improve tests/tcg/s390x/Makefile.target to look for -march flags only once 2) Fix a problem with the vistr instruction 3) Add a test for the vistr instruction Thomas Huth (3): tests/tcg/s390x: Test compiler flags only once, not every time target/s390x: Fix emulation of the VISTR

[PATCH 3/5] hw/mem/cxl_type3: CDAT pre-allocate and check resources prior to work

2022-10-12 Thread Gregory Price
Makes the size of the allocated cdat table static (6 entries), flattens the code, and reduces the number of exit conditions Signed-off-by: Gregory Price --- hw/mem/cxl_type3.c | 52 -- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git

[PATCH 2/5] hw/mem/cxl_type3: Pull validation checks ahead of functional code

2022-10-12 Thread Gregory Price
For style - pulling these validations ahead flattens the code. Signed-off-by: Gregory Price --- hw/mem/cxl_type3.c | 193 ++--- 1 file changed, 96 insertions(+), 97 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index

Re: [PATCH v7 4/5] hw/mem/cxl-type3: Add CXL CDAT Data Object Exchange

2022-10-12 Thread Gregory Price
Included in this response is a recommended patch set on top of this patch that resolves a number of issues, including style and a heap corruption bug. The purpose of this patch set is to refactor the CDAT initialization code to support future patch sets that will introduce multi-region support in

[PATCH 5/5] hw/mem/cxl_type3: Refactor CDAT sub-table entry initialization into a function

2022-10-12 Thread Gregory Price
The CDAT can contain multiple entries for multiple memory regions, this will allow us to re-use the initialization code when volatile memory region support is added. Signed-off-by: Gregory Price --- hw/mem/cxl_type3.c | 137 - 1 file changed, 72

[PATCH 1/5] hw/mem/cxl_type3: fix checkpatch errors

2022-10-12 Thread Gregory Price
This fixes checkpatch errors in the prior commit. Signed-off-by: Gregory Price --- hw/mem/cxl_type3.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index 3fa5d70662..94bc439d89 100644 --- a/hw/mem/cxl_type3.c +++

Re: [PATCH RFC 0/2] qemu-thread: Strict unlock check

2022-10-12 Thread Peter Xu
On Tue, Oct 11, 2022 at 06:41:52PM -0400, Peter Xu wrote: > NOTE: mark patchset RFC because "make check" will easily fail; but I didn't > yet dig into why as I'm not familiar with the code paths that triggers, it > can be bugs hidden or something I missed. So RFC to just have some thoughts. I

Re: [PATCH 3/4] qtest: Improve error messages when property can not be set right now

2022-10-12 Thread Thomas Huth
On 12/10/2022 17.38, Markus Armbruster wrote: When you try to set qtest property "log" while the qtest object is active, the error message blames "insufficient permission": $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio -chardev

Re: [PATCH v2 06/15] migration: Yield bitmap_mutex properly when sending/sleeping

2022-10-12 Thread Peter Xu
On Wed, Oct 12, 2022 at 05:43:53PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > Don't take the bitmap mutex when sending pages, or when being throttled by > > migration_rate_limit() (which is a bit tricky to call it here in ram code, > > but seems still

[PATCH] hw/virtio/virtio-iommu-pci: Enforce the device is plugged on the root bus

2022-10-12 Thread Eric Auger
In theory the virtio-iommu-pci could be plugged anywhere in the PCIe topology and as long as the dt/acpi info are properly built this should work. However at the moment we fail to do that because the virtio-iommu-pci BDF is not computed at plug time and in that case vms->virtio_iommu_bdf gets an

[PATCH v10 9/9] docs/s390x: document s390x cpu topology

2022-10-12 Thread Pierre Morel
Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- docs/system/s390x/cpu_topology.rst | 80 ++ 1 file changed, 80 insertions(+) create mode 100644 docs/system/s390x/cpu_topology.rst diff --git

Re: [PATCH v2 06/15] migration: Yield bitmap_mutex properly when sending/sleeping

2022-10-12 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Don't take the bitmap mutex when sending pages, or when being throttled by > migration_rate_limit() (which is a bit tricky to call it here in ram code, > but seems still helpful). > > It prepares for the possibility of concurrently sending pages in >1

[PATCH v10 7/9] s390x/cpu topology: add max_threads machine class attribute

2022-10-12 Thread Pierre Morel
The S390 CPU topology accepts the smp.threads argument while in reality it does not effectively allow multthreading. Let's keep this behavior for machines older than 7.3 and refuse to use threads in newer machines until multithreading is really proposed to the guest by the machine.

[PATCH v10 3/9] s390x/cpu_topology: resetting the Topology-Change-Report

2022-10-12 Thread Pierre Morel
During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Nico Boehr Reviewed-by: Janis Schoetterl-Glausch ---

[PATCH v10 5/9] target/s390x: interception of PTF instruction

2022-10-12 Thread Pierre Morel
When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervizor activates the interpretation by using the KVM_CAP_S390_CPU_TOPOLOGY KVM extension. The PTF instructions with function code 0 and 1 are

[PATCH v10 8/9] s390x/cpu_topology: activating CPU topology

2022-10-12 Thread Pierre Morel
The KVM capability, KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility for the guest in the case the topology is available in QEMU and in KVM. Signed-off-by: Pierre Morel --- target/s390x/kvm/kvm.c | 16 1 file

[PATCH v10 4/9] s390x/cpu_topology: CPU topology migration

2022-10-12 Thread Pierre Morel
The migration can only take place if both source and destination of the migration both use or both do not use the CPU topology facility. We indicate a change in topology during migration postload for the case the topology changed between source and destination. Signed-off-by: Pierre Morel ---

[PATCH v10 2/9] s390x/cpu topology: reporting the CPU topology to the guest

2022-10-12 Thread Pierre Morel
The guest can use the STSI instruction to get a buffer filled with the CPU topology description. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel --- include/hw/s390x/cpu-topology.h | 3 + target/s390x/cpu.h | 48

[PATCH v10 6/9] s390x/cpu topology: add topology-disable machine property

2022-10-12 Thread Pierre Morel
S390 CPU topology is only allowed for s390-virtio-ccw-7.3 and newer S390 machines. We keep the possibility to disable the topology on these newer machines with the property topology-disable. Signed-off-by: Pierre Morel --- include/hw/boards.h| 3 ++

Re: [PATCH v2 2/2] error handling: Use RETRY_ON_EINTR() macro where applicable

2022-10-12 Thread Nikita Ivanov
Hi! Execuse me, my fault. Overlooked TFR occurrences in second patch. I will correct it. ср, 12 окт. 2022 г., 18:43 Christian Schoenebeck : > On Mittwoch, 12. Oktober 2022 17:17:46 CEST Bin Meng wrote: > > Hi, > > > > On Wed, Oct 12, 2022 at 8:32 PM Nikita Ivanov > wrote: > > > There is a

[PATCH v10 0/9] s390x: CPU Topology

2022-10-12 Thread Pierre Morel
Hi, The implementation of the CPU Topology in QEMU has been drastically modified since the last patch series and the number of LOCs has been greatly reduced. 1) Unnecessary objects have been removed, only a single S390Topology object is created to support migration and reset. 2) The

[PATCH v10 1/9] s390x/cpu topology: core_id sets s390x CPU topology

2022-10-12 Thread Pierre Morel
In the S390x CPU topology the core_id specifies the CPU address and the position of the core withing the topology. Let's build the topology based on the core_id. s390x/cpu topology: core_id sets s390x CPU topology In the S390x CPU topology the core_id specifies the CPU address and the position

Re: [PATCH v2 01/15] migration: Take bitmap mutex when completing ram migration

2022-10-12 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Any call to ram_find_and_save_block() needs to take the bitmap mutex. We > used to not take it for most of ram_save_complete() because we thought > we're the only one left using the bitmap, but it's not true after the > preempt full patchset applied, since

[PULL 6/7] io/command: implement support for win32

2022-10-12 Thread marcandre . lureau
From: Marc-André Lureau The initial implementation was changing the pipe state created by GLib to PIPE_NOWAIT, but it turns out it doesn't work (read/write returns an error). Since reading may return less than the requested amount, it seems to be non-blocking already. However, the IO operation

[PULL 2/7] osdep: make readv_writev() work with partial read/write

2022-10-12 Thread marcandre . lureau
From: Marc-André Lureau With a pipe or other reasons, read/write may return less than the requested bytes. This happens with the test-io-channel-command test on Windows. glib spawn code uses a binary pipe of 4096 bytes, and the first read returns that much (although more are requested), for some

Re: [PATCH v2 1/2] Refactoring: refactor TFR() macro to RETRY_ON_EINTR()

2022-10-12 Thread Christian Schoenebeck
On Mittwoch, 12. Oktober 2022 14:28:23 CEST Nikita Ivanov wrote: > Rename macro name to more transparent one and refactor > it to expression. > > Signed-off-by: Nikita Ivanov > --- > chardev/char-fd.c| 2 +- > chardev/char-pipe.c | 8 +--- > include/qemu/osdep.h | 8 +++- >

[PULL 3/7] util: make do_send_recv work with partial send/recv

2022-10-12 Thread marcandre . lureau
From: Marc-André Lureau According to msdn documentation and Linux man pages, send() should try to send as much as possible in blocking mode, while recv() may return earlier with a smaller available amount, we should try to continue send/recv from there. Signed-off-by: Marc-André Lureau

Re: [PATCH v7 4/5] hw/mem/cxl-type3: Add CXL CDAT Data Object Exchange

2022-10-12 Thread Gregory Price
This code contains heap corruption on free, and I think should be refactored to pre-allocate all the entries we're interested in putting into the table. This would flatten the code and simplify the error handling steps. Also, should we consider making a union with all the possible entries to

[PULL 0/7] Win32 patches

2022-10-12 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit ab44ea1059242ff2dbbde44e94468f6c6e5f87be: Merge tag 'pull-testing-gdbstub-plugins-gitdm-111022-1' of https://github.com/stsquad/qemu into staging (2022-10-11 15:31:27 -0400) are available in the Git repository at:

[PULL 4/7] tests/channel-helper: set blocking in main thread

2022-10-12 Thread marcandre . lureau
From: Marc-André Lureau The /io/channel/command/echo tests run the reader side and the writer side with the same underlying command channel. Setting the blocking mode of the fd/handles while the other end is already reading/writing may create issues (deadlock in win32 when earlier attempt of

[PULL 7/7] tests/unit: make test-io-channel-command work on win32

2022-10-12 Thread marcandre . lureau
From: Marc-André Lureau This has been tested under msys2 & windows 11. I haven't tried to make it work with other environments yet, but that should be enough to validate the channel-command implementation anyway. Here are the changes: - drop tests/ from fifo/pipe path, to avoid directory issues

[PULL 5/7] io/command: use glib GSpawn, instead of open-coding fork/exec

2022-10-12 Thread marcandre . lureau
From: Marc-André Lureau Simplify qio_channel_command_new_spawn() with GSpawn API. This will allow to build for WIN32 in the following patches. As pointed out by Daniel Berrangé: there is a change in semantics here too. The current code only touches stdin/stdout/stderr. Any other FDs which do

[PULL 1/7] win32: set threads name

2022-10-12 Thread marcandre . lureau
From: Marc-André Lureau As described in: https://learn.microsoft.com/en-us/visualstudio/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2022 SetThreadDescription() is available since Windows 10, version 1607 and in some versions only by "Run Time Dynamic Linking". Its declaration is

Re: [RFC PATCH 0/4] docs/devel suggestions for discussion

2022-10-12 Thread Paolo Bonzini
On 10/12/22 14:11, Alex Bennée wrote: Hi, This is an attempt to improve our processes documentation by: - adding an explicit section on maintainers - reducing the up-front verbiage in patch submission - emphasising the importance to respectful reviews I'm sure the language could be

Re: [PATCH 0/3] iothread and irqfd support

2022-10-12 Thread Stefan Hajnoczi
virtio-blk's dataplane BH completion batching mechanism is not enabled by default and the performance results are mixed. If you develop a different mechanism from scratch I think there's a good chance it would work better :). This looks like a queuing theory problem to me. It should be possible

Re: [RFC PATCH 2/4] docs/devel: make language a little less code centric

2022-10-12 Thread Paolo Bonzini
On 10/12/22 14:11, Alex Bennée wrote: +QEMU welcomes contributions to fix bugs, add functionality or improve +the documentation. However, we get a lot of patches, and so we have +some guidelines about submitting patches. If you follow these, you'll While we're at it, "about submitting them".

Re: [PATCH v2 2/2] error handling: Use RETRY_ON_EINTR() macro where applicable

2022-10-12 Thread Christian Schoenebeck
On Mittwoch, 12. Oktober 2022 17:17:46 CEST Bin Meng wrote: > Hi, > > On Wed, Oct 12, 2022 at 8:32 PM Nikita Ivanov wrote: > > There is a defined RETRY_ON_EINTR() macro in qemu/osdep.h which > > handles the same while loop. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/415 > > > >

[PATCH 1/4] qom: Improve error messages when property has no getter or setter

2022-10-12 Thread Markus Armbruster
When you try to set a property that has no setter, the error message blames "insufficient permission": $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio QEMU 7.1.50 monitor - type 'help' for more information (qemu) qom-set /machine type q35 Error: Insufficient

[PATCH 2/4] backends: Improve error messages when property can no longer be set

2022-10-12 Thread Markus Armbruster
When you try to set virtio-rng property "filename" after the backend has been completed with user_creatable_complete(), the error message blames "insufficient permission": $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio -object rng-random,id=rng0 -device

[PATCH 0/4] Replace QERR_PERMISSION_DENIED by better error messages

2022-10-12 Thread Markus Armbruster
Markus Armbruster (4): qom: Improve error messages when property has no getter or setter backends: Improve error messages when property can no longer be set qtest: Improve error messages when property can not be set right now qerror: QERR_PERMISSION_DENIED is no longer used, drop

[PATCH 4/4] qerror: QERR_PERMISSION_DENIED is no longer used, drop

2022-10-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 596fce0c54..87ca83b155 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -50,9 +50,6 @@

[PATCH 3/4] qtest: Improve error messages when property can not be set right now

2022-10-12 Thread Markus Armbruster
When you try to set qtest property "log" while the qtest object is active, the error message blames "insufficient permission": $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio -chardev socket,id=chrqt0,path=qtest.socket,server=on,wait=off -object

Re: [PATCH 0/3] iothread and irqfd support

2022-10-12 Thread Jinhao Fan
On 10/12/2022 10:39 PM, Klaus Jensen wrote: I have been meaning to pick it up, but I got side-tracked. The polling performance drop needs to be address as we discussed offline. But the v4 looks pretty good and I can pick that up without the polling support for now. I've been using the v4

Re: [PATCH] build: disable container-based cross compilers by default

2022-10-12 Thread Alex Bennée
Paolo Bonzini writes: > On 10/12/22 14:17, Alex Bennée wrote: >>> Container-based cross compilers have some issues which were overlooked >>> when they were only used for TCG tests, but are more visible since >>> firmware builds try to use them: >> We seem to have dropped our gating somewhere.

Re: [PATCH v2 2/2] error handling: Use RETRY_ON_EINTR() macro where applicable

2022-10-12 Thread Bin Meng
Hi, On Wed, Oct 12, 2022 at 8:32 PM Nikita Ivanov wrote: > > There is a defined RETRY_ON_EINTR() macro in qemu/osdep.h which > handles the same while loop. > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/415 > > Signed-off-by: Nikita Ivanov > --- > block/file-posix.c| 37

Re: [PATCH v2 2/2] error handling: Use RETRY_ON_EINTR() macro where applicable

2022-10-12 Thread Marc-André Lureau
Hi On Wed, Oct 12, 2022 at 4:32 PM Nikita Ivanov wrote: > There is a defined RETRY_ON_EINTR() macro in qemu/osdep.h which > handles the same while loop. > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/415 > > Signed-off-by: Nikita Ivanov > Reviewed-by: Marc-André Lureau > --- >

Re: [PATCH v4 6/6] tests/unit: make test-io-channel-command work on win32

2022-10-12 Thread Daniel P . Berrangé
On Thu, Oct 06, 2022 at 03:36:57PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > This has been tested under msys2 & windows 11. I haven't tried to make > it work with other environments yet, but that should be enough to > validate the channel-command implementation

Re: [PATCH v4 2/6] util: make do_send_recv work with partial send/recv

2022-10-12 Thread Daniel P . Berrangé
On Thu, Oct 06, 2022 at 03:36:53PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > According to msdn documentation and Linux man pages, send() should try > to send as much as possible in blocking mode, while recv() may return > earlier with a smaller available amount, we

Re: [RFC PATCH 1/4] docs/devel: add a maintainers section to development process

2022-10-12 Thread Stefan Hajnoczi
On Wed, Oct 12, 2022 at 01:11:49PM +0100, Alex Bennée wrote: > We don't currently have a clear place in the documentation to describe > the rolls and responsibilities of a maintainer. Lets create one so we s/roll/role/ in the commit description and the patch. > can. I've moved a few small bits

Re: [RFC PATCH 3/4] docs/devel: simplify the minimal checklist

2022-10-12 Thread Stefan Hajnoczi
On Wed, Oct 12, 2022 at 01:11:51PM +0100, Alex Bennée wrote: > The bullet points are quite long and contain process tips. Move those > bits of the bullet to the relevant sections and link to them. Use a > table for nicer formatting of the checklist. > > Signed-off-by: Alex Bennée > --- >

Re: [RFC PATCH 0/4] docs/devel suggestions for discussion

2022-10-12 Thread Stefan Hajnoczi
On Wed, Oct 12, 2022 at 01:11:48PM +0100, Alex Bennée wrote: > Hi, > > This is an attempt to improve our processes documentation by: > > - adding an explicit section on maintainers > - reducing the up-front verbiage in patch submission > - emphasising the importance to respectful reviews > >

Re: [PATCH 0/3] iothread and irqfd support

2022-10-12 Thread Klaus Jensen
On Okt 12 10:28, Stefan Hajnoczi wrote: > On Fri, 26 Aug 2022 at 07:18, Jinhao Fan wrote: > > > > This patch series adds support for using a seperate iothread for NVMe > > IO emulation, which brings the potential of applying polling. The > > first two patches implements support for irqfd, which

Re: [PULL 0/1] testing: revert pc-bios build patch

2022-10-12 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

[PULL 15/16] tests/qtest: libqtest: Install signal handler via signal()

2022-10-12 Thread Thomas Huth
From: Bin Meng At present the codes uses sigaction() to install signal handler with a flag SA_RESETHAND. Such usage can be covered by the signal() API that is a simplified interface to the general sigaction() facility. Update to use signal() to install the signal handler, as it is available on

[PULL 16/16] tests/unit/test-image-locking: Fix handling of temporary files

2022-10-12 Thread Thomas Huth
test-image-locking leaves some temporary files around - clean them up. While we're at it, test-image-locking is a unit test, so it should not use "qtest.*" for temporary file names. Give them better names instead, so that it clear where the temporary files come from. Message-Id:

[PULL 10/16] tests/x86: Add 'q35' machine type to drive_del-test

2022-10-12 Thread Thomas Huth
From: Michael Labiuk Configure pci bridge setting to run tests on 'q35' machine type. Signed-off-by: Michael Labiuk Message-Id: <20220929223547.1429580-9-michael.lab...@virtuozzo.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/qtest/drive_del-test.c | 107

[PULL 14/16] tests/qtest: migration-test: Avoid using hardcoded /tmp

2022-10-12 Thread Thomas Huth
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_dir_make_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Message-Id: <20221006151927.2079583-5-bmeng...@gmail.com> Signed-off-by: Thomas Huth

[PULL 12/16] tests/avocado: Add missing require_netdev('user') checks

2022-10-12 Thread Thomas Huth
From: Peter Maydell Some avocado tests fail if QEMU was built without libslirp. Add require_netdev('user') checks where necessary: These tests try to ping 10.0.2.2 and expect it to succeed: boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2

[PULL 13/16] qtest: start a VNC test

2022-10-12 Thread Thomas Huth
From: Marc-André Lureau This is some of the simplest test we could perform, it simply connects to the VNC server via passed-in socket FDs and checks the connection can be established. Another series will make this test work on Windows as well. As always, more tests can be added later! :)

[PULL 11/16] tests/x86: Add 'q35' machine type to ivshmem-test

2022-10-12 Thread Thomas Huth
From: Michael Labiuk Configure pci bridge setting to test ivshmem on 'q35'. Signed-off-by: Michael Labiuk Message-Id: <20220929223547.1429580-10-michael.lab...@virtuozzo.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/qtest/ivshmem-test.c | 18 ++ 1 file

[PULL 02/16] tests/migration: remove the unused local variable

2022-10-12 Thread Thomas Huth
From: dinglimin Remove the unused local variable "records". Signed-off-by: dinglimin Reviewed-by: Ján Tomko Message-Id: <20220928080555.2263-1-dingli...@cmss.chinamobile.com> Signed-off-by: Thomas Huth --- tests/migration/guestperf/engine.py | 1 - 1 file changed, 1 deletion(-) diff --git

[PULL 08/16] tests/x86: Fix comment typo in drive_del-test

2022-10-12 Thread Thomas Huth
From: Michael Labiuk Signed-off-by: Michael Labiuk Message-Id: <20220929223547.1429580-7-michael.lab...@virtuozzo.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/qtest/drive_del-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL 07/16] tests/x86: Add 'q35' machine type to hotplug hd-geo-test

2022-10-12 Thread Thomas Huth
From: Michael Labiuk Add pci bridge setting to test hotplug. Duplicate tests for plugging scsi and virtio devices for q35 machine type. Signed-off-by: Michael Labiuk Message-Id: <20220929223547.1429580-6-michael.lab...@virtuozzo.com> Signed-off-by: Thomas Huth --- tests/qtest/hd-geo-test.c |

[PULL 01/16] qtest: "-display none" is set in qtest_init()

2022-10-12 Thread Thomas Huth
From: Juan Quintela So we don't need to set anywhere else. Signed-off-by: Juan Quintela [thuth: Drop changes in tests/qtest/fuzz/ since the fuzzers still need this] Message-Id: <20220902165126.1482-2-quint...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/bios-tables-test.c | 2

  1   2   >