[PULL 21/23] block: rename former bdrv_file_open callbacks

2024-06-21 Thread Paolo Bonzini
Since there is no bdrv_file_open callback anymore, rename the implementations so that they end with "_open" instead of "_file_open". NFS is the exception because all the functions are named nfs_file_*. Suggested-by: Kevin Wolf Signed-off-by: Paolo Bonzini --- block/blkio.c | 8 block/

[PULL 15/23] Revert "host/i386: assume presence of SSE2"

2024-06-21 Thread Paolo Bonzini
This reverts commit b18236897ca15c3db1506d8edb9a191dfe51429c. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro. Signed-off-by: Paolo Bonzini --- host/include/i386/host/cpuinfo.h | 1 + util/bufferiszero.c | 4 ++-- util/cpuinfo-i386.c |

[PULL 17/23] meson: remove dead optimization option

2024-06-21 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- meson.build | 13 - meson_options.txt | 2 -- scripts/meson-buildoptions.sh | 3 --- 3 files changed, 18 deletions(-) diff --git a/meson.build b/meson.build index 6e694ecd9fe..54e6b09f4fb

[PULL 02/23] target/i386: fix CC_OP dump

2024-06-21 Thread Paolo Bonzini
POPCNT was missing, and the entries were all out of order after ADCX/ADOX/ADCOX were moved close to EFLAGS. Just use designated initializers. Fixes: 4885c3c4953 ("target-i386: Use ctpop helper", 2017-01-10) Fixes: cc155f19717 ("target/i386: rewrite flags writeback for ADCX/ADOX", 2024-06-11) Sig

[PULL 07/23] target/i386: decode address before going back to translate.c

2024-06-21 Thread Paolo Bonzini
There are now relatively few unconverted opcodes in translate.c (there are 13 of them including 8 for x87), and all of them have the same format with a mod/rm byte and no immediate. A good next step is to remove the early bail out to disas_insn_x87/disas_insn_old, instead giving these legacy trans

[PULL 01/23] configure: detect --cpu=mipsisa64r6

2024-06-21 Thread Paolo Bonzini
Treat it as a MIPS64 machine. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 5ad1674ca5f..8b6a2f16ceb 100755 --- a/configure +++ b/configure

[PULL 14/23] Revert "host/i386: assume presence of SSSE3"

2024-06-21 Thread Paolo Bonzini
This reverts commit 433cd6d94a8256af70a5200f236dc8047c3c1468. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro. Signed-off-by: Paolo Bonzini --- util/cpuinfo-i386.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/cpuinfo-i386.c b/util

[PULL 22/23] exec: avoid using C++ keywords in function parameters

2024-06-21 Thread Paolo Bonzini
From: Roman Kiryanov to use the QEMU headers with a C++ compiler. Signed-off-by: Roman Kiryanov Link: https://lore.kernel.org/r/20240618224553.878869-1-r...@google.com Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PULL 10/23] target/i386: list instructions still in translate.c

2024-06-21 Thread Paolo Bonzini
Group them so that it is easier to figure out which two-byte opcodes to tackle together. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.c.inc | 31 +++ 1 file changed, 31 insertions(+) diff --git a/target/i386/tcg/decode-n

[PULL 04/23] target/i386: give CC_OP_POPCNT low bits corresponding to MO_TL

2024-06-21 Thread Paolo Bonzini
Handle it like the other arithmetic cc_ops. This simplifies a bit the implementation of bit test instructions. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 13 +++-- target/i386/tcg/translate.c | 3 +-- 2 files changed, 12 insertions(+)

[PULL 00/23] Misc changes for 2024-06-22

2024-06-21 Thread Paolo Bonzini
The following changes since commit 223696363bb117241ad9c2facbff0c474afa4104: Merge tag 'edgar/xilinx-queue-2024-06-17.for-upstream' of https://gitlab.com/edgar.iglesias/qemu into staging (2024-06-18 13:08:01 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git

[PULL 05/23] target/i386: convert bit test instructions to new decoder

2024-06-21 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 3 + target/i386/tcg/translate.c | 147 +- target/i386/tcg/decode-new.c.inc | 40 ++--- target/i386/tcg/emit.c.inc | 149 ++

[PULL 08/23] target/i386: convert CMPXCHG8B/CMPXCHG16B to new decoder

2024-06-21 Thread Paolo Bonzini
This moves the last LOCK-enabled instructions to the new decoder. It is now possible to assume that PREFIX_LOCK gen_multi0F is called only after checking that LOCK was not specified. The gen_cmpxchg8b and gen_cmpxchg16b functions even have the correct prototype already; the only thing that needs

[PULL 23/23] exec: don't use void* in pointer arithmetic in headers

2024-06-21 Thread Paolo Bonzini
From: Roman Kiryanov void* pointer arithmetic is a GCC extentension which could not be available in other build tools (e.g. C++). This changes removes this assumption. Signed-off-by: Roman Kiryanov Suggested-by: Paolo Bonzini Link: https://lore.kernel.org/r/20240620201654.598024-1-r...@google.

[PULL 20/23] block: remove separate bdrv_file_open callback

2024-06-21 Thread Paolo Bonzini
bdrv_file_open and bdrv_open are completely equivalent, they are never checked except to see which one to invoke. So merge them into a single one. Signed-off-by: Paolo Bonzini --- include/block/block_int-common.h | 3 --- block.c | 4 +--- block/blkdebug.c

[PULL 19/23] block: do not check bdrv_file_open

2024-06-21 Thread Paolo Bonzini
The set of BlockDrivers that have .bdrv_file_open coincides with those that have .protocol_name and guess what---checking drv->bdrv_file_open is done to see if the driver is a protocol. So check drv->protocol_name instead. Signed-off-by: Paolo Bonzini --- block.c | 11 +-- 1 file change

[PULL 18/23] block: make assertion more generic

2024-06-21 Thread Paolo Bonzini
.bdrv_needs_filename is only set for drivers that also set bdrv_file_open, i.e. protocol drivers. So we can make the assertion always, it will always pass for those drivers that use bdrv_open. Signed-off-by: Paolo Bonzini --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PULL 12/23] target/i386: remove gen_ext_tl

2024-06-21 Thread Paolo Bonzini
With the introduction of tcg_gen_ext_tl, most uses can be converted directly because they do not have a NULL destination. tcg_gen_ext_tl is able to drop no-ops like "tcg_gen_ext_tl(tcgv, tcgv, MO_TL)" just fine, and the only thing that gen_ext_tl was adding on top was avoiding the creation of a us

[PULL 16/23] meson: allow configuring the x86-64 baseline

2024-06-21 Thread Paolo Bonzini
Add a Meson option to configure which x86-64 instruction set to use. QEMU will now default to x86-64-v1 + cmpxchg16b for 64-bit builds (that corresponds to a Pentium 4 for 32-bit builds). The baseline can be tuned down to Pentium Pro for 32-bit builds (with -Dx86_version=0), or up as desired. Ac

[PULL 13/23] Revert "host/i386: assume presence of POPCNT"

2024-06-21 Thread Paolo Bonzini
This reverts commit 45ccdbcb24baf99667997fac5cf60318e5e7db51. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro. Signed-off-by: Paolo Bonzini --- host/include/i386/host/cpuinfo.h | 1 + tcg/i386/tcg-target.h| 5 +++-- util/cpuinfo-i386.c |

[PULL 03/23] target/i386: use cpu_cc_dst for CC_OP_POPCNT

2024-06-21 Thread Paolo Bonzini
It is the only CCOp, among those that compute ZF from one of the cc_op_* registers, that uses cpu_cc_src. Do not make it the odd one off, instead use cpu_cc_dst like the others. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 2 +- target/i386/tcg/

[PULL 09/23] target/i386: do not check PREFIX_LOCK in old-style decoder

2024-06-21 Thread Paolo Bonzini
It is already checked before getting there. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 26 -- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index

[PULL 11/23] target/i386: assert that cc_op* and pc_save are preserved

2024-06-21 Thread Paolo Bonzini
Now all decoding has been done before any code generation. There is no need anymore to save and restore cc_op* and pc_save but, for the time being, assert that this is indeed the case. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 12 +++-

[PULL 06/23] target/i386: try not to force EFLAGS computation for CC_OP_ADOX/ADCX

2024-06-21 Thread Paolo Bonzini
When computing the "other" flag (CF for CC_OP_ADOX, OF for CC_OP_ADCX), take into account that it is already in the right position of cpu_cc_src, just like for CC_OP_EFLAGS. There is no need to call gen_compute_eflags(). Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i3

Re: [RFC] vhost: Introduce packed vq and add buffer elements

2024-06-21 Thread Sahil
Hi, On Wednesday, June 19, 2024 3:49:29 PM GMT+5:30 Eugenio Perez Martin wrote: > [...] > Hi Sahil, > > Just some nitpicks here and there, > > > [1] https://wiki.qemu.org/Internships/ProjectIdeas/PackedShadowVirtqueue > > > > hw/virtio/vhost-shadow-virtqueue.c | 124 +++

Re: [PATCH v3 02/16] migration: Fix file migration with fdset

2024-06-21 Thread Michael Tokarev
17.06.2024 21:57, Fabiano Rosas wrote: When the "file:" migration support was added we missed the special case in the qemu_open_old implementation that allows for a particular file name format to be used to refer to a set of file descriptors that have been previously provided to QEMU via the add-

Re: [RFC] vhost: Introduce packed vq and add buffer elements

2024-06-21 Thread Sahil
Hi, Thank you for your reply. On Wednesday, June 19, 2024 1:07:54 PM GMT+5:30 Eugenio Perez Martin wrote: > [...] > > "curr" is being updated here, but descs[i].id is always set to id which > > doesn't change in the loop. So all the descriptors in the chain will have > > the same id. I can't find

Re: [PULL 00/28] Migration patches for 2024-06-21

2024-06-21 Thread Richard Henderson
gitlab.com/farosas/qemu.git tags/migration-20240621-pull-request for you to fetch changes up to 04b09de16d78cf2d163ca65d7c6d161bf2baceb6: migration: Remove unused VMSTATE_ARRAY_TEST() macro (2024-06-21 14:37:58 -0300) Migration pu

Re: [PATCH v1] memory tier: consolidate the initialization of memory tiers

2024-06-21 Thread Andrew Morton
On Fri, 21 Jun 2024 04:48:30 + "Ho-Ren (Jack) Chuang" wrote: > If we simply move the set_node_memory_tier() from memory_tier_init() to > late_initcall(), it will result in HMAT not registering the > mt_adistance_algorithm callback function, Immediate reaction: then don't do that! > because

Re: [PATCH v14 00/14] Support blob memory and venus on qemu

2024-06-21 Thread Dmitry Osipenko
On 6/21/24 11:59, Alex Bennée wrote: > Dmitry Osipenko writes: > >> On 6/19/24 20:37, Alex Bennée wrote: >>> So I've been experimenting with Aarch64 TCG with an Intel backend like >>> this: >>> >>> ./qemu-system-aarch64 \ >>>-M virt -cpu cortex-a76 \ >>>-device virtio-net-

Re: [PATCH 05/20] qapi/parser: adjust info location for doc body section

2024-06-21 Thread John Snow
On Mon, May 27, 2024 at 7:58 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, May 16, 2024, 1:58 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > Instead of using the info object for the doc block as a whole, update > >> > the info pointer for each call to ensu

Re: [RFC PATCH 0/7] migration/multifd: Introduce storage slots

2024-06-21 Thread Peter Xu
On Fri, Jun 21, 2024 at 07:40:01PM +0200, Maciej S. Szmigiero wrote: > On 21.06.2024 17:56, Peter Xu wrote: > > On Fri, Jun 21, 2024 at 05:31:54PM +0200, Maciej S. Szmigiero wrote: > > > On 21.06.2024 17:04, Fabiano Rosas wrote: > > > > "Maciej S. Szmigiero" writes: > > > > > > > > > Hi Fabiano,

Re: [PATCH 0/7] pc-bios/s390-ccw: Merge the netboot loader into s390-ccw.img

2024-06-21 Thread Eric Farman
On Fri, 2024-06-21 at 10:24 +0200, Thomas Huth wrote: > We originally built a separate binary for the netboot code since it > was considered as experimental and we could not be sure that the > necessary SLOF module had been checked out. Time passed, the netboot > code proved its usefulness, and the

RE: [RFC PATCH] cxl: avoid duplicating report from MCE & device

2024-06-21 Thread Luck, Tony
> So who actually cares about recovering poisoned volatile memory? > I'd like to understand more on how significant a use case this is. > Whilst I can conjecture that its an extreme case of wanting to avoid > loosing the ability to create 1GiB or larger pages due to poison > is that a real problem

Re: [RFC PATCH] cxl: avoid duplicating report from MCE & device

2024-06-21 Thread Jonathan Cameron via
On Fri, 21 Jun 2024 10:59:46 -0700 Dan Williams wrote: > Jonathan Cameron wrote: > > On Wed, 19 Jun 2024 00:53:10 +0800 > > Shiyang Ruan wrote: > > > > > Background: > > > Since CXL device is a memory device, while CPU consumes a poison page of > > > CXL device, it always triggers a MCE by i

Re: [RFC PATCH 1/1] hw/arm: FW first ARM processor error injection.

2024-06-21 Thread Jonathan Cameron via
On Fri, 21 Jun 2024 17:51:15 +0100 wrote: > From: Shiju Jose Thanks for posting this. Given this is going to linux-edac, probably should mention this is QEMU based error injection. For cross postings between kernel related and qemu lists I tend to stick qemu in the [] of the patch description.

[PULL 27/28] tests/migration-tests: Cover postcopy failure on reconnect

2024-06-21 Thread Fabiano Rosas
From: Peter Xu Make sure there will be an event for postcopy recovery, irrelevant of whether the reconnect will success, or when the failure happens. The added new case is to fail early in postcopy recovery, in which case it didn't even reach RECOVER stage on src (and in real life it'll be the s

[PULL 06/28] monitor: Introduce monitor_fdset_*free

2024-06-21 Thread Fabiano Rosas
Introduce new functions to remove and free no longer used fds and fdsets. We need those to decouple the remove/free routines from monitor_fdset_cleanup() which will go away in the next patches. The new functions: - monitor_fdset_free/_if_empty() will be used when a monitor connection closes an

[PULL 03/28] tests/qtest/migration: Fix file migration offset check

2024-06-21 Thread Fabiano Rosas
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 file. We have tests for this in migration-test, but only testing that the m

[PULL 02/28] migration: Fix file migration with fdset

2024-06-21 Thread Fabiano Rosas
When the "file:" migration support was added we missed the special case in the qemu_open_old implementation that allows for a particular file name format to be used to refer to a set of file descriptors that have been previously provided to QEMU via the add-fd QMP command. When using this fdset fe

[PULL 23/28] tests/migration-tests: Drop most WIN32 ifdefs for postcopy failure tests

2024-06-21 Thread Fabiano Rosas
From: Peter Xu Most of them are not needed, we can stick with one ifdef inside postcopy_recover_fail() so as to cover the scm right tricks only. The tests won't run on windows anyway due to has_uffd always false. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas

[PULL 17/28] migration/multifd: Avoid the final FLUSH in complete()

2024-06-21 Thread Fabiano Rosas
From: Peter Xu We always do the flush when finishing one round of scan, and during complete() phase we should scan one more round making sure no dirty page existed. In that case we shouldn't need one explicit FLUSH at the end of complete(), as when reaching there all pages should have been flush

[PULL 20/28] migration: Cleanup incoming migration setup state change

2024-06-21 Thread Fabiano Rosas
From: Peter Xu Destination QEMU can setup incoming ports for two purposes: either a fresh new incoming migration, in which QEMU will switch to SETUP for channel establishment, or a paused postcopy migration, in which QEMU will stay in POSTCOPY_PAUSED until kicking off the RECOVER phase. Now the

[PULL 01/28] migration: Drop reference to QIOChannel if file seeking fails

2024-06-21 Thread Fabiano Rosas
We forgot to drop the reference to the QIOChannel in the error path of the offset adjustment. Do it now. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/file.c b/migration/file.c index ab18ba505a..2bb8c64092 1

[PULL 08/28] monitor: Simplify fdset and fd removal

2024-06-21 Thread Fabiano Rosas
Remove fds right away instead of setting the ->removed flag. We don't need the extra complexity of having a cleanup function reap the removed entries at a later time. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- monitor/fds.c | 27 ++- 1 file changed, 6 inserti

[PULL 05/28] monitor: Drop monitor_fdset_dup_fd_find/_remove()

2024-06-21 Thread Fabiano Rosas
From: Peter Xu Those functions are not needed, one remove function should already work. Clean it up. Here the code doesn't really care about whether we need to keep that dupfd around if close() failed: when that happens something got very wrong, keeping the dup_fd around the fdsets may not help

[PULL 13/28] tests/qtest/migration: Add tests for file migration with direct-io

2024-06-21 Thread Fabiano Rosas
The tests are only allowed to run in systems that know about the O_DIRECT flag and in filesystems which support it. Note: this also brings back migrate_set_parameter_bool() which went away when we removed the compression tests. I copied it verbatim. Reviewed-by: Peter Xu Signed-off-by: Fabiano R

[PULL 24/28] tests/migration-tests: Always enable migration events

2024-06-21 Thread Fabiano Rosas
From: Peter Xu Libvirt should always enable it, so it'll be nice qtest also cover that for all tests on both sides. migrate_incoming_qmp() used to enable it only on dst, now we enable them on both, as we'll start to sanity check events even on the src QEMU. We'll need to leave the one in migrat

[PULL 14/28] monitor: fdset: Match against O_DIRECT

2024-06-21 Thread Fabiano Rosas
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 to different regions of a file, so we need to use more than one file desc

[PULL 16/28] tests/qtest/migration: Add a test for mapped-ram with passing of fds

2024-06-21 Thread Fabiano Rosas
Add a multifd test for mapped-ram with passing of fds into QEMU. This is how libvirt will consume the feature. There are a couple of details to the fdset mechanism: - multifd needs two distinct file descriptors (not duplicated with dup()) so it can enable O_DIRECT only on the channels that do

[PULL 00/28] Migration patches for 2024-06-21

2024-06-21 Thread Fabiano Rosas
The following changes since commit 02d9c38236cf8c9826e5c5be61780ccb4ae0: Merge tag 'pull-tcg-20240619' of https://gitlab.com/rth7680/qemu into staging (2024-06-19 14:00:39 -0700) are available in the Git repository at: https://gitlab.com/farosas/qemu.git tags/migration-202

[PULL 04/28] tests/qtest/migration: Add a precopy file test with fdset

2024-06-21 Thread Fabiano Rosas
Add a test for file migration using fdset. The passing of fds is more complex than using a file path. This is also the scenario where it's most important we ensure that the initial migration stream offset is respected because the fdset interface is the one used by the management layer when providin

[PULL 19/28] migration: Use MigrationStatus instead of int

2024-06-21 Thread Fabiano Rosas
From: Peter Xu QEMU uses "int" in most cases even if it stores MigrationStatus. I don't know why, so let's try to do that right and see what blows up.. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration.c | 24 +++- mi

[PULL 26/28] tests/migration-tests: Verify postcopy-recover-setup status

2024-06-21 Thread Fabiano Rosas
From: Peter Xu Making sure the postcopy-recover-setup status is present in the postcopy failure unit test. Note that it only applies to src QEMU not dest. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas Signed-off-by: Fabiano Rosas --- tests/qtest/migration-test.c | 6 ++ 1 file chan

[PULL 09/28] monitor: Report errors from monitor_fdset_dup_fd_add

2024-06-21 Thread Fabiano Rosas
I'm keeping the EACCES because callers expect to be able to look at errno. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- include/monitor/monitor.h | 2 +- monitor/fds.c | 10 +- stubs/fdset.c | 2 +- util/osdep.c | 10 +- 4 files c

[PULL 21/28] migration/postcopy: Add postcopy-recover-setup phase

2024-06-21 Thread Fabiano Rosas
From: Peter Xu This patch adds a migration state on src called "postcopy-recover-setup". The new state will describe the intermediate step starting from when the src QEMU received a postcopy recovery request, until the migration channels are properly established, but before the recovery process t

[PULL 25/28] tests/migration-tests: migration_event_wait()

2024-06-21 Thread Fabiano Rosas
From: Peter Xu Introduce a small helper to wait for a migration event, generalized from the incoming migration path. Make the helper easier to use by allowing it to keep waiting until the expected event is received. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas Signed-off-by: Fabiano Ros

[PULL 22/28] migration/docs: Update postcopy recover session for SETUP phase

2024-06-21 Thread Fabiano Rosas
From: Peter Xu Firstly, the "Paused" state was added in the wrong place before. The state machine section was describing PostcopyState, rather than MigrationStatus. Drop the Paused state descriptions. Then in the postcopy recover session, add more information on the state machine for MigrationSt

[PULL 18/28] migration: Rename thread debug names

2024-06-21 Thread Fabiano Rosas
From: Peter Xu The postcopy thread names on dest QEMU are slightly confusing, partly I'll need to blame myself on 36f62f11e4 ("migration: Postcopy preemption preparation on channel creation"). E.g., "fault-fast" reads like a fast version of "fault-default", but it's actually the fast version of

[PULL 28/28] migration: Remove unused VMSTATE_ARRAY_TEST() macro

2024-06-21 Thread Fabiano Rosas
From: Philippe Mathieu-Daudé Last use of VMSTATE_ARRAY_TEST() was removed in commit 46baa9007f ("migration/i386: Remove old non-softfloat 64bit FP support"), we can safely get rid of it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Li Zhijian Reviewed-by: Peter Xu Signed-off-by: Fabiano

[PULL 12/28] migration/multifd: Add direct-io support

2024-06-21 Thread Fabiano Rosas
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 writes bypass the page cache which would otherwise be thrashed by the mu

[PULL 11/28] migration: Add direct-io parameter

2024-06-21 Thread Fabiano Rosas
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 guaranteed to perform aligned writes. Acked-by: Markus Armbruster Review

[PULL 10/28] io: Stop using qemu_open_old in channel-file

2024-06-21 Thread Fabiano Rosas
We want to make use of the Error object to report fdset errors from qemu_open_internal() and passing the error pointer to qemu_open_old() would require changing all callers. Move the file channel to the new API instead. Reviewed-by: Daniel P. Berrangé Reviewed-by: Peter Xu Signed-off-by: Fabiano

[PULL 15/28] migration: Add documentation for fdset with multifd + file

2024-06-21 Thread Fabiano Rosas
With the last few changes to the fdset infrastructure, we now allow multifd to use an fdset when migrating to a file. This is useful for the scenario where the management layer wants to have control over the migration file. By receiving the file descriptors directly, QEMU can delegate some high le

[PULL 07/28] monitor: Stop removing non-duplicated fds

2024-06-21 Thread Fabiano Rosas
monitor_fdsets_cleanup() currently has three responsibilities: 1- Remove the fds that have been marked for removal(->removed=true) by qmp_remove_fd(). This is overly complicated, but ok. 2- Remove any file descriptors that have been passed into QEMU and never duplicated[1,2]. A file descrip

Re: [RFC PATCH] cxl: avoid duplicating report from MCE & device

2024-06-21 Thread Dan Williams
Shiyang Ruan wrote: > Background: > Since CXL device is a memory device, while CPU consumes a poison page of > CXL device, it always triggers a MCE by interrupt (INT18), no matter > which-First path is configured. This is the first report. Then > currently, in FW-First path, the poison event i

command line syntax for connecting a chardev to a CPU

2024-06-21 Thread Peter Maydell
Arm CPUs have a "debug communications channel" which on real hardware is basically a way to talk to the debugger on the other end of a JTAG connection; Linux supports using this as a console. This patchseries: https://patchew.org/QEMU/20240614093026.328271-1-sai.pavan.bo...@amd.com/ proposes imple

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-21 Thread John Snow
On Fri, Jun 21, 2024 at 8:23 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, Jun 20, 2024 at 11:46 AM John Snow wrote: > > > >> > >> > >> On Thu, Jun 20, 2024, 9:35 AM Markus Armbruster > wrote: > >> > >>> Markus Armbruster writes: > >>> > >>> > John Snow writes: > >>> > >>> [.

Re: [RFC PATCH 0/7] migration/multifd: Introduce storage slots

2024-06-21 Thread Maciej S. Szmigiero
On 21.06.2024 17:56, Peter Xu wrote: On Fri, Jun 21, 2024 at 05:31:54PM +0200, Maciej S. Szmigiero wrote: On 21.06.2024 17:04, Fabiano Rosas wrote: "Maciej S. Szmigiero" writes: Hi Fabiano, On 20.06.2024 23:21, Fabiano Rosas wrote: Hi folks, First of all, apologies for the roughness of th

Re: [PATCH v3 00/11] migration: New postcopy state, and some cleanups

2024-06-21 Thread Fabiano Rosas
On Wed, 19 Jun 2024 18:30:35 -0400, Peter Xu wrote: > Based-on: <20240617185731.9725-1-faro...@suse.de> > > v3: > - Added one comment in patch 8 explaining why migrate_incoming_qmp() needs > to keep enabling "events" capability. > - Split patch 9 into two patches, which makes migration_event_wai

Re: [PATCH] migration: Remove unused VMSTATE_ARRAY_TEST() macro

2024-06-21 Thread Fabiano Rosas
On Fri, 21 Jun 2024 09:03:17 +0200, Philippe Mathieu-Daudé wrote: > Last use of VMSTATE_ARRAY_TEST() was removed in commit 46baa9007f > ("migration/i386: Remove old non-softfloat 64bit FP support"), we > can safely get rid of it. > > Queued, thanks!

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-21 Thread John Snow
On Fri, Jun 21, 2024 at 8:08 AM Markus Armbruster wrote: > John Snow writes: > > > We do not need a dedicated section for notes. By eliminating a specially > > parsed section, these notes can be treated as normal rST paragraphs in > > the new QMP reference manual, and can be placed and styled mu

Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-21 Thread John Snow
On Fri, Jun 21, 2024 at 2:38 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, Jun 20, 2024, 11:07 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > On Wed, Jun 19, 2024, 8:03 AM Markus Armbruster > wrote: > >> > > >> >> John Snow writes: > >> >> > >> >> > Chan

Re: [PATCH RFC v2 0/3] cxl: Multi-headed Single Logical Device (MHSLD)

2024-06-21 Thread Jonathan Cameron via
On Wed, 24 Apr 2024 13:04:05 -0700 Svetly Todorov wrote: > MHSLDs allow multiple hosts to access dynamic capacity on a single > backing device. This complicates DC management because adds, > removals, and accesses need to be vetted such that hosts don't > stomp on each other's data. > > This pat

Re: standardizing i2c device ids

2024-06-21 Thread Patrick Leis
On Thu, Jun 20, 2024 at 11:26 PM Philippe Mathieu-Daudé wrote: > Hi Patrick, > > On 21/6/24 00:03, Patrick Leis wrote: > > Corey and Peter, > > > > My team builds lots of configurations for Qemu boards, and one pain > > point has been that the qom path for a device depends on the device > > inser

Re: [RFC PATCH] cxl: avoid duplicating report from MCE & device

2024-06-21 Thread Jonathan Cameron via
On Fri, 21 Jun 2024 18:16:33 +0800 Shiyang Ruan wrote: > 在 2024/6/21 1:02, Jonathan Cameron 写道: > > On Wed, 19 Jun 2024 00:53:10 +0800 > > Shiyang Ruan wrote: > > > >> Background: > >> Since CXL device is a memory device, while CPU consumes a poison page of > >> CXL device, it always triggers

Re: [PATCH] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs

2024-06-21 Thread Peter Maydell
On Fri, 21 Jun 2024 at 17:24, Cord Amfmgm wrote: > > > On Fri, Jun 21, 2024 at 10:21 AM Peter Maydell > wrote: >> Thanks; I've picked up this patch for target-arm.next (as with >> your previous one for hcd-ohci, adjusting the Author and >> Signed-off-by lines to both read David Hubbard). >> >> I

Re: [PATCH 2/3] target/ppc: Update VMX storage access insns to use tcg_gen_qemu_ld/st_i128.

2024-06-21 Thread Richard Henderson
On 6/21/24 09:34, Richard Henderson wrote: On 6/21/24 04:46, Chinmay Rath wrote: +    tcg_gen_qemu_ld_i128(avr, EA, ctx->mem_idx, DEF_MEMOP(MO_128)); +    set_avr_full(a->rt, avr); This needs to specify atomicity as well.  This is much more important to for 16 byte operations than smaller acc

[RFC PATCH 1/1] hw/arm: FW first ARM processor error injection.

2024-06-21 Thread shiju . jose--- via
From: Shiju Jose Add support for FW first ARM processor error injection. Compliance with N.2.4.4 ARM Processor Error Section in UEFI 2.9A/2.10 specs. Examples, { "execute": "arm-inject-error", "arguments": { "errortypes": ['cache-error'] } } { "execute": "arm-inject-error",

Re: [PATCH v2 0/2] target/arm: Enable FEAT_Debugv8p8 for -cpu max

2024-06-21 Thread Richard Henderson
On 6/21/24 07:39, Gustavo Romero wrote: Gustavo Romero (2): target/arm: Move initialization of debug ID registers target/arm: Enable FEAT_Debugv8p8 for -cpu max Reviewed-by: Richard Henderson r~

Re: [PATCH] bswap: Add st24_be_p() to store 24 bits in big-endian order

2024-06-21 Thread Richard Henderson
On 6/21/24 00:56, Philippe Mathieu-Daudé wrote: Commit 14180d6221 ("bswap: Add the ability to store to an unaligned 24 bit field") added st24_le_p() for little endianness, add st24_be_p() equivalent for bit one. Signed-off-by: Philippe Mathieu-Daudé --- Some SD card registers are 3 bytes wide s

Re: [PATCH 2/3] target/ppc: Update VMX storage access insns to use tcg_gen_qemu_ld/st_i128.

2024-06-21 Thread Richard Henderson
On 6/21/24 04:46, Chinmay Rath wrote: +tcg_gen_qemu_ld_i128(avr, EA, ctx->mem_idx, DEF_MEMOP(MO_128)); +set_avr_full(a->rt, avr); This needs to specify atomicity as well. This is much more important to for 16 byte operations than smaller accesses, as this might require stop-the-world

Re: [PATCH v2] exec: don't use void* in pointer arithmetic in headers

2024-06-21 Thread Paolo Bonzini
On 6/20/24 22:16, Roman Kiryanov wrote: void* pointer arithmetic is a GCC extentension which could not be available in other build tools (e.g. C++). This changes removes this assumption. Google-Bug-Id: 331190993 Change-Id: I5a064853429f627c17a9213910811dea4ced6174 Signed-off-by: Roman Kiryanov

Re: [PATCH] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs

2024-06-21 Thread Cord Amfmgm
On Fri, Jun 21, 2024 at 10:21 AM Peter Maydell wrote: > On Wed, 12 Jun 2024 at 20:36, Alex Bennée wrote: > > > > Cord Amfmgm writes: > > > > > On Wed, Jun 12, 2024 at 9:21 AM Alex Bennée > wrote: > > > > > > David Hubbard writes: > > > > > > > From: Cord Amfmgm > > > > > > > > This chang

Re: [PATCH 20/23] hw/sd/sdcard: Add comments around registers and commands

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 20 1 file changed, 20 insertions(+) diff --g

Re: [PATCH 18/23] hw/sd/sdcard: Add sd_invalid_mode_for_cmd to report invalid mode switch

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: Having the mode switch displayed help to track incomplete command implementations. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 75 +--

Re: [PATCH 19/23] hw/sd/sdcard: Inline BLK_READ_BLOCK / BLK_WRITE_BLOCK macros

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: These macros only save 3 chars and make the code harder to maintain, simply remove them. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 15 +++ 1 file changed, 7 insertion

Re: [PATCH 17/23] hw/sd/sdcard: Only call sd_req_get_address() where address is used

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: It will be useful later to assert only ADTC commands (Addressed point-to-point Data Transfer Commands, defined as the 'sd_adtc' enum) extract the address value from the command argument. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Céd

Re: [PATCH 16/23] hw/sd/sdcard: Factor sd_req_get_address() method out

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: Extract sd_cmd_get_address() so we can re-use it in various SDProto handlers. Use CARD_CAPACITY and HWBLOCK_SHIFT definitions instead of magic values. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. ---

Re: [PATCH 15/23] hw/sd/sdcard: Only call sd_req_get_rca() where RCA is used

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: It will be useful later to assert only AC commands (Addressed point-to-point Commands, defined as the 'sd_ac' enum) extract the RCA value from the command argument. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks

Re: [PATCH 14/23] hw/sd/sdcard: Factor sd_req_get_rca() method out

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: Extract sd_req_get_rca() so we can re-use it in various SDProto handlers. Return a 16-bit value since RCA is 16-bit. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 15 +--

Re: [PATCH 13/23] hw/sd/sdcard: Have cmd_valid_while_locked() return a boolean value

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index c6cc1bab11..510784fc82 100644 --- a/h

Re: [PATCH v3 qemu 00/11] acpi: NUMA nodes for CXL HB as GP + complex NUMA test

2024-06-21 Thread Jonathan Cameron via
On Thu, 20 Jun 2024 17:03:08 +0100 Jonathan Cameron wrote: > v3: Thanks to Richard for help debugging BE issue and to Igor for > finding a bunch of other thing to improve via the context in > the fix patch. I forgot to mention that his time I ran the bios tables test on an emulated x86_6

Re: [PATCH 12/23] hw/sd/sdcard: Trace block offset in READ/WRITE data accesses

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: Useful to detect out of bound accesses. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 4 ++-- hw/sd/trace-events | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)

Re: [PATCH 11/23] hw/sd/sdcard: Trace update of block count (CMD23)

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 1 + hw/sd/trace-events | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 4e3

Re: [PATCH 08/23] hw/sd/sdcard: Remove explicit entries for illegal commands

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: NULL handler is already handled as illegal, no need to duplicate (that keeps this array simpler to maintain). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 11 --- 1 file cha

Re: [PATCH 07/23] hw/sd/sdcard: Remove ACMD6 handler for SPI mode

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: There is no ACMD6 command in SPI mode, remove the pointless handler introduced in commit 946897ce18 ("sdcard: handles more commands in SPI mode"). Keep sd_cmd_unimplemented() since we'll reuse it later. Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH 06/23] hw/sd/sdcard: Use Load/Store API to fill some CID/CSD registers

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: The ld/st API helps noticing CID or CSD bytes refer to the same field. Multi-bytes fields are stored MSB first in CID / CSD. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 9 ++---

Re: [PATCH 05/23] hw/sd/sdcard: Use registerfield CSR::CURRENT_STATE definition

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: Use registerfield-generated definitions to update card_status. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/

Re: [PATCH 03/23] hw/sd/sdcard: Fix typo in SEND_OP_COND command name

2024-06-21 Thread Cédric Le Goater
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote: There is no SEND_OP_CMD but SEND_OP_COND. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 6 +++--- hw/sd/sdmmc-internal.c | 2 +- 2 files changed, 4 insertions(+), 4 dele

  1   2   3   >