Re: [PATCH 06/18] ui/vnc: Require audiodev=

2022-04-27 Thread Paolo Bonzini
On 4/25/22 10:21, Martin Kletzander wrote: @@ -4188,12 +4188,15 @@ void vnc_display_open(const char *id, Error **errp) vd->ledstate = 0; audiodev = qemu_opt_get(opts, "audiodev"); -if (audiodev) { -vd->audio_state = audio_state_by_name(audiodev); -if (!vd->audi

Re: [PATCH v2 02/26] Use QEMU_SANITIZE_ADDRESS

2022-04-27 Thread Thomas Huth
On 26/04/2022 11.26, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/qtest/fdc-test.c| 2 +- util/coroutine-ucontext.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/fdc-test.c b/tests/qtest/fdc-t

Re: [PATCH v2 25/26] tests: replace qemu_set_nonblock()

2022-04-27 Thread Thomas Huth
On 26/04/2022 11.27, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The call is POSIX-specific. Use the dedicated GLib API. g_unix_set_fd_nonblocking() is also available on Unix-like systems according to its name, I suppose? So what's the advantage of this change? Thomas Si

Re: [PATCH 06/18] ui/vnc: Require audiodev=

2022-04-27 Thread Daniel P . Berrangé
On Wed, Apr 27, 2022 at 11:32:41AM +0200, Paolo Bonzini wrote: > On 4/25/22 10:21, Martin Kletzander wrote: > > @@ -4188,12 +4188,15 @@ void vnc_display_open(const char *id, Error **errp) > > vd->ledstate = 0; > > audiodev = qemu_opt_get(opts, "audiodev"); > > -if (audiodev) { > > -

[PATCH] vhost-user-scsi: avoid unlink(NULL) with fd passing

2022-04-27 Thread Stefan Hajnoczi
Commit 747421e949fc1eb3ba66b5fcccdb7ba051918241 ("Implements Backend Program conventions for vhost-user-scsi") introduced fd-passing support as part of implementing the vhost-user backend program conventions. When fd passing is used the UNIX domain socket path is NULL and we must not call unlink(2

[PATCH qemu v9 03/14] target/riscv: rvv: Early exit when vstart >= vl

2022-04-27 Thread ~eopxd
From: eopXD According to v-spec (section 5.4): When vstart ≥ vl, there are no body elements, and no elements are updated in any destination vector register group, including that no tail elements are updated with agnostic values. vmsbf.m, vmsif.m, vmsof.m, viota.m, vcompress instructions themselv

[PATCH qemu v9 10/14] target/riscv: rvv: Add tail agnostic for vector fix-point arithmetic instructions

2022-04-27 Thread ~eopxd
From: eopXD Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/vector_helper.c | 220 ++- 1 file changed, 114 insertions(+), 106 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index 2b269c2dbe..fd1466ceae 10

Re: [PATCH v2 34/43] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC)

2022-04-27 Thread yangxiaojuan
Hi Mark, On 2022/4/26 上午12:27, Mark Cave-Ayland wrote: On 25/04/2022 10:10, Xiaojuan Yang wrote: This patch realize the EIOINTC interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao ---   hw/intc/Kconfig    |   3 +   hw/intc/loongarch_extioi.c |

[PATCH qemu v9 02/14] target/riscv: rvv: Rename ambiguous esz

2022-04-27 Thread ~eopxd
From: eopXD No functional change intended in this commit. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/vector_helper.c | 76 ++-- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/ve

[PATCH qemu v9 00/14] Add tail agnostic behavior for rvv instructions

2022-04-27 Thread ~eopxd
According to v-spec, tail agnostic behavior can be either kept as undisturbed or set elements' bits to all 1s. To distinguish the difference of tail policies, QEMU should be able to simulate the tail agnostic behavior as "set tail elements' bits to all 1s". An option 'rvv_ta_all_1s' is added to ena

[PATCH qemu v9 08/14] target/riscv: rvv: Add tail agnostic for vector integer comparison instructions

2022-04-27 Thread ~eopxd
From: eopXD Compares write mask registers, and so always operate under a tail- agnostic policy. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/vector_helper.c | 21 + 1 file changed, 21 insertions(+) diff --git a/target/riscv/vector_helper.c b/target/ri

[PATCH qemu v9 05/14] target/riscv: rvv: Add tail agnostic for vector load / store instructions

2022-04-27 Thread ~eopxd
From: eopXD Destination register of unit-stride mask load and store instructions are always written with a tail-agnostic policy. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 11 ++ target/riscv/vector_helper.c| 28 +

[PATCH qemu v9 14/14] target/riscv: rvv: Add tail agnostic for vector permutation instructions

2022-04-27 Thread ~eopxd
From: eopXD Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 22 ++ target/riscv/vector_helper.c| 40 + 2 files changed, 62 insertions(+) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/targe

[PATCH qemu v9 07/14] target/riscv: rvv: Add tail agnostic for vector integer shift instructions

2022-04-27 Thread ~eopxd
From: eopXD Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 11 +++ target/riscv/vector_helper.c| 11 +++ 2 files changed, 22 insertions(+) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_tran

[PATCH qemu v9 01/14] target/riscv: rvv: Prune redundant ESZ, DSZ parameter passed

2022-04-27 Thread ~eopxd
From: eopXD No functional change intended in this commit. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/vector_helper.c | 1132 +- 1 file changed, 565 insertions(+), 567 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/

[PATCH qemu v9 04/14] target/riscv: rvv: Add tail agnostic for vv instructions

2022-04-27 Thread ~eopxd
From: eopXD This is the first commit regarding the tail agnostic behavior. Added option 'rvv_ta_all_1s' to enable the behavior, the option is default to false. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/cpu.c | 1 + target/riscv/cpu.h

[PATCH qemu v9 06/14] target/riscv: rvv: Add tail agnostic for vx, vvm, vxm instructions

2022-04-27 Thread ~eopxd
From: eopXD `vmadc` and `vmsbc` produces a mask value, they always operate with a tail agnostic policy. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 29 +++ target/riscv/internals.h| 5 +- target/riscv/translate.c

[PATCH qemu v9 09/14] target/riscv: rvv: Add tail agnostic for vector integer merge and move instructions

2022-04-27 Thread ~eopxd
From: eopXD Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 44 + target/riscv/vector_helper.c| 20 +++ 2 files changed, 64 insertions(+) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/r

Re: [PATCH v3 2/6] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Greg Kurz
On Mon, 25 Apr 2022 14:20:46 +0200 Christian Schoenebeck wrote: > mknod() on macOS does not support creating sockets, so divert to > call sequence socket(), bind() and chmod() respectively if S_IFSOCK > was passed with mode argument. > > Link: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC0

[PATCH qemu v9 11/14] target/riscv: rvv: Add tail agnostic for vector floating-point instructions

2022-04-27 Thread ~eopxd
From: eopXD Compares write mask registers, and so always operate under a tail- agnostic policy. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 15 + target/riscv/vector_helper.c| 443 +--- 2 files changed, 262 in

[PATCH qemu v9 12/14] target/riscv: rvv: Add tail agnostic for vector reduction instructions

2022-04-27 Thread ~eopxd
From: eopXD Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/vector_helper.c | 20 1 file changed, 20 insertions(+) diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index 365071bfa9..3c4218d0dc 100644 --- a/target/riscv/vector_help

[PATCH qemu v9 13/14] target/riscv: rvv: Add tail agnostic for vector mask instructions

2022-04-27 Thread ~eopxd
From: eopXD The tail elements in the destination mask register are updated under a tail-agnostic policy. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 6 + target/riscv/vector_helper.c| 30 + 2 files cha

Re: [PATCH] 9pfs: local: Do not follow symlink in _nofollow

2022-04-27 Thread Greg Kurz
On Wed, 27 Apr 2022 10:46:31 +0200 Christian Schoenebeck wrote: > On Mittwoch, 27. April 2022 04:45:45 CEST Akihiko Odaki wrote: > > Signed-off-by: Akihiko Odaki > > --- > > hw/9pfs/9p-local.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/hw/9pfs/9p-local.c b/h

Re: [PATCH 01/18] hw/audio: Remove -soundhw support

2022-04-27 Thread Paolo Bonzini
On 4/25/22 10:21, Martin Kletzander wrote: One thing I am not sure about is whether to keep the aliases of ac97 and es1370 in the qdev_alias_table. Signed-off-by: Martin Kletzander I agree that -soundhw is a bad option, but I think we should preserve something similarly easy to use. For exa

Re: [PATCH v2 25/26] tests: replace qemu_set_nonblock()

2022-04-27 Thread Marc-André Lureau
Hi On Wed, Apr 27, 2022 at 1:41 PM Thomas Huth wrote: > > On 26/04/2022 11.27, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > The call is POSIX-specific. Use the dedicated GLib API. > > g_unix_set_fd_nonblocking() is also available on Unix-like systems according > to its

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Greg Kurz
On Wed, 27 Apr 2022 11:27:28 +0900 Akihiko Odaki wrote: > On 2022/04/26 21:38, Greg Kurz wrote: [..skip..] > > > > I think Christian's explanation is clear enough. We don't guarantee > > that v9fs_co_foo() calls run atomically. As a consequence, the client > > might see transient states or be

Re: [PATCH] target/arm: Use field names for accessing DBGWCRn

2022-04-27 Thread Alex Bennée
Richard Henderson writes: > While defining these names, use the correct field width of 5 not 4 for > DBGWCR.MASK. This typo prevented setting a watchpoint larger than 32k. > > Reported-by: Chris Howard > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 26/26] util: rename qemu_*block() socket functions

2022-04-27 Thread Marc-André Lureau
Hi Stefan On Tue, Apr 26, 2022 at 6:33 PM Stefan Hajnoczi wrote: > On Tue, Apr 26, 2022 at 01:27:15PM +0400, marcandre.lur...@redhat.com > wrote: > > From: Marc-André Lureau > > > > The qemu_*block() functions are meant to be be used with sockets (the > > win32 implementation expects SOCKET) >

Re: Signing QEMU up for GitLab for Open Source?

2022-04-27 Thread Alex Bennée
Daniel P. Berrangé writes: > On Mon, Apr 25, 2022 at 01:53:28PM +0100, Alex Bennée wrote: >> >> Stefan Hajnoczi writes: >> >> > [[PGP Signed Part:Undecided]] >> > Hi, >> > QEMU needs to enroll in GitLab for Open Source before July 1st to >> > receive 50,000 CI/CD pipeline minutes and GitLab

Re: [PATCH v2 25/26] tests: replace qemu_set_nonblock()

2022-04-27 Thread Thomas Huth
On 27/04/2022 12.33, Marc-André Lureau wrote: Hi On Wed, Apr 27, 2022 at 1:41 PM Thomas Huth wrote: On 26/04/2022 11.27, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The call is POSIX-specific. Use the dedicated GLib API. g_unix_set_fd_nonblocking() is also available on Uni

[PATCH 1/2] hw/arm/smmuv3: Cache event fault record

2022-04-27 Thread Jean-Philippe Brucker
The Record bit in the Context Descriptor tells the SMMU to report fault events to the event queue. Since we don't cache the Record bit at the moment, access faults from a cached Context Descriptor are never reported. Store the Record bit in the cached SMMUTransCfg. Fixes: 9bde7f0674fe ("hw/arm/smm

Re: [PATCH] 9pfs: local: Do not follow symlink in _nofollow

2022-04-27 Thread Christian Schoenebeck
On Mittwoch, 27. April 2022 12:21:51 CEST Greg Kurz wrote: > On Wed, 27 Apr 2022 10:46:31 +0200 > > Christian Schoenebeck wrote: > > On Mittwoch, 27. April 2022 04:45:45 CEST Akihiko Odaki wrote: > > > Signed-off-by: Akihiko Odaki > > > --- > > > > > > hw/9pfs/9p-local.c | 2 +- > > > 1 file c

[PATCH 2/2] hw/arm/smmuv3: Add space in guest error message

2022-04-27 Thread Jean-Philippe Brucker
Make the translation error message prettier by adding a missing space before the parenthesis. Signed-off-by: Jean-Philippe Brucker --- hw/arm/smmuv3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 8b1d8103dc..3a989b09cb 100644 --- a/h

Re: [PATCH v10 6/7] multifd: Send header packet without flags if zero-copy-send is enabled

2022-04-27 Thread Leonardo Bras Soares Passos
On Tue, Apr 26, 2022 at 8:26 PM Peter Xu wrote: > > On Tue, Apr 26, 2022 at 08:06:55PM -0300, Leonardo Bras wrote: > > Since d48c3a0445 ("multifd: Use a single writev on the send side"), > > sending the header packet and the memory pages happens in the same > > writev, which can potentially make t

Re: [PATCH v10 6/7] multifd: Send header packet without flags if zero-copy-send is enabled

2022-04-27 Thread Leonardo Bras Soares Passos
On Wed, Apr 27, 2022 at 5:44 AM Daniel P. Berrangé wrote: > > On Tue, Apr 26, 2022 at 08:06:55PM -0300, Leonardo Bras wrote: > > Since d48c3a0445 ("multifd: Use a single writev on the send side"), > > sending the header packet and the memory pages happens in the same > > writev, which can potentia

Re: [PATCH v10 7/7] multifd: Implement zero copy write in multifd migration (multifd-zero-copy)

2022-04-27 Thread Leonardo Bras Soares Passos
On Wed, Apr 27, 2022 at 5:46 AM Daniel P. Berrangé wrote: > > On Tue, Apr 26, 2022 at 08:06:56PM -0300, Leonardo Bras wrote: > > Implement zero copy send on nocomp_send_write(), by making use of QIOChannel > > writev + flags & flush interface. > > > > Change multifd_send_sync_main() so flush_zero_

[RFC PATCH 1/6] pc: remove -soundhw pcspk

2022-04-27 Thread Paolo Bonzini
The pcspk device is the only user of isa_register_soundhw, and the only -soundhw option which does not create a new device (it hacks into the PCSpkState by hand). Remove it, since it was deprecated. Signed-off-by: Paolo Bonzini --- hw/audio/pcspk.c | 10 -- hw/audio/soundhw.c

Re: [PATCH v10 7/7] multifd: Implement zero copy write in multifd migration (multifd-zero-copy)

2022-04-27 Thread Leonardo Bras Soares Passos
On Tue, Apr 26, 2022 at 8:26 PM Peter Xu wrote: > > On Tue, Apr 26, 2022 at 08:06:56PM -0300, Leonardo Bras wrote: > > Implement zero copy send on nocomp_send_write(), by making use of QIOChannel > > writev + flags & flush interface. > > > > Change multifd_send_sync_main() so flush_zero_copy() can

Re: [PATCH v2] Warn user if the vga flag is passed but no vga device is created

2022-04-27 Thread Thomas Huth
On 23/04/2022 15.27, Peter Maydell wrote: On Sat, 23 Apr 2022 at 11:00, Gautam Agrawal wrote: I will make changes in hw/ppc/spapr.c . In hw/hppa/machine.c , vga_interface_type is used inside if condition to check for graphics device creation, but I am not able to find any relation with creatio

[RFC PATCH 4/6] soundhw: unify initialization for ISA and PCI soundhw

2022-04-27 Thread Paolo Bonzini
Use qdev_new instead of distinguishing isa_create_simple/pci_create_simple. Signed-off-by: Paolo Bonzini --- hw/audio/soundhw.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/hw/audio/soundhw.c b/hw/audio/soundhw.c index 0fb64bdc8f..a9d8807b18 10

[RFC PATCH 0/6] replace -soundhw with -audio

2022-04-27 Thread Paolo Bonzini
While the -soundhw option has been deprecated, the way of creating audio devices is not as easy as with say -usbdevice or -nic. This is true especially of HDA devices. This series introduces a new option called "-audio", which allows full configuration of the backend and just the model of the fro

[RFC PATCH 6/6] vl: introduce -audio as a replacement for -soundhw

2022-04-27 Thread Paolo Bonzini
-audio is used like "-audio pa,model=sb16". It is almost as simple as -soundhw, but it reuses the -audiodev parsing machinery and attaches an audiodev to the newly-created device. The main 'feature' is that it knows about adding the codec device for model=intel-hda, and adding the audiodev to the

[RFC PATCH 2/6] soundhw: remove ability to create multiple soundcards

2022-04-27 Thread Paolo Bonzini
The usefulness of enabling a dozen soundcards is dubious. Simplify the code by allowing a single instance of -soundhw, with no support for parsing either comma-separated values or 'soundhw all'. Signed-off-by: Paolo Bonzini --- hw/audio/soundhw.c | 88 +--

[RFC PATCH 3/6] soundhw: extract soundhw help to a separate function

2022-04-27 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/audio/soundhw.c | 33 +++-- include/hw/audio/soundhw.h | 1 + 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/hw/audio/soundhw.c b/hw/audio/soundhw.c index 097501fee1..0fb64bdc8f 100644 --- a/hw/audio/soundh

[PATCH 3/4] Revert "main-loop: Disable GLOBAL_STATE_CODE() assertions"

2022-04-27 Thread Hanna Reitz
This reverts commit b1c073490553f80594b903ceedfc7c1aef6b1b19. (We wanted to do so once the 7.1 tree opens, which has happened. The issue reported in https://gitlab.com/qemu-project/qemu/-/issues/945 should be fixed by the preceding patches.) Signed-off-by: Hanna Reitz --- include/qemu/main-loo

[PATCH 0/4] Revert "main-loop: Disable GLOBAL_STATE_CODE() assertions"

2022-04-27 Thread Hanna Reitz
Hi, This assertion was disabled in commit b1c073490553f80594b903ceedfc7c1aef6b1b19. We wanted to re-enable it once the 7.1 tree has opened (which is now), but to do so, we should also fix the bug reported in https://gitlab.com/qemu-project/qemu/-/issues/945 . Patches 1 and 2 fix that problem (I

[PATCH 2/4] qcow2: Do not reopen data_file in invalidate_cache

2022-04-27 Thread Hanna Reitz
qcow2_co_invalidate_cache() closes and opens the qcow2 file, by calling qcow2_close() and qcow2_do_open(). These two functions must thus be usable from both a global-state and an I/O context. As they are, they are not safe to call in an I/O context, because they use bdrv_unref_child() and bdrv_op

[RFC PATCH 5/6] soundhw: move help handling to vl.c

2022-04-27 Thread Paolo Bonzini
This will allow processing "-audio model=help" even if the backend part of the option is missing. Signed-off-by: Paolo Bonzini --- hw/audio/soundhw.c | 24 +--- softmmu/vl.c | 4 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/hw/audio/soundhw.c b

[PATCH 1/4] block: Classify bdrv_get_flags() as I/O function

2022-04-27 Thread Hanna Reitz
This function is safe to call in an I/O context, and qcow2_do_open() does so (invoked in an I/O context by qcow2_co_invalidate_cache()). Signed-off-by: Hanna Reitz --- include/block/block-global-state.h | 1 - include/block/block-io.h | 1 + block.c| 2 +- 3

[PATCH 4/4] iotests: Add regression test for issue 945

2022-04-27 Thread Hanna Reitz
Create a VM with a BDS in an iothread, add -incoming defer to the command line, and then export this BDS via NBD. Doing so should not fail an assertion. Signed-off-by: Hanna Reitz --- .../tests/export-incoming-iothread| 81 +++ .../tests/export-incoming-iothread.out

Re: [PATCH qemu v9 05/14] target/riscv: rvv: Add tail agnostic for vector load / store instructions

2022-04-27 Thread Weiwei Li
在 2022/3/7 下午3:10, ~eopxd 写道: From: eopXD Destination register of unit-stride mask load and store instructions are always written with a tail-agnostic policy. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 11 ++ target/riscv/vecto

Re: [PATCH 7/8] qmp: add filtering of statistics by name

2022-04-27 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Allow retrieving only a subset of statistics. This can be useful > for example in order to plot a subset of the statistics many times > a second. > > KVM publishes ~40 statistics for each vCPU on x86; retrieving and > serializing all of them would be

Re: [PATCH 1/8] qmp: Support for querying stats

2022-04-27 Thread Paolo Bonzini
On 4/27/22 11:19, Dr. David Alan Gilbert wrote: { "return": [ { "provider": "kvm", "stats": [ { "name": "max_mmu_page_hash_collisions", "value": 0 }, { "name": "max_mmu_rmap_size", "value": 0 }, { "name": "nx_lpage_splits", "value": 148 }, Is there

Re: [PATCH 7/8] qmp: add filtering of statistics by name

2022-04-27 Thread Paolo Bonzini
On 4/27/22 14:01, Dr. David Alan Gilbert wrote: "providers": [ { "provider": "kvm", "names": [ "l1d_flush", "exits" ] } } } That looks inconsistent to me; I realise that 'names' has to be a child of providers (since the names are only relevant to a given provider) but how ab

Re: [PATCH v5 1/1] virtio: fix the condition for iommu_platform not supported

2022-04-27 Thread Chenyi Qiang
On 4/22/2022 3:11 PM, Chenyi Qiang wrote: On 2/7/2022 7:28 PM, Halil Pasic wrote: The commit 04ceb61a40 ("virtio: Fail if iommu_platform is requested, but unsupported") claims to fail the device hotplug when iommu_platform is requested, but not supported by the (vhost) device. On the first

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Christian Schoenebeck
On Mittwoch, 27. April 2022 12:18:10 CEST Greg Kurz wrote: > On Wed, 27 Apr 2022 11:27:28 +0900 > > Akihiko Odaki wrote: > > On 2022/04/26 21:38, Greg Kurz wrote: > [..skip..] > > > > I think Christian's explanation is clear enough. We don't guarantee > > > that v9fs_co_foo() calls run atomicall

[PATCH] softmmu/vl: Fence 'xenfb' if Xen support is not compiled in

2022-04-27 Thread Thomas Huth
The 'xenfb' parameter for the '-vga' command line option is currently always enabled unconditionally (since the xenfb is not a proper QOM device that could be tested via its class name). That means it also shows up if Xen is not enabled at all, e.g. like this: $ ./qemu-system-sparc -vga help non

Re: [PATCH v2 1/5] hw/intc: Move mtimer/mtimecmp to aclint

2022-04-27 Thread Dr. David Alan Gilbert
* Atish Kumar Patra (ati...@rivosinc.com) wrote: > On Tue, Apr 26, 2022 at 5:50 PM Richard Henderson > wrote: > > > > On 4/26/22 16:08, Atish Patra wrote: > > > @@ -334,7 +334,6 @@ const VMStateDescription vmstate_riscv_cpu = { > > > VMSTATE_UINTTL(env.mscratch, RISCVCPU), > > >

Re: [PATCH 7/8] qmp: add filtering of statistics by name

2022-04-27 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 4/27/22 14:01, Dr. David Alan Gilbert wrote: > > > "providers": [ > > >{ "provider": "kvm", > > > "names": [ "l1d_flush", "exits" ] } } } > > That looks inconsistent to me; I realise that 'names' has to be a child > > of provid

Re: [PATCH 02/26] qcow2: remove incorrect coroutine_fn annotations

2022-04-27 Thread Paolo Bonzini
On 4/21/22 12:24, Stefan Hajnoczi wrote: -int coroutine_fn qcow2_flush_caches(BlockDriverState *bs) +int qcow2_flush_caches(BlockDriverState *bs) { int ret = qcow2_write_caches(bs); Both of these eventually hit qcow2_cache_write, which is not marked coroutine, so these should not be eit

[PATCH 0/3] Cleanup CoQueue restart functions

2022-04-27 Thread Paolo Bonzini
Sending this out now that NBD's incorrect uses have been fixed. There is no equivalent of qemu_co_queue_enter_next that restarts all coroutines but that is incorrect because qemu_co_queue_restart_all should really be a coroutine_fn. The NBD uses have been fixed by removing the calls to qemu_co_qu

[PATCH 1/3] coroutine-lock: qemu_co_queue_next is a coroutine-only qemu_co_enter_next

2022-04-27 Thread Paolo Bonzini
qemu_co_queue_next is basically the same as qemu_co_enter_next but without a QemuLockable argument. That's perfectly fine, but only as long as the function is marked coroutine_fn. If used outside coroutine context, qemu_co_queue_wait will attempt to take the lock and that is just broken: if you a

[PATCH 3/3] coroutine-lock: qemu_co_queue_restart_all is a coroutine-only qemu_co_enter_all

2022-04-27 Thread Paolo Bonzini
qemu_co_queue_restart_all is basically the same as qemu_co_enter_all but without a QemuLockable argument. That's perfectly fine, but only as long as the function is marked coroutine_fn. If used outside coroutine context, qemu_co_queue_wait will attempt to take the lock and that is just broken: if

[PATCH 2/3] coroutine-lock: introduce qemu_co_queue_enter_all

2022-04-27 Thread Paolo Bonzini
Because qemu_co_queue_restart_all does not release the lock, it should be used only in coroutine context. Introduce a new function that, like qemu_co_enter_next, does release the lock, and use it whenever qemu_co_queue_restart_all was used outside coroutine context. Signed-off-by: Paolo Bonzini

Re: [PATCH 1/4] block: Classify bdrv_get_flags() as I/O function

2022-04-27 Thread Eric Blake
On Wed, Apr 27, 2022 at 01:40:54PM +0200, Hanna Reitz wrote: > This function is safe to call in an I/O context, and qcow2_do_open() > does so (invoked in an I/O context by qcow2_co_invalidate_cache()). > > Signed-off-by: Hanna Reitz > --- > include/block/block-global-state.h | 1 - > include/blo

Re: [PATCH 2/4] qcow2: Do not reopen data_file in invalidate_cache

2022-04-27 Thread Eric Blake
On Wed, Apr 27, 2022 at 01:40:55PM +0200, Hanna Reitz wrote: > qcow2_co_invalidate_cache() closes and opens the qcow2 file, by calling > qcow2_close() and qcow2_do_open(). These two functions must thus be > usable from both a global-state and an I/O context. > > As they are, they are not safe to

Re: [PATCH v4 4/6] vduse-blk: implements vduse-blk export

2022-04-27 Thread Kevin Wolf
Am 27.04.2022 um 05:11 hat Yongji Xie geschrieben: > On Wed, Apr 27, 2022 at 1:03 AM Kevin Wolf wrote: > > > > Am 06.04.2022 um 09:59 hat Xie Yongji geschrieben: > > > This implements a VDUSE block backends based on > > > the libvduse library. We can use it to export the BDSs > > > for both VM and

Re: [PATCH 3/4] Revert "main-loop: Disable GLOBAL_STATE_CODE() assertions"

2022-04-27 Thread Eric Blake
On Wed, Apr 27, 2022 at 01:40:56PM +0200, Hanna Reitz wrote: > This reverts commit b1c073490553f80594b903ceedfc7c1aef6b1b19. (We > wanted to do so once the 7.1 tree opens, which has happened. The issue > reported in https://gitlab.com/qemu-project/qemu/-/issues/945 should be > fixed by the preced

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Greg Kurz
On Wed, 27 Apr 2022 14:32:53 +0200 Christian Schoenebeck wrote: > On Mittwoch, 27. April 2022 12:18:10 CEST Greg Kurz wrote: > > On Wed, 27 Apr 2022 11:27:28 +0900 > > > > Akihiko Odaki wrote: > > > On 2022/04/26 21:38, Greg Kurz wrote: > > [..skip..] > > > > > > I think Christian's explanatio

[PATCH] qemu-options: Limit the -xen options to x86 and arm

2022-04-27 Thread Thomas Huth
The Xen hypervisor is only available on x86 and arm - thus let's limit the related options to these targets. Signed-off-by: Thomas Huth --- qemu-options.hx | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 1764eebfaf..cc3a39d21a 10

Re: [PATCH] softmmu/vl: Fence 'xenfb' if Xen support is not compiled in

2022-04-27 Thread Anthony PERARD via
On Wed, Apr 27, 2022 at 02:33:16PM +0200, Thomas Huth wrote: > The 'xenfb' parameter for the '-vga' command line option is currently > always enabled unconditionally (since the xenfb is not a proper QOM > device that could be tested via its class name). That means it also > shows up if Xen is not e

Re: [RFC PATCH 6/6] vl: introduce -audio as a replacement for -soundhw

2022-04-27 Thread Mark Cave-Ayland
On 27/04/2022 12:32, Paolo Bonzini wrote: -audio is used like "-audio pa,model=sb16". It is almost as simple as -soundhw, but it reuses the -audiodev parsing machinery and attaches an audiodev to the newly-created device. The main 'feature' is that it knows about adding the codec device for mo

Re: [PATCH v4 4/6] vduse-blk: implements vduse-blk export

2022-04-27 Thread Yongji Xie
On Wed, Apr 27, 2022 at 9:22 PM Kevin Wolf wrote: > > Am 27.04.2022 um 05:11 hat Yongji Xie geschrieben: > > On Wed, Apr 27, 2022 at 1:03 AM Kevin Wolf wrote: > > > > > > Am 06.04.2022 um 09:59 hat Xie Yongji geschrieben: > > > > This implements a VDUSE block backends based on > > > > the libvdus

[PATCH] qemu-options: Limit the -enable-kvm option to the targets that support it

2022-04-27 Thread Thomas Huth
There is no need to present the user with -enable-kvm if there is no support for KVM on the corresponding target. Signed-off-by: Thomas Huth --- qemu-options.hx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index cc3a39d21a..af1c8feda6 1

Re: [PATCH] qemu-options: Limit the -xen options to x86 and arm

2022-04-27 Thread Anthony PERARD via
On Wed, Apr 27, 2022 at 03:31:56PM +0200, Thomas Huth wrote: > The Xen hypervisor is only available on x86 and arm - thus let's > limit the related options to these targets. > > Signed-off-by: Thomas Huth Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH 4/4] iotests: Add regression test for issue 945

2022-04-27 Thread Eric Blake
On Wed, Apr 27, 2022 at 01:40:57PM +0200, Hanna Reitz wrote: > Create a VM with a BDS in an iothread, add -incoming defer to the > command line, and then export this BDS via NBD. Doing so should not > fail an assertion. > > Signed-off-by: Hanna Reitz > --- > .../tests/export-incoming-iothread

Re: [PATCH 1/3] coroutine-lock: qemu_co_queue_next is a coroutine-only qemu_co_enter_next

2022-04-27 Thread Eric Blake
On Wed, Apr 27, 2022 at 03:08:28PM +0200, Paolo Bonzini wrote: > qemu_co_queue_next is basically the same as qemu_co_enter_next but > without a QemuLockable argument. That's perfectly fine, but only > as long as the function is marked coroutine_fn. If used outside > coroutine context, qemu_co_que

Re: [PATCH 2/3] coroutine-lock: introduce qemu_co_queue_enter_all

2022-04-27 Thread Eric Blake
On Wed, Apr 27, 2022 at 03:08:29PM +0200, Paolo Bonzini wrote: > Because qemu_co_queue_restart_all does not release the lock, it should > be used only in coroutine context. Introduce a new function that, > like qemu_co_enter_next, does release the lock, and use it whenever > qemu_co_queue_restart_

Re: [PATCH 7/8] qmp: add filtering of statistics by name

2022-04-27 Thread Paolo Bonzini
On 4/27/22 14:34, Dr. David Alan Gilbert wrote: If I specify a 'vm' it's not obvious to me whether I'd get NICs and block devices in the future? VM would not get those (it's global statistics), but the size could balloon if you specify no target at all. Adding a syntax for 'all' into the vc

Re: [PATCH 02/26] qcow2: remove incorrect coroutine_fn annotations

2022-04-27 Thread Paolo Bonzini
On 4/27/22 14:36, Paolo Bonzini wrote: On 4/21/22 12:24, Stefan Hajnoczi wrote: -int coroutine_fn qcow2_flush_caches(BlockDriverState *bs) +int qcow2_flush_caches(BlockDriverState *bs)   {   int ret = qcow2_write_caches(bs); Both of these eventually hit qcow2_cache_write, which is not mark

Re: [PATCH] qemu-options: Limit the -enable-kvm option to the targets that support it

2022-04-27 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH 3/3] coroutine-lock: qemu_co_queue_restart_all is a coroutine-only qemu_co_enter_all

2022-04-27 Thread Eric Blake
On Wed, Apr 27, 2022 at 03:08:30PM +0200, Paolo Bonzini wrote: > qemu_co_queue_restart_all is basically the same as qemu_co_enter_all > but without a QemuLockable argument. That's perfectly fine, but only as > long as the function is marked coroutine_fn. If used outside coroutine > context, qemu_

Re: [RFC PATCH 6/6] vl: introduce -audio as a replacement for -soundhw

2022-04-27 Thread Paolo Bonzini
On 4/27/22 15:41, Mark Cave-Ayland wrote: +    select_soundhw(model, dev->id); +    g_free(model);   break; +    }   case QEMU_OPTION_h:   help(0);   break; Is it possible to change select_soundhw() to t

Re: [PATCH 1/2] acpi/nvdimm: Create _LS{I,R,W} method for NVDIMM device

2022-04-27 Thread Igor Mammedov
On Tue, 12 Apr 2022 14:57:52 +0800 Robert Hoo wrote: > Since ACPI 6.2, previous NVDIMM/_DSM funcions "Get Namespace Label Data > Size (function index 4)", "Get Namespace Label Data (function index 5)", > "Set Namespace Label Data (function index 6)" has been deprecated by ACPI where it's said th

[PATCH 0/6] virtio-scsi: fix 100% CPU consumption in IOThread

2022-04-27 Thread Stefan Hajnoczi
Nir Soffer reported that virtio-scsi,iothread=... consumes 100% CPU in QEMU 7.0. This patch series addresses two bugs in hw/scsi/virtio-scsi.c (see patches 1 & 2) and follows up with code cleanups. Stefan Hajnoczi (6): virtio-scsi: fix ctrl and event handler functions in dataplane mode virtio-

[PATCH 1/6] virtio-scsi: fix ctrl and event handler functions in dataplane mode

2022-04-27 Thread Stefan Hajnoczi
Commit f34e8d8b8d48d73f36a67b6d5e492ef9784b5012 ("virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane") prepared the virtio-scsi cmd virtqueue handler function to by used in both the dataplane and non-datpalane code paths. It failed to convert the ctrl and event virtqueue handler functions,

[PATCH 5/6] virtio-scsi: clean up virtio_scsi_handle_cmd_vq()

2022-04-27 Thread Stefan Hajnoczi
virtio_scsi_handle_cmd_vq() is only called from hw/scsi/virtio-scsi.c now and its return value is no longer used. Remove the function prototype from virtio-scsi.h and drop the return value. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio-scsi.h | 1 - hw/scsi/virtio-scsi.c

[PATCH 2/6] virtio-scsi: don't waste CPU polling the event virtqueue

2022-04-27 Thread Stefan Hajnoczi
The virtio-scsi event virtqueue is not emptied by its handler function. This is typical for rx virtqueues where the device uses buffers when some event occurs (e.g. a packet is received, an error condition happens, etc). Polling non-empty virtqueues wastes CPU cycles. We are not waiting for new bu

[PATCH 3/6] virtio-scsi: clean up virtio_scsi_handle_event_vq()

2022-04-27 Thread Stefan Hajnoczi
virtio_scsi_handle_event_vq() is only called from hw/scsi/virtio-scsi.c now and its return value is no longer used. Remove the function prototype from virtio-scsi.h and drop the return value. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio-scsi.h | 1 - hw/scsi/virtio-scsi.c

[PATCH 6/6] virtio-scsi: move request-related items from .h to .c

2022-04-27 Thread Stefan Hajnoczi
There is no longer a need to expose the request and related APIs in virtio-scsi.h since there are no callers outside virtio-scsi.c. Note the block comment in VirtIOSCSIReq has been adjusted to meet the coding style. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio-scsi.h | 40 ---

[PATCH 4/6] virtio-scsi: clean up virtio_scsi_handle_ctrl_vq()

2022-04-27 Thread Stefan Hajnoczi
virtio_scsi_handle_ctrl_vq() is only called from hw/scsi/virtio-scsi.c now and its return value is no longer used. Remove the function prototype from virtio-scsi.h and drop the return value. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio-scsi.h | 1 - hw/scsi/virtio-scsi.c

Re: [RESEND][PATCH 0/2] acpi/nvdimm: support NVDIMM _LS{I,R,W} methods

2022-04-27 Thread Igor Mammedov
On Tue, 12 Apr 2022 14:57:51 +0800 Robert Hoo wrote: > The original NVDIMM _DSM functions (index 4~6) for label operations have > been deprecated by new ACPI methods _LS{I,R,W}[1][2]. > > Patch 1 implements the new _LS{I,R,W} methods, on top of old _DSM > implementation. > > Patch 2 fixes some

[PATCH qemu v10 03/14] target/riscv: rvv: Early exit when vstart >= vl

2022-04-27 Thread ~eopxd
From: eopXD According to v-spec (section 5.4): When vstart ≥ vl, there are no body elements, and no elements are updated in any destination vector register group, including that no tail elements are updated with agnostic values. vmsbf.m, vmsif.m, vmsof.m, viota.m, vcompress instructions themselv

[PATCH qemu v10 00/14] Add tail agnostic behavior for rvv instructions

2022-04-27 Thread ~eopxd
According to v-spec, tail agnostic behavior can be either kept as undisturbed or set elements' bits to all 1s. To distinguish the difference of tail policies, QEMU should be able to simulate the tail agnostic behavior as "set tail elements' bits to all 1s". An option 'rvv_ta_all_1s' is added to ena

[PATCH qemu v10 08/14] target/riscv: rvv: Add tail agnostic for vector integer comparison instructions

2022-04-27 Thread ~eopxd
From: eopXD Compares write mask registers, and so always operate under a tail- agnostic policy. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/vector_helper.c | 21 + 1 file changed, 21 insertions(+) diff --git a/target/riscv/vector_helper.c b/target/ri

[PATCH qemu v10 06/14] target/riscv: rvv: Add tail agnostic for vx, vvm, vxm instructions

2022-04-27 Thread ~eopxd
From: eopXD `vmadc` and `vmsbc` produces a mask value, they always operate with a tail agnostic policy. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 29 +++ target/riscv/internals.h| 5 +- target/riscv/vector_helper.c

[PATCH qemu v10 02/14] target/riscv: rvv: Rename ambiguous esz

2022-04-27 Thread ~eopxd
From: eopXD No functional change intended in this commit. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/vector_helper.c | 76 ++-- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/ve

[PATCH qemu v10 04/14] target/riscv: rvv: Add tail agnostic for vv instructions

2022-04-27 Thread ~eopxd
From: eopXD This is the first commit regarding the tail agnostic behavior. Added option 'rvv_ta_all_1s' to enable the behavior, the option is default to false. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/cpu.c | 1 + target/riscv/cpu.h

[PATCH qemu v10 07/14] target/riscv: rvv: Add tail agnostic for vector integer shift instructions

2022-04-27 Thread ~eopxd
From: eopXD Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 11 +++ target/riscv/vector_helper.c| 11 +++ 2 files changed, 22 insertions(+) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_tran

[PATCH qemu v10 05/14] target/riscv: rvv: Add tail agnostic for vector load / store instructions

2022-04-27 Thread ~eopxd
From: eopXD Destination register of unit-stride mask load and store instructions are always written with a tail-agnostic policy. Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 11 ++ target/riscv/translate.c| 2 ++ targe

  1   2   3   >