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

2022-04-27 Thread Michael S. Tsirkin
On Thu, Apr 28, 2022 at 01:52:46PM +0800, Jason Wang wrote: > On Thu, Apr 28, 2022 at 12:57 PM Michael S. Tsirkin wrote: > > > > On Thu, Apr 28, 2022 at 11:01:10AM +0800, Jason Wang wrote: > > > On Wed, Apr 27, 2022 at 8:25 PM Chenyi Qiang > > > wrote: > > > > > > > > > > > > > > > > On

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

2022-04-27 Thread Jason Wang
On Thu, Apr 28, 2022 at 12:57 PM Michael S. Tsirkin wrote: > > On Thu, Apr 28, 2022 at 11:01:10AM +0800, Jason Wang wrote: > > On Wed, Apr 27, 2022 at 8:25 PM Chenyi Qiang wrote: > > > > > > > > > > > > On 4/22/2022 3:11 PM, Chenyi Qiang wrote: > > > > > > > > > > > > On 2/7/2022 7:28 PM, Halil

Re: serial hang in qemu-system-ppc64 -M pseries

2022-04-27 Thread Rob Landley
On 4/27/22 10:27, Thomas Huth wrote: > On 26/04/2022 12.26, Rob Landley wrote: >> When I cut and paste 80-ish characters of text into the Linux serial >> console, it >> reads 16 characters and stops. When I hit space, it reads another 16 >> characters, >> and if I keep at it will eventually

Re: [PATCH qemu] spapr_pci: Disable IRQFD resampling on XIVE

2022-04-27 Thread Alexey Kardashevskiy
On 4/27/22 17:36, Cédric Le Goater wrote: Hello Alexey, On 4/27/22 06:36, Alexey Kardashevskiy wrote: VFIO-PCI has an "KVM_IRQFD_FLAG_RESAMPLE" optimization for INTx EOI handling when KVM can unmask PCI INTx (level triggered interrupt) without switching to the userspace (==QEMU).

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

2022-04-27 Thread Michael S. Tsirkin
On Thu, Apr 28, 2022 at 11:01:10AM +0800, Jason Wang wrote: > On Wed, Apr 27, 2022 at 8:25 PM Chenyi Qiang wrote: > > > > > > > > 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

Re: [PATCH qemu v11 01/15] target/riscv: rvv: Prune redundant ESZ, DSZ parameter passed

2022-04-27 Thread Weiwei Li
在 2022/3/14 下午3:38, ~eopxd 写道: From: eopXD No functional change intended in this commit. Signed-off-by: eop Chen Reviewed-by: Frank Chang Reviewed-by: Weiwei Li Sorry. My fault. I miss a space when I send Reviewed-by. Maybe you can update this in the next version with other changes.

Re: [RFC PATCH v3 1/5] ppc64: Add semihosting support

2022-04-27 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of April 21, 2022 12:04 pm: > Excerpts from Leandro Lupori's message of April 21, 2022 4:09 am: >> On 4/18/22 17:22, Cédric Le Goater wrote: >>> On 4/18/22 21:10, Leandro Lupori wrote: Add semihosting support for PPC64. This implementation is based

[PATCH qemu v11 15/15] target/riscv: rvv: Add option 'rvv_ta_all_1s' to enable optional tail agnostic behavior

2022-04-27 Thread ~eopxd
From: 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". There are multiple

[PATCH qemu v11 13/15] 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 Reviewed-by: Weiwei Li --- target/riscv/insn_trans/trans_rvv.c.inc | 6 + target/riscv/vector_helper.c| 30

[PATCH qemu v11 11/15] 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 Reviewed-by: Weiwei Li --- target/riscv/insn_trans/trans_rvv.c.inc | 15 + target/riscv/vector_helper.c| 443 +---

[PATCH qemu v11 06/15] 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 Reviewed-by: Weiwei Li --- target/riscv/insn_trans/trans_rvv.c.inc | 29 +++ target/riscv/internals.h| 5 +-

[PATCH qemu v11 12/15] 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 Reviewed-by: Weiwei Li --- 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 21e20d47e5..e0fd0e62b3 100644 ---

[PATCH qemu v11 09/15] 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 Reviewed-by: Weiwei Li --- target/riscv/insn_trans/trans_rvv.c.inc | 44 + target/riscv/vector_helper.c| 20 +++ 2 files changed, 64 insertions(+) diff --git

[PATCH qemu v11 08/15] 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 Reviewed-by: Weiwei Li --- target/riscv/vector_helper.c | 21 + 1 file changed, 21 insertions(+) diff --git

[PATCH qemu v11 07/15] 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 Reviewed-by: Weiwei Li --- 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

[PATCH qemu v11 10/15] 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 Reviewed-by: Weiwei Li --- 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

[PATCH qemu v11 05/15] 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 Reviewed-by: Weiwei Li --- target/riscv/insn_trans/trans_rvv.c.inc | 11 ++ target/riscv/translate.c

[PATCH qemu v11 14/15] 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 Reviewed-by: Weiwei Li --- target/riscv/insn_trans/trans_rvv.c.inc | 22 ++ target/riscv/vector_helper.c| 40 + 2 files changed, 62 insertions(+) diff --git

[PATCH qemu v11 01/15] 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 Reviewed-by: Weiwei Li Reviewed-by: Alistair Francis --- target/riscv/vector_helper.c | 1132 +- 1 file changed, 565 insertions(+), 567 deletions(-)

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

2022-04-27 Thread ~eopxd
From: 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". There are multiple

[PATCH qemu v11 02/15] 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 Reviewed-by: Weiwei Li Reviewed-by: Alistair Francis --- target/riscv/vector_helper.c | 76 ++-- 1 file changed, 38 insertions(+), 38 deletions(-) diff

[PATCH qemu v11 00/15] 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

[PATCH qemu v11 03/15] 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

RE: [RFC 00/18] vfio: Adopt iommufd

2022-04-27 Thread Tian, Kevin
> From: Alex Williamson > Sent: Wednesday, April 27, 2022 12:22 AM > > > > > > My expectation would be that libvirt uses: > > > > > > -object iommufd,id=iommufd0,fd=NNN > > > -device vfio-pci,fd=MMM,iommufd=iommufd0 > > > > > > Whereas simple QEMU command line would be: > > > > > > -object

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

2022-04-27 Thread Jason Wang
On Wed, Apr 27, 2022 at 8:25 PM Chenyi Qiang wrote: > > > > 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

Re: [PATCH 1/2] target/riscv: Tentatively remove Zhinx* from ISA extension string

2022-04-27 Thread Weiwei Li
在 2022/4/28 上午7:58, Alistair Francis 写道: On Sun, Apr 24, 2022 at 3:22 PM Tsukasa OI wrote: This commit disables ISA string conversion for Zhinx and Zhinxmin extensions for now. Because extension category ordering of "H" is not ratified, their ordering is likely invalid. Once "H"-extension

Re: [PATCH] target/riscv: add scalar crypto related extenstion strings to isa_string

2022-04-27 Thread Alistair Francis
On Tue, Apr 26, 2022 at 8:14 PM Weiwei Li wrote: > > - add zbk* and zk* strings to isa_edata_arr > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 13 + > 1 file changed, 13 insertions(+) > > diff

Re: [PATCH v5 00/11] s390x/tcg: Implement Vector-Enhancements Facility 2

2022-04-27 Thread David Miller
I'm playing catch up a bit here, as I was out sick for a few days. It would be very much appreciated if you could do so, as I'm not familiar with what is required. Thanks - David Miller On Mon, Apr 25, 2022 at 3:51 AM David Hildenbrand wrote: > > On 25.04.22 09:43, Christian Borntraeger

[PATCH] error-report: fix crash when compute iso8061 time

2022-04-27 Thread Lei He
g_get_real_time() returns the number of MICROSECONDS since January 1, 1970 UTC, but g_date_time_new_from_unix_utc() expects a timestamp in SECONDS. Directly call g_data_time_new_from_unix_utc(g_get_real_time()) causes overflow and a NULL pointer is returned, then qemu crashes. Use

Re: [PATCH v3] target/riscv: Fix incorrect PTE merge in walk_pte

2022-04-27 Thread Alistair Francis
On Sun, Apr 24, 2022 at 7:59 AM Ralf Ramsauer wrote: > > Two non-subsequent PTEs can be mapped to subsequent paddrs. In this > case, walk_pte will erroneously merge them. > > Enforce the split up, by tracking the virtual base address. > > Let's say we have the mapping: > 0x8120 -> 0x89623000

Re: [Qemu-devel] [PATCH 2/7] target/openrisc: add shutdown logic

2022-04-27 Thread Jason A. Donenfeld
Hi Stafford, On Thu, Apr 28, 2022 at 06:48:27AM +0900, Stafford Horne wrote: > On Wed, Apr 27, 2022 at 07:47:33PM +0100, Peter Maydell wrote: > > On Wed, 27 Apr 2022 at 18:46, Jason A. Donenfeld wrote: > > > > > > Hey Stafford, > > > > > > On Mon, Apr 17, 2017 at 08:23:51AM +0900, Stafford Horne

Re: [PATCH 1/2] target/riscv: Tentatively remove Zhinx* from ISA extension string

2022-04-27 Thread Alistair Francis
On Sun, Apr 24, 2022 at 3:22 PM Tsukasa OI wrote: > > This commit disables ISA string conversion for Zhinx and Zhinxmin > extensions for now. Because extension category ordering of "H" is not > ratified, their ordering is likely invalid. > > Once "H"-extension ordering is determined, we can add

Re: [PATCH v3] target/riscv: Fix incorrect PTE merge in walk_pte

2022-04-27 Thread Alistair Francis
On Sun, Apr 24, 2022 at 7:59 AM Ralf Ramsauer wrote: > > Two non-subsequent PTEs can be mapped to subsequent paddrs. In this > case, walk_pte will erroneously merge them. > > Enforce the split up, by tracking the virtual base address. > > Let's say we have the mapping: > 0x8120 -> 0x89623000

[PATCH v5 4/6] hw/riscv: virt: Add support for generating platform FDT entries

2022-04-27 Thread Alistair Francis
From: Alistair Francis Similar to the ARM virt machine add support for adding device tree entries for dynamically created devices. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- hw/riscv/virt.c | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH v5 5/6] hw/riscv: virt: Add device plug support

2022-04-27 Thread Alistair Francis
From: Alistair Francis Add support for plugging in devices, this was tested with the TPM device. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Reviewed-by: Bin Meng --- hw/riscv/virt.c | 35 +++ 1 file changed, 35 insertions(+) diff --git

[PATCH v5 2/6] hw/core: Move the ARM sysbus-fdt to core

2022-04-27 Thread Alistair Francis
From: Alistair Francis The ARM virt machine currently uses sysbus-fdt to create device tree entries for dynamically created MMIO devices. The RISC-V virt machine can also benefit from this, so move the code to the core directory. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias

[PATCH v5 3/6] hw/riscv: virt: Create a platform bus

2022-04-27 Thread Alistair Francis
From: Alistair Francis Create a platform bus to allow dynamic devices to be connected. This is based on the ARM implementation. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Reviewed-by: Bin Meng --- include/hw/riscv/virt.h | 7 - hw/riscv/virt.c | 68

[PATCH v5 6/6] hw/riscv: Enable TPM backends

2022-04-27 Thread Alistair Francis
From: Alistair Francis Imply the TPM sysbus devices. This allows users to add TPM devices to the RISC-V virt board. This was tested by first creating an emulated TPM device: swtpm socket --tpm2 -t -d --tpmstate dir=/tmp/tpm \ --ctrl type=unixio,path=swtpm-sock Then launching QEMU

[PATCH v5 0/6] hw/riscv: Add TPM support to the virt board

2022-04-27 Thread Alistair Francis
From: Alistair Francis This series adds support for connecting TPM devices to the RISC-V virt board. This is similar to how it works for the ARM virt board. This was tested by first creating an emulated TPM device: swtpm socket --tpm2 -t -d --tpmstate dir=/tmp/tpm \ --ctrl

[PATCH v5 1/6] hw/riscv: virt: Add a machine done notifier

2022-04-27 Thread Alistair Francis
From: Alistair Francis Move the binary and device tree loading code to the machine done notifier. This allows us to prepare for editing the device tree as part of the notifier. This is based on similar code in the ARM virt machine. Signed-off-by: Alistair Francis Reviewed-by: Edgar E.

Re: [PATCH] target/riscv: add scalar crypto related extenstion strings to isa_string

2022-04-27 Thread Alistair Francis
On Tue, Apr 26, 2022 at 8:14 PM Weiwei Li wrote: > > - add zbk* and zk* strings to isa_edata_arr > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 13 + > 1 file changed, 13 insertions(+) > > diff

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

2022-04-27 Thread Alistair Francis
On Thu, Apr 28, 2022 at 1:09 AM ~eopxd wrote: > > 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 > --- >

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

2022-04-27 Thread Alistair Francis
On Thu, Apr 28, 2022 at 9:11 AM Alistair Francis wrote: > > On Thu, Apr 28, 2022 at 1:09 AM ~eopxd wrote: > > > > 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. > >

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

2022-04-27 Thread Alistair Francis
On Thu, Apr 28, 2022 at 1:09 AM ~eopxd wrote: > > 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. I'm not sure I follow. The spec says that: "When a set is marked agnostic,

[PATCH] loader: support loading large files (>=2GB)

2022-04-27 Thread Peter Collingbourne
Currently the loader uses int as the return type for various APIs that deal with file sizes, which leads to an error if the file size is >=2GB, as it ends up being interpreted as a negative error code. Furthermore, we do not tolerate short reads, which are possible at least on Linux when

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

2022-04-27 Thread Alistair Francis
On Thu, Apr 28, 2022 at 1:06 AM ~eopxd wrote: > > 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. > >

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

2022-04-27 Thread Alistair Francis
On Thu, Apr 28, 2022 at 1:09 AM ~eopxd wrote: > > From: eopXD > > No functional change intended in this commit. > > Signed-off-by: eop Chen > Reviewed-by: Frank Chang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/vector_helper.c | 76 ++-- > 1

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

2022-04-27 Thread Alistair Francis
On Thu, Apr 28, 2022 at 1:14 AM ~eopxd wrote: > > From: eopXD > > No functional change intended in this commit. > > Signed-off-by: eop Chen > Reviewed-by: Frank Chang Can you please keep all previous tags when sending a new version Reviewed-by: Alistair Francis Alistair > --- >

Re: [RFC PATCH 5/7] target/ppc: Implemented xvf16ger*

2022-04-27 Thread Richard Henderson
On 4/27/22 14:11, Lucas Mateus Martins Araujo e Castro wrote: Please do convert this from a macro.  Given that float16 and bfloat16 are addressed the same, I think the only callback you need is the conversion from float16_to_float64.  Drop the bf16 accessor to ppc_vsr_t. Will do, although I'm

Re: [RFC PATCH 2/7] target/ppc: Implemented xvi*ger* instructions

2022-04-27 Thread Richard Henderson
On 4/27/22 13:24, Lucas Mateus Martins Araujo e Castro wrote: On 26/04/2022 20:40, Richard Henderson wrote: On 4/26/22 05:50, Lucas Mateus Castro(alqotel) wrote: +%xx_at  23:3 !function=times_4 +@XX3_at .. ... .. . . ... xt=%xx_at xb=%xx_xb Hmm. 

Re: [Qemu-devel] [PATCH 2/7] target/openrisc: add shutdown logic

2022-04-27 Thread Stafford Horne
On Wed, Apr 27, 2022 at 07:47:33PM +0100, Peter Maydell wrote: > On Wed, 27 Apr 2022 at 18:46, Jason A. Donenfeld wrote: > > > > Hey Stafford, > > > > On Mon, Apr 17, 2017 at 08:23:51AM +0900, Stafford Horne wrote: > > > In openrisc simulators we use hooks like 'l.nop 1' to cause the > > >

Re: [PATCH v3 3/3] nbd/server: Allow MULTI_CONN for shared writable exports

2022-04-27 Thread Eric Blake
On Wed, Apr 27, 2022 at 05:52:09PM +0200, Kevin Wolf wrote: > Am 14.03.2022 um 21:38 hat Eric Blake geschrieben: > > According to the NBD spec, a server that advertises > > NBD_FLAG_CAN_MULTI_CONN promises that multiple client connections will > > not see any cache inconsistencies: when properly

Re: [RFC PATCH 5/7] target/ppc: Implemented xvf16ger*

2022-04-27 Thread Lucas Mateus Martins Araujo e Castro
On 26/04/2022 21:26, Richard Henderson wrote: On 4/26/22 05:50, Lucas Mateus Castro(alqotel) wrote: +#define VSXGER16(NAME, ORIG_T, OR_EL)   \ +    void NAME(CPUPPCState *env, uint32_t a_r, uint32_t b_r, \ +  uint32_t  at_r, uint32_t

Re: [PATCH] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap

2022-04-27 Thread Daniel Henrique Barboza
On 4/27/22 03:42, Joel Stanley wrote: These are new hwcap bits added for power10. Signed-off-by: Joel Stanley --- MMA support for TCG is on the list so I think it makes sense for this to land after those are merged. I believe you mean this series: [RFC PATCH 0/7] VSX MMA Implementation

[RESEND PATCH] hw/dma: fix crash caused by race condition

2022-04-27 Thread Tong Zhang
assert(dbs->acb) is meant to check the return value of io_func per documented in commit 6bee44ea34 ("dma: the passed io_func does not return NULL"). However, there is a chance that after calling aio_context_release(dbs->ctx); the dma_blk_cb function is called before the assertion and dbs->acb is

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

2022-04-27 Thread Greg Kurz
On Wed, 27 Apr 2022 20:54:17 +0200 Christian Schoenebeck wrote: > mknod() on macOS does not support creating sockets, so divert to > call sequence socket(), bind() and fchmodat() respectively if S_IFSOCK > was passed with mode argument. > > Link:

Re: [RFC PATCH 2/7] target/ppc: Implemented xvi*ger* instructions

2022-04-27 Thread Lucas Mateus Martins Araujo e Castro
On 26/04/2022 20:40, Richard Henderson wrote: On 4/26/22 05:50, Lucas Mateus Castro(alqotel) wrote: +%xx_at  23:3 !function=times_4 +@XX3_at .. ... .. . . ... xt=%xx_at xb=%xx_xb Hmm.  Depends, I suppose on whether you want acc[0-7] or vsr[0-28] I

Re: [PATCH v4 1/6] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-04-27 Thread Greg Kurz
On Wed, 27 Apr 2022 20:54:04 +0200 Christian Schoenebeck wrote: > mknod() on macOS does not support creating regular files, so > divert to openat_file() if S_IFREG is passed with mode argument. > > Furthermore, 'man 2 mknodat' on Linux says: "Zero file type is > equivalent to type S_IFREG". >

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

2022-04-27 Thread Nir Soffer
On Wed, Apr 27, 2022 at 5:35 PM Stefan Hajnoczi wrote: > > 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

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

2022-04-27 Thread Michael Tokarev
27.04.2022 17:35, Stefan Hajnoczi wrote: 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 Nitpick: "to BE used". /mjt

Re: [PATCH] target/riscv: add scalar crypto related extenstion strings to isa_string

2022-04-27 Thread Jiatai He
This patch could work successfully in qemu, "zk" could be found in linux device tree. Tested-by: Jiatai He

Re: [RFC 0/2] introduce QEMUMachind.cmd()

2022-04-27 Thread John Snow
On Fri, Apr 8, 2022 at 1:02 PM Vladimir Sementsov-Ogievskiy wrote: > > Hi all! > > I always dreamed about getting rid of pattern > > result = self.vm.qmp(...) > self.assert_qmp(result, 'return', {}) > > Here is a suggestion to switch to > > self.vm.cmd(...) > > pattern instead. Yeah,

[PATCH v4 6/6] 9pfs: fix qemu_mknodat() to always return -1 on error on macOS host

2022-04-27 Thread Christian Schoenebeck
qemu_mknodat() is expected to behave according to its POSIX API, and therefore should always return exactly -1 on any error, and errno should be set for the actual error code. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz --- hw/9pfs/9p-util-darwin.c | 3 ++- 1 file changed, 2

[PATCH v4 4/6] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-27 Thread Christian Schoenebeck
Linux and macOS only share some errno definitions with equal macro name and value. In fact most mappings for errno are completely different on the two systems. This patch converts some important errno values from macOS host to corresponding Linux errno values before eventually sending such error

[PATCH v4 1/6] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-04-27 Thread Christian Schoenebeck
mknod() on macOS does not support creating regular files, so divert to openat_file() if S_IFREG is passed with mode argument. Furthermore, 'man 2 mknodat' on Linux says: "Zero file type is equivalent to type S_IFREG". Link: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/

[PATCH v4 5/6] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-04-27 Thread Christian Schoenebeck
When mapped POSIX ACL is used, we are ignoring errors when trying to remove a POSIX ACL xattr that does not exist. On Linux hosts we would get ENODATA in such cases, on macOS hosts however we get ENOATTR instead. As we can be sure that ENOATTR is defined as being identical on Linux hosts (at

[PATCH v4 3/6] 9pfs: fix wrong encoding of rdev field in Rgetattr on macOS

2022-04-27 Thread Christian Schoenebeck
The 'rdev' field in 9p reponse 'Rgetattr' is of type dev_t, which is actually a system dependant type and therefore both the size and encoding of dev_t differ between macOS and Linux. So far we have sent 'rdev' to guest in host's dev_t format as-is, which caused devices to appear with wrong

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

2022-04-27 Thread Christian Schoenebeck
mknod() on macOS does not support creating sockets, so divert to call sequence socket(), bind() and fchmodat() respectively if S_IFSOCK was passed with mode argument. Link: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/ Signed-off-by: Christian Schoenebeck ---

[PATCH v4 0/6] 9pfs: macOS host fixes

2022-04-27 Thread Christian Schoenebeck
A bunch of fixes for recently (in QEMU 7.0) added 9p support on macOS hosts. Note: there are still issues to address with case-insensitive file systems on macOS hosts. I sent a separate RFC on that icase issue: https://lore.kernel.org/qemu-devel/1757498.AyhHxzoH2B@silver/ v3 -> v4: * Use

Re: [PULL 0/9] Kraxel 20220427 patches

2022-04-27 Thread Richard Henderson
://git.kraxel.org/qemu tags/kraxel-20220427-pull-request for you to fetch changes up to a8152c4e4613c70c2f0573a82babbc8acc00cf90: i386: firmware parsing and sev setup for -bios loaded firmware (2022-04-27 07:51:01 +0200) vnc: add display-update

Re: [Qemu-devel] [PATCH 2/7] target/openrisc: add shutdown logic

2022-04-27 Thread Peter Maydell
On Wed, 27 Apr 2022 at 18:46, Jason A. Donenfeld wrote: > > Hey Stafford, > > On Mon, Apr 17, 2017 at 08:23:51AM +0900, Stafford Horne wrote: > > In openrisc simulators we use hooks like 'l.nop 1' to cause the > > simulator to exit. Implement that for qemu too. > > > > Reported-by: Waldemar

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

2022-04-27 Thread Christian Schoenebeck
On Mittwoch, 27. April 2022 19:37:39 CEST Greg Kurz wrote: > On Wed, 27 Apr 2022 18:18:31 +0200 > > Christian Schoenebeck wrote: > > On Mittwoch, 27. April 2022 15:31:42 CEST Greg Kurz wrote: > > > On Wed, 27 Apr 2022 14:32:53 +0200 > > > > > > Christian Schoenebeck wrote: > > > > On Mittwoch,

[PATCH] hw/arm: add versioning to sbsa-ref machine DT

2022-04-27 Thread Leif Lindholm
The sbsa-ref machine is continuously evolving. Some of the changes we want to make in the near future, to align with real components (e.g. the GIC-700), will break compatibility for existing firmware. Introduce two new properties to the DT generated on machine generation: - machine-version-major

[PATCH] MAINTAINERS/.mailmap: update email for Leif Lindholm

2022-04-27 Thread Leif Lindholm
NUVIA was acquired by Qualcomm in March 2021, but kept functioning on separate infrastructure for a transitional period. We've now switched over to contributing as Qualcomm Innocation Center (quicinc), so update my email address to reflect this. Signed-off-by: Leif Lindholm Cc: Leif Lindholm

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

2022-04-27 Thread Christian Schoenebeck
On Mittwoch, 27. April 2022 19:12:15 CEST Will Cohen wrote: > On Wed, Apr 27, 2022 at 12:18 PM Christian Schoenebeck < > > qemu_...@crudebyte.com> wrote: > > On Mittwoch, 27. April 2022 15:31:42 CEST Greg Kurz wrote: > > > On Wed, 27 Apr 2022 14:32:53 +0200 > > > > > > Christian Schoenebeck

Re: [PATCH] MAINTAINERS/.mailmap: update email for Leif Lindholm

2022-04-27 Thread Leif Lindholm
On Wed, Apr 27, 2022 at 7:13 PM Leif Lindholm wrote: > > NUVIA was acquired by Qualcomm in March 2021, but kept functioning on > separate infrastructure for a transitional period. We've now switched > over to contributing as Qualcomm Innocation Center (quicinc), so update > my email address to

Re: [Qemu-devel] [PATCH 2/7] target/openrisc: add shutdown logic

2022-04-27 Thread Jason A. Donenfeld
Hey Stafford, On Mon, Apr 17, 2017 at 08:23:51AM +0900, Stafford Horne wrote: > In openrisc simulators we use hooks like 'l.nop 1' to cause the > simulator to exit. Implement that for qemu too. > > Reported-by: Waldemar Brodkorb > Signed-off-by: Stafford Horne I'm curious as to why this

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

2022-04-27 Thread Greg Kurz
On Wed, 27 Apr 2022 18:18:31 +0200 Christian Schoenebeck wrote: > On Mittwoch, 27. April 2022 15:31:42 CEST Greg Kurz wrote: > > 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

[PULL 9/9] i386: firmware parsing and sev setup for -bios loaded firmware

2022-04-27 Thread Gerd Hoffmann
Don't register firmware as rom, not needed (see comment). Add x86_firmware_configure() call for proper sev initialization. Signed-off-by: Gerd Hoffmann Tested-by: Xiaoyao Li Reviewed-by: Daniel P. Berrangé Tested-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Acked-by: Michael S.

[PULL 7/9] i386: move bios load error message

2022-04-27 Thread Gerd Hoffmann
Switch to usual goto-end-of-function error handling style. No functional change. Signed-off-by: Gerd Hoffmann Tested-by: Xiaoyao Li Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin Message-Id: <20220425135051.551037-2-kra...@redhat.com> ---

[PULL 8/9] i386: factor out x86_firmware_configure()

2022-04-27 Thread Gerd Hoffmann
move sev firmware setup to separate function so it can be used from other code paths. No functional change. Signed-off-by: Gerd Hoffmann Tested-by: Xiaoyao Li Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin Message-Id:

[PULL 6/9] avocado/vnc: add test_change_listen

2022-04-27 Thread Gerd Hoffmann
From: Vladimir Sementsov-Ogievskiy Add simple test-case for new display-update qmp command. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Daniel P. Berrangé Message-Id: <20220401143936.356460-4-vsement...@openvz.org> Signed-off-by: Gerd Hoffmann --- tests/avocado/vnc.py | 63

[PULL 1/9] hw/display/vmware_vga: do not discard screen updates

2022-04-27 Thread Gerd Hoffmann
From: Carwyn Ellis In certain circumstances, typically when there is lots changing on the screen, updates will be discarded resulting in garbled output. This change simplifies the traversal of the display update FIFO queue when applying updates. We just track the queue length and iterate up to

[PULL 5/9] qapi/ui: add 'display-update' command for changing listen address

2022-04-27 Thread Gerd Hoffmann
From: Vladimir Sementsov-Ogievskiy Add possibility to change addresses where VNC server listens for new connections. Prior to 6.0 this functionality was available through 'change' qmp command which was deleted. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Daniel P. Berrangé

[PULL 3/9] Added parameter to take screenshot with screendump as PNG

2022-04-27 Thread Gerd Hoffmann
From: Kshitij Suri Currently screendump only supports PPM format, which is un-compressed. Added a "format" parameter to QMP and HMP screendump command to support PNG image capture using libpng. QMP example usage: { "execute": "screendump", "arguments": { "filename": "/tmp/image", "format":"png"

[PULL 2/9] Replacing CONFIG_VNC_PNG with CONFIG_PNG

2022-04-27 Thread Gerd Hoffmann
From: Kshitij Suri Libpng is only detected if VNC is enabled currently. This patch adds a generalised png option in the meson build which is aimed to replace use of CONFIG_VNC_PNG with CONFIG_PNG. Signed-off-by: Kshitij Suri Reviewed-by: Daniel P. Berrangé Message-Id:

[PULL 4/9] ui/vnc: refactor arrays of addresses to SocketAddressList

2022-04-27 Thread Gerd Hoffmann
From: Vladimir Sementsov-Ogievskiy Let's use SocketAddressList instead of dynamic arrays. Benefits: - Automatic cleanup: don't need specific freeing function and drop some gotos. - Less indirection: no triple asterix anymore! - Prepare for the following commit, which will reuse new

[PULL 0/9] Kraxel 20220427 patches

2022-04-27 Thread Gerd Hoffmann
The following changes since commit a74782936dc6e979ce371dabda4b1c05624ea87f: Merge tag 'pull-migration-20220421a' of https://gitlab.com/dagrh/qemu into staging (2022-04-21 18:48:18 -0700) are available in the Git repository at: git://git.kraxel.org/qemu tags/kraxel-20220427-pull-request

[PATCH 6/7] tests/tcg/xtensa: enable mmu tests for MMUv3

2022-04-27 Thread Max Filippov
MMU test suite is disabled for cores that have spanning TLB way, i.e. for all MMUv3 cores. Instead of disabling it make testing region virtual addresses explicit and invalidate TLB mappings for entries that conflict with the test. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_mmu.S |

[PATCH 2/7] tests/tcg/xtensa: restore vecbase SR after test

2022-04-27 Thread Max Filippov
Writing garbage into the vecbase SR results in hang in the subsequent tests that expect to raise an exception. Restore vecbase SR to its reset value after the test. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_sr.S | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH 7/7] tests/tcg/xtensa: fix vectors and checks in timer test

2022-04-27 Thread Max Filippov
Timer test assumes that timer 0 IRQ has level 1 and other timers have higher level IRQs. This assumption is not correct and the levels may be arbitrary. Fix that assumption by providing TIMER*_VECTOR macro and using it for vector selection and by making the check for the timer exception cause

[PATCH 5/7] tests/tcg/xtensa: enable autorefill phys_mem tests for MMUv3

2022-04-27 Thread Max Filippov
Autorefill tests in the phys_mem test suite are disabled for cores that have spanning TLB way, i.e. for all MMUv3 cores. Instead of disabling it invalidate TLB mappings for entries that conflict with the test. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_phys_mem.S | 10 +- 1

[PATCH 1/7] tests/tcg/xtensa: fix build for cores without windowed registers

2022-04-27 Thread Max Filippov
Don't try to initialize windowbase/windowstart in crt.S if they don't exist. Signed-off-by: Max Filippov --- tests/tcg/xtensa/crt.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tcg/xtensa/crt.S b/tests/tcg/xtensa/crt.S index d9846acace90..909872cd3853 100644 ---

[PATCH 3/7] tests/tcg/xtensa: fix watchpoint test

2022-04-27 Thread Max Filippov
xtensa core may have only one set of DBREAKA/DBREAKC registers. Don't hardcode register numbers in the test as 0 and 1, use macros that only index valid DBREAK* registers. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_break.S | 86 +++ 1 file changed, 46

[PATCH 4/7] tests/tcg/xtensa: remove dependency on the loop option

2022-04-27 Thread Max Filippov
xtensa core may not have the loop option, but still have timers. Don't use loop opcode in the timer test. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_timer.S | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/tcg/xtensa/test_timer.S

[PATCH 0/7] tests/tcg/xtensa: test fixes and improvements

2022-04-27 Thread Max Filippov
Hello, this series fixes xtensa TCG tests so that they could be built on cores with reduced configurations (e.g. missing windowed registers, no loop option, single data watchpoint register) and expands test coverage to configurations not supported earlier (e.g. MMUv3, timers at high IRQ levels).

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 17:16, Dr. David Alan Gilbert wrote: > > * Paolo Bonzini (pbonz...@redhat.com) wrote: > > > 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

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

2022-04-27 Thread Will Cohen
On Wed, Apr 27, 2022 at 12:18 PM Christian Schoenebeck < qemu_...@crudebyte.com> wrote: > On Mittwoch, 27. April 2022 15:31:42 CEST Greg Kurz wrote: > > On Wed, 27 Apr 2022 14:32:53 +0200 > > > > Christian Schoenebeck wrote: > > > On Mittwoch, 27. April 2022 12:18:10 CEST Greg Kurz wrote: > > >

Re: [PATCH 03/20] target/ppc: Substitute msr_pr macro with new M_MSR_PR macro

2022-04-27 Thread Víctor Colombo
Hello everyone! Thanks Zoltan and Richard for your kind reviews! On 26/04/2022 18:29, Richard Henderson wrote: On 4/22/22 11:54, Víctor Colombo wrote: Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo ---   hw/ppc/pegasos2.c    |  2 +-   hw/ppc/spapr.c   |  2 +-  

Re: [PATCH 1/2] ppc/xive: Always recompute the PIPR when pushing an OS context

2022-04-27 Thread Cédric Le Goater
On 4/27/22 18:02, Frederic Barrat wrote: The Post Interrupt Priority Register (PIPR) is not restored like the other OS-context related fields of the TIMA when pushing an OS context on the CPU. It's not needed because it can be calculated from the Interrupt Pending Buffer (IPB), which is saved

  1   2   3   >