Re: [PULL 00/14] Accel / SH4 / UI patches for 2024-05-03

2024-05-03 Thread Richard Henderson
/philmd/qemu.git tags/accel-sh4-ui-20240503 for you to fetch changes up to 2d27c91e2b72ac7a65504ac207c89262d92464eb: ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs (2024-05-03 17:33:26 +0200) - Fix NULL dereference

Re: [PATCH V8 6/8] physmem: Add helper function to destroy CPU AddressSpace

2024-05-03 Thread Salil Mehta
Hi Zhukeqian, On Fri, Mar 15, 2024 at 1:17 AM zhukeqian wrote: > Hi Salil, > > [...] > > +void cpu_address_space_destroy(CPUState *cpu, int asidx) { > +CPUAddressSpace *cpuas; > + > +assert(cpu->cpu_ases); > +assert(asidx >= 0 && asidx < cpu->num_ases); > +/* KVM cannot

Re: [PATCH 0/3] testing/next: s390x gitlab updates

2024-05-03 Thread Richard Henderson
On 4/26/24 08:39, Alex Bennée wrote: I was asked to update the custom gitlab runner from the aging 20.04 to 22.04 which has been done. However I needed to update the provisioning scripts and clean-up some of the cruft. Sadly this doesn't seem to be passing cleanly as we have: -

Re: [PATCH 7/9] monitor: fdset: Match against O_DIRECT

2024-05-03 Thread Peter Xu
On Fri, May 03, 2024 at 06:19:30PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Fri, Apr 26, 2024 at 11:20:40AM -0300, Fabiano Rosas wrote: > >> We're about to enable the use of O_DIRECT in the migration code and > >> due to the alignment restrictions imposed by filesystems we need to

Re: [PATCH 2/9] migration: Fix file migration with fdset

2024-05-03 Thread Peter Xu
On Fri, May 03, 2024 at 06:31:06PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Fri, May 03, 2024 at 04:56:08PM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Fri, Apr 26, 2024 at 11:20:35AM -0300, Fabiano Rosas wrote: > >> >> When the migration using the "file:"

Re: [PULL 00/10] bufferiszero improvements

2024-05-03 Thread Richard Henderson
/rth7680/qemu.git tags/pull-misc-20240503 for you to fetch changes up to a06d9eddb015a9f5895161b0a3958a2e4be21579: tests/bench: Add bufferiszero-bench (2024-05-03 08:03:35 -0700) util/bufferiszero: - Remove sse4.1 and avx512

Re: [PATCH v3 07/11] hw/sh4/r2d: Realize IDE controller before accessing it

2024-05-03 Thread Guenter Roeck
Hi, On Thu, Feb 08, 2024 at 07:12:40PM +0100, Philippe Mathieu-Daudé wrote: > We should not wire IRQs on unrealized device. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Peter Maydell > Reviewed-by: Yoshinori Sato qemu 9.0 fails to boot Linux from ide/ata drives with the sh4 and

Re: [PATCH 2/9] migration: Fix file migration with fdset

2024-05-03 Thread Fabiano Rosas
Peter Xu writes: > On Fri, May 03, 2024 at 04:56:08PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Fri, Apr 26, 2024 at 11:20:35AM -0300, Fabiano Rosas wrote: >> >> When the migration using the "file:" URI was implemented, I don't >> >> think any of us noticed that if you pass in

Re: [PATCH 6/9] tests/qtest/migration: Add tests for file migration with direct-io

2024-05-03 Thread Peter Xu
On Fri, May 03, 2024 at 06:05:19PM -0300, Fabiano Rosas wrote: > >> +#ifdef O_DIRECT > >> +static void *migrate_mapped_ram_dio_start(QTestState *from, > >> + QTestState *to) > >> +{ > >> +migrate_mapped_ram_start(from, to); > > > > This line

Re: [PATCH 7/9] monitor: fdset: Match against O_DIRECT

2024-05-03 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Apr 26, 2024 at 11:20:40AM -0300, Fabiano Rosas wrote: >> We're about to enable the use of O_DIRECT in the migration code and >> due to the alignment restrictions imposed by filesystems we need to >> make sure the flag is only used when doing aligned IO. >> >> The

Re: [PATCH 5/9] migration/multifd: Add direct-io support

2024-05-03 Thread Peter Xu
On Fri, May 03, 2024 at 05:54:28PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Fri, Apr 26, 2024 at 11:20:38AM -0300, Fabiano Rosas wrote: > >> When multifd is used along with mapped-ram, we can take benefit of a > >> filesystem that supports the O_DIRECT flag and perform direct I/O

Re: [PATCH 4/9] migration: Add direct-io parameter

2024-05-03 Thread Peter Xu
On Fri, May 03, 2024 at 05:49:32PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Fri, Apr 26, 2024 at 11:20:37AM -0300, Fabiano Rosas wrote: > >> Add the direct-io migration parameter that tells the migration code to > >> use O_DIRECT when opening the migration stream file whenever

[PATCH] hw/nvme: fix number of PIDs for FDP RUH update

2024-05-03 Thread Vincent Fu
The number of PIDs is in the upper 16 bits of cdw10. So we need to right-shift by 16 bits instead of only a single bit. Signed-off-by: Vincent Fu --- hw/nvme/ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 127c3d2383..e89f9f7808

Re: [PATCH 3/9] tests/qtest/migration: Fix file migration offset check

2024-05-03 Thread Peter Xu
On Fri, May 03, 2024 at 05:36:59PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Fri, Apr 26, 2024 at 11:20:36AM -0300, Fabiano Rosas wrote: > >> When doing file migration, QEMU accepts an offset that should be > >> skipped when writing the migration stream to the file. The purpose of

Re: [PATCH 6/9] tests/qtest/migration: Add tests for file migration with direct-io

2024-05-03 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Apr 26, 2024 at 11:20:39AM -0300, Fabiano Rosas wrote: >> The tests are only allowed to run in systems that know about the >> O_DIRECT flag and in filesystems which support it. >> >> Signed-off-by: Fabiano Rosas > > Mostly: > > Reviewed-by: Peter Xu > > Two trivial

Re: [PATCH 2/9] migration: Fix file migration with fdset

2024-05-03 Thread Peter Xu
On Fri, May 03, 2024 at 04:56:08PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Fri, Apr 26, 2024 at 11:20:35AM -0300, Fabiano Rosas wrote: > >> When the migration using the "file:" URI was implemented, I don't > >> think any of us noticed that if you pass in a file name with the > >>

Re: [PATCH 5/9] migration/multifd: Add direct-io support

2024-05-03 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Apr 26, 2024 at 11:20:38AM -0300, Fabiano Rosas wrote: >> When multifd is used along with mapped-ram, we can take benefit of a >> filesystem that supports the O_DIRECT flag and perform direct I/O in >> the multifd threads. This brings a significant performance

Re: [PATCH 4/9] migration: Add direct-io parameter

2024-05-03 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Apr 26, 2024 at 11:20:37AM -0300, Fabiano Rosas wrote: >> Add the direct-io migration parameter that tells the migration code to >> use O_DIRECT when opening the migration stream file whenever possible. >> >> This is currently only used with the mapped-ram migration

Re: [PATCH 3/9] tests/qtest/migration: Fix file migration offset check

2024-05-03 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Apr 26, 2024 at 11:20:36AM -0300, Fabiano Rosas wrote: >> When doing file migration, QEMU accepts an offset that should be >> skipped when writing the migration stream to the file. The purpose of >> the offset is to allow the management layer to put its own metadata at

RE: [PATCH V8 3/8] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2024-05-03 Thread Salil Mehta via
Hi Vishnu, > From: Vishnu Pajjuri > Sent: Thursday, April 4, 2024 3:01 PM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org > > Hi Salil, >> On 12-03-2024 07:29, Salil Mehta wrote: >> ACPI GED (as described in the ACPI 6.4 spec) uses an interrupt listed in the >> _CRS

Re: More doc updates needed for new migrate argument @channels

2024-05-03 Thread Fabiano Rosas
Peter Xu writes: > On Fri, May 03, 2024 at 09:13:27AM -0400, Steven Sistare wrote: >> On 5/3/2024 8:49 AM, Fabiano Rosas wrote: >> > Markus Armbruster writes: >> > >> > > Commit 074dbce5fcce (migration: New migrate and migrate-incoming >> > > argument 'channels') and its fixup commit

RE: [PATCH V8 3/8] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2024-05-03 Thread Salil Mehta via
Hello, Sorry, I missed this earlier. > From: Zhao Liu > Sent: Wednesday, March 13, 2024 6:14 AM > To: Salil Mehta > > Hi Salil, > > It seems my comment [1] in v7 was missed, but I still hit the same issue. Pls > let me paste the previous comment here again. > > [1]:

Re: [PATCH] tests/avocado: update sunxi kernel from armbian to 6.6.16

2024-05-03 Thread Niek Linnenbank
On Tue, Apr 30, 2024 at 4:12 PM Peter Maydell wrote: > On Mon, 29 Apr 2024 at 21:40, Niek Linnenbank > wrote: > > > > Hi Peter, Strahinja, > > > > I can confirm that the orangepi-pc and cubieboard based tests are > working OK using the newer kernel 6.6.16: > > > > $

Re: [PATCH 2/9] migration: Fix file migration with fdset

2024-05-03 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Apr 26, 2024 at 11:20:35AM -0300, Fabiano Rosas wrote: >> When the migration using the "file:" URI was implemented, I don't >> think any of us noticed that if you pass in a file name with the >> format "/dev/fdset/N", this allows a file descriptor to be passed in >> to

RE: [PATCH V8 7/8] gdbstub: Add helper function to unregister GDB register space

2024-05-03 Thread Salil Mehta via
Hi Vishnu, Sorry for the delay in reply. Still catching up. > From: Vishnu Pajjuri > Sent: Thursday, April 4, 2024 3:02 PM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org > > Hi Salil, > On 12-03-2024 07:29, Salil Mehta wrote: >> Add common function to help unregister

Re: [PATCH v2 7/7] target/sparc: Split out do_ms16b

2024-05-03 Thread Philippe Mathieu-Daudé
On 3/5/24 21:11, Philippe Mathieu-Daudé wrote: On 2/5/24 18:55, Richard Henderson wrote: The unit operation for fmul8x16 and friends is described in the manual as "MS16b".  Split that out for clarity.  Improve rounding with an unconditional addition of 0.5 as a fixed-point integer.

Re: More doc updates needed for new migrate argument @channels

2024-05-03 Thread Peter Xu
On Fri, May 03, 2024 at 09:13:27AM -0400, Steven Sistare wrote: > On 5/3/2024 8:49 AM, Fabiano Rosas wrote: > > Markus Armbruster writes: > > > > > Commit 074dbce5fcce (migration: New migrate and migrate-incoming > > > argument 'channels') and its fixup commit 57fd4b4e1075 made command > > >

Re: [PATCH v2 7/7] target/sparc: Split out do_ms16b

2024-05-03 Thread Philippe Mathieu-Daudé
On 2/5/24 18:55, Richard Henderson wrote: The unit operation for fmul8x16 and friends is described in the manual as "MS16b". Split that out for clarity. Improve rounding with an unconditional addition of 0.5 as a fixed-point integer. Signed-off-by: Richard Henderson ---

RE: [PATCH V8 1/8] accel/kvm: Extract common KVM vCPU {creation, parking} code

2024-05-03 Thread Salil Mehta via
Hello, Just replied to your other thread just now. Sorry catching everything late. Thanks > From: Harsh Prateek Bora > Sent: Tuesday, April 23, 2024 7:44 AM > > + Nick > > Hi Salil, > I have posted a patch [1] for ppc which based on this refactoring patch. > I see there were some

Re: [PATCH 7/9] monitor: fdset: Match against O_DIRECT

2024-05-03 Thread Peter Xu
On Fri, Apr 26, 2024 at 11:20:40AM -0300, Fabiano Rosas wrote: > We're about to enable the use of O_DIRECT in the migration code and > due to the alignment restrictions imposed by filesystems we need to > make sure the flag is only used when doing aligned IO. > > The migration will do parallel IO

RE: [PATCH V8 1/8] accel/kvm: Extract common KVM vCPU {creation, parking} code

2024-05-03 Thread Salil Mehta via
Hi Harsh, Sorry for the delay in my reply. I've been off the grid for some time so missed this earlier mail. Please find my reply below to you query. Thanks > From: Harsh Prateek Bora > Sent: Friday, March 22, 2024 8:15 AM > > + Vaibhav, Shiva > > Hi Salil, > > I came across your

Re: [PATCH 6/9] tests/qtest/migration: Add tests for file migration with direct-io

2024-05-03 Thread Peter Xu
On Fri, Apr 26, 2024 at 11:20:39AM -0300, Fabiano Rosas wrote: > The tests are only allowed to run in systems that know about the > O_DIRECT flag and in filesystems which support it. > > Signed-off-by: Fabiano Rosas Mostly: Reviewed-by: Peter Xu Two trivial comments below. > --- >

Re: [PATCH v2 2/7] target/sparc: Fix FEXPAND

2024-05-03 Thread Philippe Mathieu-Daudé
On 2/5/24 18:55, Richard Henderson wrote: This is a 2-operand instruction, not 3-operand. Worse, we took the source from the wrong operand. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 2 +- target/sparc/insns.decode | 2 +- target/sparc/translate.c | 20

Re: [PATCH v2 4/7] target/sparc: Fix FMUL8x16A{U,L}

2024-05-03 Thread Philippe Mathieu-Daudé
On 2/5/24 18:55, Richard Henderson wrote: These instructions have f32 inputs, which changes the decode of the register numbers. While we're fixing things, use a common helper for both insns, extracting the 16-bit scalar in tcg beforehand. Signed-off-by: Richard Henderson ---

Re: [PATCH v2 3/7] target/sparc: Fix FMUL8x16

2024-05-03 Thread Philippe Mathieu-Daudé
On 2/5/24 18:55, Richard Henderson wrote: This instruction has f32 as source1, which alters the decoding of the register number, which means we've been passing the wrong data for odd register numbers. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 2 +-

Re: [PATCH 5/9] migration/multifd: Add direct-io support

2024-05-03 Thread Peter Xu
On Fri, Apr 26, 2024 at 11:20:38AM -0300, Fabiano Rosas wrote: > When multifd is used along with mapped-ram, we can take benefit of a > filesystem that supports the O_DIRECT flag and perform direct I/O in > the multifd threads. This brings a significant performance improvement > because direct-io

Re: [PATCH v2 6/7] target/sparc: Fix FPMERGE

2024-05-03 Thread Philippe Mathieu-Daudé
On 2/5/24 18:55, Richard Henderson wrote: This instruction has f32 inputs, which changes the decode of the register numbers. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 2 +- target/sparc/translate.c | 2 +- target/sparc/vis_helper.c | 27 ++-

Re: [PATCH V8 1/8] accel/kvm: Extract common KVM vCPU {creation,parking} code

2024-05-03 Thread Philippe Mathieu-Daudé
On 3/5/24 17:57, Salil Mehta wrote: Hi Philippe, From: Philippe Mathieu-Daudé Sent: Friday, May 3, 2024 10:40 AM Subject: Re: [PATCH V8 1/8] accel/kvm: Extract common KVM vCPU {creation,parking} code Hi Salil, On 12/3/24 02:59, Salil Mehta wrote: > KVM vCPU creation is

Re: [PATCH v2 0/7] target/sparc: vis fixes

2024-05-03 Thread Philippe Mathieu-Daudé
On 2/5/24 18:55, Richard Henderson wrote: Split out from my vis4 patch set, with just the bug fixes. I've fixed the issue in patch 6, as noticed by Mark, but include the follow-up that cleans up all of the macros by removing them. r~ Richard Henderson (7): linux-user/sparc: Add more hwcap

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-03 Thread Dorjoy Chowdhury
On Fri, May 3, 2024 at 10:28 PM Peter Maydell wrote: > > On Fri, 19 Apr 2024 at 19:31, Dorjoy Chowdhury wrote: > > > > Some ARM CPUs advertise themselves as SMT by having the MT[24] bit set > > to 1 in the MPIDR register. These CPUs have the thread id in Aff0[7:0] > > bits, CPU id in Aff1[15:8]

Re: [PATCH 4/9] migration: Add direct-io parameter

2024-05-03 Thread Peter Xu
On Fri, Apr 26, 2024 at 11:20:37AM -0300, Fabiano Rosas wrote: > Add the direct-io migration parameter that tells the migration code to > use O_DIRECT when opening the migration stream file whenever possible. > > This is currently only used with the mapped-ram migration that has a > clear window

Re: [PATCH] qga/commands-posix: fix typo in qmp_guest_set_user_password

2024-05-03 Thread Philippe Mathieu-Daudé
On 3/5/24 19:13, Paolo Bonzini wrote: qga/commands-posix.c does not compile on FreeBSD due to a confusion between "chpasswdata" (wrong) and "chpasswddata" (used in the #else branch). Fixes: 0e5b75a390 ("qga/commands-posix: qmp_guest_set_user_password: use ga_run_command helper")

[PATCH v3] target/i386: Fix CPUID encoding of Fn8000001E_ECX

2024-05-03 Thread Babu Moger
Observed the following failure while booting the SEV-SNP guest and the guest fails to boot with the smp parameters: "-smp 192,sockets=1,dies=12,cores=8,threads=2". qemu-system-x86_64: sev_snp_launch_update: SNP_LAUNCH_UPDATE ret=-5 fw_error=22 'Invalid parameter' qemu-system-x86_64: SEV-SNP:

Re: [PATCH v2 5/5] monitor: use aio_co_reschedule_self()

2024-05-03 Thread Kevin Wolf
Am 06.02.2024 um 20:06 hat Stefan Hajnoczi geschrieben: > The aio_co_reschedule_self() API is designed to avoid the race > condition between scheduling the coroutine in another AioContext and > yielding. > > The QMP dispatch code uses the open-coded version that appears > susceptible to the race

Re: [PATCH] qga/commands-posix: fix typo in qmp_guest_set_user_password

2024-05-03 Thread Thomas Huth
On 03/05/2024 19.13, Paolo Bonzini wrote: qga/commands-posix.c does not compile on FreeBSD due to a confusion between "chpasswdata" (wrong) and "chpasswddata" (used in the #else branch). Signed-off-by: Paolo Bonzini --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] qga/commands-posix: fix typo in qmp_guest_set_user_password

2024-05-03 Thread Paolo Bonzini
qga/commands-posix.c does not compile on FreeBSD due to a confusion between "chpasswdata" (wrong) and "chpasswddata" (used in the #else branch). Signed-off-by: Paolo Bonzini --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-posix.c

[PATCH v6] Hexagon: add PC alignment check and exception

2024-05-03 Thread Matheus Tavares Bernardino
The Hexagon Programmer's Reference Manual says that the exception 0x1e should be raised upon an unaligned program counter. Let's implement that and also add some tests. Signed-off-by: Matheus Tavares Bernardino Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- Changes in v6: - The

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-03 Thread Dorjoy Chowdhury
On Fri, May 3, 2024 at 10:28 PM Peter Maydell wrote: > > On Fri, 19 Apr 2024 at 19:31, Dorjoy Chowdhury wrote: > > > > Some ARM CPUs advertise themselves as SMT by having the MT[24] bit set > > to 1 in the MPIDR register. These CPUs have the thread id in Aff0[7:0] > > bits, CPU id in Aff1[15:8]

Re: [PATCH 3/9] tests/qtest/migration: Fix file migration offset check

2024-05-03 Thread Peter Xu
On Fri, Apr 26, 2024 at 11:20:36AM -0300, Fabiano Rosas wrote: > When doing file migration, QEMU accepts an offset that should be > skipped when writing the migration stream to the file. The purpose of > the offset is to allow the management layer to put its own metadata at > the start of the

Re: [PATCH v5] xlnx_dpdma: fix descriptor endianness bug

2024-05-03 Thread Peter Maydell
On Thu, 2 May 2024 at 15:16, Alexandra Diupina wrote: > > Add xlnx_dpdma_read_descriptor() and > xlnx_dpdma_write_descriptor() functions. > xlnx_dpdma_read_descriptor() combines reading a > descriptor from desc_addr by calling dma_memory_read() > and swapping the desc fields from guest memory

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-03 Thread Peter Maydell
On Fri, 19 Apr 2024 at 19:31, Dorjoy Chowdhury wrote: > > Some ARM CPUs advertise themselves as SMT by having the MT[24] bit set > to 1 in the MPIDR register. These CPUs have the thread id in Aff0[7:0] > bits, CPU id in Aff1[15:8] bits and cluster id in Aff2[23:16] bits in > MPIDR. > > On the

RE: [PATCH V8 1/8] accel/kvm: Extract common KVM vCPU {creation,parking} code

2024-05-03 Thread Salil Mehta via
Hi Vishnu, > From: Vishnu Pajjuri > Sent: Thursday, April 4, 2024 3:00 PM > Subject: Re: [PATCH V8 1/8] accel/kvm: Extract common KVM vCPU > {creation,parking} code > > Hi Salil, >> On 12-03-2024 07:29, Salil Mehta wrote: >> KVM vCPU creation is done once during the vCPU realization

Re: [PATCH 2/9] migration: Fix file migration with fdset

2024-05-03 Thread Peter Xu
On Fri, Apr 26, 2024 at 11:20:35AM -0300, Fabiano Rosas wrote: > When the migration using the "file:" URI was implemented, I don't > think any of us noticed that if you pass in a file name with the > format "/dev/fdset/N", this allows a file descriptor to be passed in > to QEMU and that behaves

Re: [PATCH 1/9] monitor: Honor QMP request for fd removal immediately

2024-05-03 Thread Peter Xu
On Fri, Apr 26, 2024 at 11:20:34AM -0300, Fabiano Rosas wrote: > We're enabling using the fdset interface to pass file descriptors for > use in the migration code. Since migrations can happen more than once > during the VMs lifetime, we need a way to remove an fd from the fdset > at the end of

RE: [PATCH V8 1/8] accel/kvm: Extract common KVM vCPU {creation,parking} code

2024-05-03 Thread Salil Mehta via
Hi Philippe, > From: Philippe Mathieu-Daudé > Sent: Friday, May 3, 2024 10:40 AM > Subject: Re: [PATCH V8 1/8] accel/kvm: Extract common KVM vCPU > {creation,parking} code > > Hi Salil, > > On 12/3/24 02:59, Salil Mehta wrote: > > KVM vCPU creation is done once during the vCPU

[PULL 13/14] target/sh4: Rename TCGv variables as manual for SUBV opcode

2024-05-03 Thread Philippe Mathieu-Daudé
To easily compare with the SH4 manual, rename: REG(B11_8) -> Rn REG(B7_4) -> Rm t0 -> result Mention how underflow is calculated. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240430163125.77430-5-phi...@linaro.org> --- target/sh4/translate.c | 16

[PULL 12/14] target/sh4: Rename TCGv variables as manual for ADDV opcode

2024-05-03 Thread Philippe Mathieu-Daudé
To easily compare with the SH4 manual, rename: REG(B11_8) -> Rn REG(B7_4) -> Rm t0 -> result Mention how overflow is calculated. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Yoshinori Sato Message-Id: <20240430163125.77430-4-phi...@linaro.org> ---

[PULL 08/14] plugins: Update stale comment

2024-05-03 Thread Philippe Mathieu-Daudé
"plugin_mask" was renamed as "event_mask" in commit c006147122 ("plugins: create CPUPluginState and migrate plugin_mask"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240427155714.53669-3-phi...@linaro.org> --- plugins/core.c | 2 +- 1 file changed, 1

[PULL 07/14] plugins/api: Only include 'exec/ram_addr.h' with system emulation

2024-05-03 Thread Philippe Mathieu-Daudé
"exec/ram_addr.h" shouldn't be used with user emulation. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Richard Henderson Message-Id: <20240427155714.53669-4-phi...@linaro.org> --- plugins/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/api.c b/plugins/api.c

[PULL 05/14] user: Move 'thunk.h' from 'exec/user' to 'user'

2024-05-03 Thread Philippe Mathieu-Daudé
Keep all user emulation headers under the same user/ directory. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240428221450.26460-2-phi...@linaro.org> --- MAINTAINERS | 1 - bsd-user/qemu.h | 2 +- include/{exec =>

[PULL 11/14] target/sh4: Fix SUBV opcode

2024-05-03 Thread Philippe Mathieu-Daudé
The documentation says: SUBV Rm, RnRn - Rm -> Rn, underflow -> T The overflow / underflow can be calculated as: T = ((Rn ^ Rm) & (Result ^ Rn)) >> 31 However we were using the incorrect: T = ((Rn ^ Rm) & (Result ^ Rm)) >> 31 Fix by using the Rn register instead of Rm. Add

[PULL 14/14] ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs

2024-05-03 Thread Philippe Mathieu-Daudé
From: Peter Maydell We only support the most recent two versions of macOS (currently macOS 13 Ventura and macOS 14 Sonoma), and our ui/cocoa.m code already assumes at least macOS 12 Monterey or better, because it uses NSScreen safeAreaInsets, which is 12.0-or-newer. Remove the ifdefs that were

[PULL 09/14] MAINTAINERS: Update my email address

2024-05-03 Thread Philippe Mathieu-Daudé
From: Anthony PERARD Signed-off-by: Anthony PERARD Acked-by: Paul Durrant Acked-by: Stefano Stabellini Message-ID: <20240429154938.19340-1-anthony.per...@citrix.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL 04/14] user: Move 'abitypes.h' from 'exec/user' to 'user'

2024-05-03 Thread Philippe Mathieu-Daudé
Keep all user emulation headers under the same user/ directory. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240503125202.35667-1-phi...@linaro.org> --- bsd-user/qemu.h| 2 +- include/exec/cpu-all.h | 2 +-

[PULL 10/14] target/sh4: Fix ADDV opcode

2024-05-03 Thread Philippe Mathieu-Daudé
The documentation says: ADDV Rm, RnRn + Rm -> Rn, overflow -> T But QEMU implementation was: ADDV Rm, RnRn + Rm -> Rm, overflow -> T Fix by filling the correct Rm register. Add tests provided by Paul Cercueil. Cc: qemu-sta...@nongnu.org Fixes: ad8d25a11f ("target-sh4:

[PULL 03/14] exec: Include missing license in 'exec/cpu-common.h'

2024-05-03 Thread Philippe Mathieu-Daudé
Commit 1ad2134f91 ("Hardware convenience library") extracted "cpu-common.h" from "cpu-all.h", which uses the LGPL-2.1+ license. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240427155714.53669-5-phi...@linaro.org> --- include/exec/cpu-common.h | 9

[PULL 06/14] coverity: Update user emulation regexp

2024-05-03 Thread Philippe Mathieu-Daudé
All user emulation headers are now under include/user/. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240428221450.26460-3-phi...@linaro.org> --- scripts/coverity-scan/COMPONENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL 02/14] accel/whpx: Fix NULL dereference in whpx_init_vcpu()

2024-05-03 Thread Philippe Mathieu-Daudé
When mechanically moving the @dirty field to AccelCPUState in commit 9ad49538c7, we neglected cpu->accel is still NULL when we want to dereference it. Fixes: 9ad49538c7 ("accel/whpx: Use accel-specific per-vcpu @dirty field") Reported-by: Volker Rümelin Suggested-by: Volker Rümelin

[PULL 01/14] accel/nvmm: Fix NULL dereference in nvmm_init_vcpu()

2024-05-03 Thread Philippe Mathieu-Daudé
When mechanically moving the @dirty field to AccelCPUState in commit 79f1926b2d, we neglected cpu->accel is still NULL when we want to dereference it. Reported-by: Volker Rümelin Suggested-by: Volker Rümelin Fixes: 79f1926b2d ("accel/nvmm: Use accel-specific per-vcpu @dirty field")

[PULL 00/14] Accel / SH4 / UI patches for 2024-05-03

2024-05-03 Thread Philippe Mathieu-Daudé
The following changes since commit fd87be1dada5672f877e03c2ca8504458292c479: Merge tag 'accel-20240426' of https://github.com/philmd/qemu into staging (2024-04-26 15:28:13 -0700) are available in the Git repository at: https://github.com/philmd/qemu.git tags/accel-sh4-ui-20240503 for you

[PATCH] hvf: arm: Fix encodings for ID_AA64PFR1_EL1 and debug System registers

2024-05-03 Thread Zenghui Yu
We wrongly encoded ID_AA64PFR1_EL1 using {3,0,0,4,2} in hvf_sreg_match[] so we fail to get the expected ARMCPRegInfo from cp_regs hash table with the wrong key. Fix it with the correct encoding {3,0,0,4,1}. With that fixed, the Linux guest can properly detect FEAT_SSBS2 on my M1 HW. All

[PULL 06/10] util/bufferiszero: Improve scalar variant

2024-05-03 Thread Richard Henderson
Split less-than and greater-than 256 cases. Use unaligned accesses for head and tail. Avoid using out-of-bounds pointers in loop boundary conditions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- util/bufferiszero.c | 85 +++--

[PULL 04/10] util/bufferiszero: Remove useless prefetches

2024-05-03 Thread Richard Henderson
From: Alexander Monakov Use of prefetching in bufferiszero.c is quite questionable: - prefetches are issued just a few CPU cycles before the corresponding line would be hit by demand loads; - they are done for simple access patterns, i.e. where hardware prefetchers can perform better; -

Re: [PATCH] kvm: ppc: disable sPAPR code if CONFIG_PSERIES is disabled

2024-05-03 Thread Philippe Mathieu-Daudé
On 3/5/24 15:49, Paolo Bonzini wrote: target/ppc/kvm.c calls out to code in hw/ppc/spapr*.c; that code is not present and fails to link if CONFIG_PSERIES is not enabled. Adjust kvm.c to depend on CONFIG_PSERIES instead of TARGET_PPC64, and compile out anything that requires cap_papr, because

[PULL 10/10] tests/bench: Add bufferiszero-bench

2024-05-03 Thread Richard Henderson
Benchmark each acceleration function vs an aligned buffer of zeros. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tests/bench/bufferiszero-bench.c | 47 tests/bench/meson.build | 1 + 2 files changed, 48 insertions(+)

[PULL 02/10] util/bufferiszero: Remove AVX512 variant

2024-05-03 Thread Richard Henderson
From: Alexander Monakov Thanks to early checks in the inline buffer_is_zero wrapper, the SIMD routines are invoked much more rarely in normal use when most buffers are non-zero. This makes use of AVX512 unprofitable, as it incurs extra frequency and voltage transition periods during which the

[PULL 07/10] util/bufferiszero: Introduce biz_accel_fn typedef

2024-05-03 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- util/bufferiszero.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util/bufferiszero.c b/util/bufferiszero.c index c9a7ded016..f9af7841ba 100644 --- a/util/bufferiszero.c +++

[PULL 08/10] util/bufferiszero: Simplify test_buffer_is_zero_next_accel

2024-05-03 Thread Richard Henderson
Because the three alternatives are monotonic, we don't need to keep a couple of bitmasks, just identify the strongest alternative at startup. Generalize test_buffer_is_zero_next_accel and init_accel by always defining an accel_table array. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by:

[PULL 09/10] util/bufferiszero: Add simd acceleration for aarch64

2024-05-03 Thread Richard Henderson
Because non-embedded aarch64 is expected to have AdvSIMD enabled, merely double-check with the compiler flags for __ARM_NEON and don't bother with a runtime check. Otherwise, model the loop after the x86 SSE2 function. Use UMAXV for the vector reduction. This is 3 cycles on cortex-a76 and 2

[PULL 05/10] util/bufferiszero: Optimize SSE2 and AVX2 variants

2024-05-03 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

[PULL 03/10] util/bufferiszero: Reorganize for early test for acceleration

2024-05-03 Thread Richard Henderson
From: Alexander Monakov Test for length >= 256 inline, where is is often a constant. Before calling into the accelerated routine, sample three bytes from the buffer, which handles most non-zero buffers. Signed-off-by: Alexander Monakov Signed-off-by: Mikhail Romanov Message-Id:

[PULL 00/10] bufferiszero improvements

2024-05-03 Thread Richard Henderson
The following changes since commit 4977ce198d2390bff8c71ad5cb1a5f6aa24b56fb: Merge tag 'pull-tcg-20240501' of https://gitlab.com/rth7680/qemu into staging (2024-05-01 15:15:33 -0700) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-misc-20240503

[PULL 01/10] util/bufferiszero: Remove SSE4.1 variant

2024-05-03 Thread Richard Henderson
From: Alexander Monakov The SSE4.1 variant is virtually identical to the SSE2 variant, except for using 'PTEST+JNZ' in place of 'PCMPEQB+PMOVMSKB+CMP+JNE' for testing if an SSE register is all zeroes. The PTEST instruction decodes to two uops, so it can be handled only by the complex decoder,

Re: [PATCH v2 08/33] accel/tcg: Record DisasContextBase in tcg_ctx for plugins

2024-05-03 Thread Philippe Mathieu-Daudé
On 25/4/24 01:31, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 + accel/tcg/plugin-gen.c | 1 + 2 files changed, 2 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v3 0/5] accel/tcg: Call tcg_flush_jmp_cache() again when creating user-mode cpu

2024-05-03 Thread Philippe Mathieu-Daudé
+Claudio & Peter On 3/5/24 14:34, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (5): accel/tcg: Move SoftMMU specific units to softmmu_specific_ss[] accel/tcg: Move system emulation files under sysemu/ subdirectory accel/tcg: Do not define cpu_exec_reset_hold() as stub

Re: [PATCH 3/5] tcg/i386: Optimize setcond of TST{EQ,NE} with 0xffffffff

2024-05-03 Thread Philippe Mathieu-Daudé
On 24/4/24 19:09, Richard Henderson wrote: This may be treated as a 32-bit EQ/NE comparison against 0, which is in turn treated as a LTU/GEU comparison against 1. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 17 +++-- 1 file changed, 15 insertions(+), 2

Re: [PATCH 5/5] accel/tcg: Introduce CF_BP_PAGE

2024-05-03 Thread Philippe Mathieu-Daudé
On 24/4/24 19:09, Richard Henderson wrote: Record the fact that we've found a breakpoint on the page in which a TranslationBlock is running. Signed-off-by: Richard Henderson --- include/exec/translation-block.h | 1 + accel/tcg/cpu-exec.c | 2 +- 2 files changed, 2

Re: [PATCH 1/5] tcg: Add write_aofs to GVecGen3i

2024-05-03 Thread Philippe Mathieu-Daudé
On 24/4/24 19:09, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/tcg/tcg-op-gvec-common.h | 2 ++ tcg/tcg-op-gvec.c| 30 ++ 2 files changed, 24 insertions(+), 8 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] target/arm: Restrict translation disabled alignment check to VMSA

2024-05-03 Thread Richard Henderson
On 5/3/24 07:58, Philippe Mathieu-Daudé wrote: On 24/4/24 19:09, Richard Henderson wrote: For cpus using PMSA, when the MPU is disabled, the default memory type is Normal, Non-cachable. Fixes: 59754f85ed3 ("target/arm: Do memory type alignment check when translation disabled") Reported-by:

Re: [PATCH] target/arm: Restrict translation disabled alignment check to VMSA

2024-05-03 Thread Philippe Mathieu-Daudé
On 24/4/24 19:09, Richard Henderson wrote: For cpus using PMSA, when the MPU is disabled, the default memory type is Normal, Non-cachable. Fixes: 59754f85ed3 ("target/arm: Do memory type alignment check when translation disabled") Reported-by: Clément Chigot Signed-off-by: Richard Henderson

[PATCH v4] vfio/pci: migration: Skip config space check for Vendor Specific Information in VSC during restore/load

2024-05-03 Thread Vinayak Kale
In case of migration, during restore operation, qemu checks config space of the pci device with the config space in the migration stream captured during save operation. In case of config space data mismatch, restore operation is failed. config space check is done in function

Re: [PATCH v5] Hexagon: add PC alignment check and exception

2024-05-03 Thread Richard Henderson
On 5/3/24 06:38, Matheus Tavares Bernardino wrote: On Thu, 2 May 2024 13:00:34 -0700 Richard Henderson wrote: On 5/2/24 12:20, Matheus Tavares Bernardino wrote: + +void test_multi_cof(void) +{ +asm volatile( +"p0 = cmp.eq(r0, r0)\n" +"{\n" +"if (p0) jump

[PATCH v2] hmp/migration: Fix "migrate" command's documentation

2024-05-03 Thread Peter Xu
Peter missed the Sphinx HMP document for the "resume/-r" flag in commit 7a4da28b26 ("qmp: hmp: add migrate "resume" option"). Add it. When at it, slightly cleanup the lines around: - Move "detach/-d" to a separate section rather than appending it at the end of the command description. Add a

Re: [PATCH] hmp/migration: Fix documents for "migrate" command

2024-05-03 Thread Peter Xu
On Fri, May 03, 2024 at 04:08:45PM +0200, Markus Armbruster wrote: > If there's still time, suggest to tweak the subject to > > hmp/migration: Fix "migrate" command's documentation Yes there is. :) > > Peter Xu writes: > > > On Fri, May 03, 2024 at 08:58:09AM +0200, Markus Armbruster

Re: [PATCH v3 07/16] aspeed/smc: fix dma moving incorrect data length issue

2024-05-03 Thread Cédric Le Goater
On 4/30/24 10:51, Jamin Lin wrote: Hi Cedric, On 4/19/24 15:41, Cédric Le Goater wrote: On 4/16/24 11:18, Jamin Lin wrote: DMA length is from 1 byte to 32MB for AST2600 and AST10x0 and DMA length is from 4 bytes to 32MB for AST2500. In other words, if "R_DMA_LEN" is 0, it should move at

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-03 Thread Peter Xu
On Fri, May 03, 2024 at 08:40:03AM +0200, Jinpu Wang wrote: > I had a brief check in the rsocket changelog, there seems some > improvement over time, > might be worth revisiting this. due to socket abstraction, we can't > use some feature like > ODP, it won't be a small and easy task. It'll be

Re: [PATCH v3 00/19] Add a host IOMMU device abstraction to check with vIOMMU

2024-05-03 Thread Cédric Le Goater
On 5/3/24 16:10, Jason Gunthorpe wrote: On Fri, May 03, 2024 at 04:04:25PM +0200, Cédric Le Goater wrote: However, have you considered another/complementary approach which would be to create an host IOMMU (iommufd) backend object and a vIOMMU device object together for each vfio-pci device

Re: [PATCH v3 08/16] aspeed/smc: support 64 bits dma dram address

2024-05-03 Thread Cédric Le Goater
Hello Jamin, On 4/30/24 09:56, Jamin Lin wrote: Hi Cedric, -Original Message- From: Cédric Le Goater Sent: Tuesday, April 30, 2024 3:26 PM To: Jamin Lin ; Peter Maydell ; Andrew Jeffery ; Joel Stanley ; Alistair Francis ; Cleber Rosa ; Philippe Mathieu-Daudé ; Wainer dos Santos

Re: [PATCH v3 00/19] Add a host IOMMU device abstraction to check with vIOMMU

2024-05-03 Thread Jason Gunthorpe
On Fri, May 03, 2024 at 04:04:25PM +0200, Cédric Le Goater wrote: > However, have you considered another/complementary approach which > would be to create an host IOMMU (iommufd) backend object and a vIOMMU > device object together for each vfio-pci device being plugged in the > machine ? > >

Re: [PATCH] hmp/migration: Fix documents for "migrate" command

2024-05-03 Thread Markus Armbruster
If there's still time, suggest to tweak the subject to hmp/migration: Fix "migrate" command's documentation Peter Xu writes: > On Fri, May 03, 2024 at 08:58:09AM +0200, Markus Armbruster wrote: >> Peter Xu writes: >> >> > Peter missed the Sphinx HMP document for the "resume/-r" flag in

  1   2   3   >