Re: [PATCH v3 0/2] vhost-user: Support vhost_dev_start

2022-11-04 Thread Michael S. Tsirkin
On Mon, Oct 17, 2022 at 02:44:50PM +0800, Yajun Wu wrote: > The motivation of adding vhost-user vhost_dev_start support is to > improve backend configuration speed and reduce live migration VM > downtime. > > Today VQ configuration is issued one by one. For virtio net with > multi-queue support, b

Re: [PATCH v4 10/22] hw/virtio: move vm_running check to virtio_device_started

2022-11-04 Thread Michael S. Tsirkin
On Thu, Nov 03, 2022 at 05:35:57PM -0400, Michael S. Tsirkin wrote: > On Thu, Nov 03, 2022 at 04:30:48PM -0400, Michael S. Tsirkin wrote: > > On Thu, Nov 03, 2022 at 07:18:30PM +, Alex Bennée wrote: > > > > > > "Michael S. Tsirkin" writes: > > > > > > > On Tue, Aug 02, 2022 at 10:49:58AM +01

Re: [PATCH 2/9] block-copy: add missing coroutine_fn annotations

2022-11-04 Thread Emanuele Giuseppe Esposito
Am 03/11/2022 um 19:36 schrieb Paolo Bonzini: > On 11/3/22 19:06, Kevin Wolf wrote: >> I think it can make sense to have coroutine_fn as a documentation for >> things that are only ever called in a coroutine even if they could >> theoretically also work outside of coroutine context. >> >> Otherw

Use of unshare(CLONE_FS) in virtiofsd

2022-11-04 Thread Florian Weimer
I've got a proposed extension for glibc's pthread_create which allows the creation of threads with a dedicated current working directory/umask/chroot: [PATCH 0/2] Introduce per-thread file system properties on Linux I expe

[PATCH] tests/avocado/machine_aspeed.py: Reduce noise on the console for SDK tests

2022-11-04 Thread Cédric Le Goater
The Aspeed SDK images are based on OpenBMC which starts a lot of services. The output noise on the console can break from time to time the test waiting for the logging prompt. Change the U-Boot bootargs variable to add "quiet" to the kernel command line and reduce the output volume. This also drop

Re: [PATCH v3 0/2] vhost-user: Support vhost_dev_start

2022-11-04 Thread Michael S. Tsirkin
On Fri, Nov 04, 2022 at 03:11:44AM -0400, Michael S. Tsirkin wrote: > On Mon, Oct 17, 2022 at 02:44:50PM +0800, Yajun Wu wrote: > > The motivation of adding vhost-user vhost_dev_start support is to > > improve backend configuration speed and reduce live migration VM > > downtime. > > > > Today VQ

[PATCH v4] linux-user: implement execveat

2022-11-04 Thread Drew DeVault
References: https://gitlab.com/qemu-project/qemu/-/issues/1007 Signed-off-by: Drew DeVault --- v3 => v4: implement strace for execveat linux-user/strace.c| 91 +++--- linux-user/strace.list | 2 +- linux-user/syscall.c | 203 + 3 files

Re: [PATCH v9 5/8] KVM: Register/unregister the guest private memory regions

2022-11-04 Thread Chao Peng
On Thu, Nov 03, 2022 at 11:04:53PM +, Sean Christopherson wrote: > On Tue, Oct 25, 2022, Chao Peng wrote: > > @@ -4708,6 +4802,24 @@ static long kvm_vm_ioctl(struct file *filp, > > r = kvm_vm_ioctl_set_memory_region(kvm, &mem); > > break; > > } > > +#ifdef CONFIG_KVM

Re: [PATCH 2/9] block-copy: add missing coroutine_fn annotations

2022-11-04 Thread Paolo Bonzini
On 11/4/22 08:35, Emanuele Giuseppe Esposito wrote: But isn't it a bug also not to mark a function _only_ called by coroutine_fn? My point is that if this function is an implementation of a BlockDriver callback marked as coroutine_fn (like in patch 6 with vmdk), then it would make sense. If a f

Re: [PATCH v9 0/5] improve error handling for module load

2022-11-04 Thread Claudio Fontana
On 10/27/22 20:34, Kevin Wolf wrote: > Am 27.10.2022 um 16:52 hat Claudio Fontana geschrieben: >> A ping on this one, is there anything more that needs to be urgently >> addressed before it can be queued for inclusion? This is currently >> creating problems for upstream kubevirt, due to the error

Re: [PATCH 2/9] block-copy: add missing coroutine_fn annotations

2022-11-04 Thread Emanuele Giuseppe Esposito
Am 04/11/2022 um 09:44 schrieb Paolo Bonzini: > On 11/4/22 08:35, Emanuele Giuseppe Esposito wrote: >> But isn't it a bug also not to mark a function _only_ called by >> coroutine_fn? My point is that if this function is an implementation of >> a BlockDriver callback marked as coroutine_fn (like

[PATCH] tests/qtest: netdev: test stream and dgram backends

2022-11-04 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- Notes: compared to v14 of "qapi: net: add unix socket type support to netdev backend": - use IP addresses 127.0.0.1 and ::1 rather than localhost tests/qtest/meson.build | 1 + tests/qtest/netdev-socket.c | 423 +

Re: [PATCH] qom.json: default the prealloc-threads to smp-cpus

2022-11-04 Thread Philippe Mathieu-Daudé
On 4/11/22 02:57, Zhenyu Zhang wrote: Hello Philippe I checked out this modified patch: https://www.mail-archive.com/qemu-devel@nongnu.org/msg15.html It should have been merged in 7.1 This changed the default value, not the property availability. IIUC the '(since X)' format document when

Re: [PATCH] gitlab-ci: split clang-user to avoid timeout

2022-11-04 Thread Philippe Mathieu-Daudé
On 4/11/22 07:27, Thomas Huth wrote: On 03/11/2022 22.23, Stefan Hajnoczi wrote: GitLab CI times out when the clang-user job takes over 1 hour. Oh, that's new to me ... is that a regression? Has something become slower? Or did we just add more stuff to the user builds recently? We added mor

Re: [PATCH] tests/qtest: netdev: test stream and dgram backends

2022-11-04 Thread Daniel P . Berrangé
On Fri, Nov 04, 2022 at 10:22:36AM +0100, Laurent Vivier wrote: > +static int inet_get_free_port_socket(int sock) > +{ > +struct sockaddr_in addr; > +socklen_t len; > + > +memset(&addr, 0, sizeof(addr)); > +addr.sin_family = AF_INET; > +addr.sin_addr.s_addr = INADDR_ANY; > +

Re: [PATCH] tests/avocado/machine_aspeed.py: Reduce noise on the console for SDK tests

2022-11-04 Thread Philippe Mathieu-Daudé
On 4/11/22 08:53, Cédric Le Goater wrote: The Aspeed SDK images are based on OpenBMC which starts a lot of services. The output noise on the console can break from time to time the test waiting for the logging prompt. IIUC OpenBMC uses systemd, so you can mask pointless services from the kernel

Re: [PATCH] qom.json: default the prealloc-threads to smp-cpus

2022-11-04 Thread Zhenyu Zhang
Ok, many thanks for the clarification. I'll post a v2 patch to correct it. On Fri, Nov 4, 2022 at 5:29 PM Philippe Mathieu-Daudé wrote: > > On 4/11/22 02:57, Zhenyu Zhang wrote: > > Hello Philippe > > > > I checked out this modified patch: > > https://www.mail-archive.com/qemu-devel@nongnu.org/ms

Re: [PATCH v6 0/3] ppc/e500: Add support for eSDHC

2022-11-04 Thread Daniel Henrique Barboza
On 11/3/22 23:31, BALATON Zoltan wrote: On Thu, 3 Nov 2022, Daniel Henrique Barboza wrote: On 11/3/22 09:51, BALATON Zoltan wrote: On Wed, 2 Nov 2022, Daniel Henrique Barboza wrote: On 11/1/22 19:29, Philippe Mathieu-Daudé wrote: This is a respin of Bernhard's v4 with Freescale eSDHC imple

Re: [PATCH v3] linux-user: implement execveat

2022-11-04 Thread Philippe Mathieu-Daudé
Hi Drew, On 3/11/22 18:32, Drew DeVault wrote: References: https://gitlab.com/qemu-project/qemu/-/issues/1007 Signed-off-by: Drew DeVault --- v2 => v3: - Rebase to address the is_proc_myself fix - Drop the ifdefs linux-user/syscall.c | 203 ++- 1 file

Re: [PATCH v3] linux-user: implement execveat

2022-11-04 Thread Drew DeVault
On Fri Nov 4, 2022 at 10:53 AM CET, Philippe Mathieu-Daudé wrote: > Splitting this big patch would ease review: It's only +165/-131, are you sure it really needs to be split? > 1/ Replace safe_execve() by safe_execveat() > > -safe_execve(exec_path, argp, envp)) > +safe_execveat(AT_FDCWD,

[PATCH v2 1/9] block: call bdrv_co_drain_begin in a coroutine

2022-11-04 Thread Emanuele Giuseppe Esposito
It seems that bdrv_open_driver() forgot to create a coroutine where to call bs->drv->bdrv_co_drain_begin(), a callback marked as coroutine_fn. Because there is no active I/O at this point, the coroutine should end right after entering, so the caller does not need to poll until it is finished. Sig

[PATCH v2 5/9] block: distinguish between bdrv_create running in coroutine and not

2022-11-04 Thread Emanuele Giuseppe Esposito
Call two different functions depending on whether bdrv_create is in coroutine or not, following the same pattern as generated_co_wrapper functions. This allows to also call the coroutine function directly, without using CreateCo or relying in bdrv_create(). Signed-off-by: Emanuele Giuseppe Esposi

[PATCH v2 4/9] block-backend: replace bdrv_*_above with blk_*_above

2022-11-04 Thread Emanuele Giuseppe Esposito
Avoid mixing bdrv_* functions with blk_*, so create blk_* counterparts for: - bdrv_block_status_above - bdrv_is_allocated_above Signed-off-by: Emanuele Giuseppe Esposito --- block/block-backend.c | 21 + block/commit.c| 4 ++-- include/sysemu/

[PATCH v2 8/9] block: bdrv_create is never called in non-coroutine context

2022-11-04 Thread Emanuele Giuseppe Esposito
Delete the if case and make sure it won't be called again in coroutines. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Paolo Bonzini --- block.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/block.c b/block.c index c6a80d775

[PATCH v2 3/9] nbd/server.c: add missing coroutine_fn annotations

2022-11-04 Thread Emanuele Giuseppe Esposito
These functions end up calling bdrv_*() implemented as generated_co_wrapper functions. In addition, they also happen to be always called in coroutine context, meaning all callers are coroutine_fn. This means that the g_c_w function will enter the qemu_in_coroutine() case and eventually suspend (or

[PATCH v2 6/9] block/vmdk: add missing coroutine_fn annotations

2022-11-04 Thread Emanuele Giuseppe Esposito
These functions end up calling bdrv_create() implemented as generated_co_wrapper functions. In addition, they also happen to be always called in coroutine context, meaning all callers are coroutine_fn. This means that the g_c_w function will enter the qemu_in_coroutine() case and eventually suspend

[PATCH v2 0/9] Still more coroutine and various fixes in block layer

2022-11-04 Thread Emanuele Giuseppe Esposito
This is a dump of all minor coroutine-related fixes found while looking around and testing various things in the QEMU block layer. Patches aim to: - add missing coroutine_fn annotation to the functions - simplify to avoid the typical "if in coroutine: fn() // else create_coroutine(fn)" already p

[PATCH v2 9/9] block/dirty-bitmap: remove unnecessary qemu_in_coroutine() case

2022-11-04 Thread Emanuele Giuseppe Esposito
bdrv_can_store_new_dirty_bitmap and bdrv_remove_persistent_dirty_bitmap check if they are running in a coroutine, directly calling the coroutine callback if it's the case. Except that no coroutine calls such functions, therefore that check can be removed. Signed-off-by: Emanuele Giuseppe Esposito

[PATCH v2 7/9] block: bdrv_create_file is a coroutine_fn

2022-11-04 Thread Emanuele Giuseppe Esposito
It is always called in coroutine_fn callbacks, therefore it can directly call bdrv_co_create(). Signed-off-by: Emanuele Giuseppe Esposito --- block.c| 6 -- include/block/block-global-state.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/

[PATCH v2 2/9] block-copy: add missing coroutine_fn annotations

2022-11-04 Thread Emanuele Giuseppe Esposito
These functions end up calling bdrv_common_block_status_above(), a generated_co_wrapper function. In addition, they also happen to be always called in coroutine context, meaning all callers are coroutine_fn. This means that the g_c_w function will enter the qemu_in_coroutine() case and eventually s

[PULL v2 8/9] target/loongarch: Adjust the layout of hardware flags bit fields

2022-11-04 Thread Song Gao
From: Rui Wang Suggested-by: Richard Henderson Reviewed-by: Song Gao Signed-off-by: Rui Wang Message-Id: <20221104040517.222059-2-wang...@loongson.cn> Signed-off-by: Song Gao --- target/loongarch/cpu.h | 9 - target/loongarch/insn_trans/trans_privileged.c.

[PULL v2 6/9] target/loongarch: Add exception subcode

2022-11-04 Thread Song Gao
We need subcodes to distinguish the same excode cs->exception_indexs, such as EXCCODE_ADEF/EXCCODE_ADEM. Signed-off-by: Song Gao Reviewed-by: Richard Henderson Message-ID: <20221101073210.3934280-1-gaos...@loongson.cn> --- target/loongarch/cpu.c | 7 +++-- target/loongarch/cpu.h | 58 +

[PULL v2 7/9] target/loongarch: Fix raise_mmu_exception() set wrong exception_index

2022-11-04 Thread Song Gao
When the address is invalid address, We should set exception_index according to MMUAccessType, and EXCCODE_ADEF need't update badinstr. Otherwise, The system enters an infinite loop. e.g: run test.c on system mode test.c: #include void (*func)(int *); int main() { int i =

[PULL v2 4/9] hw/loongarch: Improve fdt for LoongArch virt machine

2022-11-04 Thread Song Gao
From: Xiaojuan Yang Add new items into LoongArch FDT, including rtc and uart info. Signed-off-by: Xiaojuan Yang Reviewed-by: Song Gao Message-Id: <20221028014007.2718352-3-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/virt.c| 31 +++ i

[PULL v2 2/9] hw/intc: Fix LoongArch extioi coreisr accessing

2022-11-04 Thread Song Gao
From: Xiaojuan Yang 1. When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the cpu index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_id to get the cpu index. 2. it need not to mask 0x1f when calculate the coreisr array index. Signed-o

[PULL v2 1/9] hw/intc: Convert the memops to with_attrs in LoongArch extioi

2022-11-04 Thread Song Gao
From: Xiaojuan Yang Converting the MemoryRegionOps read/write handlers to with_attrs in LoongArch extioi emulation. Signed-off-by: Xiaojuan Yang Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221021015307.2570844-2-yangxiaoj...@loongson.cn> Signed-off-by: So

[PULL v2 9/9] target/loongarch: Fix emulation of float-point disable exception

2022-11-04 Thread Song Gao
From: Rui Wang We need to emulate it to generate a floating point disable exception when CSR.EUEN.FPE is zero. Reviewed-by: Richard Henderson Reviewed-by: Song Gao Signed-off-by: Rui Wang Message-Id: <20221104040517.222059-3-wang...@loongson.cn> Signed-off-by: Song Gao --- target/loongarch/

[PULL v2 5/9] hw/loongarch: Add TPM device for LoongArch virt machine

2022-11-04 Thread Song Gao
From: Xiaojuan Yang Add TPM device for LoongArch virt machine, including establish TPM acpi info and add TYPE_TPM_TIS_SYSBUS to dynamic_sysbus_devices list. Signed-off-by: Xiaojuan Yang Reviewed-by: Song Gao Message-Id: <20221028014007.2718352-4-yangxiaoj...@loongson.cn> Signed-off-by: Song Ga

[PULL v2 0/9] loongarch-to-apply queue

2022-11-04 Thread Song Gao
tags/pull-loongarch-20221104 for you to fetch changes up to 2419978cb09e11bc53a07d4de5621424d2a6a86d: target/loongarch: Fix emulation of float-point disable exception (2022-11-04 17:10:53 +0800) pull-loongarch-20221104 v2: -

[PULL v2 3/9] hw/loongarch: Load FDT table into dram memory space

2022-11-04 Thread Song Gao
From: Xiaojuan Yang Load FDT table into dram memory space, and the addr is 2 MiB. Since lowmem region starts from 0, FDT base address is located at 2 MiB to avoid NULL pointer access. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <20221028014007.2718352-2-yangxiaoj...@loongson.cn

Re: [PATCH v3] linux-user: implement execveat

2022-11-04 Thread Philippe Mathieu-Daudé
On 4/11/22 10:55, Drew DeVault wrote: On Fri Nov 4, 2022 at 10:53 AM CET, Philippe Mathieu-Daudé wrote: Splitting this big patch would ease review: It's only +165/-131, are you sure it really needs to be split? I tend to ignore patches over 120 lines of change :) In this case it is about ex

Re: [PATCH v3] linux-user: implement execveat

2022-11-04 Thread Laurent Vivier
Le 04/11/2022 à 10:55, Drew DeVault a écrit : On Fri Nov 4, 2022 at 10:53 AM CET, Philippe Mathieu-Daudé wrote: Splitting this big patch would ease review: It's only +165/-131, are you sure it really needs to be split? 1/ Replace safe_execve() by safe_execveat() -safe_execve(exec_path,

Re: [PATCH v4] linux-user: implement execveat

2022-11-04 Thread Laurent Vivier
Le 04/11/2022 à 09:10, Drew DeVault a écrit : References: https://gitlab.com/qemu-project/qemu/-/issues/1007 Signed-off-by: Drew DeVault --- v3 => v4: implement strace for execveat linux-user/strace.c| 91 +++--- linux-user/strace.list | 2 +- linux-user/syscall.c | 203

Re: [PATCH v11 09/11] s390x/cpu topology: add topology machine property

2022-11-04 Thread Pierre Morel
On 11/3/22 18:20, Cornelia Huck wrote: On Thu, Nov 03 2022, Pierre Morel wrote: We keep the possibility to switch on/off the topology on newer machines with the property topology=[on|off]. Signed-off-by: Pierre Morel --- include/hw/boards.h| 3 +++ include/hw/s390x/cpu

Re: [PATCH v3] linux-user: implement execveat

2022-11-04 Thread Daniel P . Berrangé
On Fri, Nov 04, 2022 at 10:55:39AM +0100, Drew DeVault wrote: > On Fri Nov 4, 2022 at 10:53 AM CET, Philippe Mathieu-Daudé wrote: > > Splitting this big patch would ease review: > > It's only +165/-131, are you sure it really needs to be split? IMHO it is a standard best practice that code moveme

Re: [PATCH v11 01/11] s390x: Register TYPE_S390_CCW_MACHINE properties as class properties

2022-11-04 Thread Pierre Morel
On 11/4/22 07:32, Thomas Huth wrote: On 03/11/2022 18.01, Pierre Morel wrote: Signed-off-by: Pierre Morel ---   hw/s390x/s390-virtio-ccw.c | 127 +   1 file changed, 72 insertions(+), 55 deletions(-) -EMISSINGPATCHDESCRIPTION ... please add some words *w

[PATCH v2] qom.json: default the prealloc-threads to smp-cpus

2022-11-04 Thread Zhenyu Zhang
Since the amount of prealloc-threads to smp-cpus is defaulted in hostmem, so sync this information. Signed-off-by: Zhenyu Zhang v1: https://www.mail-archive.com/qemu-devel@nongnu.org/msg919682.html Changelog = v2: * This property is available since 5.0. (Philippe)

Re: [PATCH v11 01/11] s390x: Register TYPE_S390_CCW_MACHINE properties as class properties

2022-11-04 Thread Cédric Le Goater
On 11/4/22 11:16, Pierre Morel wrote: On 11/4/22 07:32, Thomas Huth wrote: On 03/11/2022 18.01, Pierre Morel wrote: Signed-off-by: Pierre Morel ---   hw/s390x/s390-virtio-ccw.c | 127 +   1 file changed, 72 insertions(+), 55 deletions(-) -EMISSINGPATCHDES

Re: [PATCH] tests/qtest: netdev: test stream and dgram backends

2022-11-04 Thread Laurent Vivier
On 11/4/22 10:41, Daniel P. Berrangé wrote: ... +static void test_stream_unix(void) +{ +QTestState *qts0, *qts1; +char *expect; +gchar *path; +int ret; + +ret = g_file_open_tmp("netdev-XX", &path, NULL); +g_assert_true(ret >= 0); +close(ret); This is creating a z

Re: [PATCH] target/arm: Two fixes for secure ptw

2022-11-04 Thread Peter Maydell
On Thu, 3 Nov 2022 at 20:30, Richard Henderson wrote: > > On 11/4/22 00:19, Peter Maydell wrote: > >> @@ -2671,6 +2671,13 @@ static bool get_phys_addr_with_struct(CPUARMState > >> *env, S1Translate *ptw, > >> bool is_secure = ptw->in_secure; > >> ARMMMUIdx s1_mmu_idx; > >> > >> +/

Re: [PATCH] tests/qtest: netdev: test stream and dgram backends

2022-11-04 Thread Daniel P . Berrangé
On Fri, Nov 04, 2022 at 11:58:29AM +0100, Laurent Vivier wrote: > On 11/4/22 10:41, Daniel P. Berrangé wrote: > ... > > > +static void test_stream_unix(void) > > > +{ > > > +QTestState *qts0, *qts1; > > > +char *expect; > > > +gchar *path; > > > +int ret; > > > + > > > +ret = g_

[PULL 1/7] hw/arm/boot: Set SME and SVE EL3 vector lengths when booting kernel

2022-11-04 Thread Peter Maydell
When we direct boot a kernel on a CPU which emulates EL3, we need to set up the EL3 system registers as the Linux kernel documentation specifies: https://www.kernel.org/doc/Documentation/arm64/booting.rst For SVE and SME this includes: - ZCR_EL3.LEN must be initialised to the same value for a

[PULL 5/7] target/arm: Copy the entire vector in DO_ZIP

2022-11-04 Thread Peter Maydell
From: Richard Henderson With odd_ofs set, we weren't copying enough data. Fixes: 09eb6d7025d1 ("target/arm: Move sve zip high_ofs into simd_data") Reported-by: Idan Horowitz Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20221031054144.3574-1-richard.hender..

[PULL 7/7] target/arm: Two fixes for secure ptw

2022-11-04 Thread Peter Maydell
From: Richard Henderson Reversed the sense of non-secure in get_phys_addr_lpae, and failed to initialize attrs.secure for ARMMMUIdx_Phys_S. Fixes: 48da29e4 ("target/arm: Add ptw_idx to S1Translate") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1293 Signed-off-by: Richard Henderson Te

[PULL 6/7] target/arm: Honor HCR_E2H and HCR_TGE in ats_write64()

2022-11-04 Thread Peter Maydell
From: Ake Koomsin We need to check HCR_E2H and HCR_TGE to select the right MMU index for the correct translation regime. To check for EL2&0 translation regime: - For S1E0*, S1E1* and S12E* ops, check both HCR_E2H and HCR_TGE - For S1E2* ops, check only HCR_E2H Signed-off-by: Ake Koomsin Messag

[PULL 0/7] target-arm queue

2022-11-04 Thread Peter Maydell
ent_vivier/qemu into staging (2022-11-03 10:55:05 -0400) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20221104 for you to fetch changes up to cead7fa4c06087c86c67c5ce815cc1ff0bfeac3a: target/arm: Two fixes for secure ptw (202

[PULL 4/7] target/arm: Fix Privileged Access Never (PAN) for aarch32

2022-11-04 Thread Peter Maydell
From: Timofey Kutergin When we implemented the PAN support we theoretically wanted to support it for both AArch32 and AArch64, but in practice several bugs made it essentially unusable with an AArch32 guest. Fix all those problems: - Use CPSR.PAN to check for PAN state in aarch32 mode -

[PULL 2/7] hw/arm/boot: Set SCR_EL3.HXEn when booting kernel

2022-11-04 Thread Peter Maydell
When we direct boot a kernel on a CPU which emulates EL3, we need to set up the EL3 system registers as the Linux kernel documentation specifies: https://www.kernel.org/doc/Documentation/arm64/booting.rst For CPUs with FEAT_HCX support this includes: - SCR_EL3.HXEn (bit 38) must be initia

[PULL 3/7] target/arm: Make TLBIOS and TLBIRANGE ops trap on HCR_EL2.TTLB

2022-11-04 Thread Peter Maydell
The HCR_EL2.TTLB bit is supposed to trap all EL1 execution of TLB maintenance instructions. However we have added new TLB insns for FEAT_TLBIOS and FEAT_TLBIRANGE, and forgot to set their accessfn to access_ttlb. Add the missing accessfns. Signed-off-by: Peter Maydell Reviewed-by: Richard Hende

Re: [PATCH v9 0/5] improve error handling for module load

2022-11-04 Thread Peter Maydell
On Fri, 4 Nov 2022 at 09:05, Claudio Fontana wrote: > > On 10/27/22 20:34, Kevin Wolf wrote: > > Am 27.10.2022 um 16:52 hat Claudio Fontana geschrieben: > >> A ping on this one, is there anything more that needs to be urgently > >> addressed before it can be queued for inclusion? This is currentl

Re: Commit 'iomap: add support for dma aligned direct-io' causes qemu/KVM boot failures #forregzbot

2022-11-04 Thread Thorsten Leemhuis
[Note: this mail is primarily send for documentation purposes and/or for regzbot, my Linux kernel regression tracking bot. That's why I removed most or all folks from the list of recipients, but left any that looked like a mailing lists. These mails usually contain '#forregzbot' in the subject, to

[PATCH 1/2] util/log: Make the per-thread flag immutable

2022-11-04 Thread Greg Kurz
Per-thread logging was implemented under the assumption that once enabled, it is not possible to switch back to single file logging. This isn't enforced though and it is possible to go through the global file opening sequence in per-thread mode. The code isn't ready for this and produces unexpected

[PATCH 2/2] util/log: Ignore per-thread flag if global file already there

2022-11-04 Thread Greg Kurz
If QEMU is started with `-D qemu.log.%d` without any `-d` option, doing `log all` in the monitor fails with: Filename template with '%d' required for 'tid' It is confusing since '%d' was actually passed. This happens because QEMU caches the log file name with %d converted to getpid() since `tid`

[PATCH 0/2] util/log: Make the per-thread flag immutable

2022-11-04 Thread Greg Kurz
While working on the "util/log: Always send errors to logfile when daemonized" series [1], I've encountered some issues with the per-thread flag. They stem from the code not being designed to allow the per-thread flag to be enabled or disabled more than once, but nothing is done to prevent that fro

Re: [PATCH] tests/qtest: netdev: test stream and dgram backends

2022-11-04 Thread Michael S. Tsirkin
On Fri, Nov 04, 2022 at 11:58:29AM +0100, Laurent Vivier wrote: > On 11/4/22 10:41, Daniel P. Berrangé wrote: > ... > > > +static void test_stream_unix(void) > > > +{ > > > +QTestState *qts0, *qts1; > > > +char *expect; > > > +gchar *path; > > > +int ret; > > > + > > > +ret = g_

[PATCH 2/3] net: Restore printing of the help text with "-nic help"

2022-11-04 Thread Thomas Huth
Running QEMU with "-nic help" used to work in QEMU 5.2 and earlier versions (it showed the available netdev backends), but this feature got broken during some refactoring in version 6.0. Let's restore the old behavior, and while we're at it, let's also print the available NIC models here now since

[PATCH 0/3] Fix the "-nic help" option

2022-11-04 Thread Thomas Huth
Running QEMU with "-nic help" used to work in QEMU 5.2 and earlier versions, but since QEMU 6.0 it just complains that "help" is not a valid value here. This patch series fixes this problem and also extends the help output here to list the available NIC models, too. Thomas Huth (3): net: Move th

[PATCH 1/3] net: Move the code to collect available NIC models to a separate function

2022-11-04 Thread Thomas Huth
The code that collects the available NIC models is not really specific to PCI anymore and will be required in the next patch, too, so let's move this into a new separate function in net.c instead. Signed-off-by: Thomas Huth --- include/net/net.h | 1 + hw/pci/pci.c | 29 +--

[PATCH 3/3] net: Replace "Supported NIC models" with "Available NIC models"

2022-11-04 Thread Thomas Huth
Just because a NIC model is compiled into the QEMU binary does not necessary mean that it can be used with each and every machine. So let's rather talk about "available" models instead of "supported" models, just to avoid confusion. Signed-off-by: Thomas Huth --- net/net.c | 2 +- 1 file changed

Re: Use of unshare(CLONE_FS) in virtiofsd

2022-11-04 Thread Vivek Goyal
On Fri, Nov 04, 2022 at 08:50:45AM +0100, Florian Weimer wrote: > I've got a proposed extension for glibc's pthread_create which allows > the creation of threads with a dedicated current working > directory/umask/chroot: > > [PATCH 0/2] Introduce per-thread file system properties on Linux >

Re: [PATCH 2/9] block-copy: add missing coroutine_fn annotations

2022-11-04 Thread Kevin Wolf
Am 04.11.2022 um 09:44 hat Paolo Bonzini geschrieben: > On 11/4/22 08:35, Emanuele Giuseppe Esposito wrote: > > But isn't it a bug also not to mark a function _only_ called by > > coroutine_fn? My point is that if this function is an implementation of > > a BlockDriver callback marked as coroutine_

Re: [PATCH 2/9] block-copy: add missing coroutine_fn annotations

2022-11-04 Thread Paolo Bonzini
On 11/4/22 10:20, Emanuele Giuseppe Esposito wrote: At this point I just want to make sure that we agree that it's correct to add coroutine_fn because of "the function calls a g_c_w that suspends" *&&* "all the callers are coroutine_fn". If the callers weren't coroutine_fn then g_c_w would just c

Re: [PATCH v2 0/9] Still more coroutine and various fixes in block layer

2022-11-04 Thread Paolo Bonzini
On 11/4/22 10:56, Emanuele Giuseppe Esposito wrote: This is a dump of all minor coroutine-related fixes found while looking around and testing various things in the QEMU block layer. Patches aim to: - add missing coroutine_fn annotation to the functions - simplify to avoid the typical "if in cor

Re: [PATCH 2/2] gitlab: show configure/make args before running

2022-11-04 Thread Daniel P . Berrangé
On Fri, Nov 04, 2022 at 08:31:31AM +1100, Richard Henderson wrote: > On 11/4/22 06:06, Stefan Hajnoczi wrote: > > On Thu, 3 Nov 2022 at 13:30, Daniel P. Berrangé wrote: > > > > > > When debugging failed jobs it is helpful to see the > > > full configure/make args used, without having to search >

Re: [PATCH] qom.json: default the prealloc-threads to smp-cpus

2022-11-04 Thread Igor Mammedov
On Fri, 04 Nov 2022 05:53:02 +0100 Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > > > On 3/11/22 11:47, Zhenyu Zhang wrote: > >> Since the amount of prealloc-threads to smp-cpus is > >> defaulted in hostmem, so sync this information. > > Has this always defaulted to smp-cpus,

Re: [PATCH] tests/qtest: netdev: test stream and dgram backends

2022-11-04 Thread Laurent Vivier
On 11/4/22 13:15, Michael S. Tsirkin wrote: On Fri, Nov 04, 2022 at 11:58:29AM +0100, Laurent Vivier wrote: On 11/4/22 10:41, Daniel P. Berrangé wrote: ... +static void test_stream_unix(void) +{ +QTestState *qts0, *qts1; +char *expect; +gchar *path; +int ret; + +ret = g_file

Re: [PATCH] gitlab-ci: split clang-user to avoid timeout

2022-11-04 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 4/11/22 07:27, Thomas Huth wrote: >> On 03/11/2022 22.23, Stefan Hajnoczi wrote: >>> GitLab CI times out when the clang-user job takes over 1 hour. >> Oh, that's new to me ... is that a regression? Has something become >> slower? Or did we just add more stuff

Re: [PATCH v11 01/11] s390x: Register TYPE_S390_CCW_MACHINE properties as class properties

2022-11-04 Thread Pierre Morel
On 11/4/22 11:53, Cédric Le Goater wrote: On 11/4/22 11:16, Pierre Morel wrote: On 11/4/22 07:32, Thomas Huth wrote: On 03/11/2022 18.01, Pierre Morel wrote: Signed-off-by: Pierre Morel ---   hw/s390x/s390-virtio-ccw.c | 127 +   1 file changed, 72 in

[PATCH v2] gitlab-ci: increase clang-user timeout

2022-11-04 Thread Stefan Hajnoczi
The clang-user test exceeds the 1 hour timeout occassionally. Philippe Mathieu-Daudé has pointed out that the number of tcg tests has increased since QEMU 7.1. The execution time therefore probably reflects a legitimate increase in tests rather than a performance regression. Bump the timeout to p

Re: [PATCH v2] gitlab-ci: increase clang-user timeout

2022-11-04 Thread Thomas Huth
On 04/11/2022 12.36, Stefan Hajnoczi wrote: The clang-user test exceeds the 1 hour timeout occassionally. Philippe Mathieu-Daudé has pointed out that the number of tcg tests has increased since QEMU 7.1. The execution time therefore probably reflects a legitimate increase in tests rather than a

Re: [PATCH v11 01/11] s390x: Register TYPE_S390_CCW_MACHINE properties as class properties

2022-11-04 Thread Thomas Huth
On 04/11/2022 11.53, Cédric Le Goater wrote: On 11/4/22 11:16, Pierre Morel wrote: On 11/4/22 07:32, Thomas Huth wrote: On 03/11/2022 18.01, Pierre Morel wrote: Signed-off-by: Pierre Morel ---   hw/s390x/s390-virtio-ccw.c | 127 +   1 file changed, 72 inse

Re: [PULL 00/10] Trivial branch for 7.2 patches

2022-11-04 Thread Stefan Hajnoczi
Hi Stefan and Laurent, Please take a look at this CI failure, I think it's triggered by this pull request: arm-linux-gnueabi-gcc -Isubprojects/libvhost-user/libvhost-user.a.p -Isubprojects/libvhost-user -I../subprojects/libvhost-user -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11

[PATCH v2] tests/qtest: netdev: test stream and dgram backends

2022-11-04 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- Notes: v2: - Fix ipv6 free port allocation - Check for IPv4, IPv6, AF_UNIX - Use g_mkdtemp() rather than g_file_open_tmp() - Use socketpair() in test_stream_fd() v1: compared to v14 of "qapi: net: add uni

Re: [PATCH v11 01/11] s390x: Register TYPE_S390_CCW_MACHINE properties as class properties

2022-11-04 Thread Pierre Morel
On 11/4/22 15:29, Thomas Huth wrote: On 04/11/2022 11.53, Cédric Le Goater wrote: On 11/4/22 11:16, Pierre Morel wrote: On 11/4/22 07:32, Thomas Huth wrote: On 03/11/2022 18.01, Pierre Morel wrote: Signed-off-by: Pierre Morel ---   hw/s390x/s390-virtio-ccw.c | 127 +

Re: [PATCH] tests/avocado/machine_aspeed.py: Reduce noise on the console for SDK tests

2022-11-04 Thread Cédric Le Goater
On 11/4/22 10:41, Philippe Mathieu-Daudé wrote: On 4/11/22 08:53, Cédric Le Goater wrote: The Aspeed SDK images are based on OpenBMC which starts a lot of services. The output noise on the console can break from time to time the test waiting for the logging prompt. IIUC OpenBMC uses systemd, s

[RFC PATCH 1/3] KVM: keep track of running ioctls

2022-11-04 Thread Emanuele Giuseppe Esposito
kvm_in_ioctl_lock uses a QemuLockCnt to keep track of the running ioctls. It will be used by the memory listener to make sure no new ioctl runs when it has to perform memslots modifications. Signed-off-by: David Hildenbrand Signed-off-by: Emanuele Giuseppe Esposito --- accel/kvm/kvm-all.c | 19

[RFC PATCH 3/3] kvm: Atomic memslot updates

2022-11-04 Thread Emanuele Giuseppe Esposito
From: David Hildenbrand If we update an existing memslot (e.g., resize, split), we temporarily remove the memslot to re-add it immediately afterwards. These updates are not atomic, especially not for KVM VCPU threads, such that we can get spurious faults. Let's inhibit most KVM ioctls while perf

[RFC PATCH 0/3] KVM: allow listener to stop all vcpus before

2022-11-04 Thread Emanuele Giuseppe Esposito
QEMU needs to perform memslots operations like merging and splitting, and each operation requires more than a single ioctl. Therefore if a vcpu is concurrently reading the same memslots, it could end up reading something that was temporarly deleted. For example, merging two memslots into one would

[RFC PATCH 2/3] KVM: keep track of running vcpu ioctls

2022-11-04 Thread Emanuele Giuseppe Esposito
Just as in kvm-all.c, introduce per-vcpu QemuLockCnt to keep track when vcpus are executing an ioctl. Keep a per-vcpu lock to minimize cache line bouncing. The kvm listener will then use the lock to prevent new ioctls from running when modifying memslots. Signed-off-by: David Hildenbrand Signed-o

Re: [PATCH 1/3] s390x/pci: RPCIT second pass when mappings exhausted

2022-11-04 Thread Eric Farman
On Fri, 2022-10-28 at 15:47 -0400, Matthew Rosato wrote: > If we encounter a new mapping while the number of available DMA > entries > in vfio is 0, we are currently skipping that mapping which is a > problem > if we manage to free up DMA space after that within the same RPCIT -- > we will return t

Re: [RFC PATCH] virtio: re-order vm_running and use_started checks

2022-11-04 Thread Michael S. Tsirkin
On Fri, Oct 14, 2022 at 02:21:08PM +0100, Alex Bennée wrote: > During migration the virtio device state can be restored before we > restart the VM. As no devices can be running while the VM is paused it > makes sense to bail out early in that case. > > This returns the order introduced in: > > 9

Re: [RFC PATCH] virtio: re-order vm_running and use_started checks

2022-11-04 Thread Christian Borntraeger
Am 04.11.22 um 16:56 schrieb Michael S. Tsirkin: On Fri, Oct 14, 2022 at 02:21:08PM +0100, Alex Bennée wrote: During migration the virtio device state can be restored before we restart the VM. As no devices can be running while the VM is paused it makes sense to bail out early in that case.

[PATCH v3 30/30] qapi: Drop temporary logic to support conversion step by step

2022-11-04 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé --- scripts/qapi/schema.py | 6 -- 1 file changed, 6 deletions(-) diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index 4594c69d0b..cd8661125c 100644 --- a/scripts/qapi/schema.

[PATCH v3 00/30] qapi: Elide redundant has_FOO in generated C

2022-11-04 Thread Markus Armbruster
In QAPI, absent optional members are distinct from any present value. We thus represent an optional schema member FOO as two C members: a FOO with the member's type, and a bool has_FOO. Likewise for function arguments. However, the has_FOO is actually redundant for a pointer-valued FOO, which can

[PATCH v3 24/30] qapi stats: Elide redundant has_FOO in generated C

2022-11-04 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/stats.json. Said commit explains the transfor

Re: [PATCH 2/3] s390x/pci: coalesce unmap operations

2022-11-04 Thread Eric Farman
On Fri, 2022-10-28 at 15:47 -0400, Matthew Rosato wrote: > Currently, each unmapped page is handled as an individual iommu > region notification.  Attempt to group contiguous unmap operations > into fewer notifications to reduce overhead. > > Signed-off-by: Matthew Rosato > --- >  hw/s390x/s390-p

[PATCH v3 21/30] qapi replay: Elide redundant has_FOO in generated C

2022-11-04 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/replay.json. Said commit explains the transfo

[PATCH v3 26/30] qapi transaction: Elide redundant has_FOO in generated C

2022-11-04 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/transaction.json. Said commit explains the tr

[PATCH v3 15/30] qapi machine: Elide redundant has_FOO in generated C

2022-11-04 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/machine*.json. Said commit explains the trans

[PATCH v3 05/30] qapi tests: Elide redundant has_FOO in generated C

2022-11-04 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for tests/qapi-schema/qapi-schema-test.json. Said comm

  1   2   3   >