Re: [PATCH] tap: fix net_init_tap() return code

2023-04-12 Thread Jason Wang
On Tue, Apr 11, 2023 at 9:10 PM Steven Sistare wrote: > > On 4/11/2023 2:32 AM, Jason Wang wrote: > > 在 2023/4/5 23:38, Steven Sistare 写道: > >> On 4/4/2023 6:00 PM, Philippe Mathieu-Daudé wrote: > >>> On 4/4/23 18:00, Steve Sistare wrote: > When net_init_tap() succeeds for a multi-queue devic

Re: [RFC PATCH] vhost: enable IOMMU_NOTIFIER_UNMAP events handling when device-iotlb=on

2023-04-12 Thread Jason Wang
On Thu, Apr 13, 2023 at 2:24 PM Viktor Prutyanov wrote: > > On Thu, Mar 30, 2023 at 7:49 PM Viktor Prutyanov wrote: > > > > Even if Device-TLB and PCI ATS is enabled, the guest can reject to use > > it. For example, this situation appears when Windows Server 2022 is > > running with intel-iommu w

Re: [RFC PATCH] vhost: enable IOMMU_NOTIFIER_UNMAP events handling when device-iotlb=on

2023-04-12 Thread Viktor Prutyanov
On Thu, Mar 30, 2023 at 7:49 PM Viktor Prutyanov wrote: > > Even if Device-TLB and PCI ATS is enabled, the guest can reject to use > it. For example, this situation appears when Windows Server 2022 is > running with intel-iommu with device-iotlb=on and virtio-net-pci with > vhost=on. The guest imp

Re: [PATCH v4 0/3] NUMA: Apply cluster-NUMA-node boundary for aarch64 and riscv machines

2023-04-12 Thread Gavin Shan
On 4/12/23 7:42 PM, Peter Maydell wrote: On Wed, 12 Apr 2023 at 02:08, Gavin Shan wrote: On 3/27/23 9:26 PM, Igor Mammedov wrote: On Fri, 17 Mar 2023 14:25:39 +0800 Gavin Shan wrote: For arm64 and riscv architecture, the driver (/base/arch_topology.c) is used to populate the CPU topology in

[PATCH] softmmu: Move dirtylimit.c into the target independent source set

2023-04-12 Thread Thomas Huth
dirtylimit.c just uses one TARGET_PAGE_SIZE macro - change it to qemu_target_page_size() so we can move thefile into the target independent source set. Then we only have to compile this file once during the build instead of multiple times (one time for each target). Signed-off-by: Thomas Huth ---

Re: [PATCH v11] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-12 Thread Volker Rümelin
Am 12.04.23 um 15:59 schrieb Dorinda Bassey: > Hi Volker, > > It seems that for some unknown reason using audio_pcm_info_clear_buf in > playback_process causes segmentation fault. Hence I moved the handling of > buffer underruns from the playback process to the qpw_write process because > that i

virtio-iommu hotplug issue

2023-04-12 Thread Akihiko Odaki
Hi, Recently I encountered a problem with the combination of Linux's virtio-iommu driver and QEMU when a SR-IOV virtual function gets disabled. I'd like to ask you what kind of solution is appropriate here and implement the solution if possible. A PCIe device implementing the SR-IOV specific

Re: [PATCH V2] intel_iommu: refine iotlb hash calculation

2023-04-12 Thread Jason Wang
On Wed, Apr 12, 2023 at 4:43 PM Alex Bennée wrote: > > > Jason Wang writes: > > > Commit 1b2b12376c8 ("intel-iommu: PASID support") takes PASID into > > account when calculating iotlb hash like: > > > > static guint vtd_iotlb_hash(gconstpointer v) > > { > > const struct vtd_iotlb_key *key = v

Re: [RFC PATCH v2 38/44] target/loongarch: Implement vbitsel vset

2023-04-12 Thread gaosong
在 2023/4/12 下午2:53, Richard Henderson 写道: +#define SETANYEQZ(NAME, BIT, E) \ +void HELPER(NAME)(CPULoongArchState *env, uint32_t cd, uint32_t vj) \ +{   \ +    int i; \ +    bool ret = false;   

Re: [PATCH v10 0/9] KVM: mm: fd-based approach for supporting KVM

2023-04-12 Thread Sean Christopherson
On Wed, Jan 25, 2023, Kirill A. Shutemov wrote: > On Wed, Jan 25, 2023 at 12:20:26AM +, Sean Christopherson wrote: > > On Tue, Jan 24, 2023, Liam Merwick wrote: > > > On 14/01/2023 00:37, Sean Christopherson wrote: > > > > On Fri, Dec 02, 2022, Chao Peng wrote: > > > > > This patch series imple

Re: [PATCH 10/16] hw/i3c/aspeed_i3c: Add IBI handling

2023-04-12 Thread Joe Komlodi
Hi jeremy, On Tue, Apr 11, 2023 at 2:17 AM Jeremy Kerr wrote: > > Hi Joe, > > > +static int aspeed_i3c_device_ibi_finish(I3CBus *bus) > > +{ > > +AspeedI3CDevice *s = ASPEED_I3C_DEVICE(bus->qbus.parent); > > +bool nack_and_disable_hj = ARRAY_FIELD_EX32(s->regs, DEVICE_CTRL, > > +

Re: [PATCH v10 0/9] KVM: mm: fd-based approach for supporting KVM

2023-04-12 Thread Sean Christopherson
On Wed, Mar 22, 2023, Michael Roth wrote: > On Tue, Feb 21, 2023 at 08:11:35PM +0800, Chao Peng wrote: > > > *fixup (upm_base_support): KVM: use inclusive ranges for restrictedmem > > > binding/unbinding > > > *fixup (upm_base_support): mm: restrictedmem: use inclusive ranges for > > > issuin

[PULL 0/5] Migration 20230412 patches

2023-04-12 Thread Juan Quintela
The following changes since commit abb02ce0e76a8e00026699a863ab2d11d88f56d4: Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging (2023-04-11 16:19:06 +0100) are available in the Git repository at: https://gitlab.com/juan.quintela/qemu.git tags/migration-202

[PULL 3/5] migration: Recover behavior of preempt channel creation for pre-7.2

2023-04-12 Thread Juan Quintela
From: Peter Xu In 8.0 devel window we reworked preempt channel creation, so that there'll be no race condition when the migration channel and preempt channel got established in the wrong order in commit 5655aab079. However no one noticed that the change will also be not compatible with older qem

[PULL 2/5] migration: Fix potential race on postcopy_qemufile_src

2023-04-12 Thread Juan Quintela
From: Peter Xu postcopy_qemufile_src object should be owned by one thread, either the main thread (e.g. when at the beginning, or at the end of migration), or by the return path thread (when during a preempt enabled postcopy migration). If that's not the case the access to the object might be ra

[PULL 5/5] migration: fix ram_state_pending_exact()

2023-04-12 Thread Juan Quintela
I removed that bit on commit: commit c8df4a7aeffcb46020f610526eea621fa5b0cd47 Author: Juan Quintela Date: Mon Oct 3 02:00:03 2022 +0200 migration: Split save_live_pending() into state_pending_* Fixes: c8df4a7aeffcb46020f610526eea621fa5b0cd47 Suggested-by: Nina Schoetterl-Glausch Signed-o

[PULL 1/5] io: tls: Inherit QIO_CHANNEL_FEATURE_SHUTDOWN on server side

2023-04-12 Thread Juan Quintela
From: Peter Xu TLS iochannel will inherit io_shutdown() from the master ioc, however we missed to do that on the server side. This will e.g. allow qemu_file_shutdown() to work on dest QEMU too for migration. Acked-by: Daniel P. Berrangé Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Sign

[PULL 4/5] migration/ram.c: Fix migration with compress enabled

2023-04-12 Thread Juan Quintela
From: Lukas Straub Since ec6f3ab9, migration with compress enabled was broken, because the compress threads use a dummy QEMUFile which just acts as a buffer and that commit accidentally changed it to use the outgoing migration channel instead. Fix this by using the dummy file again in the compre

Re: [PATCH 3/4] vhost: Add high-level state save/load functions

2023-04-12 Thread Stefan Hajnoczi
On Tue, Apr 11, 2023 at 05:05:14PM +0200, Hanna Czenczek wrote: > vhost_save_backend_state() and vhost_load_backend_state() can be used by > vhost front-ends to easily save and load the back-end's state to/from > the migration stream. > > Because we do not know the full state size ahead of time, >

Re: [PATCH 1/3] ui/sdl2: Grab Alt+Tab also in fullscreen mode

2023-04-12 Thread Bernhard Beschow
Am 12. April 2023 20:34:23 UTC schrieb Bernhard Beschow : >By default, SDL grabs Alt+Tab only in non-fullscreen mode. This causes Alt+Tab >to switch tasks on the host rather than in the VM in fullscreen mode while it >switches tasks in non-fullscreen mode in the VM. Fix this confusing behavior >

Re: [PATCH for 8.1] intel_iommu: refine iotlb hash calculation

2023-04-12 Thread Peter Maydell
On Wed, 12 Apr 2023 at 09:40, Alex Bennée wrote: > Peter Maydell writes: > > Whoops, hadn't noticed that guint type... (glib's > > g_int64_hash()'s approach to this is to XOR the top > > 32 bits with the bottom 32 bits to produce the 32-bit > > hash value.) > > This is less of a hash and more jus

Re: [PATCH 2/4] vhost-user: Interface for migration state transfer

2023-04-12 Thread Stefan Hajnoczi
On Tue, Apr 11, 2023 at 05:05:13PM +0200, Hanna Czenczek wrote: > So-called "internal" virtio-fs migration refers to transporting the > back-end's (virtiofsd's) state through qemu's migration stream. To do > this, we need to be able to transfer virtiofsd's internal state to and > from virtiofsd. >

Re: s390x TCG migration failure

2023-04-12 Thread Juan Quintela
Nina Schoetterl-Glausch wrote: > Hi, > > We're seeing failures running s390x migration kvm-unit-tests tests with TCG. As this is tcg, could you tell the exact command that you are running? Does it needs to be in s390x host, rigth? $ time ./tests/qtest/migration-test # random seed: R02S940c4f22ab

Re: [PATCH] tests/vm: use the default system python for NetBSD

2023-04-12 Thread John Snow
On Wed, Mar 29, 2023 at 8:47 AM Daniel P. Berrangé wrote: > > Currently our NetBSD VM recipe requests instal of the python37 package > and explicitly tells QEMU to use that version of python. Since the > NetBSD base ISO was updated to version 9.3 though, the default system > python version is 3.9

Re: [PATCH 0/4] vhost-user-fs: Internal migration

2023-04-12 Thread Stefan Hajnoczi
Hi, Is there a vhost-user.rst spec patch? Thanks, Stefan signature.asc Description: PGP signature

Re: [PATCH 1/4] vhost: Re-enable vrings after setting features

2023-04-12 Thread Stefan Hajnoczi
On Tue, Apr 11, 2023 at 05:05:12PM +0200, Hanna Czenczek wrote: > If the back-end supports the VHOST_USER_F_PROTOCOL_FEATURES feature, > setting the vhost features will set this feature, too. Doing so > disables all vrings, which may not be intended. > > For example, enabling or disabling logging

Re: s390x TCG migration failure

2023-04-12 Thread Juan Quintela
Nina Schoetterl-Glausch wrote: > Hi, > > We're seeing failures running s390x migration kvm-unit-tests tests with TCG. > Some initial findings: > What seems to be happening is that after migration a control block header > accessed by the test code is all zeros which causes an unexpected exception.

[PATCH 1/3] ui/sdl2: Grab Alt+Tab also in fullscreen mode

2023-04-12 Thread Bernhard Beschow
By default, SDL grabs Alt+Tab only in non-fullscreen mode. This causes Alt+Tab to switch tasks on the host rather than in the VM in fullscreen mode while it switches tasks in non-fullscreen mode in the VM. Fix this confusing behavior by grabbing Alt+F4 in fullscreen mode, always causing tasks to be

[PATCH 0/3] SDL2 usability fixes

2023-04-12 Thread Bernhard Beschow
I'm trying to use QEMU on Windows hosts for fun and for profit. While the GTK GUI doesn't seem to support OpenGL under Windows the SDL2 GUI does. Hence I used the SDL2 GUI where I ran into several issues of which three are fixed in this series, which are: * Alt+Tab switches tasks on the host rathe

[PATCH 3/3] ui/sdl2-input: Fix AltGr modifier on Windows hosts

2023-04-12 Thread Bernhard Beschow
Windows generates Ctrl + Alt_R for AltGr. By removing the Ctrl modifier Linux guests see AltGr. This fixes e.g. the '~' key on german keyboards. Signed-off-by: Bernhard Beschow --- ui/sdl2-input.c | 13 + 1 file changed, 13 insertions(+) diff --git a/ui/sdl2-input.c b/ui/sdl2-input.

[PATCH 2/3] ui/sdl2: Grab Alt+F4 also under Windows

2023-04-12 Thread Bernhard Beschow
SDL doesn't grab Alt+F4 under Windows by default. Pressing Alt+F4 thus closes the VM immediately without confirmation, possibly leading to data loss. Fix this by always grabbing Alt+F4 on Windows hosts, too. Signed-off-by: Bernhard Beschow --- ui/sdl2.c | 1 + 1 file changed, 1 insertion(+) dif

Re: s390x TCG migration failure

2023-04-12 Thread Juan Quintela
Nina Schoetterl-Glausch wrote: > Hi, > > We're seeing failures running s390x migration kvm-unit-tests tests with TCG. > Some initial findings: > What seems to be happening is that after migration a control block header > accessed by the test code is all zeros which causes an unexpected exception.

Re: [RFC 5/5] target/riscv: Expose properties for BF16 extensions

2023-04-12 Thread Daniel Henrique Barboza
On 4/11/23 23:33, Weiwei Li wrote: Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- Reviewed-by: Daniel Henrique Barboza target/riscv/cpu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index c19bbb41fb..0265fae46f 100644

Re: [RFC 1/5] target/riscv: Add properties for BF16 extensions

2023-04-12 Thread Daniel Henrique Barboza
On 4/11/23 23:33, Weiwei Li wrote: Add ext_zfbfmin/zvfbfmin/zvfbfwma properties. Add require check for BF16 extensions. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- Reviewed-by: Daniel Henrique Barboza target/riscv/cpu.c | 13 + target/riscv/cpu.h | 3 +++

Re: [PATCH v2 52/54] tcg/riscv: Simplify constraints on qemu_ld/st

2023-04-12 Thread Daniel Henrique Barboza
On 4/10/23 22:05, Richard Henderson wrote: The softmmu tlb uses TCG_REG_TMP[0-2], not any of the normally available registers. Now that we handle overlap betwen inputs and helper arguments, we can allow any allocatable reg. Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique

Re: [PATCH v2 43/54] tcg/riscv: Convert tcg_out_qemu_{ld,st}_slow_path

2023-04-12 Thread Daniel Henrique Barboza
On 4/10/23 22:05, Richard Henderson wrote: Use tcg_out_ld_helper_args, tcg_out_ld_helper_ret, and tcg_out_st_helper_args. Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza tcg/riscv/tcg-target.c.inc | 37 ++--- 1 file changed, 1

Re: [PATCH v2 28/54] tcg/riscv: Rationalize args to tcg_out_qemu_{ld,st}

2023-04-12 Thread Daniel Henrique Barboza
On 4/10/23 22:04, Richard Henderson wrote: Interpret the variable argument placement in the caller. Mark the argument registers const, because they must be passed to add_qemu_ldst_label unmodified. Pass data_type instead of is64 -- there are several places where we already convert back from b

Re: [PATCH v2 27/54] tcg/riscv: Require TCG_TARGET_REG_BITS == 64

2023-04-12 Thread Daniel Henrique Barboza
On 4/10/23 22:04, Richard Henderson wrote: The port currently does not support "oversize" guests, which means riscv32 can only target 32-bit guests. We will soon be building TCG once for all guests. This implies that we can only support riscv64. Since all Linux distributions target riscv64

Re: [PATCH for-8.0 0/5] Xen emulation build/Coverity fixes

2023-04-12 Thread Stefano Stabellini
On Wed, 11 Apr 2023, David Woodhouse wrote: > Some Coverity fixes and minor cleanups. And most notably, dropping > support for Xen libraries older than 4.7.1. I just wanted to say that I am fine with this

Re: [PATCH v2 12/54] tcg/riscv: Conditionalize tcg_out_exts_i32_i64

2023-04-12 Thread Daniel Henrique Barboza
On 4/10/23 22:04, Richard Henderson wrote: Since TCG_TYPE_I32 values are kept sign-extended in registers, via "w" instructions, we need not extend if the register matches. Perhaps "we don't need to extend if ..." ? This is already relied upon by comparisons. Signed-off-by: Richard Henders

Re: [PATCH 2/2] migration/ram.c: Fix migration with compress enabled

2023-04-12 Thread Juan Quintela
Lukas Straub wrote: > Since ec6f3ab9, migration with compress enabled was broken, because > the compress threads use a dummy QEMUFile which just acts as a > buffer and that commit accidentally changed it to use the outgoing > migration channel instead. > > Fix this by using the dummy file again in

Re: [PULL for-8.0 0/1] NFS changes for 2023-04-12

2023-04-12 Thread Peter Maydell
On Wed, 12 Apr 2023 at 17:30, Paolo Bonzini wrote: > > The following changes since commit abb02ce0e76a8e00026699a863ab2d11d88f56d4: > > Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging > (2023-04-11 16:19:06 +0100) > > are available in the Git repository at: > > https://

Re: [PATCH for-8.0 2/3] migration: Fix potential race on postcopy_qemufile_src

2023-04-12 Thread Juan Quintela
Peter Xu wrote: > postcopy_qemufile_src object should be owned by one thread, either the main > thread (e.g. when at the beginning, or at the end of migration), or by the > return path thread (when during a preempt enabled postcopy migration). If > that's not the case the access to the object mig

Re: [PATCH for-8.0 3/3] migration: Recover behavior of preempt channel creation for pre-7.2

2023-04-12 Thread Juan Quintela
Peter Xu wrote: > In 8.0 devel window we reworked preempt channel creation, so that there'll > be no race condition when the migration channel and preempt channel got > established in the wrong order in commit 5655aab079. > > However no one noticed that the change will also be not compatible with

Re: [PATCH for-8.0 1/3] io: tls: Inherit QIO_CHANNEL_FEATURE_SHUTDOWN on server side

2023-04-12 Thread Juan Quintela
Peter Xu wrote: > TLS iochannel will inherit io_shutdown() from the master ioc, however we > missed to do that on the server side. > > This will e.g. allow qemu_file_shutdown() to work on dest QEMU too for > migration. > > Acked-by: Daniel P. Berrangé > Signed-off-by: Peter Xu Reviewed-by: Juan

Re: [PATCH v2 51/54] tcg/ppc: Remove unused constraints A, B, C, D

2023-04-12 Thread Daniel Henrique Barboza
On 4/10/23 22:05, Richard Henderson wrote: These constraints have not been used for quite some time. Fixes: 77b73de67632 ("Use rem/div[u]_i32 drop div[u]2_i32") Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza tcg/ppc/tcg-target-con-str.h | 4 1 file cha

Re: [PATCH v2 49/54] tcg/ppc: Reorg tcg_out_tlb_read

2023-04-12 Thread Daniel Henrique Barboza
On 4/10/23 22:05, Richard Henderson wrote: Allocate TCG_REG_TMP2. Use R0, TMP1, TMP2 instead of any of the normally allocated registers for the tlb load. Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza tcg/ppc/tcg-target.c.inc | 84 +++---

Re: [PATCH v2 50/54] tcg/ppc: Adjust constraints on qemu_ld/st

2023-04-12 Thread Daniel Henrique Barboza
On 4/10/23 22:05, Richard Henderson wrote: The softmmu tlb uses TCG_REG_{TMP1,TMP2,R0}, not any of the normally available registers. Now that we handle overlap betwen inputs and helper arguments, we can allow any allocatable reg. Signed-off-by: Richard Henderson --- Reviewed-by: Daniel He

Re: [PATCH for-8.0 0/5] Xen emulation build/Coverity fixes

2023-04-12 Thread David Woodhouse
On Wed, 2023-04-12 at 20:01 +0100, David Woodhouse wrote: > On Wed, 2023-04-12 at 19:55 +0100, Peter Maydell wrote: > > On Wed, 12 Apr 2023 at 19:52, David Woodhouse wrote: > > > > > > Some Coverity fixes and minor cleanups. And most notably, dropping > > > support for Xen libraries older than 4.

Re: [PATCH v2 42/54] tcg/ppc: Convert tcg_out_qemu_{ld,st}_slow_path

2023-04-12 Thread Daniel Henrique Barboza
On 4/10/23 22:05, Richard Henderson wrote: Use tcg_out_ld_helper_args, tcg_out_ld_helper_ret, and tcg_out_st_helper_args. Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza tcg/ppc/tcg-target.c.inc | 88 1 file changed,

Re: [PATCH v2 25/54] tcg/ppc: Rationalize args to tcg_out_qemu_{ld,st}

2023-04-12 Thread Daniel Henrique Barboza
On 4/10/23 22:04, Richard Henderson wrote: Interpret the variable argument placement in the caller. Mark the argument register const, because they must be passed to add_qemu_ldst_label unmodified. This requires a bit of local variable renaming, because addrlo was being modified. Pass data_ty

Re: [PATCH for-8.0 0/5] Xen emulation build/Coverity fixes

2023-04-12 Thread David Woodhouse
On Wed, 2023-04-12 at 19:55 +0100, Peter Maydell wrote: > On Wed, 12 Apr 2023 at 19:52, David Woodhouse wrote: > > > > Some Coverity fixes and minor cleanups. And most notably, dropping > > support for Xen libraries older than 4.7.1. > > > > I believe there are two issues that remain to be fixed

Re: [PATCH 4/5] hw/xen: Fix double-free in xen_console store_con_info()

2023-04-12 Thread Peter Maydell
On Wed, 12 Apr 2023 at 19:52, David Woodhouse wrote: > > From: David Woodhouse > > Coverity spotted a double-free (CID 1508254); we g_string_free(path) and > then for some reason immediately call free(path) too. > > We should just use g_autoptr() for it anyway, which simplifies the code > a bit.

Re: [PATCH 5/5] hw/xen: Fix broken check for invalid state in xs_be_open()

2023-04-12 Thread Peter Maydell
On Wed, 12 Apr 2023 at 19:52, David Woodhouse wrote: > > From: David Woodhouse > > Coverity points out that if (!s && !s->impl) isn't really what we intended > to do here. CID 1508131. > > Fixes: 032475127225 ("hw/xen: Add emulated implementation of XenStore > operations") > Signed-off-by: David

Re: [PATCH for-8.0 0/5] Xen emulation build/Coverity fixes

2023-04-12 Thread Peter Maydell
On Wed, 12 Apr 2023 at 19:52, David Woodhouse wrote: > > Some Coverity fixes and minor cleanups. And most notably, dropping > support for Xen libraries older than 4.7.1. > > I believe there are two issues that remain to be fixed. The x32 build > fails, and I've seen patches which attempt to detect

Re: [PULL 22/27] hw/xen: Add emulated implementation of XenStore operations

2023-04-12 Thread Peter Maydell
On Wed, 12 Apr 2023 at 19:22, David Woodhouse wrote: > > On Tue, 2023-04-11 at 19:07 +0100, Peter Maydell wrote: > > > > > > > +static void xs_be_unwatch(struct qemu_xs_handle *h, struct > > > qemu_xs_watch *w) > > > +{ > > > +xs_impl_unwatch(h->impl, DOMID_QEMU, w->path, NULL, > > > xs_be_wat

[PATCH 1/5] hw/xen: Simplify emulated Xen platform init

2023-04-12 Thread David Woodhouse
From: David Woodhouse I initially put the basic platform init (overlay pages, grant tables, event channels) into mc->kvm_type because that was the earliest place that could sensibly test for xen_mode==XEN_EMULATE. The intent was to do this early enough that we could then initialise the XenBus an

[PATCH 4/5] hw/xen: Fix double-free in xen_console store_con_info()

2023-04-12 Thread David Woodhouse
From: David Woodhouse Coverity spotted a double-free (CID 1508254); we g_string_free(path) and then for some reason immediately call free(path) too. We should just use g_autoptr() for it anyway, which simplifies the code a bit. Fixes: 7a8a749da7d3 ("hw/xen: Move xenstore_store_pv_console_info t

[PATCH for-8.0 0/5] Xen emulation build/Coverity fixes

2023-04-12 Thread David Woodhouse
Some Coverity fixes and minor cleanups. And most notably, dropping support for Xen libraries older than 4.7.1. I believe there are two issues that remain to be fixed. The x32 build fails, and I've seen patches which attempt to detect x32 and disable the Xen emulation. Along with assertions that we

[PATCH 5/5] hw/xen: Fix broken check for invalid state in xs_be_open()

2023-04-12 Thread David Woodhouse
From: David Woodhouse Coverity points out that if (!s && !s->impl) isn't really what we intended to do here. CID 1508131. Fixes: 032475127225 ("hw/xen: Add emulated implementation of XenStore operations") Signed-off-by: David Woodhouse --- hw/i386/kvm/xen_xenstore.c | 2 +- 1 file changed, 1

[PATCH 3/5] xen: Drop support for Xen versions below 4.7.1

2023-04-12 Thread David Woodhouse
From: David Woodhouse In restructuring to allow for internal emulation of Xen functionality, I broke compatibility for Xen 4.6 and earlier. Fix this by explicitly removing support for anything older than 4.7.1, which is also ancient but it does still build, and the compatibility support for it is

[PATCH 2/5] hw/xen: Fix memory leak in libxenstore_open() for Xen

2023-04-12 Thread David Woodhouse
From: David Woodhouse There was a superfluous allocation of the XS handle, leading to it being leaked on both the error path and the success path (where it gets allocated again). Spotted by Coverity (CID 1508098). Fixes: ba2a92db1ff6 ("hw/xen: Add xenstore operations to allow redirection to in

Re: [PULL 22/27] hw/xen: Add emulated implementation of XenStore operations

2023-04-12 Thread David Woodhouse
On Tue, 2023-04-11 at 19:07 +0100, Peter Maydell wrote: > > > > +static void xs_be_unwatch(struct qemu_xs_handle *h, struct > > qemu_xs_watch *w) > > +{ > > +    xs_impl_unwatch(h->impl, DOMID_QEMU, w->path, NULL, > > xs_be_watch_cb, w); > > Coverity points out that this is the only call to xs_i

Re: qemu v8.0-rc3 fails to compile with Xen

2023-04-12 Thread David Woodhouse
On Wed, 2023-04-12 at 18:32 +0100, Peter Maydell wrote: > On Wed, 12 Apr 2023 at 17:58, David Woodhouse > wrote: > > > > On Wed, 2023-04-12 at 18:41 +0200, Olaf Hering wrote: > > > The error with this patch applied looks like this: > > > > Thanks. So I think I fixed that one but there are others

Re: qemu v8.0-rc3 fails to compile with Xen

2023-04-12 Thread Peter Maydell
On Wed, 12 Apr 2023 at 17:58, David Woodhouse wrote: > > On Wed, 2023-04-12 at 18:41 +0200, Olaf Hering wrote: > > The error with this patch applied looks like this: > > Thanks. So I think I fixed that one but there are others. I'll make > myself a build environment rather than getting you to help

Re: [PATCH v12 02/10] target/riscv: add support for Zca extension

2023-04-12 Thread Daniel Henrique Barboza
On 4/12/23 08:35, Weiwei Li wrote: On 2023/4/12 18:55, Alistair Francis wrote: On Wed, Apr 12, 2023 at 12:55 PM Weiwei Li wrote: On 2023/4/12 10:12, Alistair Francis wrote: On Fri, Apr 7, 2023 at 6:23 AM Daniel Henrique Barboza wrote: Hi, This patch is going to break the sifive_u boot

Re: [PATCH] target/riscv: Update check for Zca/zcf/zcd

2023-04-12 Thread Daniel Henrique Barboza
On 4/12/23 00:06, Weiwei Li wrote: Even though Zca/Zcf/Zcd can be included by C/F/D, however, their priv version is higher than the priv version of C/F/D. So if we use check for them instead of check for C/F/D totally, it will trigger new problem when we try to disable the extensions based on

Re: PCIe atomics in pcie-root-port

2023-04-12 Thread Robin Voetter
On 4/6/23 20:40, Alex Williamson wrote: I think the typical approach for QEMU would be expose options in the downstream ports that would then need to be enabled by the user or management tool, but that's where the complication begins. At some point we would want management tools to "do the righ

Re: qemu v8.0-rc3 fails to compile with Xen

2023-04-12 Thread David Woodhouse
On Wed, 2023-04-12 at 18:41 +0200, Olaf Hering wrote: > The error with this patch applied looks like this: Thanks. So I think I fixed that one but there are others. I'll make myself a build environment rather than getting you to help me play whack-a-mole. Thanks. smime.p7s Description: S/MIME c

Re: qemu v8.0-rc3 fails to compile with Xen

2023-04-12 Thread Olaf Hering
Wed, 12 Apr 2023 15:05:06 +0100 David Woodhouse : > On Wed, 2023-04-12 at 14:20 +0200, Olaf Hering wrote: > > Wed, 12 Apr 2023 12:46:23 +0100 Alex Bennée : > > > > > Olaf Hering writes: > > > > Qemu v7.2.1 can be compiled with Xen 4.6, but v8.0.0-rc3 needs now at > > > > least Xen 4.7.  > > >

[PATCH for-8.1] hw/display: Compile vga.c as target-independent code

2023-04-12 Thread Thomas Huth
The target checks here are only during the initialization, so they are not performance critical. We can switch these to runtime checks to avoid that we have to compile this file multiple times during the build, and make the code ready for an universal build one day. Signed-off-by: Thomas Huth ---

[PULL for-8.0 1/1] block/nfs: do not poll within a coroutine

2023-04-12 Thread Paolo Bonzini
Since the former nfs_get_allocated_file_size is now a coroutine function, it must suspend rather than poll. Switch BDRV_POLL_WHILE() to a qemu_coroutine_yield() loop and schedule nfs_co_generic_bh_cb() in place of the call to bdrv_wakeup(). Fixes: 82618d7bc341 ("block: Convert bdrv_get_allocated_

[PULL for-8.0 0/1] NFS changes for 2023-04-12

2023-04-12 Thread Paolo Bonzini
The following changes since commit abb02ce0e76a8e00026699a863ab2d11d88f56d4: Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging (2023-04-11 16:19:06 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch cha

Re: [PATCH 8.0 regression] block/nfs: do not poll within a coroutine

2023-04-12 Thread Kevin Wolf
Am 12.04.2023 um 13:26 hat Paolo Bonzini geschrieben: > Since the former nfs_get_allocated_file_size is now a coroutine > function, it must suspend rather than poll. Switch BDRV_POLL_WHILE() > to a qemu_coroutine_yield() loop and schedule nfs_co_generic_bh_cb() > in place of the call to bdrv_wakeu

Re: [QEMU][PATCH] gitlab-ci.d/crossbuilds: Drop the '--disable-tcg' configuration for xen

2023-04-12 Thread Vikram Garhwal
Hi all, Yes, gdbstub build issue is only for for aarch64-softmmu target and that was the reason for this patch. x86 targets build fine with ''disable-tcg" option. Thanks Fabiano & Philippe for sharing the existing patch series for this. Regards, Vikram On 4/12/23 5:51 AM, Fabiano Rosas w

Re: [PATCH 8.0 regression] block/nfs: do not poll within a coroutine

2023-04-12 Thread Eric Blake
On Wed, Apr 12, 2023 at 01:26:06PM +0200, Paolo Bonzini wrote: > Since the former nfs_get_allocated_file_size is now a coroutine > function, it must suspend rather than poll. Switch BDRV_POLL_WHILE() > to a qemu_coroutine_yield() loop and schedule nfs_co_generic_bh_cb() > in place of the call to b

Re: [PULL v4 23/83] hw/cxl/cdat: CXL CDAT Data Object Exchange implementation

2023-04-12 Thread Jonathan Cameron via
On Tue, 11 Apr 2023 16:52:58 +0100 Peter Maydell wrote: > On Mon, 7 Nov 2022 at 22:49, Michael S. Tsirkin wrote: > > > > From: Huai-Cheng Kuo > > > > The Data Object Exchange implementation of CXL Coherent Device Attribute > > Table (CDAT). This implementation is referring to "Coherent Device >

Re: [PATCH 3/3] block-backend: delay application of request queuing

2023-04-12 Thread Hanna Czenczek
On 12.04.23 14:03, Paolo Bonzini wrote: On Wed, Apr 12, 2023 at 1:54 PM Hanna Czenczek wrote: On 05.04.23 18:31, Paolo Bonzini wrote: +if (busy || blk->in_flight) { +return true; +} + +if (qatomic_read(&blk->request_queuing) == BLK_QUEUE_READY) { +qatomic_set(&blk->

Re: source fails to compile on msys2

2023-04-12 Thread Howard Spoelstra
Yep, fixed No idea how I got that wrong ;-) Best, Howard

Re: [PATCH v3 18/20] bsd-user: Automatically generate syscall_nr.h

2023-04-12 Thread Warner Losh
On Wed, Apr 12, 2023 at 4:10 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 4/11/23 19:09, Warner Losh wrote: > > +++ b/bsd-user/syscallhdr.sh > > @@ -0,0 +1,7 @@ > > +#!/bin/sh > > + > > +in="$1" > > +out="$2" > > +bsd="$3" > > + > > +awk -v bsd="$3" '{sub("SYS_", "TARGET_" bsd

[PATCH 0/2] tests/migration: Fix migration-test slowdown

2023-04-12 Thread Juan Quintela
Since commit: commit 1bfc8dde505f1e6a92697c52aa9b09e81b54c78f Author: Dr. David Alan Gilbert Date: Mon Mar 6 15:26:12 2023 + tests/migration: Tweek auto converge limits check Thomas found an autoconverge test failure where the migration completed before the autoconverge had ki

[PATCH 1/2] tests/migration: Make precopy fast

2023-04-12 Thread Juan Quintela
Otherwise we do the 1st migration iteration at a too slow speed. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 3b615b0da9..7b05b0b7dd 100644 ---

[PATCH 2/2] tests/migration: Only run auto_converge in slow mode

2023-04-12 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 7b05b0b7dd..6317131b50 100644 --- a/tests/qtest/migration-test.c +++ b/tests

Re: [PULL for-8.0 0/2] last minute hw/nvme coverity fixes

2023-04-12 Thread Peter Maydell
On Wed, 12 Apr 2023 at 11:04, Klaus Jensen wrote: > > From: Klaus Jensen > > Hi Peter, > > The following changes since commit 6c50845a9183610cfd4cfffd48dfc704cd340882: > > hw/i2c/allwinner-i2c: Fix subclassing of TYPE_AW_I2C_SUN6I (2023-04-11 > 14:13:29 +0100) > > are available in the Git repo

Re: qemu v8.0-rc3 fails to compile with Xen

2023-04-12 Thread David Woodhouse
On Wed, 2023-04-12 at 14:20 +0200, Olaf Hering wrote: > Wed, 12 Apr 2023 12:46:23 +0100 Alex Bennée : > > > Olaf Hering writes: > > > Qemu v7.2.1 can be compiled with Xen 4.6, but v8.0.0-rc3 needs now at > > > least Xen 4.7.  > > Was this caused by the addition of the KVM Xen target support or

Re: [PATCH v11] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-12 Thread Dorinda Bassey
Hi Volker, It seems that for some unknown reason using audio_pcm_info_clear_buf in playback_process causes segmentation fault. Hence I moved the handling of buffer underruns from the playback process to the qpw_write process because that is the underlying cause of buffer underrun. Regards, Dorind

Re: [PATCH 8.0 regression] block/nfs: do not poll within a coroutine

2023-04-12 Thread Peter Maydell
If you would like this in 8.0 then it needs to be reviewed and in a pullreq today... thanks -- PMM On Wed, 12 Apr 2023 at 12:27, Paolo Bonzini wrote: > > Since the former nfs_get_allocated_file_size is now a coroutine > function, it must suspend rather than poll. Switch BDRV_POLL_WHILE() > to a

[PATCH v11] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-12 Thread Dorinda Bassey
This commit adds a new audiodev backend to allow QEMU to use Pipewire as both an audio sink and source. This backend is available on most systems Add Pipewire entry points for QEMU Pipewire audio backend Add wrappers for QEMU Pipewire audio backend in qpw_pcm_ops() qpw_write function returns the c

Re: AVX-512 instruction set

2023-04-12 Thread Paolo Bonzini
On Wed, Apr 12, 2023 at 3:41 PM Walid Ghandour wrote: > I will try to work on this. Even if the individual tasks I listed are not enough to implement AVX512, I suggest that you post individual pieces of work so that you can somewhat pipeline the work. Also, please review the design of the AVX de

Re: [PATCH 1/2] accel/tcg/plugin: export host insn size

2023-04-12 Thread Wu, Fei
On 4/12/2023 9:28 PM, Alex Bennée wrote: > > "Wu, Fei" writes: > >> On 4/11/2023 3:27 PM, Alex Bennée wrote: >>> >>> "Wu, Fei" writes: >>> On 4/10/2023 6:36 PM, Alex Bennée wrote: > > Richard Henderson writes: > >> On 4/6/23 00:46, Alex Bennée wrote: >>> If your aim is

Re: AVX-512 instruction set

2023-04-12 Thread Walid Ghandour
I will try to work on this. Regards, Walid Le mer. 12 avr. 2023 à 15:30, Paolo Bonzini a écrit : > On Wed, Apr 12, 2023 at 2:17 PM Alex Bennée > wrote: > > I don't think there is currently any active effort to add AVX512 > > support. There have been various GSoC projects to improve the x86 SIM

Re: source fails to compile on msys2

2023-04-12 Thread Thomas Huth
On 12/04/2023 15.13, Howard Spoelstra wrote: Hello Peter, My source was cloned today. I just cloned again and I still see the tokens reversed: git clone https://www.gitlab.com/qemu/qemu You're using the wrong repository. The official QEMU repo is here: https://gitlab.com/qemu-project/qemu.

Re: source fails to compile on msys2

2023-04-12 Thread Peter Maydell
On Wed, 12 Apr 2023 at 14:21, Stefan Weil via wrote: > > Am 12.04.23 um 15:13 schrieb Howard Spoelstra: > > Hello Peter, > > > > My source was cloned today. I just cloned again and I still see the > > tokens reversed: > > git clone https://www.gitlab.com/qemu/qemu > >

Re: [QEMU][PATCH v6 10/10] meson.build: enable xenpv machine build for ARM

2023-04-12 Thread Alex Bennée
Fabiano Rosas writes: > Vikram Garhwal writes: > >> Add CONFIG_XEN for aarch64 device to support build for ARM targets. >> >> Signed-off-by: Vikram Garhwal >> Signed-off-by: Stefano Stabellini >> Reviewed-by: Alex Bennée >> --- >> meson.build | 2 +- >> 1 file changed, 1 insertion(+), 1 de

Re: [PATCH 1/2] accel/tcg/plugin: export host insn size

2023-04-12 Thread Alex Bennée
"Wu, Fei" writes: > On 4/11/2023 3:27 PM, Alex Bennée wrote: >> >> "Wu, Fei" writes: >> >>> On 4/10/2023 6:36 PM, Alex Bennée wrote: Richard Henderson writes: > On 4/6/23 00:46, Alex Bennée wrote: >> If your aim is to examine JIT efficiency what is wrong with the curr

Re: AVX-512 instruction set

2023-04-12 Thread Paolo Bonzini
On Wed, Apr 12, 2023 at 2:17 PM Alex Bennée wrote: > I don't think there is currently any active effort to add AVX512 > support. There have been various GSoC projects to improve the x86 SIMD > emulation but I don't think they got merged. No, there isn't. However, the recent implementation of AVX

[Patch] SDHCI: fixing extend sdhci controller ops usage

2023-04-12 Thread Hake Huang (OSS)
[Patch] SDHCI: fixing extend sdhci controller ops usage 1. ops bug fixing For IMX and S3C sdhci control the ops are given in inst_init but it will be overwritten by class_init which calls the class_realize fix it by checking whether ops has value of not. 2. CLKCON updates According to usdhc RM fo

Re: source fails to compile on msys2

2023-04-12 Thread Stefan Weil via
Am 12.04.23 um 15:13 schrieb Howard Spoelstra: Hello Peter, My source was cloned today. I just cloned again and I still see the tokens reversed: git clone https://www.gitlab.com/qemu/qemu qemu-master-clean The official URL is https://gitlab.com/qemu-project

Re: [QEMU][PATCH v6 10/10] meson.build: enable xenpv machine build for ARM

2023-04-12 Thread Fabiano Rosas
Vikram Garhwal writes: > Add CONFIG_XEN for aarch64 device to support build for ARM targets. > > Signed-off-by: Vikram Garhwal > Signed-off-by: Stefano Stabellini > Reviewed-by: Alex Bennée > --- > meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meson.buil

Re: source fails to compile on msys2

2023-04-12 Thread Howard Spoelstra
Hello Peter, My source was cloned today. I just cloned again and I still see the tokens reversed: git clone https://www.gitlab.com/qemu/qemu qemu-master-clean /** * qemu_build_not_reached() * * The compiler, during optimization, is expected to prove that a call * to this function cannot be re

  1   2   3   >