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

2022-02-01 Thread Michael S. Tsirkin
On Wed, Feb 02, 2022 at 02:15:47AM +0100, Halil Pasic wrote: > On Tue, 1 Feb 2022 16:31:22 -0300 > Daniel Henrique Barboza wrote: > > > On 2/1/22 15:33, Halil Pasic wrote: > > > On Tue, 1 Feb 2022 12:36:25 -0300 > > > Daniel Henrique Barboza wrote: > > > > > >>> +vdev_has_iommu =

Re: [PATCH 1/2] migration/rdma: Increase the backlog from 5 to 128

2022-02-01 Thread Pankaj Gupta
> > > > migration/rdma.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/migration/rdma.c b/migration/rdma.c > > > > index c7c7a384875b..2e223170d06d 100644 > > > > --- a/migration/rdma.c > > > > +++ b/migration/rdma.c > > > > @@ -4238,7 +4238,7 @@ void

Re: [PATCH v6 0/7] target/riscv: Add XVentanaCondOps and supporting infrastructure changes

2022-02-01 Thread Alistair Francis
On Wed, Feb 2, 2022 at 2:03 PM Philipp Tomsich wrote: > > > In adding our first X-extension (i.e., vendor-defined) on RISC-V with > XVentanaCondOps, we need to add a few instructure improvements to make > it easier to add similar vendor-defined extensions in the future: > - refactor access to the

Re: [PATCH] target/riscv: Fix vill field write in vtype

2022-02-01 Thread Alistair Francis
On Tue, Feb 1, 2022 at 5:08 PM LIU Zhiwei wrote: > > The guest should be able to set the vill bit as part of vsetvl. > > Currently we may set env->vill to 1 in the vsetvl helper, but there > is nowhere that we set it to 0, so once it transitions to 1 it's stuck > there until the system is reset.

Re: [PATCH 1/2] migration/rdma: Increase the backlog from 5 to 128

2022-02-01 Thread Pankaj Gupta
> > > So it can handle more incoming requests. > > > > > > Signed-off-by: Jack Wang > > > --- > > > migration/rdma.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/migration/rdma.c b/migration/rdma.c > > > index c7c7a384875b..2e223170d06d 100644 > > > ---

Re: [PATCH] target/hexagon: remove unused variable

2022-02-01 Thread Thomas Huth
On 24/01/2022 07.43, Zongyuan Li wrote: When building with clang version 13.0.0 (eg. Fedora 13.0.0-3.fc35), two unused variables introduced by macro GATHER_FUNCTION and SCATTER_FUNCTION will cause building process failure due to [-Werror -Wunused-variable]. Signed-off-by: Zongyuan Li Resolves:

Re: [PATCH 2/2] tests: Update CentOS 8 container to CentOS Stream 8

2022-02-01 Thread Thomas Huth
On 01/02/2022 19.34, Andrea Bolognani wrote: On Tue, Feb 01, 2022 at 06:47:14PM +0100, Philippe Mathieu-Daudé wrote: Andrea, do you think it is acceptable to merge this and fix on top, or we should do it properly from start? My preference is always to avoid follow-up tweaks if possible :) but

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Alex Williamson
On Wed, 2 Feb 2022 01:13:22 + Jag Raman wrote: > > On Feb 1, 2022, at 5:47 PM, Alex Williamson > > wrote: > > > > On Tue, 1 Feb 2022 21:24:08 + > > Jag Raman wrote: > > > >>> On Feb 1, 2022, at 10:24 AM, Alex Williamson > >>> wrote: > >>> > >>> On Tue, 1 Feb 2022 09:30:35 +

Re: [PATCH 2/2] migration/rdma: set the REUSEADDR option for destination

2022-02-01 Thread Pankaj Gupta
> > > This allow address could be reused to avoid rdma_bind_addr error > > > out. > > > > Seems we are proposing to allow multiple connections on same source ip > > port pair? > according to the man page, it's more about the destination side which > is the incoming side.[1] By source here I meant

Re: [PATCH v2 17/25] tracing: remove TCG memory access tracing

2022-02-01 Thread Philippe Mathieu-Daudé via
On 1/2/22 19:20, Alex Bennée wrote: If you really want to trace all memory operations TCG plugins gives you a more flexible interface for doing so. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Cc: Luis Vilanova Cc: Stefan Hajnoczi -- v2 - dropped extra line

Re: [PATCH v2 14/25] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too

2022-02-01 Thread Philippe Mathieu-Daudé via
On 1/2/22 19:20, Alex Bennée wrote: From: Thomas Huth When running "make lcitool-refresh" in an out-of-tree build, it currently fails with an error message from git like this: fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary

[PATCH] hw/smbios: fix memory corruption for large guests due to handle overlap

2022-02-01 Thread Ani Sinha
The current implementation of smbios table handle assignment does not leave enough gap between tables 17 and table 19 for guests with larger than 8 TB of memory. This change fixes this issue. This change calculates if additional space between the tables need to be set aside and then reserves that

Re: [PATCH v2 12/25] docs/devel: mention our .editorconfig

2022-02-01 Thread Philippe Mathieu-Daudé via
On 1/2/22 19:20, Alex Bennée wrote: Ideally we should keep all our automatic formatting gubins in here. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220127150159.1489286-1-alex.ben...@linaro.org> --- docs/devel/style.rst | 4 1 file changed, 4 insertions(+)

[PATCH v6 4/7] target/riscv: access cfg structure through DisasContext

2022-02-01 Thread Philipp Tomsich
The Zb[abcs] support code still uses the RISCV_CPU macros to access the configuration information (i.e., check whether an extension is available/enabled). Now that we provide this information directly from DisasContext, we can access this directly via the cfg_ptr field. Signed-off-by: Philipp

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

2022-02-01 Thread Halil Pasic
On Tue, 1 Feb 2022 16:31:22 -0300 Daniel Henrique Barboza wrote: > On 2/1/22 15:33, Halil Pasic wrote: > > On Tue, 1 Feb 2022 12:36:25 -0300 > > Daniel Henrique Barboza wrote: > > > >>> +vdev_has_iommu = virtio_host_has_feature(vdev, > >>> VIRTIO_F_IOMMU_PLATFORM); > >>>if

[PATCH v6 2/7] target/riscv: riscv_tr_init_disas_context: copy pointer-to-cfg into cfg_ptr

2022-02-01 Thread Philipp Tomsich
As the number of extensions is growing, copying them individiually into the DisasContext will scale less and less... instead we populate a pointer to the RISCVCPUConfig structure in the DisasContext. This adds an extra indirection when checking for the availability of an extension (compared to

[PATCH v6 0/7] target/riscv: Add XVentanaCondOps and supporting infrastructure changes

2022-02-01 Thread Philipp Tomsich
In adding our first X-extension (i.e., vendor-defined) on RISC-V with XVentanaCondOps, we need to add a few instructure improvements to make it easier to add similar vendor-defined extensions in the future: - refactor access to the cfg->ext_* fields by making a pointer to the cfg structure (as

[PATCH v6 6/7] target/riscv: Add XVentanaCondOps custom extension

2022-02-01 Thread Philipp Tomsich
This adds the decoder and translation for the XVentanaCondOps custom extension (vendor-defined by Ventana Micro Systems), which is documented at https://github.com/ventanamicro/ventana-custom-extensions/releases/download/v1.0.0/ventana-custom-extensions-v1.0.0.pdf This commit then also adds a

[PATCH v6 1/7] target/riscv: refactor (anonymous struct) RISCVCPU.cfg into 'struct RISCVCPUConfig'

2022-02-01 Thread Philipp Tomsich
Signed-off-by: Philipp Tomsich Reviewed-by: Alistair Francis Suggested-by: Richard Henderson Reviewed-by: Richard Henderson --- (no changes since v4) Changes in v4: - use a typedef into 'RISCVCPUConfig' (instead of the explicit 'struct RISCVCPUConfig') to comply with the coding standard

Re: [PATCH] target/riscv: Fix vill field write in vtype

2022-02-01 Thread Richard Henderson
On 2/1/22 17:46, LIU Zhiwei wrote: The guest should be able to set the vill bit as part of vsetvl. Currently we may set env->vill to 1 in the vsetvl helper, but there is nowhere that we set it to 0, so once it transitions to 1 it's stuck there until the system is reset. Signed-off-by: LIU

Re: [PATCH 13/22] bsd-user/bsd-file.h: Implementation details for the filesystem calls

2022-02-01 Thread Warner Losh
On Tue, Feb 1, 2022 at 10:43 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 2/1/22 22:14, Warner Losh wrote: > > +#ifndef BSD_FILE_H_ > > +#define BSD_FILE_H_ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > >

Re: [PATCH 03/22] bsd-user/x86_64/target_arch_cpu.h: Remove openbsd syscall

2022-02-01 Thread Warner Losh
On Tue, Feb 1, 2022 at 9:23 AM Kyle Evans wrote: > On Tue, Feb 1, 2022 at 5:14 AM Warner Losh wrote: > > > > This doesn't build on openbsd at the moment, and this could > > should arguably be in bsd-user/*bsd/x86_64 somewhere. Until > > we refactor to support OpenBSD/NetBSD again, drop it here.

[PATCH v5 2/2] tcg/mips: Support unaligned access for softmmu

2022-02-01 Thread Richard Henderson
We can use the routines just added for user-only to emit unaligned accesses in softmmu mode too. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c.inc | 91 ++- 1 file changed, 51 insertions(+), 40 deletions(-) diff --git a/tcg/mips/tcg-target.c.inc

[PULL 0/1] Bsd user fix patches

2022-02-01 Thread Warner Losh
The following changes since commit 3bbe296c1c7a6ddce7a294e006b8c4a53b385292: Merge remote-tracking branch 'remotes/hreitz-gitlab/tags/pull-block-2022-02-01' into staging (2022-02-01 16:32:54 +) are available in the Git repository at: g...@gitlab.com:bsdimp/qemu.git

Re: [PATCH 20/22] bsd-user/bsd-file.h: Add implementations for read, pread, readv and preadv

2022-02-01 Thread Warner Losh
On Tue, Feb 1, 2022 at 2:37 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 2/1/22 22:14, Warner Losh wrote: > > Implement do_bsd_{read,pread,readv,preadv}. Connect them to the system > > call table. > > > > Signed-off-by: Stacey Son > > Signed-off-by: Kyle Evans > >

[PATCH v6 3/3] spapr: nvdimm: Introduce spapr-nvdimm device

2022-02-01 Thread Shivaprasad G Bhat
If the device backend is not persistent memory for the nvdimm, there is need for explicit IO flushes on the backend to ensure persistence. On SPAPR, the issue is addressed by adding a new hcall to request for an explicit flush from the guest when the backend is not pmem. So, the approach here is

Re: [PATCH v4 00/12] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-02-01 Thread Nakajima, Jun
> On Jan 28, 2022, at 8:47 AM, Steven Price wrote: > > On 18/01/2022 13:21, Chao Peng wrote: >> This is the v4 of this series which try to implement the fd-based KVM >> guest private memory. The patches are based on latest kvm/queue branch >> commit: >> >> fea31d169094 KVM: x86/pmu: Fix

Re: [PATCH v2] bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026

2022-02-01 Thread Warner Losh
On Tue, Feb 1, 2022 at 2:40 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 2/2/22 08:28, Warner Losh wrote: > > The capsicum signal stuff is new with FreeBSD 14, rev 1400026, so only > > define QEMU_SI_CAPSICUM there. Only copy _capsicum when QEMU_SI_CAPSICUM > > is defined.

Re: [PATCH 18/22] bsd-user: Define target_arg64

2022-02-01 Thread Richard Henderson
On 2/1/22 22:14, Warner Losh wrote: target_arg64 is a generic way to extract 64-bits from a pair of arguments. On 32-bit platforms, it returns them joined together as appropriate. On 64-bit platforms, it returns the first arg because it's already 64-bits. Signed-off-by: Stacey Son

Re: [PATCH 17/22] bsd-user: introduce target.h

2022-02-01 Thread Richard Henderson
On 2/1/22 22:14, Warner Losh wrote: Create target.h. This file is intended to be simple and describe basic things about the architecture. If something is a basic feature of the architecture, it belongs here. Should we need something that's per-BSD there will be a target-os.h that will live in

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Jag Raman
> On Feb 1, 2022, at 5:47 PM, Alex Williamson > wrote: > > On Tue, 1 Feb 2022 21:24:08 + > Jag Raman wrote: > >>> On Feb 1, 2022, at 10:24 AM, Alex Williamson >>> wrote: >>> >>> On Tue, 1 Feb 2022 09:30:35 + >>> Stefan Hajnoczi wrote: >>> On Mon, Jan 31, 2022 at 09:16:23AM

[PATCH v6 1/3] nvdimm: Add realize, unrealize callbacks to NVDIMMDevice class

2022-02-01 Thread Shivaprasad G Bhat
A new subclass inheriting NVDIMMDevice is going to be introduced in subsequent patches. The new subclass uses the realize and unrealize callbacks. Add them on NVDIMMClass to appropriately call them as part of plug-unplug. Signed-off-by: Shivaprasad G Bhat --- hw/mem/nvdimm.c | 16

Re: [PATCH 16/22] bsd-user/freebsd/os-syscall.c: Tracing and error boilerplate

2022-02-01 Thread Richard Henderson
On 2/1/22 22:14, Warner Losh wrote: Add in the tracing and this system call not implemented boilerplate. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/bsd-user/freebsd/os-syscall.c

[PATCH v6 0/3] spapr: nvdimm: Introduce spapr-nvdimm device

2022-02-01 Thread Shivaprasad G Bhat
If the device backend is not persistent memory for the nvdimm, there is need for explicit IO flushes to ensure persistence. On SPAPR, the issue is addressed by adding a new hcall to request for an explicit flush from the guest when the backend is not pmem. So, the approach here is to convey when

[PATCH v2] bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026

2022-02-01 Thread Warner Losh
The capsicum signal stuff is new with FreeBSD 14, rev 1400026, so only define QEMU_SI_CAPSICUM there. Only copy _capsicum when QEMU_SI_CAPSICUM is defined. Default to no info being passed for signals we make no guess about. Signed-off-by: Warner Losh --- bsd-user/signal-common.h | 5 +

Re: [PATCH] qapi, i386/sev: Add debug-launch-digest to launch-measure response

2022-02-01 Thread Tobin Feldman-Fitzthum
On 1/31/22 9:26 AM, Daniel P. Berrangé wrote: > > Ok, so the usage scenario is that the platform owner is deciding > which OVMF build in use, not the guest owner. That guest owner just > knows that it is an OVMF build from a set of builds published by the > platform owner. Good enough if you

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Jag Raman
> On Feb 1, 2022, at 10:24 AM, Alex Williamson > wrote: > > On Tue, 1 Feb 2022 09:30:35 + > Stefan Hajnoczi wrote: > >> On Mon, Jan 31, 2022 at 09:16:23AM -0700, Alex Williamson wrote: >>> On Fri, 28 Jan 2022 09:18:08 + >>> Stefan Hajnoczi wrote: >>> On Thu, Jan 27, 2022 at

Re: [PATCH] bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026

2022-02-01 Thread Warner Losh
On Tue, Feb 1, 2022 at 2:06 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 2/2/22 07:52, Warner Losh wrote: > > The capsicum signal stuff is new with FreeBSD 14, rev 1400026, so only > > copy them on a new enough system. > > > > Signed-off-by: Warner Losh > > --- > >

[PATCH v6 7/7] target/riscv: add a MAINTAINERS entry for XVentanaCondOps

2022-02-01 Thread Philipp Tomsich
The XVentanaCondOps extension is supported by VRULL on behalf of the Ventana Micro. Add myself as a point-of-contact. Signed-off-by: Philipp Tomsich Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- (no changes since v3) Changes in v3: - add a MAINTAINERS entry for

Re: [PATCH 22/22] bsd-user/freebsd/os-syscall.c: Implement exit

2022-02-01 Thread Richard Henderson
On 2/1/22 22:14, Warner Losh wrote: Implement the exit system call. Bring in bsd-proc.h to contain all the process system call implementation and helper routines. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-proc.h | 43 +++

Re: [PATCH 20/22] bsd-user/bsd-file.h: Add implementations for read, pread, readv and preadv

2022-02-01 Thread Richard Henderson
On 2/1/22 22:14, Warner Losh wrote: Implement do_bsd_{read,pread,readv,preadv}. Connect them to the system call table. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 79 +++

Re: [PATCH 14/22] bsd-user/freebsd/os-syscall.c: lock_iovec

2022-02-01 Thread Richard Henderson
On 2/1/22 22:14, Warner Losh wrote: lock_iovec will lock an I/O vec and the memory to which it referrs and create a iovec in the host space that referrs to it, with full error unwinding. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 92 +++ 1

Re: [PATCH v5 6/7] target/riscv: Add XVentanaCondOps custom extension

2022-02-01 Thread Richard Henderson
On 2/1/22 19:36, Philipp Tomsich wrote: +static bool gen_condmask(DisasContext *ctx, arg_r *a, TCGCond cond) This should also have a vendor prefix This one is a static helper function inside a file ..._xventanacondops..._ and not visible outside the compilation unit. Do we really want to

Re: [PATCH 2/2] migration/rdma: set the REUSEADDR option for destination

2022-02-01 Thread Jinpu Wang
On Tue, Feb 1, 2022 at 7:39 PM Pankaj Gupta wrote: > > > This allow address could be reused to avoid rdma_bind_addr error > > out. > > Seems we are proposing to allow multiple connections on same source ip > port pair? according to the man page, it's more about the destination side which is the

[PATCH v5 1/2] tcg/mips: Support unaligned access for user-only

2022-02-01 Thread Richard Henderson
This is kinda sorta the opposite of the other tcg hosts, where we get (normal) alignment checks for free with host SIGBUS and need to add code to support unaligned accesses. Fortunately, the ISA contains pairs of instructions that are used to implement unaligned memory accesses. Use them.

Re: [PULL 00/40] Bsd user arm 2022q1 patches

2022-02-01 Thread Warner Losh
On Tue, Feb 1, 2022 at 9:32 AM Peter Maydell wrote: > On Mon, 31 Jan 2022 at 19:56, Warner Losh wrote: > > > > The following changes since commit > 7a1043cef91739ff4b59812d30f1ed2850d3d34e: > > > > Merge remote-tracking branch > 'remotes/bonzini-gitlab/tags/for-upstream' into staging

Re: [PATCH 05/22] bsd-user/arm/target_arch_cpu.h: Only support FreeBSD sys calls

2022-02-01 Thread Warner Losh
On Tue, Feb 1, 2022 at 9:32 AM Kyle Evans wrote: > On Tue, Feb 1, 2022 at 5:14 AM Warner Losh wrote: > > > > Since we don't build on OpenBSD, only do FreeBSD system calls here. In > > the future, we'll need to move this to some place like > > bsd-user/freebsd/arm/mumble.h, but until then just

Re: [PATCH] bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026

2022-02-01 Thread Warner Losh
This fixes a build regression. The _capsicum member was added on -current recently, and isn't in FreeBSD 12 or 13. This fixes the build regression there. My apologies... Warner On Tue, Feb 1, 2022 at 1:52 PM Warner Losh wrote: > The capsicum signal stuff is new with FreeBSD 14, rev 1400026,

Re: [PATCH] hw/timer/armv7m_systick: Update clock source before enabling timer

2022-02-01 Thread Richard Petri
On Tue, Feb 01 2022, Peter Maydell wrote: > Thanks, you've saved me a debugging session! I had a bug report about > a problem with the systick timer a couple of days back, but I hadn't yet > got round to investigating it, and now I don't have to, because this > patch fixes the reported failure

Re: [PATCH 1/2] migration/rdma: Increase the backlog from 5 to 128

2022-02-01 Thread Jinpu Wang
On Tue, Feb 1, 2022 at 7:19 PM Pankaj Gupta wrote: > > > So it can handle more incoming requests. > > > > Signed-off-by: Jack Wang > > --- > > migration/rdma.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/migration/rdma.c b/migration/rdma.c > > index

Re: [PATCH] replay: use CF_NOIRQ for special exception-replaying TB

2022-02-01 Thread Richard Henderson
On 1/31/22 22:25, Pavel Dovgalyuk wrote: Commit aff0e204cb1f1c036a496c94c15f5dfafcd9b4b4 introduced CF_NOIRQ usage, but one case was forgotten. Record/replay uses one special TB which is not really executed, but used to cause a correct exception in replay mode. This patch adds CF_NOIRQ flag for

Re: [PATCH v4 4/4] python/aqmp: add socket bind step to legacy.py

2022-02-01 Thread Kevin Wolf
Am 01.02.2022 um 19:32 hat John Snow geschrieben: > On Tue, Feb 1, 2022 at 8:21 AM Kevin Wolf wrote: > > > > Am 01.02.2022 um 05:11 hat John Snow geschrieben: > > > The synchronous QMP library would bind to the server address during > > > __init__(). The new library delays this to the accept()

Re: [PATCH REBASED v5 2/2] spapr: nvdimm: Introduce spapr-nvdimm device

2022-02-01 Thread Shivaprasad G Bhat
On 9/21/21 12:02, David Gibson wrote: On Wed, Jul 07, 2021 at 09:57:31PM -0500, Shivaprasad G Bhat wrote: If the device backend is not persistent memory for the nvdimm, there is need for explicit IO flushes on the backend to ensure persistence. On SPAPR, the issue is addressed by adding a

[PATCH 10/13] hw/intc/arm_gicv3_its: Drop TableDesc and CmdQDesc valid fields

2022-02-01 Thread Peter Maydell
Currently we track in the TableDesc and CmdQDesc structs the state of the GITS_BASER and GITS_CBASER Valid bits. However we aren't very consistent abut checking the valid field: we test it in update_cte() and update_dte(), but not anywhere else we look things up in tables. The GIC specification

Re: [PATCH REBASED v5 1/2] spapr: nvdimm: Implement H_SCM_FLUSH hcall

2022-02-01 Thread Shivaprasad G Bhat
Hi David, Thanks for comments. Sorry about the delay. Replies inline. On 9/21/21 11:53, David Gibson wrote: On Wed, Jul 07, 2021 at 09:57:21PM -0500, Shivaprasad G Bhat wrote: The patch adds support for the SCM flush hcall for the nvdimm devices. To be available for exploitation by guest

[PATCH v6 3/7] target/riscv: access configuration through cfg_ptr in DisasContext

2022-02-01 Thread Philipp Tomsich
The implementation in trans_{rvi,rvv,rvzfh}.c.inc accesses the shallow copies (in DisasContext) of some of the elements available in the RISCVCPUConfig structure. This commit redirects accesses to use the cfg_ptr copied into DisasContext and removes the shallow copies. Signed-off-by: Philipp

[PATCH 04/13] hw/intc/arm_gicv3_its: Keep CTEs as a struct, not a raw uint64_t

2022-02-01 Thread Peter Maydell
In the ITS, a CTE is an entry in the collection table, which contains multiple fields. Currently the function get_cte() which reads one entry from the device table returns a success/failure boolean and passes back the raw 64-bit integer CTE value via a pointer argument. We then extract fields from

[PATCH v6 5/7] target/riscv: iterate over a table of decoders

2022-02-01 Thread Philipp Tomsich
To split up the decoder into multiple functions (both to support vendor-specific opcodes in separate files and to simplify maintenance of orthogonal extensions), this changes decode_op to iterate over a table of decoders predicated on guard functions. This commit only adds the new structure and

Re: [PATCH v2] bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026

2022-02-01 Thread Richard Henderson
On 2/2/22 08:28, Warner Losh wrote: The capsicum signal stuff is new with FreeBSD 14, rev 1400026, so only define QEMU_SI_CAPSICUM there. Only copy _capsicum when QEMU_SI_CAPSICUM is defined. Default to no info being passed for signals we make no guess about. Signed-off-by: Warner Losh ---

[PATCH 09/13] hw/intc/arm_gicv3_its: Make update_ite() use ITEntry

2022-02-01 Thread Peter Maydell
Make the update_ite() struct use the new ITEntry struct, so that callers don't need to assemble the in-memory ITE data themselves, and only get_ite() and update_ite() need to care about that in-memory layout. We can then drop the no-longer-used IteEntry struct definition. Signed-off-by: Peter

[PATCH 05/13] hw/intc/arm_gicv3_its: Pass CTEntry to update_cte()

2022-02-01 Thread Peter Maydell
Make update_cte() take a CTEntry struct rather than all the fields of the new CTE as separate arguments. This brings it into line with the update_dte() API. Signed-off-by: Peter Maydell --- hw/intc/arm_gicv3_its.c | 32 +--- 1 file changed, 17 insertions(+), 15

Re: [PATCH 0/2] RISC-V: Correctly generate store/amo faults

2022-02-01 Thread Richard Henderson
On 2/1/22 15:40, Alistair Francis wrote: Alistair, you're only changing the reporting of MMIO faults for which read permission is missing. Importantly, the actual permission check is done elsewhere, and you aren't changing that to perform a write access check. Also, you very much need to

[PATCH 12/13] hw/intc/arm_gicv3_its: Don't allow intid 1023 in MAPI/MAPTI

2022-02-01 Thread Peter Maydell
When handling MAPI/MAPTI, we allow the supplied interrupt ID to be either 1023 or something in the valid LPI range. This is a mistake: only a real valid LPI is allowed. (The general behaviour of the ITS is that most interrupt ID fields require a value in the LPI range; the exception is that

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

2022-02-01 Thread Daniel Henrique Barboza
On 2/1/22 15:33, Halil Pasic wrote: On Tue, 1 Feb 2022 12:36:25 -0300 Daniel Henrique Barboza wrote: +vdev_has_iommu = virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM); if (klass->get_dma_as != NULL && has_iommu) { virtio_add_feature(>host_features,

Re: [PATCH 19/22] bsd-user: Add safe system call macros

2022-02-01 Thread Richard Henderson
On 2/1/22 22:14, Warner Losh wrote: Add a series of macros to create system call macros that go via the safe_syscall path. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/syscall_defs.h | 47 + 1 file changed, 47 insertions(+)

[PATCH 06/13] hw/intc/arm_gicv3_its: Fix address calculation in get_ite() and update_ite()

2022-02-01 Thread Peter Maydell
In get_ite() and update_ite() we work with a 12-byte in-guest-memory table entry, which we intend to handle as an 8-byte value followed by a 4-byte value. Unfortunately the calculation of the address of the 4-byte value is wrong, because we write it as: table_base_address + (index * entrysize)

[PATCH 01/13] hw/intc/arm_gicv3_its: Use address_space_map() to access command queue packets

2022-02-01 Thread Peter Maydell
Currently the ITS accesses each 8-byte doubleword in a 4-doubleword command packet with a separate address_space_ldq_le() call. This is awkward because the individual command processing functions have ended up with code to handle "load more doublewords out of the packet", which is both unwieldy

Re: [PATCH v1 1/1] target/i386: Mask xstate_bv based on the cpu enabled features

2022-02-01 Thread Leonardo Brás
Hello Igor, On Tue, 2022-02-01 at 09:29 +0100, Igor Mammedov wrote: > On Mon, 31 Jan 2022 12:53:31 + > David Edmondson wrote: > > > On Saturday, 2022-01-29 at 06:46:45 -03, Leonardo Bras wrote: > > > > > The following steps describe a migration bug: > > > 1 - Bring up a VM with -cpu EPYC

Re: [PATCH] hw/i2c: flatten pca954x mux device

2022-02-01 Thread Patrick Venture
On Tue, Feb 1, 2022 at 11:02 AM Philippe Mathieu-Daudé wrote: > On 1/2/22 17:30, Patrick Venture wrote: > > Previously this device created N subdevices which each owned an i2c bus. > > Now this device simply owns the N i2c busses directly. > > > > Tested: Verified devices behind mux are still

[PATCH v5 0/2] tcg/mips: Unaligned access support

2022-02-01 Thread Richard Henderson
Based-on: <20220104021543.396571-1-richard.hender...@linaro.org> ("[PATCH v4 0/7] Unaligned access for user only") Changes from v4: * Rebase on master. * Drop other cleanup for now. Changes from v3: * Rebase on master, which has some patches applied. r~ Richard Henderson (2):

Re: [PATCH 08/20] tcg/i386: Implement avx512 variable shifts

2022-02-01 Thread Alex Bennée
Richard Henderson writes: > AVX512VL has VPSRAVQ, and > AVX512BW has VPSLLVW, VPSRAVW, VPSRLVW. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > tcg/i386/tcg-target.c.inc | 32 > 1 file changed, 24 insertions(+), 8 deletions(-) > >

Re: [PATCH 12/22] bsd-user/freebsd/os-syscall.c: Add get_errno and host_to_target_errno

2022-02-01 Thread Warner Losh
On Tue, Feb 1, 2022 at 10:40 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 2/1/22 22:14, Warner Losh wrote: > > +/* > > + * errno conversion. > > + */ > > +abi_long get_errno(abi_long ret) > > +{ > > + > > +if (ret == -1) { > > Watch the extra blank lines. > Will do. It's

Re: [PATCH 07/20] tcg/i386: Use tcg_can_emit_vec_op in expand_vec_cmp_noinv

2022-02-01 Thread Alex Bennée
Richard Henderson writes: > The condition for UMIN/UMAX availability is about to change; > use the canonical version. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: "make check-acceptance" takes way too long

2022-02-01 Thread Cleber Rosa
On Tue, Feb 1, 2022 at 1:06 PM Alex Bennée wrote: > > > Cleber Rosa writes: > > > On Tue, Feb 1, 2022 at 11:20 AM Daniel P. Berrangé > > wrote: > >> > >> On Tue, Feb 01, 2022 at 11:01:43AM -0500, Cleber Rosa wrote: > >> > On Tue, Feb 1, 2022 at 6:25 AM Alex Bennée > >> > wrote: > >> > > > >>

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Alex Williamson
On Tue, 1 Feb 2022 21:24:08 + Jag Raman wrote: > > On Feb 1, 2022, at 10:24 AM, Alex Williamson > > wrote: > > > > On Tue, 1 Feb 2022 09:30:35 + > > Stefan Hajnoczi wrote: > > > >> On Mon, Jan 31, 2022 at 09:16:23AM -0700, Alex Williamson wrote: > >>> On Fri, 28 Jan 2022

Re: [PATCH v1 1/1] target/i386: Mask xstate_bv based on the cpu enabled features

2022-02-01 Thread Leonardo Brás
Hello David, thanks for this feedback! On Mon, 2022-01-31 at 12:53 +, David Edmondson wrote: > On Saturday, 2022-01-29 at 06:46:45 -03, Leonardo Bras wrote: > > > The following steps describe a migration bug: > > 1 - Bring up a VM with -cpu EPYC on a host with EPYC-Milan cpu > > 2 - Migrate

[PATCH 07/13] hw/intc/arm_gicv3_its: Avoid nested ifs in get_ite()

2022-02-01 Thread Peter Maydell
The get_ite() code has some awkward nested if statements; clean them up by returning early if the memory accesses fail. Signed-off-by: Peter Maydell --- hw/intc/arm_gicv3_its.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git

Re: [PATCH 1/2] hw/char/renesas_sci: Add fifo buffer to backend interface.

2022-02-01 Thread Peter Maydell
On Tue, 1 Feb 2022 at 17:47, Yoshinori Sato wrote: > > On Tue, 01 Feb 2022 15:48:58 +0900, > Thomas Huth wrote: > > > > On 31/01/2022 10.42, Yoshinori Sato wrote: > > If you describe it like this, it sounds like you're now emulating a > > buffer that is not there with real hardware? Is that

[PATCH] target/i386: the sgx_epc_get_section stub is reachable

2022-02-01 Thread Paolo Bonzini
The sgx_epc_get_section stub is reachable from cpu_x86_cpuid. It should not assert, instead it should just return true just like the "real" sgx_epc_get_section does when SGX is disabled. Reported-by: Vladimír Beneš Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- hw/i386/sgx-stub.c

[PATCH 08/13] hw/intc/arm_gicv3_its: Pass ITE values back from get_ite() via a struct

2022-02-01 Thread Peter Maydell
In get_ite() we currently return the caller some of the fields of an Interrupt Table Entry via a set of pointer arguments, and validate some of them internally (interrupt type and valid bit) to return a simple true/false 'valid' indication. Define a new ITEntry struct which has all the fields that

[PULL 1/1] bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026

2022-02-01 Thread Warner Losh
The capsicum signal stuff is new with FreeBSD 14, rev 1400026, so only define QEMU_SI_CAPSICUM there. Only copy _capsicum when QEMU_SI_CAPSICUM is defined. Default to no info being passed for signals we make no guess about. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson ---

[PATCH 03/13] hw/intc/arm_gicv3_its: Pass DTEntry to update_dte()

2022-02-01 Thread Peter Maydell
Make update_dte() take a DTEntry struct rather than all the fields of the new DTE as separate arguments. Signed-off-by: Peter Maydell --- hw/intc/arm_gicv3_its.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/hw/intc/arm_gicv3_its.c

Re: [PATCH 05/20] tcg/i386: Detect AVX512

2022-02-01 Thread Alex Bennée
Richard Henderson writes: > There are some operation sizes in some subsets of AVX512 that > are missing from previous iterations of AVX. Detect them. > > Signed-off-by: Richard Henderson Hard for me to test but the code looks sane Reviewed-by: Alex Bennée -- Alex Bennée

[PATCH v6 2/3] spapr: nvdimm: Implement H_SCM_FLUSH hcall

2022-02-01 Thread Shivaprasad G Bhat
The patch adds support for the SCM flush hcall for the nvdimm devices. To be available for exploitation by guest through the next patch. The hcall is applicable only for new SPAPR specific device class which is also introduced in this patch. The hcall expects the semantics such that the flush to

[PATCH 02/13] hw/intc/arm_gicv3_its: Keep DTEs as a struct, not a raw uint64_t

2022-02-01 Thread Peter Maydell
In the ITS, a DTE is an entry in the device table, which contains multiple fields. Currently the function get_dte() which reads one entry from the device table returns it as a raw 64-bit integer, which we then pass around in that form, only extracting fields from it as we need them. Create a real

Re: [PATCH 21/22] bsd-user/bsd-file.h: Meat of the write system calls

2022-02-01 Thread Richard Henderson
On 2/1/22 22:14, Warner Losh wrote: Implement write, writev, pwrite and pwritev and connect them to the system call dispatch routine. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/bsd-file.h | 85 +++

Re: "make check-acceptance" takes way too long

2022-02-01 Thread Stefano Brivio
On Tue, 1 Feb 2022 12:47:48 -0500 Cleber Rosa wrote: > On Tue, Feb 1, 2022 at 11:20 AM Daniel P. Berrangé > wrote: > > > > On Tue, Feb 01, 2022 at 11:01:43AM -0500, Cleber Rosa wrote: > > > On Tue, Feb 1, 2022 at 6:25 AM Alex Bennée > > > wrote: > > > > > > > > We have up to now tried

Re: [PATCH 2/2] tests: Update CentOS 8 container to CentOS Stream 8

2022-02-01 Thread Andrea Bolognani
On Tue, Feb 01, 2022 at 06:47:14PM +0100, Philippe Mathieu-Daudé wrote: > Andrea, do you think it is acceptable to merge this and fix on top, or > we should do it properly from start? My preference is always to avoid follow-up tweaks if possible :) but ultimately the decision is up to the QEMU

Re: [PATCH 15/22] bsd-user/freebsd/os-syscall.c: unlock_iovec

2022-02-01 Thread Richard Henderson
On 2/1/22 22:14, Warner Losh wrote: Releases the references to the iovec created by lock_iovec. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/bsd-user/freebsd/os-syscall.c

Re: [PATCH 2/2] tests: Update CentOS 8 container to CentOS Stream 8

2022-02-01 Thread Andrea Bolognani
On Tue, Feb 01, 2022 at 06:02:21PM +, Daniel P. Berrangé wrote: > On Tue, Feb 01, 2022 at 09:08:22AM -0800, Andrea Bolognani wrote: > > CentOS 8 and CentOS Stream 8 are two pretty distinct operating > > systems in terms of update cadence and stability expectations, so I > > think that using

Re: [PATCH 06/20] tcg/i386: Add tcg_out_evex_opc

2022-02-01 Thread Alex Bennée
Richard Henderson writes: > The evex encoding is added here, for use in a subsequent patch. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v4 4/4] python/aqmp: add socket bind step to legacy.py

2022-02-01 Thread John Snow
On Tue, Feb 1, 2022 at 8:21 AM Kevin Wolf wrote: > > Am 01.02.2022 um 05:11 hat John Snow geschrieben: > > The synchronous QMP library would bind to the server address during > > __init__(). The new library delays this to the accept() call, because > > binding occurs inside of the call to

[PATCH v2 18/25] tracing: remove the trace-tcg includes from the build

2022-02-01 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Cc: Luis Vilanova Cc: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220124201608.604599-16-alex.ben...@linaro.org> --- include/exec/helper-proto.h | 1 - include/exec/helper-tcg.h | 1 - include/trace-tcg.h

Re: [PATCH 04/20] tcg/s390x: Implement vector NAND, NOR, EQV

2022-02-01 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH] bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026

2022-02-01 Thread Richard Henderson
On 2/2/22 07:52, Warner Losh wrote: The capsicum signal stuff is new with FreeBSD 14, rev 1400026, so only copy them on a new enough system. Signed-off-by: Warner Losh --- bsd-user/signal.c | 4 1 file changed, 4 insertions(+) diff --git a/bsd-user/signal.c b/bsd-user/signal.c index

[PATCH v2 23/25] tests/plugins: add instruction matching to libinsn.so

2022-02-01 Thread Alex Bennée
This adds simple instruction matching to the libinsn.so plugin which is useful for examining the execution distance between instructions. For example to track how often we flush in ARM due to TLB updates: -plugin ./tests/plugin/libinsn.so,match=tlbi which leads to output like this:

Re: [PATCH v3 0/3] linux-user/ppc: Deliver SIGTRAP on tw[i]/td[i]

2022-02-01 Thread Matheus K. Ferst
Ping. The based-on series is already on master, only patch 3 is missing review. On 13/01/2022 14:04, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst In the review of 66c6b40aba1, Richard Henderson suggested[1] using "trap" instead of ".long 0x0" to generate the signal to test XER

[PATCH v2 17/25] tracing: remove TCG memory access tracing

2022-02-01 Thread Alex Bennée
If you really want to trace all memory operations TCG plugins gives you a more flexible interface for doing so. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Cc: Luis Vilanova Cc: Stefan Hajnoczi -- v2 - dropped extra line Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PATCH] bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026

2022-02-01 Thread Warner Losh
The capsicum signal stuff is new with FreeBSD 14, rev 1400026, so only copy them on a new enough system. Signed-off-by: Warner Losh --- bsd-user/signal.c | 4 1 file changed, 4 insertions(+) diff --git a/bsd-user/signal.c b/bsd-user/signal.c index ad22ba9d90d..b43266e6e06 100644 ---

Re: [PATCH v4 0/4] Python: Improvements for iotest 040,041

2022-02-01 Thread John Snow
On Tue, Feb 1, 2022 at 8:28 AM Kevin Wolf wrote: > > Am 01.02.2022 um 05:11 hat John Snow geschrieben: > > GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-aqmp-fixes > > CI: https://gitlab.com/jsnow/qemu/-/pipelines/455146881 > > > > Fixes and improvements all relating to "iotest 040,041,

  1   2   3   4   >