[PULL 32/35] util/bufferiszero: Optimize SSE2 and AVX2 variants

2024-04-08 Thread Richard Henderson
From: Alexander Monakov Increase unroll factor in SIMD loops from 4x to 8x in order to move their bottlenecks from ALU port contention to load issue rate (two loads per cycle on popular x86 implementations). Avoid using out-of-bounds pointers in loop boundary conditions. Follow SSE2 implementat

Re: [PATCH v2 14/18] memory-device: move stubs out of stubs/

2024-04-08 Thread Philippe Mathieu-Daudé
On 8/4/24 17:53, Paolo Bonzini wrote: Since the memory-device stubs are needed exactly when the Kconfig symbols are not needed, move them to hw/mem/. Signed-off-by: Paolo Bonzini --- stubs/memory_device.c => hw/mem/memory-device-stubs.c | 0 hw/mem/meson.build

Re: [PATCH-for-9.0 3/4] hw/char/virtio-serial-bus: Protect from DMA re-entrancy bugs

2024-04-08 Thread Philippe Mathieu-Daudé
On 8/4/24 17:20, Michael S. Tsirkin wrote: On Mon, Apr 08, 2024 at 01:04:11PM +0200, Philippe Mathieu-Daudé wrote: On 8/4/24 12:08, Michael S. Tsirkin wrote: On Mon, Apr 08, 2024 at 09:14:39AM +0200, Philippe Mathieu-Daudé wrote: On 4/4/24 21:13, Philippe Mathieu-Daudé wrote: Replace qemu_bh_

Re: [PATCH 1/2] Fix typo to allow migrate_qmp_fail command with 'channels' argument

2024-04-08 Thread Het Gala
On 08/04/24 9:05 pm, Peter Xu wrote: !---| CAUTION: External Email |---! Hey, Het, On Sun, Apr 07, 2024 at 01:21:24PM +, Het Gala wrote: Fixes: (tests/qtest/

Re: [PATCH 1/2] Fix typo to allow migrate_qmp_fail command with 'channels' argument

2024-04-08 Thread Peter Xu
Het, It's all fine, no worries! This is good enough. Let's finish the discussion in the next patch before a repost. Thanks, On Mon, Apr 8, 2024, 2:35 p.m. Het Gala wrote: > > On 08/04/24 9:05 pm, Peter Xu wrote: > > !---| > CAU

[PULL 1/3] Makefile: preserve --jobserver-auth argument when calling ninja

2024-04-08 Thread Paolo Bonzini
From: Martin Hundebøll Qemu wraps its call to ninja in a Makefile. Since ninja, as opposed to make, utilizes all CPU cores by default, the qemu Makefile translates the absense of a `-jN` argument into `-j1`. This breaks jobserver functionality, so update the -jN mangling to take the --jobserver-a

[PULL 3/3] kvm: error out of kvm_irqchip_add_msi_route() in case of full route table

2024-04-08 Thread Paolo Bonzini
From: Igor Mammedov subj is calling kvm_add_routing_entry() which simply extends KVMState::irq_routes::entries[] but doesn't check if number of routes goes beyond limit the kernel is willing to accept. Which later leads toi the assert qemu-kvm: ../accel/kvm/kvm-all.c:1833: kvm_irqchip_commit

[PULL 2/3] nanomips: fix warnings with GCC 14

2024-04-08 Thread Paolo Bonzini
GCC 14 shows -Wshadow=local warnings if an enum conflicts with a local variable (including a parameter). To avoid this, move the problematic enum and all of its dependencies after the hundreds of functions that have a parameter named "instruction". Reviewed-by: Richard Henderson Signed-off-by: P

[PULL 0/3] 9.0 bugfixes for 2024-04-08

2024-04-08 Thread Paolo Bonzini
The following changes since commit ce64e6224affb8b4e4b019f76d2950270b391af5: Merge tag 'qemu-sparc-20240404' of https://github.com/mcayland/qemu into staging (2024-04-04 15:28:06 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to

Re: Point where target instructions are read

2024-04-08 Thread Gautam Bhat
On Thu, Apr 4, 2024 at 2:23 PM Peter Maydell wrote: > This will not work (yet) -- CPUs do not get reset as part of the > whole-system three-phase-reset, so using the exit phase method > is not sufficient to avoid the reset ordering problem here. > > You need to use rom_ptr_for_as() to see if ther

Re: [PATCH 2/2] Call args->connect_channels to actually test multifd_tcp_channels_none qtest

2024-04-08 Thread Het Gala
On 08/04/24 9:10 pm, Peter Xu wrote: !---| CAUTION: External Email |---! On Sun, Apr 07, 2024 at 01:21:25PM +, Het Gala wrote: Earlier, without args->connect_

Re: [PATCH] Revert "hw/virtio: Add support for VDPA network simulation devices"

2024-04-08 Thread Paolo Bonzini
Il lun 8 apr 2024, 12:18 Michael S. Tsirkin ha scritto: > On Mon, Apr 08, 2024 at 10:51:57AM +0100, Peter Maydell wrote: > > On Mon, 8 Apr 2024 at 10:48, Michael S. Tsirkin wrote: > > > > > > This reverts commit cd341fd1ffded978b2aa0b5309b00be7c42e347c. > > > > > > The patch adds non-upstream co

Re: [PATCH] target/i386: fix direction of "32-bit MMU" test

2024-04-08 Thread Paolo Bonzini
Il ven 5 apr 2024, 19:30 Michael Tokarev ha scritto: > 01.04.2024 09:02, Michael Tokarev: > > > Anyone can guess why this rather trivial and obviously correct patch > causes segfaults > > in a few tests in staging-7.2 - when run in tcg mode, namely: > > > >pxe-test > >migration-test > >

Re: [PATCH] target/i386: fix direction of "32-bit MMU" test

2024-04-08 Thread Michael Tokarev
08.04.2024 23:12, Paolo Bonzini wrote: Il ven 5 apr 2024, 19:30 Michael Tokarev mailto:m...@tls.msk.ru>> ha scritto: It sigsegvs in probe_access_internal():    CPUTLBEntry *entry = tlb_entry(env, mmu_idx, addr); -- this one returns NULL, and next there's a call    tlb_add

Re: [PATCH v2] e1000: Convert debug macros into tracepoints.

2024-04-08 Thread Don Porter
On 4/3/24 2:44 PM, Austin Clements wrote: At this point there's not much of my original code left. :D Don, you're welcome to take the credit in the commit. Thanks Austin.  I'll send v3 with this change :) BTW, my attempt to include the appropriate maintainer from scripts/get_maintainer.pl (ja

[PATCH v3] e1000: Convert debug macros into tracepoints.

2024-04-08 Thread Don Porter
The E1000 debug messages are very useful for developing drivers. Make these available to users without recompiling QEMU. Signed-off-by: Austin Clements [geo...@ldpreload.com: Rebased on top of 2.9.0] Signed-off-by: Geoffrey Thomas Signed-off-by: Don Porter Reviewed-by: Richard Henderson --- h

[RFC PATCH-for-9.1 1/4] hw/i2c: Fix checkpatch block comment warnings

2024-04-08 Thread Philippe Mathieu-Daudé
We are going to modify these lines, fix their style in order to avoid checkpatch.pl warnings: WARNING: Block comments use a leading /* on a separate line WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Philippe Ma

[RFC PATCH-for-9.1 4/4] hw/i2c: Convert to spec v7 terminology (manually)

2024-04-08 Thread Philippe Mathieu-Daudé
See previous commit for rationale. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i2c/i2c.h | 52 ++-- hw/i2c/core.c| 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h index fa

[RFC PATCH-for-9.1 0/4] hw/i2c: Convert to spec v7 (inclusive) terminology

2024-04-08 Thread Philippe Mathieu-Daudé
Mechanical (mostly) conversion inspired by Wolfram [*] to use inclusive terminology, similarly to the other renames we did 3 years ago, shortly before the I2C spec v7 was published. Posted as RFC to get feedback, if no objection I plan to finish the conversion (SMBus and rest if hw/i2c/). [*] ht

[RFC PATCH-for-9.1 2/4] hw/i2c: Fix checkpatch line over 80 chars warnings

2024-04-08 Thread Philippe Mathieu-Daudé
We are going to modify these lines, fix their style in order to avoid checkpatch.pl warnings: WARNING: line over 80 characters Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i2c/i2c.h| 11 ++- include/hw/nvram/eeprom_at24c.h | 6 +- hw/arm/aspeed.c | 140 +

[RFC PATCH-for-9.1 3/4] hw/i2c: Convert to spec v7 terminology (automatically)

2024-04-08 Thread Philippe Mathieu-Daudé
One of the biggest change from I2C spec v6 -> v7 is: • Updated the terms "master/slave" to "controller/target" Since it follows the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*], replace the I2C terminology. Mechanical transformation running:

Re: [PATCH-for-9.0? 3/3] hw/block/nand: Fix out-of-bound access in NAND block buffer

2024-04-08 Thread Philippe Mathieu-Daudé
On 8/4/24 18:39, Richard Henderson wrote: On 4/7/24 22:36, Philippe Mathieu-Daudé wrote: nand_command() and nand_getio() don't check @offset points into the block, nor the available data length (s->iolen) is not negative. In order to fix: - check the offset is in range in nand_blk_load_NAND_PA

Re: [PATCH] Revert "hw/virtio: Add support for VDPA network simulation devices"

2024-04-08 Thread Michael S. Tsirkin
On Mon, Apr 08, 2024 at 10:11:18PM +0200, Paolo Bonzini wrote: > > > Il lun 8 apr 2024, 12:18 Michael S. Tsirkin ha scritto: > > On Mon, Apr 08, 2024 at 10:51:57AM +0100, Peter Maydell wrote: > > On Mon, 8 Apr 2024 at 10:48, Michael S. Tsirkin wrote: > > > > > > This reverts co

Re: [PATCH] hw/intc/riscv_aplic: APLICs should add child earlier than realize

2024-04-08 Thread Daniel Henrique Barboza
On 4/7/24 00:46, yang.zhang wrote: From: "yang.zhang" Since only root APLICs can have hw IRQ lines, aplic->parent should be initialized first. I think it's worth mentioning that, if we don't do that, there won't be an aplic->parent assigned during riscv_aplic_realize() and we won't create

[PATCH for-9.0] linux-user: Preserve unswapped siginfo_t for strace

2024-04-08 Thread Richard Henderson
Passing the tswapped structure to strace means that our internal si_type is also gone, which then aborts in print_siginfo. Fixes: 4d6d8a05a0a ("linux-user: Move tswap_siginfo out of target code") Signed-off-by: Richard Henderson --- linux-user/signal.c | 12 +--- 1 file changed, 9 insert

[PATCH] hw/intc/riscv_aplic: APLICs should add child earlier than realize

2024-04-08 Thread yang.zhang
From: "yang.zhang" Since only root APLICs can have hw IRQ lines, aplic->parent should be initialized first. Fixes: e8f79343cf ("hw/intc: Add RISC-V AIA APLIC device emulation") Reviewed-by: Daniel Henrique Barboza Signed-off-by: yang.zhang --- hw/intc/riscv_aplic.c | 8 1 file change

Re: [PATCH] Revert "hw/virtio: Add support for VDPA network simulation devices"

2024-04-08 Thread Jason Wang
On Mon, Apr 8, 2024 at 5:47 PM Michael S. Tsirkin wrote: > > This reverts commit cd341fd1ffded978b2aa0b5309b00be7c42e347c. > > The patch adds non-upstream code in > include/standard-headers/linux/virtio_pci.h > which would make maintainance harder. > > Revert for now. > > Suggested-by: Jason Wang

Re:Re: [PATCH] hw/intc/riscv_aplic: APLICs should add child earlier than realize

2024-04-08 Thread yang.zhang
At 2024-04-09 06:33:55, "Daniel Henrique Barboza" wrote: > > >On 4/7/24 00:46, yang.zhang wrote: >> From: "yang.zhang" >> >> Since only root APLICs can have hw IRQ lines, aplic->parent should >> be initialized first. > >I think it's worth mentioning that, if we don't do that, there won't be >a

Re: [PATCH-for-9.0?] backends/cryptodev: Do not abort for invalid session ID

2024-04-08 Thread zhenwei pi
Hi, VIRTIO_CRYPTO_INVSESS has a quite clear meaning: invalid session ID when executing crypto operations. Uplayer would get an explicit code once failing to close session, so I suggest no error log printing in this function. On 4/8/24 23:45, Philippe Mathieu-Daudé wrote: Instead of abortin

Re: [PATCH v8] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-04-08 Thread Shaoqin Huang
Hi Kevin, On 4/2/24 21:01, Kevin Wolf wrote: Maybe I'm wrong. So I want to double check with if the -cpu option support json format nowadays? As far as I can see, -cpu doesn't support JSON yet. But even if it did, your command line would be invalid because the 'host,' part isn't JSON. Thanks

Re: [PATCH v8] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-04-08 Thread Shaoqin Huang
Hi Eric, On 3/19/24 23:23, Eric Auger wrote: +if (kvm_supports_pmu_filter) { +assert_set_feature_str(qts, "host", "kvm-pmu-filter", ""); +assert_set_feature_str(qts, "host", "kvm-pmu-filter", + "A:0x11-0x11"); +assert_

[PATCH v9] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-04-08 Thread Shaoqin Huang
The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide which PMU events are provided to the guest. Add a new option `kvm-pmu-filter` as -cpu sub-option to set the PMU Event Filtering. Without the filter, all PMU events are exposed from host to guest by default. The usage of the n

RE: [PATCH v2 03/10] backends/iommufd: Introduce abstract HIODIOMMUFD device

2024-04-08 Thread Duan, Zhenzhong
Hi All, >-Original Message- >From: Duan, Zhenzhong >Subject: [PATCH v2 03/10] backends/iommufd: Introduce abstract >HIODIOMMUFD device > >HIODIOMMUFD represents a host IOMMU device under iommufd backend. > >Currently it includes only public iommufd handle and device id. >which could be us

Re: [PATCH 1/2] virtio-net: Fix vhost virtqueue notifiers for RSS

2024-04-08 Thread Jason Wang
On Mon, Apr 8, 2024 at 6:13 PM Michael S. Tsirkin wrote: > > On Tue, Mar 26, 2024 at 07:06:29PM +0900, Akihiko Odaki wrote: > > virtio_net_guest_notifier_pending() and virtio_net_guest_notifier_mask() > > checked VIRTIO_NET_F_MQ to know there are multiple queues, but > > VIRTIO_NET_F_RSS also enab

Re: [PATCH v2] vhost: don't set vring call if guest notifiers is not enabled

2024-04-08 Thread Jason Wang
On Mon, Apr 8, 2024 at 3:33 PM lyx634449800 wrote: > > When conducting performance testing using testpmd in the guest os, > it was observed that the performance was lower compared to the > scenario of direct vfio-pci usage. > > In the commit 96a3d98d2cdbd897ff5ab33427aa4cfb94077665, the author > p

[PATCH for-9.1 v2 00/28] linux-user/i386: Properly align signal frame

2024-04-08 Thread Richard Henderson
v1: https://lore.kernel.org/qemu-devel/20230524054647.1093758-1-richard.hender...@linaro.org/ But v1 isn't particularly complet or korrect. Disconnect fpstate from sigframe, just like the kernel does. Return the separate portions of the frame from get_sigframe. Alter all of the target fpu routin

[PATCH v2 19/28] linux-user/i386: Fix -mregparm=3 for signal delivery

2024-04-08 Thread Richard Henderson
Since v2.6.19, the kernel has supported -mregparm=3. Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index 559b63c25b..f8cc0cff07 100644 ---

[PATCH v2 28/28] target/i386: Pass host pointer and size to cpu_x86_{xsave, xrstor}

2024-04-08 Thread Richard Henderson
We have already validated the memory region in the course of validating the signal frame. No need to do it again within the helper function. In addition, return failure when the header contains invalid xstate_bv. The kernel handles this via exception handling within XSTATE_OP within xrstor_from_

[PATCH v2 09/28] tagret/i386: Convert do_fxsave, do_fxrstor to X86Access

2024-04-08 Thread Richard Henderson
Move the alignment fault from do_* to helper_*, as it need not apply to usage from within user-only signal handling. Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 84 1 file changed, 48 insertions(+), 36 deletions(-) diff --git a/target

[PATCH v2 14/28] target/i386: Add {hw, sw}_reserved to X86LegacyXSaveArea

2024-04-08 Thread Richard Henderson
This completes the 512 byte structure, allowing the union to be removed. Assert that the structure layout is as expected. Signed-off-by: Richard Henderson --- target/i386/cpu.h | 39 +-- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/target/i

[PATCH v2 11/28] target/i386: Convert do_xrstor_* to X86Access

2024-04-08 Thread Richard Henderson
The body of do_xrstor is now fully converted. Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 51 ++-- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 82a041f4bf.

[PATCH v2 06/28] target/i386: Convert do_fsave, do_frstor to X86Access

2024-04-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 60 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 25074af0ce..e6fa161aa0 100644 --- a/target/i386/tcg/fpu_he

[PATCH v2 15/28] linux-user/i386: Drop xfeatures_size from sigcontext arithmetic

2024-04-08 Thread Richard Henderson
This is subtracting sizeof(target_fpstate_fxsave) in TARGET_FXSAVE_SIZE, then adding it again via &fxsave->xfeatures. Perform the same computation using xstate_size alone. Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-)

[PATCH v2 07/28] target/i386: Convert do_xsave_{fpu, mxcr, sse} to X86Access

2024-04-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 52 +--- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index e6fa161aa0..643e017bef 100644 --- a/target/i386/tcg/fpu_he

[PATCH v2 04/28] target/i386: Convert do_fldenv to X86Access

2024-04-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index ad8b536cb5..28ae8100f6 100644 --- a/target/i386/tcg/fpu_helper.c

[PATCH v2 26/28] target/i386: Pass host pointer and size to cpu_x86_{fsave, frstor}

2024-04-08 Thread Richard Henderson
We have already validated the memory region in the course of validating the signal frame. No need to do it again within the helper function. Signed-off-by: Richard Henderson --- target/i386/cpu.h| 10 ++ linux-user/i386/signal.c | 4 ++-- target/i386/tcg/fpu_helper.c |

[PATCH v2 24/28] target/i386: Convert do_xsave to X86Access

2024-04-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 2 +- target/i386/tcg/fpu_helper.c | 72 +--- 2 files changed, 43 insertions(+), 31 deletions(-) diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index fd09c973d4..ba17d27219 1006

[PATCH v2 10/28] target/i386: Convert do_xsave_* to X86Access

2024-04-08 Thread Richard Henderson
The body of do_xsave is now fully converted. Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 47 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 23e22e4521..

[PATCH v2 02/28] target/i386: Convert do_fldt, do_fstt to X86Access

2024-04-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 44 +--- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 4b965a5d6c..878fad9795 100644 --- a/target/i386/tcg/fpu_he

[PATCH v2 05/28] target/i386: Convert do_fstenv to X86Access

2024-04-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 45 +++- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 28ae8100f6..25074af0ce 100644 --- a/target/i386/tcg/fpu_he

[PATCH v2 22/28] linux-user/i386: Fix allocation and alignment of fp state

2024-04-08 Thread Richard Henderson
For modern cpus, the kernel uses xsave to store all extra cpu state across the signal handler. For xsave/xrstor to work, the pointer must be 64 byte aligned. Moreover, the regular part of the signal frame must be 16 byte aligned. Attempt to mirror the kernel code as much as possible. Use enum FP

[PATCH v2 25/28] target/i386: Convert do_xrstor to X86Access

2024-04-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 106 +-- 1 file changed, 64 insertions(+), 42 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index d4dd09dc95..909da05f91 100644 --- a/target/i386/tcg/fpu_he

[PATCH v2 08/28] target/i386: Convert do_xrstor_{fpu, mxcr, sse} to X86Access

2024-04-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 46 ++-- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 643e017bef..59f73ad075 100644 --- a/target/i386/tcg/fpu_he

[PATCH v2 13/28] target/i386: Add rbfm argument to cpu_x86_{xsave, xrstor}

2024-04-08 Thread Richard Henderson
For now, continue to pass all 1's from signal.c. Signed-off-by: Richard Henderson --- target/i386/cpu.h| 4 ++-- linux-user/i386/signal.c | 4 ++-- target/i386/tcg/fpu_helper.c | 8 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target/i386/cpu.h b/target

[PATCH v2 03/28] target/i386: Convert helper_{fbld, fbst}_ST0 to X86Access

2024-04-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 878fad9795..ad8b536cb5 100644 --- a/target/i386/tcg/fpu_helper.c +++

[PATCH v2 12/28] target/i386: Split out do_xsave_chk

2024-04-08 Thread Richard Henderson
This path is not required by user-only, and can in fact be shared between xsave and xrstor. Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 51 +++- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/target/i386/tcg/fpu_helper.c b/

[PATCH v2 16/28] linux-user/i386: Remove xfeatures from target_fpstate_fxsave

2024-04-08 Thread Richard Henderson
This is easily computed by advancing past the structure. At the same time, replace the magic number "64". Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index

[PATCH v2 23/28] target/i386: Honor xfeatures in xrstor_sigcontext

2024-04-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index d015fe520a..fd09c973d4 100644 --- a/linux-user/i386/signal.c +++ b/linux-user/i386/signal

[PATCH v2 20/28] linux-user/i386: Return boolean success from restore_sigcontext

2024-04-08 Thread Richard Henderson
Invert the sense of the return value and use bool. Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 51 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index f8cc0cff07..15

[PATCH v2 21/28] linux-user/i386: Return boolean success from xrstor_sigcontext

2024-04-08 Thread Richard Henderson
Invert the sense of the return value and use bool. Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index 1571ff8553..d600a4355b 100644 --- a/linu

[PATCH v2 27/28] target/i386: Pass host pointer and size to cpu_x86_{fxsave, fxrstor}

2024-04-08 Thread Richard Henderson
We have already validated the memory region in the course of validating the signal frame. No need to do it again within the helper function. Signed-off-by: Richard Henderson --- target/i386/cpu.h| 4 ++-- linux-user/i386/signal.c | 13 + target/i386/tcg/fpu_helper.c

[PATCH v2 18/28] linux-user/i386: Split out struct target_fregs_state

2024-04-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 43 +++- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index ed98b4d073..559b63c25b 100644 --- a/linux-user/i386/signal.c +++ b

[PATCH v2 17/28] linux-user/i386: Replace target_fpstate_fxsave with X86LegacyXSaveArea

2024-04-08 Thread Richard Henderson
Use the structure definition from target/i386/cpu.h. The only minor quirk is re-casting the sw_reserved area to the OS specific struct target_fpx_sw_bytes. Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 71 +++- 1 file changed, 26 insertions(+

[PATCH v2 01/28] target/i386: Add tcg/access.[ch]

2024-04-08 Thread Richard Henderson
Provide a method to amortize page lookup across large blocks. Signed-off-by: Richard Henderson --- target/i386/tcg/access.h| 40 + target/i386/tcg/access.c| 160 target/i386/tcg/meson.build | 1 + 3 files changed, 201 insertions(+) create

Re: [PATCH v4] hw/virtio: Fix packed virtqueue flush used_idx

2024-04-08 Thread Wafer
On 4/9/24 1:32 Eugenio Perez Martin wrote: > > External Mail: This email originated from OUTSIDE of the organization! > Do not click links, open attachments or provide ANY information unless you > recognize the sender and know the content is safe. > > > On Sun, Apr 7, 2024 at 3:56 AM Wafer wro

Re: [PATCH v9] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-04-08 Thread Thomas Huth
On 09/04/2024 04.49, Shaoqin Huang wrote: The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide which PMU events are provided to the guest. Add a new option `kvm-pmu-filter` as -cpu sub-option to set the PMU Event Filtering. Without the filter, all PMU events are exposed from

Re: [PATCH v5 1/2] nbd/server: do not poll within a coroutine context

2024-04-08 Thread Vladimir Sementsov-Ogievskiy
On 08.04.24 19:00, Eric Blake wrote: From: Zhu Yangyang Coroutines are not supposed to block. Instead, they should yield. The client performs TLS upgrade outside of an AIOContext, during synchronous handshake; this still requires g_main_loop. But the server responds to TLS upgrade inside a cor

Re: [PATCH] virtio-iommu: Do not process commands with bad size

2024-04-08 Thread Michael S. Tsirkin
On Thu, Apr 04, 2024 at 02:45:05PM +0200, Zheyu Ma wrote: > The device should not handle the commands which have bad request/reply > size, it should just report the error instead of raising an assertation. > > Signed-off-by: Zheyu Ma This fails test for cross-i686-tci https://gitlab.com/mstred

Re: [PATCH v3 0/3] target/riscv: Support Zve32x and Zve64x extensions

2024-04-08 Thread Jason Chien
Ping. Jason Chien 於 2024年3月28日 週四 上午10:23寫道: > This patch series adds the support for Zve32x and Zvx64x and makes vector > registers visible in GDB if any of the V/Zve*/Zvk* extensions is enabled. > > v2: > Rebase onto riscv-to-apply.next (commit 385e575). > v3: > Spuash patch 2 into pat

Re: [PATCH v3 3/3] target/riscv: Relax vector register check in RISCV gdbstub

2024-04-08 Thread Jason Chien
Ping. Jason Chien 於 2024年3月28日 週四 上午10:24寫道: > In current implementation, the gdbstub allows reading vector registers > only if V extension is supported. However, all vector extensions and > vector crypto extensions have the vector registers and they all depend > on Zve32x. The gdbstub should ch

Re: [PATCH v5 2/2] nbd/server: Mark negotiation functions as coroutine_fn

2024-04-08 Thread Vladimir Sementsov-Ogievskiy
On 08.04.24 19:00, Eric Blake wrote: nbd_negotiate() is already marked coroutine_fn. And given the fix in the previous patch to have nbd_negotiate_handle_starttls not create and wait on a g_main_loop (as that would violate coroutine constraints), it is worth marking the rest of the related stati

Re: [PATCH 1/1] virtio-net: fix bug 1451 aka "assert(!virtio_net_get_subqueue(nc)->async_tx.elem);"

2024-04-08 Thread Michael S. Tsirkin
On Fri, Apr 05, 2024 at 02:20:15PM +0300, Alexey Dobriyan wrote: > Don't send zero length packets in virtio_net_flush_tx(). > > Reproducer from https://gitlab.com/qemu-project/qemu/-/issues/1451 > creates small packet (1 segment, len = 10 == n->guest_hdr_len), > destroys queue. > > "if (n->host_h

Re: [PATCH 1/1] virtio-net: fix bug 1451 aka "assert(!virtio_net_get_subqueue(nc)->async_tx.elem);"

2024-04-08 Thread Michael S. Tsirkin
On Fri, Apr 05, 2024 at 02:20:15PM +0300, Alexey Dobriyan wrote: > Don't send zero length packets in virtio_net_flush_tx(). > > Reproducer from https://gitlab.com/qemu-project/qemu/-/issues/1451 > creates small packet (1 segment, len = 10 == n->guest_hdr_len), > destroys queue. > > "if (n->host_h

<    1   2   3