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

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) +{ +

[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 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

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

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

[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

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

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 ---

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 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 +++

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 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 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

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

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 ---

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

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 --

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 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 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"); -

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

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 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

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 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 +++

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 + >>

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

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(>features, VIRTIO_IOMMU_F_INPUT_RANGE); > >

[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 ---

[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

[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 +

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

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.

[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

[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

[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

[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

[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 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 ---

[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 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).

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

[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 ---

[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

[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

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:

[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

[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

[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

[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

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

[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

[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

[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

[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 +++

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

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

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 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

[PATCH v3] tests/qtest: add qtests for npcm7xx sdhci

2022-02-08 Thread Patrick Venture
From: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Signed-off-by: Shengtan Mao Signed-off-by: Patrick Venture --- v3: * fixup compilation from missing macro value v2: * update copyright year * check result of open * use g_free instead of free * move declarations to the top

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

2022-02-08 Thread Peter Maydell
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| 1 + util/osdep.c| 1 +

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

2022-02-08 Thread Peter Maydell
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/qemu/osdep.h | 25

Re: [PATCH] ui/cocoa: Set UI information

2022-02-08 Thread Peter Maydell
On Sat, 5 Feb 2022 at 02:06, Akihiko Odaki wrote: > > On Sat, Feb 5, 2022 at 1:19 AM Peter Maydell wrote > > (1) A question for Akihiko: > > Are all the cocoa calls we make in updateUIInfo safe to > > make from a non-UI thread? Would it be preferable for this > > call in cocoa_switch() to be

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

2022-02-08 Thread Peter Maydell
On Tue, 8 Feb 2022 at 19:34, Liviu Ionescu wrote: > > The 4th attempt... > > Not that this would be a significant patch, but I would like to proceed with > other improvements. I've cc'd some people who might have an opinion on whether this something we want to add upstream. (Patch/thread below

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

2022-02-08 Thread Christian Schoenebeck
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: > >> On Dienstag, 8. Februar 2022 16:57:55 CET Will Cohen wrote: > >> > My

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

2022-02-08 Thread Will Cohen
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: > >> On Dienstag, 8. Februar 2022 16:57:55 CET Will Cohen wrote: >> > My inclination is to go with the __builtin_available(macOS 10.12, *) >> path, >> > if

[PATCH v10 1/3] target/ppc: fix indent of function parameters

2022-02-08 Thread Daniel Henrique Barboza
Fix indentation of powerpc_set_excp_state() and ppc_excp_apply_ail() parameters. Signed-off-by: Daniel Henrique Barboza --- target/ppc/excp_helper.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index

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

2022-02-08 Thread Daniel Henrique Barboza
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_interrupt() to fire the EBB exception,

Re: [PATCH 2/2] Kconfig: Add 'imply I2C_DEVICES' on boards with available i2c bus

2022-02-08 Thread Hao Wu
On Tue, Feb 8, 2022 at 9:23 AM Peter Maydell wrote: > For arm boards with an i2c bus which a user could reasonably > want to plug arbitrary devices, add 'imply I2C_DEVICES' to the > Kconfig stanza. > > Signed-off-by: Peter Maydell > Reviewed-by: Hao Wu > --- > Again, slightly arbitrary but

Re: [PATCH 1/2] Kconfig: Add I2C_DEVICES device group

2022-02-08 Thread Hao Wu
On Tue, Feb 8, 2022 at 9:55 AM Peter Maydell wrote: > Currently there is no way for a board model's Kconfig stanza to > say "I have an i2c bus which the user can plug an i2c device into, > build all the free-standing i2c devices". The Kconfig mechanism > for this is the "device group". Add an

[PATCH] hw/arm/armv7m: Handle disconnected clock inputs

2022-02-08 Thread Peter Maydell
In the armv7m object, handle clock inputs that aren't connected. This is always an error for 'cpuclk'. For 'refclk' it is OK for this to be disconnected, but we need to handle it by not trying to connect a sourceless-clock to the systick device. This fixes a bug where on the mps2-an521 and

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

2022-02-08 Thread Liviu Ionescu
The 4th attempt... Not that this would be a significant patch, but I would like to proceed with other improvements. Thank you, Liviu > On 27 Jan 2022, at 14:23, Liviu Ionescu wrote: > > Any chance for someone to take a look at this proposal? > > Thank you, > > Liviu > > >> On 20 Jan

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

2022-02-08 Thread Cornelia Huck
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(>features, VIRTIO_IOMMU_F_INPUT_RANGE); > virtio_add_feature(>features, VIRTIO_IOMMU_F_DOMAIN_RANGE); >

Re: [PATCH] audio/dbus: Fix building with modules enabled on macOS

2022-02-08 Thread Li Zhang
On 2/3/22 5:58 PM, Philippe Mathieu-Daudé via wrote: When configuring QEMU with --enable-modules we get on macOS: --- stderr --- Dependency ui-dbus cannot be satisfied ui-dbus depends on pixman and opengl, so add these dependencies to audio-dbus. Fixes: 739362d420 ("audio: add "dbus"

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Peter Maydell
On Tue, 8 Feb 2022 at 16:36, Alex Williamson wrote: > > On Tue, 8 Feb 2022 16:01:48 + > Peter Maydell wrote: > > Well, it can if it likes, but "this is a RAM-backed MemoryRegion" > > doesn't imply "this is really guest actual RAM RAM", so if it's > > using that as its discriminator it should

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

2022-02-08 Thread Paolo Bonzini
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 output of meson-logs/testlog.txt instead? The

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

2022-02-08 Thread Will Cohen
On Tue, Feb 8, 2022 at 11:11 AM Christian Schoenebeck < qemu_...@crudebyte.com> wrote: > On Dienstag, 8. Februar 2022 16:57:55 CET Will Cohen wrote: > > My inclination is to go with the __builtin_available(macOS 10.12, *) > path, > > if acceptable, since it partially mirrors the API_AVAILABLE

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

2022-02-08 Thread Peter Maydell
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 under the qemu-project umbrella on GitLab > (2) Add Cleber Rosa and

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Dr. David Alan Gilbert
* Eric Auger (eric.au...@redhat.com) wrote: > Representing the CRB cmd/response buffer as a standard > RAM region causes some trouble when the device is used > with VFIO. Indeed VFIO attempts to DMA_MAP this region > as usual RAM but this latter does not have a valid page > size alignment causing

[PATCH 1/2] Kconfig: Add I2C_DEVICES device group

2022-02-08 Thread Peter Maydell
Currently there is no way for a board model's Kconfig stanza to say "I have an i2c bus which the user can plug an i2c device into, build all the free-standing i2c devices". The Kconfig mechanism for this is the "device group". Add an I2C_DEVICES group along the same lines as the existing

Re: [PATCH v4 02/12] mm/memfd: Introduce MFD_INACCESSIBLE flag

2022-02-08 Thread Mike Rapoport
On Tue, Feb 08, 2022 at 09:49:35AM +0100, David Hildenbrand wrote: > On 07.02.22 19:51, Vlastimil Babka wrote: > > On 1/18/22 14:21, Chao Peng wrote: > >> Introduce a new memfd_create() flag indicating the content of the > >> created memfd is inaccessible from userspace. It does this by force > >>

[PATCH 5/6] test-bdrv-drain.c: remove test_detach_by_parent_cb()

2022-02-08 Thread Emanuele Giuseppe Esposito
This test uses a callback of an I/O function (blk_aio_preadv) to modify the graph, using bdrv_attach_child. This is simply not allowed anymore. I/O cannot change the graph. Before "block/io.c: make bdrv_do_drained_begin_quiesce static and introduce bdrv_drained_begin_no_poll", the test would

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Eric Auger
Hi Stefan, On 2/8/22 6:16 PM, Stefan Berger wrote: > > On 2/8/22 08:38, Eric Auger wrote: >> Representing the CRB cmd/response buffer as a standard >> RAM region causes some trouble when the device is used >> with VFIO. Indeed VFIO attempts to DMA_MAP this region >> as usual RAM but this latter

Re: [PATCH] ui/cocoa: Add clipboard support

2022-02-08 Thread Peter Maydell
On Wed, 16 Jun 2021 at 15:20, Akihiko Odaki wrote: > > Signed-off-by: Akihiko Odaki Hi Akihiko -- I have a similar question here to the other patch about doing things not on the Cocoa UI thread... > +static void cocoa_clipboard_notify(Notifier *notifier, void *data) > +{ > +

[PATCH 3/6] block.c: bdrv_replace_child_noperm: first call ->attach(), and then add child

2022-02-08 Thread Emanuele Giuseppe Esposito
Doing the opposite can make adding the child node to a non-drained node, as apply_subtree_drain is only done in ->attach() and thus make assert_bdrv_graph_writable fail. This can happen for example during a transaction rollback (test 245, test_io_with_graph_changes): 1. a node is removed from the

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

2022-02-08 Thread Peter Maydell
On Tue, 1 Feb 2022 at 23:15, Richard Petri wrote: > And if you still want to do a debug session: I think there is another > related problem. The `systick_reset` function sets the right clock > source, but I guess at the time of calling reset the `cpuclk` doesn't > have the right value (probably

[PATCH 6/6] jobs: ensure sleep in job_sleep_ns is fully performed

2022-02-08 Thread Emanuele Giuseppe Esposito
If a drain happens while a job is sleeping, the timeout gets cancelled and the job continues once the drain ends. This is especially bad for the sleep performed in commit and stream jobs, since that is dictated by ratelimit to maintain a certain speed. Basically the execution path is the

Re: [PATCH v3 0/2] python: a few improvements to qmp-shell

2022-02-08 Thread John Snow
On Tue, Feb 8, 2022, 3:56 AM Daniel P. Berrangé wrote: > On Mon, Feb 07, 2022 at 04:05:47PM -0500, John Snow wrote: > > On Fri, Jan 28, 2022 at 11:12 AM Daniel P. Berrangé > wrote: > > > > > > This makes the qmp-shell program a little more pleasant to use when you > > > are just trying to spawn

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Eric Auger
Hi, On 2/8/22 5:01 PM, Peter Maydell wrote: > On Tue, 8 Feb 2022 at 15:56, Eric Auger wrote: >> Hi Peter, >> >> On 2/8/22 4:17 PM, Peter Maydell wrote: >>> On Tue, 8 Feb 2022 at 15:08, Eric Auger wrote: Representing the CRB cmd/response buffer as a standard RAM region causes some

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

2022-02-08 Thread Philippe Mathieu-Daudé via
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(-) diff --git a/target/mips/internal.h b/target/mips/internal.h index f705d6bfa6..ac6e03e2f2

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

2022-02-08 Thread Taylor Simpson
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 -- 1

Re: [PATCH 01/13] meson: Display libfdt as disabled when system emulation is disabled

2022-02-08 Thread Paolo Bonzini
On 2/8/22 16:22, Philippe Mathieu-Daudé wrote: When configuring QEMU with --disable-system, meson keeps showing libfdt as "auto". Mark it as disabled instead. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

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

2022-02-08 Thread Philippe Mathieu-Daudé via
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, ^ ../target/nios2/mmu.h:43:18:

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

2022-02-08 Thread Christian Schoenebeck
On Dienstag, 8. Februar 2022 16:57:55 CET Will Cohen wrote: > My inclination is to go with the __builtin_available(macOS 10.12, *) path, > if acceptable, since it partially mirrors the API_AVAILABLE macro idea. I OTOH that's duplication of the ">= macOS 10.12" info, plus __builtin_available is

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

2022-02-08 Thread Philippe Mathieu-Daudé via
cpu_abort() and cpu_breakpoint*() don't use target-specific API. Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 109 cpus-common.c | 112 ++ 2 files changed, 112 insertions(+), 109

Re: [PATCH v2 3/4] virtio-iommu: Support bypass domain

2022-02-08 Thread Jean-Philippe Brucker
On Tue, Feb 08, 2022 at 02:29:21PM +0100, Eric Auger wrote: > Hi Jean, > > On 2/8/22 2:09 PM, Dr. David Alan Gilbert wrote: > > * Jean-Philippe Brucker (jean-phili...@linaro.org) wrote: > >> On Wed, Feb 02, 2022 at 02:21:37PM +0100, Eric Auger wrote: > >> diff --git a/hw/virtio/virtio-iommu.c

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

2022-02-08 Thread Philippe Mathieu-Daudé via
Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/kvm-stub.c | 5 - cpu.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c index 7e0fb884b9..924ffbde85 100644 --- a/accel/stubs/kvm-stub.c +++

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Peter Maydell
On Tue, 8 Feb 2022 at 15:56, Eric Auger wrote: > > Hi Peter, > > On 2/8/22 4:17 PM, Peter Maydell wrote: > > On Tue, 8 Feb 2022 at 15:08, Eric Auger wrote: > >> Representing the CRB cmd/response buffer as a standard > >> RAM region causes some trouble when the device is used > >> with VFIO.

Re: Fwd: VirtioSound device emulation implementation

2022-02-08 Thread Shreyansh Chouhan
On Mon, 7 Feb 2022 at 09:36, Shreyansh Chouhan wrote: > > On Thu, 20 Jan 2022 at 16:09, Laurent Vivier wrote: > > > > > > Hi, > > > > I'm trying to test your RFC series but I have a core dump (using alsa-utils > > speaker-test), do you > > have an updated branch I could pull? > > Yes, I will

  1   2   3   4   >