Re: [PATCH] linux-user/syscall.c: fix build without RLIMIT_RTTIME

2022-05-23 Thread Laurent Vivier
Le 14/05/2022 à 16:34, Fabrice Fontaine a écrit : RLIMIT_RTTIME is not provided by uclibc-ng or by musl prior to version 1.2.0 and https://github.com/bminor/musl/commit/2507e7f5312e79620f6337935d0a6c9045ccba09 resulting in the following build failure since https://git.qemu.org/?p=qemu.git;a=commi

Re: [PATCH] block: drop unused bdrv_co_drain() API

2022-05-23 Thread Emanuele Giuseppe Esposito
Am 21/05/2022 um 14:27 schrieb Stefan Hajnoczi: > bdrv_co_drain() has not been used since commit 9a0cec664eef ("mirror: > use bdrv_drained_begin/bdrv_drained_end") in 2016. Remove it so there > are fewer drain scenarios to worry about. > > Use bdrv_drained_begin()/bdrv_drained_end() instead. Th

Re: [PATCH] target/riscv: add support for zmmul extension v0.1

2022-05-23 Thread Weiwei Li
在 2022/5/23 下午2:34, Alistair Francis 写道: On Wed, May 18, 2022 at 11:54 AM Weiwei Li wrote: - includes all multiplication operations for M extension Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.c | 2 ++ target/riscv/cpu.h

Re: [RFC PATCH v4 03/36] target/i386: Implement mc->kvm_type() to get VM type

2022-05-23 Thread Gerd Hoffmann
Hi, > +if (!(kvm_check_extension(KVM_STATE(ms->accelerator), KVM_CAP_VM_TYPES) > & BIT(kvm_type))) { > +error_report("vm-type %s not supported by KVM", > vm_type_name[kvm_type]); > +exit(1); > +} Not sure why TDX needs a new vm type whereas sev doesn't. But that's up

Re: [RFC PATCH v4 04/36] target/i386: Introduce kvm_confidential_guest_init()

2022-05-23 Thread Gerd Hoffmann
On Thu, May 12, 2022 at 11:17:31AM +0800, Xiaoyao Li wrote: > Introduce a separate function kvm_confidential_guest_init() for SEV (and > future TDX). > > Signed-off-by: Xiaoyao Li Acked-by: Gerd Hoffmann

Re: [RFC PATCH v4 05/36] i386/tdx: Implement tdx_kvm_init() to initialize TDX VM context

2022-05-23 Thread Gerd Hoffmann
On Thu, May 12, 2022 at 11:17:32AM +0800, Xiaoyao Li wrote: > Introduce tdx_kvm_init() and invoke it in kvm_confidential_guest_init() > if it's a TDX VM. More initialization will be added later. > > Signed-off-by: Xiaoyao Li Acked-by: Gerd Hoffmann

Re: [RFC PATCH v4 06/36] i386/tdx: Get tdx_capabilities via KVM_TDX_CAPABILITIES

2022-05-23 Thread Gerd Hoffmann
Hi, > +do { > +size = sizeof(struct kvm_tdx_capabilities) + > + max_ent * sizeof(struct kvm_tdx_cpuid_config); > +caps = g_malloc0(size); > +caps->nr_cpuid_configs = max_ent; > + > +r = tdx_platform_ioctl(KVM_TDX_CAPABILITIES, 0, caps); > +

[PATCH v6 1/8] block: Support passing NULL ops to blk_set_dev_ops()

2022-05-23 Thread Xie Yongji
This supports passing NULL ops to blk_set_dev_ops() so that we can remove stale ops in some cases. Signed-off-by: Xie Yongji Reviewed-by: Stefan Hajnoczi --- block/block-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/block-backend.c b/block/block-backend.c i

[PATCH v6 0/8] Support exporting BDSs via VDUSE

2022-05-23 Thread Xie Yongji
Hi all, Last few months ago, VDUSE (vDPA Device in Userspace) [1] has been merged into Linux kernel as a framework that make it possible to emulate a vDPA device in userspace. This series aimed at implementing a VDUSE block backend based on the qemu-storage-daemon infrastructure. To support that,

[PATCH v6 4/8] linux-headers: Add vduse.h

2022-05-23 Thread Xie Yongji
This adds vduse header to linux headers so that the relevant VDUSE API can be used in subsequent patches. Signed-off-by: Xie Yongji Reviewed-by: Stefan Hajnoczi --- linux-headers/linux/vduse.h | 306 scripts/update-linux-headers.sh | 2 +- 2 files changed,

Re: [RFC PATCH v4 07/36] i386/tdx: Introduce is_tdx_vm() helper and cache tdx_guest object

2022-05-23 Thread Gerd Hoffmann
> diff --git a/target/i386/kvm/tdx.h b/target/i386/kvm/tdx.h > index c8a23d95258d..4036ca2f3f99 100644 > --- a/target/i386/kvm/tdx.h > +++ b/target/i386/kvm/tdx.h > @@ -1,6 +1,10 @@ > #ifndef QEMU_I386_TDX_H > #define QEMU_I386_TDX_H > > +#ifndef CONFIG_USER_ONLY > +#include CONFIG_DEVICES /* C

[PATCH v6 6/8] vduse-blk: Implement vduse-blk export

2022-05-23 Thread Xie Yongji
This implements a VDUSE block backends based on the libvduse library. We can use it to export the BDSs for both VM and container (host) usage. The new command-line syntax is: $ qemu-storage-daemon \ --blockdev file,node-name=drive0,filename=test.img \ --export vduse-blk,node-name=drive0,i

Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock

2022-05-23 Thread Emanuele Giuseppe Esposito
Am 22/05/2022 um 17:06 schrieb Stefan Hajnoczi: > On Wed, May 18, 2022 at 06:14:17PM +0200, Kevin Wolf wrote: >> Am 18.05.2022 um 14:43 hat Paolo Bonzini geschrieben: >>> On 5/18/22 14:28, Emanuele Giuseppe Esposito wrote: For example, all callers of bdrv_open() always take the AioContext l

[PATCH v6 8/8] libvduse: Add support for reconnecting

2022-05-23 Thread Xie Yongji
To support reconnecting after restart or crash, VDUSE backend might need to resubmit inflight I/Os. This stores the metadata such as the index of inflight I/O's descriptors to a shm file so that VDUSE backend can restore them during reconnecting. Signed-off-by: Xie Yongji --- block/export/vduse-

[PATCH v6 3/8] block/export: Abstract out the logic of virtio-blk I/O process

2022-05-23 Thread Xie Yongji
Abstract the common logic of virtio-blk I/O process to a function named virtio_blk_process_req(). It's needed for the following commit. Signed-off-by: Xie Yongji --- MAINTAINERS | 2 + block/export/meson.build | 2 +- block/export/vhost-user-blk-server.c

Re: [RFC PATCH v4 08/36] i386/tdx: Adjust get_supported_cpuid() for TDX VM

2022-05-23 Thread Gerd Hoffmann
Hi, > - The supported XCR0 and XSS bits needs to be cap'ed by tdx_caps, because > KVM uses them to setup XFAM of TD. > +case 0xd: > +if (index == 0) { > +if (reg == R_EAX) { > +*ret &= (uint32_t)tdx_caps->xfam_fixed0 & XCR0_MASK; > +*ret

Re: [RFC PATCH v4 10/36] i386/kvm: Move architectural CPUID leaf generation to separate helper

2022-05-23 Thread Gerd Hoffmann
On Thu, May 12, 2022 at 10:48:14AM -0700, Isaku Yamahata wrote: > On Thu, May 12, 2022 at 11:17:37AM +0800, > Xiaoyao Li wrote: > > > diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h > > index b434feaa6b1d..5c7972f617e8 100644 > > --- a/target/i386/kvm/kvm_i386.h > > +++ b/tar

[PATCH v6 2/8] block/export: Fix incorrect length passed to vu_queue_push()

2022-05-23 Thread Xie Yongji
Now the req->size is set to the correct value only when handling VIRTIO_BLK_T_GET_ID request. This patch fixes it. Signed-off-by: Xie Yongji --- block/export/vhost-user-blk-server.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/export/vhost-user-blk-server.c b/b

[PATCH v6 5/8] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-05-23 Thread Xie Yongji
VDUSE [1] is a linux framework that makes it possible to implement software-emulated vDPA devices in userspace. This adds a library as a subproject to help implementing VDUSE backends in QEMU. [1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html Signed-off-by: Xie Yongji --- MAIN

[PATCH v6 7/8] vduse-blk: Add vduse-blk resize support

2022-05-23 Thread Xie Yongji
To support block resize, this uses vduse_dev_update_config() to update the capacity field in configuration space and inject config interrupt on the block resize callback. Signed-off-by: Xie Yongji Reviewed-by: Stefan Hajnoczi --- block/export/vduse-blk.c | 20 1 file change

Re: [PATCH v6 6/9] crypto: Implement RSA algorithm by gcrypt

2022-05-23 Thread Daniel P . Berrangé
On Sat, May 14, 2022 at 08:55:01AM +0800, zhenwei pi wrote: > From: Lei He > > Added gcryt implementation of RSA algorithm, RSA algorithm > implemented by gcrypt has a higher priority than nettle because > it supports raw padding. > > Signed-off-by: zhenwei pi > Signed-off-by: lei he > --- >

Re: [PATCH v6 5/9] crypto: Implement RSA algorithm by hogweed

2022-05-23 Thread Daniel P . Berrangé
On Sat, May 14, 2022 at 08:55:00AM +0800, zhenwei pi wrote: > From: Lei He > > Implement RSA algorithm by hogweed from nettle. Thus QEMU supports > a 'real' RSA backend to handle request from guest side. It's > important to test RSA offload case without OS & hardware requirement. > > Signed-off-

[QEMU PATCH v2] x86: Set maximum APIC ID to KVM prior to vCPU creation

2022-05-23 Thread Zeng Guang
Specify maximum possible APIC ID assigned for current VM session to KVM prior to the creation of vCPUs. By this setting, KVM can set up VM-scoped data structure indexed by the APIC ID, e.g. Posted-Interrupt Descriptor table to support Intel IPI virtualization, with the most optimal memory footprint

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-23 Thread Joao Martins
On 5/23/22 07:11, Avihai Horon wrote: > On 5/20/2022 1:58 PM, Joao Martins wrote: >>> +migrate_get_current()->skip_precopy = true; >>> +} >>> + >> Perhaps it might be easier to reuse the existing knob to disable pre-copy >> per device that Kirti added some time ago, rather than changing

Re: [PATCH v6 4/9] crypto: add ASN.1 DER decoder

2022-05-23 Thread Daniel P . Berrangé
On Sat, May 14, 2022 at 08:54:59AM +0800, zhenwei pi wrote: > From: Lei He > > Add an ANS.1 DER decoder which is used to parse asymmetric > cipher keys > > Signed-off-by: zhenwei pi > Signed-off-by: lei he > --- > crypto/der.c | 189 +++ > crypto/der.h

Re: [RFC PATCH v4 11/36] i386/tdx: Initialize TDX before creating TD vcpus

2022-05-23 Thread Gerd Hoffmann
> +int tdx_pre_create_vcpu(CPUState *cpu) > +{ > +MachineState *ms = MACHINE(qdev_get_machine()); > +X86CPU *x86cpu = X86_CPU(cpu); > +CPUX86State *env = &x86cpu->env; > +struct kvm_tdx_init_vm init_vm; > +int r = 0; > + > +qemu_mutex_lock(&tdx_guest->lock); > +if (tdx_g

Re: [PATCH v6 7/9] test/crypto: Add test suite for crypto akcipher

2022-05-23 Thread Daniel P . Berrangé
On Sat, May 14, 2022 at 08:55:02AM +0800, zhenwei pi wrote: > From: Lei He > > Add unit test and benchmark test for crypto akcipher. > > Signed-off-by: lei he > Signed-off-by: zhenwei pi > Reviewed-by: Daniel P. Berrangé > --- > tests/bench/benchmark-crypto-akcipher.c | 157 ++ > tests/b

proposed 7.1 release schedule

2022-05-23 Thread Peter Maydell
I just put some proposed dates into the 7.1 schedule page: https://wiki.qemu.org/Planning/7.1#Release_Schedule * 2022-07-12 Softfreeze * 2022-07-19 Hardfreeze. Tag rc0 * 2022-07-26 Tag rc1 * 2022-08-02 Tag rc2 * 2022-08-09 Tag rc3 * 2022-08-16 Release; or tag rc4 if needed * 2022-08-23 Rele

Re: [RFC PATCH v4 13/36] i386/tdx: Validate TD attributes

2022-05-23 Thread Gerd Hoffmann
> Validate TD attributes with tdx_caps that fixed-0 bits must be zero and > fixed-1 bits must be set. > -static void setup_td_guest_attributes(X86CPU *x86cpu) > +static int tdx_validate_attributes(TdxGuest *tdx) > +{ > +if (((tdx->attributes & tdx_caps->attrs_fixed0) | > tdx_caps->attrs_fixed

Re: [PATCH v6 5/9] crypto: Implement RSA algorithm by hogweed

2022-05-23 Thread Daniel P . Berrangé
On Sat, May 14, 2022 at 08:55:00AM +0800, zhenwei pi wrote: > From: Lei He > > Implement RSA algorithm by hogweed from nettle. Thus QEMU supports > a 'real' RSA backend to handle request from guest side. It's > important to test RSA offload case without OS & hardware requirement. > > Signed-off-

[PATCH] Trivial: 3 char repeat typos

2022-05-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Inspired by Julia Lawall's fixing of Linux kernel comments, I looked at qemu, although I did it manually. Signed-off-by: Dr. David Alan Gilbert --- hw/intc/openpic.c| 2 +- hw/net/imx_fec.c | 2 +- hw/pci/pcie_aer.c

Re: [RFC PATCH v4 14/36] i386/tdx: Implement user specified tsc frequency

2022-05-23 Thread Gerd Hoffmann
On Thu, May 12, 2022 at 11:17:41AM +0800, Xiaoyao Li wrote: > Reuse "-cpu,tsc-frequency=" to get user wanted tsc frequency and pass it > to KVM_TDX_INIT_VM. > > Besides, sanity check the tsc frequency to be in the legal range and > legal granularity (required by TDX module). Acked-by: Gerd Hoffma

Re: [RFC PATCH v4 15/36] i386/tdx: Set kvm_readonly_mem_enabled to false for TDX VM

2022-05-23 Thread Gerd Hoffmann
On Thu, May 12, 2022 at 11:17:42AM +0800, Xiaoyao Li wrote: > TDX only supports readonly for shared memory but not for private memory. > > In the view of QEMU, it has no idea whether a memslot is used as shared > memory of private. Thus just mark kvm_readonly_mem_enabled to false to > TDX VM for s

Re: [PATCH] Trivial: 3 char repeat typos

2022-05-23 Thread Daniel P . Berrangé
On Mon, May 23, 2022 at 10:56:29AM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Inspired by Julia Lawall's fixing of Linux > kernel comments, I looked at qemu, although I did it manually. > > Signed-off-by: Dr. David Alan Gilbert > --- > hw/intc/openpic.c

Re: [PATCH] Trivial: 3 char repeat typos

2022-05-23 Thread Peter Maydell
On Mon, 23 May 2022 at 11:09, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > Inspired by Julia Lawall's fixing of Linux > kernel comments, I looked at qemu, although I did it manually. > > Signed-off-by: Dr. David Alan Gilbert Checkpatch would probably ask you to fix

Re: [PATCH] Trivial: 3 char repeat typos

2022-05-23 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Mon, 23 May 2022 at 11:09, Dr. David Alan Gilbert (git) > wrote: > > > > From: "Dr. David Alan Gilbert" > > > > Inspired by Julia Lawall's fixing of Linux > > kernel comments, I looked at qemu, although I did it manually. > > > > Signed-off-b

Re: [PATCH] Trivial: 3 char repeat typos

2022-05-23 Thread Peter Maydell
On Mon, 23 May 2022 at 11:24, Dr. David Alan Gilbert wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > On Mon, 23 May 2022 at 11:09, Dr. David Alan Gilbert (git) > > wrote: > > > > > > From: "Dr. David Alan Gilbert" > > > > > > Inspired by Julia Lawall's fixing of Linux > > > kern

Re: [PATCH] Trivial: 3 char repeat typos

2022-05-23 Thread Cédric Le Goater
On 5/23/22 11:56, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Inspired by Julia Lawall's fixing of Linux kernel comments, I looked at qemu, although I did it manually. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Cédric Le Goater Thanks, C. --- hw/intc/op

[PATCH v2] linux-user/syscall.c: fix build without RLIMIT_RTTIME

2022-05-23 Thread Fabrice Fontaine
RLIMIT_RTTIME is not provided by uclibc-ng or by musl prior to version 1.2.0 and https://github.com/bminor/musl/commit/2507e7f5312e79620f6337935d0a6c9045ccba09 resulting in the following build failure since https://git.qemu.org/?p=qemu.git;a=commit;h=244fd08323088db73590ff2317dfe86f810b51d7: ../li

Re: [PATCH v6 10/13] migration: Respect postcopy request order in preemption mode

2022-05-23 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > With preemption mode on, when we see a postcopy request that was requesting > for exactly the page that we have preempted before (so we've partially sent > the page already via PRECOPY channel and it got preempted by another > postcopy request), currently we

Re: [PATCH v3 05/49] semihosting: Add target_strlen for softmmu-uaccess.h

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 05:51, Richard Henderson wrote: > > On 5/20/22 17:03, Richard Henderson wrote: > > Mirror the interface of the user-only function of the same name. > > Use probe_access_flags for the common case of ram, and > > cpu_memory_rw_debug for the uncommon case of mmio. > > > > Signe

Re: [PATCH v3 08/49] semihosting: Inline set_swi_errno into common_semi_cb

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > Do not store 'err' into errno only to read it back immediately. > Use 'ret' for the return value, not 'reg0'. > > Signed-off-by: Richard Henderson > --- > semihosting/arm-compat-semi.c | 19 ++- > 1 file changed, 10 inser

[PATCH] s390: Typo fix FLOATING_POINT_SUPPPORT_ENH

2022-05-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" One less P needed. Signed-off-by: Dr. David Alan Gilbert --- target/s390x/cpu_features_def.h.inc | 2 +- target/s390x/gen-features.c | 6 +++--- target/s390x/tcg/translate.c| 8 3 files changed, 8 insertions(+), 8 deletions(-) diff --git

Re: [PATCH v3 05/15] osdep: export qemu_open_cloexec()

2022-05-23 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Used in the next patch, to simplify qga code. > > Signed-off-by: Marc-André Lureau The commit mesage makes me expect a change to external linkage plus a declaration in the header, but ... > --- > include/qemu/osdep.h | 1 + >

Re: [PATCH v3 09/49] semihosting: Adjust error checking in common_semi_cb

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > The err parameter is non-zero if and only if an error occured. > Use this instead of ret == -1 for determining if we need to > update the saved errno. The gdb protocol isn't 100% clear on this, but what it says is: https://sourceware.org/

Re: [PATCH v3 13/49] semihosting: Move common-semi.h to include/semihosting/

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > This header is not private to the top-level semihosting directory, > so place it in the public include directory. > > Signed-off-by: Richard Henderson > --- > {semihosting => include/semihosting}/common-semi.h | 0 > 1 file changed, 0 in

Re: [PATCH 3/3] capstone: Remove the capstone submodule

2022-05-23 Thread Thomas Huth
On 19/05/2022 13.41, Peter Maydell wrote: On Mon, 16 May 2022 at 16:22, Thomas Huth wrote: Now that we allow compiling with Capstone v3.05 again, all our supported build hosts should provide at least this version of the disassembler library, so we do not need to ship this as a submodule anymor

Re: [PATCH v3 01/15] include: move qemu_*_exec_dir() to cutils

2022-05-23 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > The function is required by get_relocated_path() (already in cutils), > and used by qemu-ga and may be generally useful. > > Signed-off-by: Marc-André Lureau > --- > include/qemu/cutils.h| 7 ++ > include/qemu/o

Re: [PATCH v3 14/49] include/exec: Move gdb open flags to gdbstub.h

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > There were 3 copies of these flags. Place them in the > file with gdb_do_syscall, with which they belong. > > Signed-off-by: Richard Henderson > --- > include/exec/gdbstub.h| 10 ++ > semihosting/arm-compat-semi.c | 8 -

Re: [PATCH v3 05/15] osdep: export qemu_open_cloexec()

2022-05-23 Thread Peter Maydell
On Fri, 13 May 2022 at 19:16, wrote: > > From: Marc-André Lureau > > Used in the next patch, to simplify qga code. > > Signed-off-by: Marc-André Lureau > --- > include/qemu/osdep.h | 1 + > util/osdep.c | 10 -- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH v3 05/15] osdep: export qemu_open_cloexec()

2022-05-23 Thread Daniel P . Berrangé
On Fri, May 13, 2022 at 08:08:11PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Used in the next patch, to simplify qga code. > > Signed-off-by: Marc-André Lureau > --- > include/qemu/osdep.h | 1 + > util/osdep.c | 10 -- > 2 files changed, 9 insert

Re: [PATCH v3 15/49] include/exec: Move gdb_stat and gdb_timeval to gdbstub.h

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > We have two copies of these structures, and require them > in semihosting/ going forward. > > Signed-off-by: Richard Henderson > --- > include/exec/gdbstub.h| 25 + > target/m68k/m68k-semi.c | 30 +++

Re: [PATCH v3 18/49] semihosting: Split is_64bit_semihosting per target

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > We already have some larger ifdef blocks for ARM and RISCV; > split the function into multiple implementations per arch. > > Reviewed-by: Alistair Francis > Signed-off-by: Richard Henderson > --- > semihosting/arm-compat-semi.c | 19 +++

Re: [PATCH v3 19/49] semihosting: Split common_semi_flen_buf per target

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > We already have some larger ifdef blocks for ARM and RISCV; > split out common_semi_stack_bottom per target. > > Reviewed-by: Alistair Francis > Signed-off-by: Richard Henderson > --- > semihosting/arm-compat-semi.c | 44 +++

Re: [PATCH v3 16/49] include/exec: Define errno values in gdbstub.h

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > Define constants for the errno values defined by the > gdb remote fileio protocol. > > Signed-off-by: Richard Henderson > --- > include/exec/gdbstub.h | 22 ++ > 1 file changed, 22 insertions(+) > > diff --git a/inclu

Re: [PATCH v3 21/49] semihosting: Use env more often in do_common_semihosting

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > We've already loaded cs->env_ptr into a local variable; use it. > Since env is unconditionally used, we don't need a dummy use. > > Signed-off-by: Richard Henderson > --- > target/arm/common-semi-target.h | 62 ++ > ta

Re: [PATCH v3 17/49] semihosting: Use struct gdb_stat in common_semi_flen_cb

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > Use offsetof instead of an integer constant. > Load the entire 64-bit size while we're at it. > > Signed-off-by: Richard Henderson > --- > semihosting/arm-compat-semi.c | 14 ++ > 1 file changed, 6 insertions(+), 8 deletions(

Re: [PATCH v3 22/49] semihosting: Move GET_ARG/SET_ARG earlier in the file

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > Moving this to be useful for another function > besides do_common_semihosting. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: PCI memory sync question (kvm,dpdk,e1000,packet stalled)

2022-05-23 Thread Ding Hui
Hi ASM I think I meet the almost exactly same issue with ASM (qemu e1000 tap, guest run dpdk), in our environment, rather than your github project It seems that the desc (not only status filed, we also traced buffer_addr and csum) changed to old value suddenly after guest dpdk set status to

Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock

2022-05-23 Thread Kevin Wolf
Am 22.05.2022 um 17:06 hat Stefan Hajnoczi geschrieben: > Hi, > Sorry for the long email. I've included three topics that may help us discuss > draining and AioContext removal further. > > The shortcomings of drain > - > I wanted to explore the logical argument that making

Re: [PATCH v3 20/49] semihosting: Split out common_semi_has_synccache

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > We already have some larger ifdef blocks for ARM and RISCV; > split out a boolean test for SYS_SYNCCACHE. > > Reviewed-by: Alistair Francis > Signed-off-by: Richard Henderson > --- > semihosting/arm-compat-semi.c | 20 +-

Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock

2022-05-23 Thread Stefan Hajnoczi
On Mon, May 23, 2022 at 10:48:48AM +0200, Emanuele Giuseppe Esposito wrote: > > > Am 22/05/2022 um 17:06 schrieb Stefan Hajnoczi: > > On Wed, May 18, 2022 at 06:14:17PM +0200, Kevin Wolf wrote: > >> Am 18.05.2022 um 14:43 hat Paolo Bonzini geschrieben: > >>> On 5/18/22 14:28, Emanuele Giuseppe Es

Re: proposed 7.1 release schedule

2022-05-23 Thread Stefan Hajnoczi
On Mon, May 23, 2022 at 10:53:44AM +0100, Peter Maydell wrote: > I just put some proposed dates into the 7.1 schedule page: > https://wiki.qemu.org/Planning/7.1#Release_Schedule > > * 2022-07-12 Softfreeze > * 2022-07-19 Hardfreeze. Tag rc0 > * 2022-07-26 Tag rc1 > * 2022-08-02 Tag rc2 > * 202

Re: [PATCH v6 4/8] KVM: Extend the memslot to support fd-based private memory

2022-05-23 Thread Chao Peng
On Fri, May 20, 2022 at 06:31:02PM +, Sean Christopherson wrote: > On Fri, May 20, 2022, Andy Lutomirski wrote: > > The alternative would be to have some kind of separate table or bitmap (part > > of the memslot?) that tells KVM whether a GPA should map to the fd. > > > > What do you all think

Re: [PATCH v3 23/49] semihosting: Split out semihost_sys_open

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > Split out the non-ARM specific portions of SYS_OPEN to a > reusable function. This handles gdb and host file i/o. > > Add helpers to validate the length of the filename string. > Prepare for usage by other semihosting by allowing the > fi

Re: [PATCH v3 36/49] gdbstub: Widen gdb_syscall_complete_cb return value

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > Always pass a uint64_t. This resolves a FIXME in the > m68k and nios2 semihosting that we've lost data. > > Signed-off-by: Richard Henderson > --- > include/exec/gdbstub.h| 3 +-- > gdbstub.c | 7 --- >

Re: [PATCH v3 37/49] semihosting: Fix docs comment for qemu_semihosting_console_inc

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > The implementation of qemu_semihosting_console_inc does not > defer to gdbstub, but only reads from the fifo in console.c. > > Signed-off-by: Richard Henderson > --- > include/semihosting/console.h | 9 - > 1 file changed, 4 inse

Re: [PATCH v3 38/49] semihosting: Pass CPUState to qemu_semihosting_console_inc

2022-05-23 Thread Peter Maydell
On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: > > We don't need CPUArchState, and we do want the CPUState of the > thread performing the operation -- use this instead of current_cpu. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-23 Thread Markus Armbruster
Thomas Huth writes: > The "-display sdl" option still uses a hand-crafted parser for its > parameters since we didn't want to drag an interface we considered > somewhat flawed into the QAPI schema. Since the flaws are gone now, > it's time to QAPIfy. > > This introduces the new "DisplaySDL" QAPI

Re: [PATCH v2 06/12] target/ppc: implement xscvspdpn with helper_todouble

2022-05-23 Thread Daniel Henrique Barboza
./scripts/checkpatch.pl is complaining about something that I don't agree with: On 5/19/22 17:18, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Move xscvspdpn to decodetree, drop helper_xscvspdpn and use helper_todouble directly. Signed-off-by: Matheus Ferst --- target/ppc/fpu_

Re: [PATCH v2 2/4] xlnx_dp: Introduce a vblank signal

2022-05-23 Thread Peter Maydell
On Thu, 19 May 2022 at 16:39, Frederic Konrad wrote: > > From: Sai Pavan Boddu > > Add a periodic timer which raises vblank at a frequency of 30Hz. > > Signed-off-by: Sai Pavan Boddu > Signed-off-by: Edgar E. Iglesias > Changes by fkonrad: > - Switched to transaction-based ptimer API. > - A

Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock

2022-05-23 Thread Emanuele Giuseppe Esposito
Am 23/05/2022 um 15:15 schrieb Stefan Hajnoczi: > On Mon, May 23, 2022 at 10:48:48AM +0200, Emanuele Giuseppe Esposito wrote: >> >> >> Am 22/05/2022 um 17:06 schrieb Stefan Hajnoczi: >>> On Wed, May 18, 2022 at 06:14:17PM +0200, Kevin Wolf wrote: Am 18.05.2022 um 14:43 hat Paolo Bonzini ges

Re: [PATCH v2] linux-user/syscall.c: fix build without RLIMIT_RTTIME

2022-05-23 Thread Laurent Vivier
Le 23/05/2022 à 12:52, Fabrice Fontaine a écrit : RLIMIT_RTTIME is not provided by uclibc-ng or by musl prior to version 1.2.0 and https://github.com/bminor/musl/commit/2507e7f5312e79620f6337935d0a6c9045ccba09 resulting in the following build failure since https://git.qemu.org/?p=qemu.git;a=commi

Re: [PATCH] hw/sd/allwinner-sdhost: report FIFO water level as 1 when data ready

2022-05-23 Thread Peter Maydell
On Fri, 20 May 2022 at 13:42, Icenowy Zheng wrote: > > U-Boot queries the FIFO water level to reduce checking status register > when doing PIO SD card operation. > > Report a FIFO water level of 1 when data is ready, to prevent the code > from trying to read 0 words from the FIFO each time. > > Si

Windows QXL Display Driver

2022-05-23 Thread Geoffrey McRae
Hi Gerd, Over the past few weeks I have been adding spice display support to Looking Glass as a fallback mechanism for during system boot (or diags) before our application is loaded in the guest VM. The idea is to have the VFIO GPU duplicate it's output to the QXL device, which works fine unt

Re: [PATCH v2] Fix 'writeable' typos

2022-05-23 Thread Peter Maydell
Ping for qemu-trivial? Or I can take it through the arm queue if you prefer. thanks -- PMM On Thu, 5 May 2022 at 10:50, Peter Maydell wrote: > > We have about 30 instances of the typo/variant spelling 'writeable', > and over 500 of the more common 'writable'. Standardize on the > latter. > > Ch

Re: [PATCH v5 4/8] target/ppc: Implemented xvf*ger*

2022-05-23 Thread Daniel Henrique Barboza
This patch is failing checkpatch.pl: $ ../scripts/checkpatch.pl v5-4-8-target-ppc-Implemented-xvf-ger.patch WARNING: line over 80 characters #252: FILE: target/ppc/fpu_helper.c:3557: + vsxger_muladd_f mul, vsxger_muladd_f muladd, vsxger_zero zero) total: 0 errors, 1 warnings,

Re: [PATCH v5 2/8] target/ppc: Implemented xvi*ger* instructions

2022-05-23 Thread Daniel Henrique Barboza
./scripts/checkpatch.pl does not like this long line: $ ../scripts/checkpatch.pl v5-2-8-target-ppc-Implemented-xvi-ger-instructions.patch WARNING: line over 80 characters #382: FILE: target/ppc/translate/vsx-impl.c.inc:2829: + void (*helper)(TCGv_env, TCGv_ptr, TCGv_ptr, TCGv_

Re: [PATCH v5 5/8] target/ppc: Implemented xvf16ger*

2022-05-23 Thread Daniel Henrique Barboza
checkpatch.pl didn't like this patch: Checking v5-5-8-target-ppc-Implemented-xvf16ger.patch... WARNING: line over 80 characters #177: FILE: target/ppc/fpu_helper.c:3535: +va = !(pmsk & 2) ? float64_zero : extract(a->VsrHF(2 * i), excp_ptr); WARNING: line over 80 characters #17

can QEMU's arm smmu model handle non-PCI devices?

2022-05-23 Thread Peter Maydell
Hi; in real hardware an SMMUv3 might be sat in front of any DMA-capable device. Putting one in front of a PCI bus is common but not the only use case. Does QEMU's SMMUv3 model handle that, or is the implementation currently restricted to only handling DMA from PCI devices? I ask because for the Re

Re: [RFC PATCH v4 03/36] target/i386: Implement mc->kvm_type() to get VM type

2022-05-23 Thread Isaku Yamahata
On Mon, May 23, 2022 at 10:36:16AM +0200, Gerd Hoffmann wrote: > Hi, > > > +if (!(kvm_check_extension(KVM_STATE(ms->accelerator), > > KVM_CAP_VM_TYPES) & BIT(kvm_type))) { > > +error_report("vm-type %s not supported by KVM", > > vm_type_name[kvm_type]); > > +exit(1); > >

[PATCH] trivial: qga: Log version on start

2022-05-23 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk --- qga/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qga/main.c b/qga/main.c index 3b9546c185..a58368c75e 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1271,6 +1271,8 @@ static GAState *initialize_agent(GAConfig *config, int socket_activation)

Re: [PATCH v3 08/49] semihosting: Inline set_swi_errno into common_semi_cb

2022-05-23 Thread Richard Henderson
On 5/23/22 03:58, Peter Maydell wrote: On Sat, 21 May 2022 at 01:04, Richard Henderson wrote: Do not store 'err' into errno only to read it back immediately. Use 'ret' for the return value, not 'reg0'. Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 19 ++--

Re: [RFC PATCH v4 07/36] i386/tdx: Introduce is_tdx_vm() helper and cache tdx_guest object

2022-05-23 Thread Isaku Yamahata
On Mon, May 23, 2022 at 10:48:17AM +0200, Gerd Hoffmann wrote: > > diff --git a/target/i386/kvm/tdx.h b/target/i386/kvm/tdx.h > > index c8a23d95258d..4036ca2f3f99 100644 > > --- a/target/i386/kvm/tdx.h > > +++ b/target/i386/kvm/tdx.h > > @@ -1,6 +1,10 @@ > > #ifndef QEMU_I386_TDX_H > > #define

[PATCH v4 0/8] qmp, hmp: statistics subsystem and KVM suport.

2022-05-23 Thread Paolo Bonzini
This patchset adds QEMU support for querying fd-based KVM statistics. This allows the user to analyze the behavior of the VM without access to debugfs. However, instead of adding an ad hoc command, the new QMP entry point can be extended in the future to more statistics provider than KVM (for exam

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

2022-05-23 Thread Paolo Bonzini
From: Mark Kanda Gathering statistics is important for development, for monitoring and for performance measurement. There are tools such as kvm_stat that do this and they rely on the _user_ knowing the interesting data points rather than the tool (which can treat them as opaque). The commands i

[PATCH 2/8] kvm: Support for querying fd-based stats

2022-05-23 Thread Paolo Bonzini
From: Mark Kanda Add support for querying fd-based KVM stats - as introduced by Linux kernel commit: cb082bfab59a ("KVM: stats: Add fd-based API to read binary stats data") This allows the user to analyze the behavior of the VM without access to debugfs. Signed-off-by: Mark Kanda Signed-off-b

[PATCH 4/8] hmp: add basic "info stats" implementation

2022-05-23 Thread Paolo Bonzini
From: Mark Kanda Add an HMP command to retrieve statistics collected at run-time. The command will retrieve and print either all VM-level statistics, or all vCPU-level statistics for the currently selected CPU. Signed-off-by: Paolo Bonzini --- hmp-commands-info.hx | 13 +++ include/monitor/h

[PATCH 3/8] qmp: add filtering of statistics by target vCPU

2022-05-23 Thread Paolo Bonzini
Introduce a simple filtering of statistics, that allows to retrieve statistics for a subset of the guest vCPUs. This will be used for example by the HMP monitor, in order to retrieve the statistics for the currently selected CPU. Example: { "execute": "query-stats", "arguments": { "target":

[RFC PATCH] mpqemu: Remove unlock/lock of iothread in mpqemu-link send and recv functions

2022-05-23 Thread Alexander Duyck
From: Alexander Duyck When I run Multi-process QEMU with an e1000 as the remote device and SMP enabled I see the combination lock up and become unresponsive. The QEMU build is a fairly standard x86_64-softmmu setup. After doing some digging I tracked the lockup down to the what appears to be a ra

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

2022-05-23 Thread Paolo Bonzini
Allow retrieving only a subset of statistics. This can be useful for example in order to plot a subset of the statistics many times a second. KVM publishes ~40 statistics for each vCPU on x86; retrieving and serializing all of them would be useless Another use will be in HMP in the following pat

[PATCH 5/8] qmp: add filtering of statistics by provider

2022-05-23 Thread Paolo Bonzini
Allow retrieving the statistics from a specific provider only. This can be used in the future by HMP commands such as "info sync-profile" or "info profile". The next patch also adds filter-by-provider capabilities to the HMP equivalent of query-stats, "info stats". Example: { "execute": "query-s

Re: proposed 7.1 release schedule

2022-05-23 Thread Richard Henderson
On 5/23/22 02:53, Peter Maydell wrote: I just put some proposed dates into the 7.1 schedule page: https://wiki.qemu.org/Planning/7.1#Release_Schedule * 2022-07-12 Softfreeze * 2022-07-19 Hardfreeze. Tag rc0 * 2022-07-26 Tag rc1 * 2022-08-02 Tag rc2 * 2022-08-09 Tag rc3 * 2022-08-16 Release

[PATCH 8/8] hmp: add filtering of statistics by name

2022-05-23 Thread Paolo Bonzini
Allow the user to request only a specific subset of statistics. This can be useful when working on a feature or optimization that is known to affect that statistic. Extracted from a patch by Mark Kanda. Signed-off-by: Paolo Bonzini --- hmp-commands-info.hx | 8 monitor/hmp-cmds.c |

[PATCH 6/8] hmp: add filtering of statistics by provider

2022-05-23 Thread Paolo Bonzini
Allow the user to request statistics for a single provider of interest. Extracted from a patch by Mark Kanda. Signed-off-by: Paolo Bonzini --- hmp-commands-info.hx | 7 --- monitor/hmp-cmds.c | 41 ++--- 2 files changed, 38 insertions(+), 10 deletions(-

[PATCH v2] target/riscv: Fix typo of mimpid cpu option

2022-05-23 Thread frank . chang
From: Frank Chang "mimpid" cpu option was mistyped to "mipid". Fixes: 9951ba94 ("target/riscv: Support configuarable marchid, mvendorid, mipid CSR values") Signed-off-by: Frank Chang --- target/riscv/cpu.c | 4 ++-- target/riscv/cpu.h | 2 +- target/riscv/csr.c | 8 3 files changed,

Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock

2022-05-23 Thread Stefan Hajnoczi
On Mon, May 23, 2022 at 03:02:05PM +0200, Kevin Wolf wrote: > Am 22.05.2022 um 17:06 hat Stefan Hajnoczi geschrieben: > > Hi, > > Sorry for the long email. I've included three topics that may help us > > discuss > > draining and AioContext removal further. > > > > The shortcomings of drain > > --

[PATCH] pnv/xive2: Don't overwrite PC registers when writing TCTXT registers

2022-05-23 Thread Frederic Barrat
When writing a register from the TCTXT memory region (4th page within the IC BAR), we were overwriting the Presentation Controller (PC) register at the same offset. It looks like a silly cut and paste error. We were somehow lucky: the TCTXT registers being touched are TCTXT_ENx/_SET/_RESET to enab

Re: [PATCH v6 4/8] KVM: Extend the memslot to support fd-based private memory

2022-05-23 Thread Sean Christopherson
On Mon, May 23, 2022, Chao Peng wrote: > On Fri, May 20, 2022 at 06:31:02PM +, Sean Christopherson wrote: > > On Fri, May 20, 2022, Andy Lutomirski wrote: > > > The alternative would be to have some kind of separate table or bitmap > > > (part > > > of the memslot?) that tells KVM whether a GP

Re: [PATCH v10 27/45] hw/cxl/host: Add support for CXL Fixed Memory Windows.

2022-05-23 Thread Jonathan Cameron via
On Sat, 21 May 2022 11:07:13 +0200 Paolo Bonzini wrote: > On 4/29/22 16:40, Jonathan Cameron via wrote: > > From: Jonathan Cameron > > > > The concept of these is introduced in [1] in terms of the > > description the CEDT ACPI table. The principal is more general. > > Unlike once traffic hits t

  1   2   3   >