Re: [PATCH v4 04/12] mm/shmem: Support memfile_notifier

2022-02-08 Thread Mike Rapoport
Hi, On Tue, Jan 18, 2022 at 09:21:13PM +0800, Chao Peng wrote: > It maintains a memfile_notifier list in shmem_inode_info structure and > implements memfile_pfn_ops callbacks defined by memfile_notifier. It > then exposes them to memfile_notifier via > shmem_get_memfile_notifier_info. > > We use

Re: [PATCH v5 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-08 Thread Christian Schoenebeck
On Dienstag, 8. Februar 2022 19:28:21 CET Christian Schoenebeck wrote: > On Dienstag, 8. Februar 2022 19:04:31 CET Will Cohen wrote: > > On Tue, Feb 8, 2022 at 11:19 AM Will Cohen wrote: > > > On Tue, Feb 8, 2022 at 11:11 AM Christian Schoenebeck < > > > > > > qemu_...@crudebyte.com> wrote: > > >

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

2022-02-08 Thread Mike Rapoport
(addded linux-api) On Tue, Jan 18, 2022 at 09:21:09PM +0800, 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 available_event_types check

Re: Adding a 'qemu.qmp' repository to gitlab.com/qemu-project/

2022-02-08 Thread John Snow
On Tue, Feb 8, 2022 at 1:54 PM Peter Maydell wrote: > > On Fri, 4 Feb 2022 at 19:47, John Snow wrote: > > > > Hi Peter: > > > > I am working my way towards splitting the QMP library out of the > > qemu.git source tree. I'd like to ask for permission to: > > > > (1) Create a "qemu.qmp" repository

[PATCH 5/5] include: Move hardware version declarations to new qemu/hw-version.h

2022-02-08 Thread Peter Maydell
The "hardware version" machinery (qemu_set_hw_version(), qemu_hw_version(), and the QEMU_HW_VERSION define) is used by fewer than 10 files. Move it out from osdep.h into a new qemu/hw-version.h. Signed-off-by: Peter Maydell --- include/qemu/hw-version.h | 27 +++ include

[RFC PATCH 1/3] tests/tcg/ppc64le: use inline asm instead of __builtin_mtfsf

2022-02-08 Thread matheus . ferst
From: Matheus Ferst LLVM/Clang does not support __builtin_mtfsf. Signed-off-by: Matheus Ferst --- tests/tcg/ppc64le/mtfsf.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/tcg/ppc64le/mtfsf.c b/tests/tcg/ppc64le/mtfsf.c index b3d31f3637..bed5b1afa

[PATCH 4/5] include: Move qemu_[id]cache_* declarations to new qemu/cacheinfo.h

2022-02-08 Thread Peter Maydell
The qemu_icache_linesize, qemu_icache_linesize_log, qemu_dcache_linesize, and qemu_dcache_linesize_log variables are not used in many files. Move them out of osdep.h to a new qemu/cacheinfo.h, and document them. Signed-off-by: Peter Maydell --- include/qemu/cacheinfo.h | 21 +++

[PATCH v10 0/3] PMU-EBB support for PPC64 TCG

2022-02-08 Thread Daniel Henrique Barboza
Hi, This small series finalizes the pending PMU-EBB support for PPC64 TCG. In theory this would be a re-send of patches 09 and 10 of the v9, but those patches were so off the mark with the recent exception changes that I ended up discarding them and doing from the start. Patch 1 is a trivial inde

Re: [PATCH] Add --with-branding-prefix and QEMU_BRANDING_PREFIX

2022-02-08 Thread Liviu Ionescu
> On 8 Feb 2022, at 21:58, Peter Maydell wrote: > > I've cc'd some people who might have an opinion on whether this > something we want to add upstream. (Patch/thread below for context.) Sure. For a better understanding of the reason why I found this useful: I use QEMU extensively in CI test

[PATCH v10 2/3] target/ppc: finalize pre-EBB PMU logic

2022-02-08 Thread Daniel Henrique Barboza
There are still PMU exclusive bits to handle in fire_PMC_interrupt() before implementing the EBB support. Let's finalize it now to avoid dealing with PMU and EBB logic at the same time in the next patches. fire_PMC_interrupt() will fire an Performance Monitor alert depending on MMCR0_PMAE. If we a

[RFC PATCH 3/3] tests/tcg/ppc64le: Use vector types instead of __int128

2022-02-08 Thread matheus . ferst
From: Matheus Ferst LLVM/Clang doesn't like inline asm with __int128, use a vector type instead. Signed-off-by: Matheus Ferst --- Alternatively, we could pass VSR values in GPR pairs, as we did in tests/tcg/ppc64le/non_signalling_xscv.c --- tests/tcg/ppc64le/bcdsub.c | 92 +

[RFC PATCH 0/3] tests/tcg/ppc64le: fix the build of TCG tests with Clang

2022-02-08 Thread matheus . ferst
From: Matheus Ferst Based-on: https://lists.gnu.org/archive/html/qemu-devel/2022-01/msg06506.html As the configuration scripts used -mbig and -mlittle, building PPC tests with Clang was silently skipped. With the patch to fix these options[1], "make check-tcg" fails because of build and runtime

[PATCH v6 05/10] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-08 Thread Vivek Goyal
Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_common.h | 5 ++ tools/virtiofsd/fuse_i.h| 7 +

Re: [PATCH 0/4] iotests: finalize switch to async QMP

2022-02-08 Thread John Snow
Squeak Squeak... ...Any objections to me staging this? (This patchset removes the accommodations in iotests for allowing either library to run and always forces the new one. Point of no return for iotests.) --js On Wed, Feb 2, 2022 at 9:24 PM John Snow wrote: > > Based-on: <20220203015946.1330

[PATCH v6 08/10] virtiofsd: Create new file with security context

2022-02-08 Thread Vivek Goyal
This patch adds support for creating new file with security context as sent by client. It basically takes three paths. - If no security context enabled, then it continues to create files without security context. - If security context is enabled and but security.selinux has not been remapped,

[PATCH 0/5] include: Trim some fat from osdep.h

2022-02-08 Thread Peter Maydell
The osdep.h header is included by every C file we compile, so it helps build times to keep it small. (As the comment at the top of the file notes, in an ideal world this header would contain only things that everybody needs and things where we need to apply a compatibility workaround on some hosts.

[RFC PATCH 2/3] target/ppc: change xs[n]madd[am]sp to use float64r32_muladd

2022-02-08 Thread matheus . ferst
From: Matheus Ferst Change VSX Scalar Multiply-Add/Subtract Type-A/M Single Precision helpers to use float64r32_muladd. This method should correctly handle all rounding modes, so the workaround for float_round_nearest_even can be dropped. Signed-off-by: Matheus Ferst --- target/ppc/fpu_helper.

Re: [PATCH v2] Use long endian options for ppc64

2022-02-08 Thread Matheus K. Ferst
On 31/01/2022 06:17, Miroslav Rezanina wrote: GCC options pairs -mlittle/-mlittle-endian and -mbig/-mbig-endian are equivalent on ppc64 architecture. However, Clang supports only long version of the options. Use longer form in configure to properly support both GCC and Clang compiler. In additio

[PATCH v6 01/10] virtiofsd: Fix breakage due to fuse_init_in size change

2022-02-08 Thread Vivek Goyal
Kernel version 5.17 has increased the size of "struct fuse_init_in" struct. Previously this struct was 16 bytes and now it has been extended to 64 bytes in size. Once qemu headers are updated to latest, it will expect to receive 64 byte size struct (for protocol version major 7 and minor > 6). But

[PATCH 1/5] include: Move qemu_madvise() and related #defines to new qemu/madvise.h

2022-02-08 Thread Peter Maydell
The function qemu_madvise() and the QEMU_MADV_* constants associated with it are used in only 10 files. Move them out of osdep.h to a new qemu/madvise.h header that is included where it is needed. Signed-off-by: Peter Maydell --- include/qemu/madvise.h | 95 +

[PATCH v6 03/10] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-08 Thread Vivek Goyal
Add some code to parse extended "struct fuse_init_in". And use a local variable "flag" to represent 64 bit flags. This will make it easier to add more features without having to worry about two 32bit flags (->flags and ->flags2) in "fuse_struct_in". Signed-off-by: Vivek Goyal --- tools/virtiofsd

[PATCH v6 07/10] virtiofsd: Add helpers to work with /proc/self/task/tid/attr/fscreate

2022-02-08 Thread Vivek Goyal
Soon we will be able to create and also set security context on the file atomically using /proc/self/task/tid/attr/fscreate knob. If this knob is available on the system, first set the knob with the desired context and then create the file. It will be created with the context set in fscreate. This

[PATCH v6 04/10] virtiofsd: Extend size of fuse_conn_info->capable and ->want fields

2022-02-08 Thread Vivek Goyal
->capable keeps track of what capabilities kernel supports and ->wants keep track of what capabilities filesytem wants. Right now these fields are 32bit in size. But now fuse has run out of bits and capabilities can now have bit number which are higher than 31. That means 32 bit fields are not su

[PATCH v6 10/10] virtiofsd: Add an option to enable/disable security label

2022-02-08 Thread Vivek Goyal
Provide an option "-o security_label/no_security_label" to enable/disable security label functionality. By default these are turned off. If enabled, server will indicate to client that it is capable of handling one security label during file creation. Typically this is expected to be a SELinux lab

[PATCH v6 09/10] virtiofsd: Create new file using O_TMPFILE and set security context

2022-02-08 Thread Vivek Goyal
If guest and host policies can't work with each other, then guest security context (selinux label) needs to be set into an xattr. Say remap guest security.selinux xattr to trusted.virtiofs.security.selinux. That means setting "fscreate" is not going to help as that's ony useful for security.selinu

[PATCH] build: fix build failure with gcc 11.2 by disabling -fcf-protection

2022-02-08 Thread Vineet Gupta
When doing RV qemu builds with host gcc 11.2, ran into following build failure | cc -MMD -MP -MT linuxboot_dma.o -MF ./linuxboot_dma.d -O2 -g -march=i486 -Wall \ | -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes \ | -Wold-style-declaration -Wold-style-defin

Re: [PATCH] hvf: Enable RDTSCP support

2022-02-08 Thread Cameron Esfahani
Ping Cameron > On Oct 31, 2021, at 10:48 PM, Cameron Esfahani wrote: > > Pass through RDPID and RDTSCP support in CPUID if host supports it. > Correctly detect if CPU_BASED_TSC_OFFSET and CPU_BASED2_RDTSCP would > be supported in primary and secondary processor-based VM-execution > controls. E

Re: [PATCH] Hexagon (tests/tcg/hexagon) fix inline asm in preg_alias.c

2022-02-08 Thread Richard Henderson
On 2/9/22 04:16, Taylor Simpson wrote: Replace consecutive inline asm blocks with a single one with proper outputs/inputs/clobbers rather than making assumptions about register values being carried between separate blocks. Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/preg_alias.c | 46 +

[PATCH v6 02/10] linux-headers: Update headers to v5.17-rc1

2022-02-08 Thread Vivek Goyal
Update headers to 5.17-rc1. I need latest fuse changes. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- include/standard-headers/asm-x86/kvm_para.h | 1 + include/standard-headers/drm/drm_fourcc.h | 11 ++ include/standard-headers/linux/ethtool.h | 1 + includ

[PATCH v6 00/10] virtiofsd: Add support for file security context at file creation

2022-02-08 Thread Vivek Goyal
Hi, This is V6 of the patches. I posted V5 here. https://listman.redhat.com/archives/virtio-fs/2022-February/msg00012.html This patch series basically allows client to send a security context (which is expected to be xattr security.selinux and its content) to virtiofsd and it will set that secu

[PATCH v6 06/10] virtiofsd: Move core file creation code in separate function

2022-02-08 Thread Vivek Goyal
Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- tools/virtiofsd/pas

Re: [PATCH v2 2/4] virtio-iommu: Default to bypass during boot

2022-02-08 Thread Michael S. Tsirkin
On Tue, Feb 08, 2022 at 06:42:57PM +0100, Cornelia Huck wrote: > On Thu, Jan 27 2022, Jean-Philippe Brucker wrote: > > > @@ -988,9 +1025,9 @@ static void virtio_iommu_device_realize(DeviceState > > *dev, Error **errp) > > virtio_add_feature(&s->features, VIRTIO_IOMMU_F_INPUT_RANGE); > >

Re: [PATCH] hvf: Fix OOB write in RDTSCP instruction decode

2022-02-08 Thread Cameron Esfahani
Ping Cameron > On Oct 29, 2021, at 5:02 PM, Cameron Esfahani wrote: > > A guest could craft a specific stream of instructions that will have QEMU > write 0xF9 to inappropriate locations in memory. Add additional asserts > to check for this. Generate a #UD if there are more than 14 prefix byt

Re: [PATCH] hvf: Use standard CR0 and CR4 register definitions

2022-02-08 Thread Cameron Esfahani
Ping Cameron > On Oct 28, 2021, at 11:09 PM, Philippe Mathieu-Daudé > wrote: > > On 10/29/21 03:33, Cameron Esfahani wrote: >> No need to have our own definitions of these registers. >> >> Signed-off-by: Cameron Esfahani >> --- >> target/i386/hvf/vmx.h | 17 + >> target/i

Re: [PATCH 02/13] exec/cpu_ldst: Include 'cpu.h' to get target_ulong definition

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu_ldst.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index a878fd0105..5c66de 100644 --- a/include/exec/cpu_ldst.h +++ b/includ

Re: [PATCH 03/13] accel: Elide kvm_update_guest_debug by checking kvm_supports_guest_debug

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: -int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) -{ -return -ENOSYS; -} - int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr, target_ulong len, int type) { diff --git a/cpu.c b/cpu.c

Re: [PATCH 05/13] target/i386/tcg/sysemu: Include missing 'exec/exec-all.h' header

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: excp_helper.c requires "exec/exec-all.h" for tlb_set_page_with_attrs() and misc_helper.c for tlb_flush(). Signed-off-by: Philippe Mathieu-Daudé --- target/i386/tcg/sysemu/excp_helper.c | 1 + target/i386/tcg/sysemu/misc_helper.c | 1 + 2 files c

Re: [PATCH 04/13] target/i386/cpu: Ensure accelerators set CPU addressble physical bits

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: The only accelerator allowed to use zero as default value is TCG. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 06/13] cpu: Add missing 'exec/exec-all.h' and ''exec/exec-all.h'' headers

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: cpu.c requires "exec/exec-all.h" to call tlb_flush() and "qemu/accel.h" to call accel_cpu_realizefn(). Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpu.c b/cpu.c index 834e2b4cdb..a728f3e7

Re: [PATCH 07/13] cpu: Move common code to cpu-common

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: -void cpu_abort(CPUState *cpu, const char *fmt, ...) -{ -va_list ap; -va_list ap2; - -va_start(ap, fmt); -va_copy(ap2, ap); -fprintf(stderr, "qemu: fatal: "); -vfprintf(stderr, fmt, ap); -fprintf(stderr, "\n"); -cpu_du

Re: [PATCH 08/13] target: Include missing 'cpu.h'

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: These target-specific files use the target-specific CPU state but lack to include "cpu.h"; i.e.: ../target/riscv/pmp.h:61:23: error: unknown type name 'CPURISCVState' void pmpcfg_csr_write(CPURISCVState *env, uint32_t reg_index,

Re: [PATCH 09/13] target: Use forward declared type instead of structure type

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: The CPU state is forward declared. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/internal.h | 14 +++--- target/xtensa/cpu.h| 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 10/13] target: Use CPUArchState as interface to target-specific CPU state

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: While CPUState is our interface with generic code, CPUArchState is our interface with target-specific code. Use CPUArchState as an abstract type, defined by each target. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/poison.h | 2 -- i

Re: [PATCH 11/13] exec/cpu_ldst: Restrict TCG-specific code

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu_ldst.h | 53 ++--- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 5c66de..

Re: [PATCH 12/13] exec/cpu-all: Restrict cpu_copy() to user emulation

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-all.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index c0f0fab28a..84188febfa 100644 --- a/include/exec/cpu-all.

Re: [PATCH v5 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-08 Thread Will Cohen
On Tue, Feb 8, 2022 at 2:49 PM Christian Schoenebeck wrote: > On Dienstag, 8. Februar 2022 19:28:21 CET Christian Schoenebeck wrote: > > On Dienstag, 8. Februar 2022 19:04:31 CET Will Cohen wrote: > > > On Tue, Feb 8, 2022 at 11:19 AM Will Cohen wrote: > > > > On Tue, Feb 8, 2022 at 11:11 AM Chr

Re: [PATCH 13/13] exec: Move translation declarations to 'translate-all.h'

2022-02-08 Thread Richard Henderson
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: Translation declarations are only useful to TCG accelerator. Signed-off-by: Philippe Mathieu-Daudé Ug. So, like, what's you vision of exec-all.h vs translate-all.h? Certainly there's not much in translate-all.h at the moment. Taking a case at r

Re: [PATCH 1/5] include: Move qemu_madvise() and related #defines to new qemu/madvise.h

2022-02-08 Thread Richard Henderson
On 2/9/22 07:08, Peter Maydell wrote: The function qemu_madvise() and the QEMU_MADV_* constants associated with it are used in only 10 files. Move them out of osdep.h to a new qemu/madvise.h header that is included where it is needed. Signed-off-by: Peter Maydell --- include/qemu/madvise.h

Re: [PATCH 5/5] include: Move hardware version declarations to new qemu/hw-version.h

2022-02-08 Thread Richard Henderson
On 2/9/22 07:08, Peter Maydell wrote: The "hardware version" machinery (qemu_set_hw_version(), qemu_hw_version(), and the QEMU_HW_VERSION define) is used by fewer than 10 files. Move it out from osdep.h into a new qemu/hw-version.h. Signed-off-by: Peter Maydell --- include/qemu/hw-version.h |

Re: [PATCH 3/5] include: Move QEMU_MAP_* constants to mmap-alloc.h

2022-02-08 Thread Richard Henderson
On 2/9/22 07:08, Peter Maydell wrote: The QEMU_MAP_* constants are used only as arguments to the qemu_ram_mmap() function. Move them to mmap-alloc.h, where that function's prototype is defined. Signed-off-by: Peter Maydell --- include/qemu/mmap-alloc.h | 23 +++ include/q

Re: [PATCH 2/5] include: Move qemu_mprotect_*() to new qemu/mprotect.h

2022-02-08 Thread Richard Henderson
On 2/9/22 07:08, Peter Maydell wrote: The qemu_mprotect_*() family of functions are used in very few files; move them from osdep.h to a new qemu/mprotect.h. Signed-off-by: Peter Maydell --- include/qemu/mprotect.h | 14 ++ include/qemu/osdep.h| 4 tcg/region.c

Re: [PATCH 4/5] include: Move qemu_[id]cache_* declarations to new qemu/cacheinfo.h

2022-02-08 Thread Richard Henderson
On 2/9/22 07:08, Peter Maydell wrote: The qemu_icache_linesize, qemu_icache_linesize_log, qemu_dcache_linesize, and qemu_dcache_linesize_log variables are not used in many files. Move them out of osdep.h to a new qemu/cacheinfo.h, and document them. Signed-off-by: Peter Maydell --- include/qe

Re: [PATCH v10 3/3] target/ppc: EBB exception implementation

2022-02-08 Thread Fabiano Rosas
Daniel Henrique Barboza writes: > This patch adds the EBB exception support that are triggered by > Performance Monitor alerts. This happens when a Performance Monitor > alert occurs and MMCR0_EBE, BESCR_PME and BESCR_GE are set. > > A 'ebb_excp_enabled' helper is called at the end of fire_PMC_in

[PATCH] hw/arm: add initial mori-bmc board

2022-02-08 Thread Patrick Venture
This is the BMC attached to the OpenBMC Mori board. Signed-off-by: Patrick Venture Reviewed-by: Chris Rauer Reviewed-by: Ilkyun Choi --- docs/system/arm/nuvoton.rst | 1 + hw/arm/npcm7xx_boards.c | 32 2 files changed, 33 insertions(+) diff --git a/docs/s

Re: [PATCH RFC 14/15] migration: Postcopy preemption on separate channel

2022-02-08 Thread Peter Xu
On Tue, Feb 08, 2022 at 01:23:29PM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Feb 08, 2022 at 11:24:14AM +, Dr. David Alan Gilbert wrote: > > > > The current model is we only have 1 postcopy channel and 1 precopy > > > > channel, but > > > > it sho

Re: [RFC PATCH] hw/intc: Make RISC-V ACLINT mtime MMIO register writable

2022-02-08 Thread Frank Chang
On Tue, Feb 1, 2022 at 10:34 AM Alistair Francis wrote: > On Wed, Jan 26, 2022 at 7:55 PM wrote: > > > > From: Frank Chang > > > > RISC-V privilege spec defines that mtime is exposed as a memory-mapped > > machine-mode read-write register. However, as QEMU uses host monotonic > > timer as timer

Re: [PATCH v3 23/26] tests/plugin: allow libinsn.so per-CPU counts

2022-02-08 Thread Emilio Cota
(Sorry if this comes out garbled, I'm on a web editor not a proper email client) On Fri, Feb 4, 2022 at 3:49 PM Alex Bennée wrote: > +typedef struct { > +uint64_t last_pc; > +uint64_t insn_count; > +} InstructionCount; This will need padding to take up a cache line. > +static Instructio

[PATCH] target/riscv: Call probe_write() before atomic operations

2022-02-08 Thread Alistair Francis
From: Alistair Francis If an atomic operation fails on RISC-V we want to generate a store/amo fault and not a load fault. Currently if we have no permissions to access the memory location the atomic operation will sometimes fail with a load fault (depending on the path taken in tcg/tcg-op.c) as

Re: [PATCH] target/riscv: Call probe_write() before atomic operations

2022-02-08 Thread Richard Henderson
On 2/9/22 16:48, Alistair Francis wrote: Note that this only fixes the fault for memory regions. I/O and non-existant regions will still trigger a load fault. ... +void helper_atomic_check(CPURISCVState *env, target_ulong address, + int width, int mmu_idx) +{ +probe_

Re: [PATCH] Revert "check-block: replace -makecheck with TAP output"

2022-02-08 Thread Thomas Huth
On 08/02/2022 17.21, Paolo Bonzini wrote: On 2/8/22 15:51, Thomas Huth wrote: On 08/02/2022 13.44, Paolo Bonzini wrote: This reverts commit d316859f4e28c74ab8b618895d2a5e0a865d3cf1.  The TAP output is inferior in that it does not include the diff for failed tests. What about dumping the outpu

<    1   2   3   4