[PATCH v5 6/7] migration/multifd: Enable multifd zero page checking by default.

2024-03-08 Thread Hao Xiang
From: Hao Xiang 1. Set default "zero-page-detection" option to "multifd". Now zero page checking can be done in the multifd threads and this becomes the default configuration. 2. Handle migration QEMU9.0 -> QEMU8.2 compatibility. We provide backward compatibility where zero page checking is done

[PATCH v5 0/7] Introduce multifd zero page checking.

2024-03-08 Thread Hao Xiang
From: Hao Xiang v5 update: * Move QEMU9.0 -> QEMU8.2 migration backward compatibility handling into the patch where "multifd" zero page checking becomes the default option. * A few function renaming according to feedback. * Fix bug in multifd_send_zero_page_detect. * Rebase on the new mapped-ram

[PATCH v5 2/7] migration/multifd: Allow clearing of the file_bmap from multifd

2024-03-08 Thread Hao Xiang
From: Fabiano Rosas We currently only need to clear the mapped-ram file bitmap from the migration thread during save_zero_page. We're about to add support for zero page detection on the multifd thread, so allow ramblock_set_file_bmap_atomic() to also clear the bits. Signed-off-by: Fabiano

[PATCH v5 7/7] migration/multifd: Add new migration test cases for legacy zero page checking.

2024-03-08 Thread Hao Xiang
From: Hao Xiang Now that zero page checking is done on the multifd sender threads by default, we still provide an option for backward compatibility. This change adds a qtest migration test case to set the zero-page-detection option to "legacy" and run multifd migration with zero page checking on

[PATCH v5 4/7] migration/multifd: Implement zero page transmission on the multifd thread.

2024-03-08 Thread Hao Xiang
From: Hao Xiang 1. Add zero_pages field in MultiFDPacket_t. 2. Implements the zero page detection and handling on the multifd threads for non-compression, zlib and zstd compression backends. 3. Added a new value 'multifd' in ZeroPageDetection enumeration. 4. Adds zero page counters and updates

[PATCH v5 5/7] migration/multifd: Implement ram_save_target_page_multifd to handle multifd version of MigrationOps::ram_save_target_page.

2024-03-08 Thread Hao Xiang
From: Hao Xiang 1. Add a dedicated handler for MigrationOps::ram_save_target_page in multifd live migration. 2. Refactor ram_save_target_page_legacy so that the legacy and multifd handlers don't have internal functions calling into each other. Signed-off-by: Hao Xiang Reviewed-by: Fabiano

[PATCH v5 1/7] migration/multifd: Allow zero pages in file migration

2024-03-08 Thread Hao Xiang
From: Fabiano Rosas Currently, it's an error to have no data pages in the multifd file migration because zero page detection is done in the migration thread and zero pages don't reach multifd. This is enforced with the pages->num assert. We're about to add zero page detection on the multifd

Re: [PATCH v4 0/8] qtest: migration: Add tests for introducing 'channels' argument in migrate QAPIs

2024-03-08 Thread Het Gala
Can find the reference to the githab pipeline (before patchset) : https://gitlab.com/galahet/Qemu/-/pipelines/1207185095 Can find the reference to the githab pipeline (after patchset) : https://gitlab.com/galahet/Qemu/-/pipelines/1207183673 On 09/03/24 2:29 am, Het Gala wrote: With recent

Re: [External] Re: [PATCH v4 6/7] migration/multifd: Add zero pages and zero bytes counter to migration status interface.

2024-03-08 Thread hao . xiang
> > On Thu, Feb 29, 2024 at 11:40 PM Markus Armbruster wrote: > > > > > Hao Xiang writes: > > > > This change extends the MigrationStatus interface to track zero pages > > > > and zero bytes counter. > > > > Signed-off-by: Hao Xiang > > > > [...] > > > > diff --git

Re: [PATCH v2 07/20] smbios: avoid mangling user provided tables

2024-03-08 Thread Ani Sinha
> On 08-Mar-2024, at 22:49, Igor Mammedov wrote: > > On Thu, 7 Mar 2024 09:33:17 +0530 > Ani Sinha wrote: > >>> On 06-Mar-2024, at 12:11, Ani Sinha wrote: >>> >>> >>> >>> On Tue, 5 Mar 2024, Igor Mammedov wrote: >>> currently smbios_entry_add() preserves internally '-smbios type='

Re: Unmapping KVM Guest Memory from Host Kernel

2024-03-08 Thread Matthew Wilcox
On Fri, Mar 08, 2024 at 03:50:05PM +, Gowans, James wrote: > Currently when using anonymous memory for KVM guest RAM, the memory all > remains mapped into the kernel direct map. We are looking at options to > get KVM guest memory out of the kernel’s direct map as a principled > approach to

Re: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-03-08 Thread fan
On Thu, Mar 07, 2024 at 12:45:55PM +, Jonathan Cameron wrote: > ... > > > > > +list = records; > > > > +extents = g_new0(CXLDCExtentRaw, num_extents); > > > > +while (list) { > > > > +CXLDCExtent *ent; > > > > +bool skip_extent = false; > > > > + > > > > +

Re: [PATCH] disas/riscv: Further correction to LUI disassembly

2024-03-08 Thread Richard Bagley
post-nack, one further comment: One could argue that this change also aligns QEMU with supporting tools (as Andrew observed), and it makes sense to merge this change into QEMU until those tools update to supporting signed decimal numbers with immediates. As it is, both GNU assembler and the LLVM

Re: [PATCH v2 2/2] xen: fix stubdom PCI addr

2024-03-08 Thread Jason Andryuk
On Tue, Mar 5, 2024 at 2:13 PM Marek Marczykowski-Górecki wrote: > > From: Frédéric Pierret (fepitre) Needs to be changed to Marek. > When running in a stubdomain, the config space access via sysfs needs to > use BDF as seen inside stubdomain (connected via xen-pcifront), which is > different

Re: [PATCH v2 1/2] hw/xen: detect when running inside stubdomain

2024-03-08 Thread Jason Andryuk
On Tue, Mar 5, 2024 at 2:13 PM Marek Marczykowski-Górecki wrote: > > Introduce global xen_is_stubdomain variable when qemu is running inside > a stubdomain instead of dom0. This will be relevant for subsequent > patches, as few things like accessing PCI config space need to be done > differently.

[PATCH v3 5/5] tests/tcg: Add multiarch test for Xfer:siginfo:read stub

2024-03-08 Thread Gustavo Romero
Add multiarch test for testing if Xfer:siginfo:read query is properly handled by gdbstub. Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson --- tests/tcg/multiarch/Makefile.target | 10 ++- .../gdbstub/test-qxfer-siginfo-read.py| 26 +++

[PATCH v3 1/5] gdbstub: Rename back gdb_handlesig

2024-03-08 Thread Gustavo Romero
Rename gdb_handlesig_reason back to gdb_handlesig. There is no need to add a wrapper for gdb_handlesig and rename it when a new parameter is added. Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- gdbstub/user.c | 8

[PATCH v3 3/5] gdbstub: Save target's siginfo

2024-03-08 Thread Gustavo Romero
Save target's siginfo into gdbserver_state so it can be used later, for example, in any stub that requires the target's si_signo and si_code. This change affects only linux-user mode. Signed-off-by: Gustavo Romero Suggested-by: Richard Henderson --- bsd-user/main.c| 2 +-

[PATCH v3 4/5] gdbstub: Add Xfer:siginfo:read stub

2024-03-08 Thread Gustavo Romero
Add stub to handle Xfer:siginfo:read packet query that requests the machine's siginfo data. This is used when GDB user executes 'print $_siginfo' and when the machine stops due to a signal, for instance, on SIGSEGV. The information in siginfo allows GDB to determiner further details on the

[PATCH v3 0/5] Add stub to handle Xfer:siginfo:read query

2024-03-08 Thread Gustavo Romero
Xfer:siginfo:read query is received, usually, when GDB catches a signal and needs additional info about it, like the si_code and the si_addr, so GDB can show the user interesting info about the signal. This query can also be received when an user explicitly asks for more information via printing

[PATCH v3 2/5] linux-user: Move tswap_siginfo out of target code

2024-03-08 Thread Gustavo Romero
Move tswap_siginfo from target code to handle_pending_signal. This will allow some cleanups and having the siginfo ready to be used in gdbstub. Signed-off-by: Gustavo Romero Suggested-by: Richard Henderson Reviewed-by: Richard Henderson --- linux-user/aarch64/signal.c | 2 +-

Re: Unmapping KVM Guest Memory from Host Kernel

2024-03-08 Thread Manwaring, Derek
On 2024-03-08 10:36-0700, David Matlack wrote: > On Fri, Mar 8, 2024 at 8:25 AM Brendan Jackman wrote: > > On Fri, 8 Mar 2024 at 16:50, Gowans, James wrote: > > > Our goal is to more completely address the class of issues whose leak > > > origin is categorized as "Mapped memory" [1]. > > > > Did

Re: [External] Re: [PATCH v4 2/7] migration/multifd: Implement zero page transmission on the multifd thread.

2024-03-08 Thread hao . xiang
> > On Sun, Mar 3, 2024 at 11:16 PM Peter Xu wrote: > > > > > On Fri, Mar 01, 2024 at 02:28:24AM +, Hao Xiang wrote: > > > > -GlobalProperty hw_compat_8_2[] = {}; > > > > +GlobalProperty hw_compat_8_2[] = { > > > > + { "migration", "zero-page-detection", "legacy"}, > > > > +}; > >

Re: [PATCH v4 3/7] migration/multifd: Implement ram_save_target_page_multifd to handle multifd version of MigrationOps::ram_save_target_page.

2024-03-08 Thread hao . xiang
> > On Sun, Mar 3, 2024 at 11:46 PM Peter Xu wrote: > > > > > On Fri, Mar 01, 2024 at 02:28:25AM +, Hao Xiang wrote: > > > > 1. Add a dedicated handler for MigrationOps::ram_save_target_page in > > > > multifd live migration. > > > > 2. Refactor ram_save_target_page_legacy so that

Re: [PATCH v2 4/5] gdbstub: Add Xfer:siginfo:read stub

2024-03-08 Thread Richard Henderson
On 3/8/24 08:30, Gustavo Romero wrote: Hi Richard! On 3/7/24 6:13 PM, Richard Henderson wrote: On 3/7/24 08:26, Gustavo Romero wrote: +void gdb_handle_query_xfer_siginfo(GArray *params, void *user_ctx) +{ +    unsigned long offset, len; +    uint8_t *siginfo_offset; + +    offset =

Re: [PATCH v2 3/5] gdbstub: Save target's siginfo

2024-03-08 Thread Richard Henderson
On 3/8/24 09:25, Alex Bennée wrote: make vm-build-[open|net|free]bsd see make vm-help for details. That won't build freebsd user. Something I've mentioned to you before... r~

Re: [PATCH v9 00/21] Introduce smp.modules for x86 in QEMU

2024-03-08 Thread Zhao Liu
On Fri, Mar 08, 2024 at 05:36:38PM +0100, Philippe Mathieu-Daudé wrote: > Date: Fri, 8 Mar 2024 17:36:38 +0100 > From: Philippe Mathieu-Daudé > Subject: Re: [PATCH v9 00/21] Introduce smp.modules for x86 in QEMU > > On 27/2/24 11:32, Zhao Liu wrote: > > > --- > > Zhao Liu (20): > >

Re: [PATCH v2 00/13] Cleanup on SMP and its test

2024-03-08 Thread Zhao Liu
Hi Philippe, > > Can you share your base commit please? > > Applying: hw/core/machine-smp: Remove deprecated "parameter=0" SMP > configurations > Applying: hw/core/machine-smp: Deprecate unsupported "parameter=1" SMP > configurations > error: patch failed: docs/about/deprecated.rst:47 > error:

Re: Unmapping KVM Guest Memory from Host Kernel

2024-03-08 Thread Sean Christopherson
On Fri, Mar 08, 2024, James Gowans wrote: > However, memfd_secret doesn’t work out the box for KVM guest memory; the > main reason seems to be that the GUP path is intentionally disabled for > memfd_secret, so if we use a memfd_secret backed VMA for a memslot then > KVM is not able to fault the

Re: Unmapping KVM Guest Memory from Host Kernel

2024-03-08 Thread David Matlack
On Fri, Mar 8, 2024 at 8:25 AM Brendan Jackman wrote: > > Hi James > > On Fri, 8 Mar 2024 at 16:50, Gowans, James wrote: > > Our goal is to more completely address the class of issues whose leak > > origin is categorized as "Mapped memory" [1]. > > Did you forget a link below? I'm interested in

Re: Unmapping KVM Guest Memory from Host Kernel

2024-03-08 Thread Manwaring, Derek
On 2024-03-08 at 10:46-0700, David Woodhouse wrote: > On Fri, 2024-03-08 at 09:35 -0800, David Matlack wrote: > > I think what James is looking for (and what we are also interested > > in), is _eliminating_ the ability to access guest memory from the > > direct map entirely. And in general,

Re: Unmapping KVM Guest Memory from Host Kernel

2024-03-08 Thread Sean Christopherson
On Fri, Mar 08, 2024, David Woodhouse wrote: > On Fri, 2024-03-08 at 09:35 -0800, David Matlack wrote: > > I think what James is looking for (and what we are also interested > > in), is _eliminating_ the ability to access guest memory from the > > direct map entirely. And in general, eliminate the

[PATCH v8 05/10] target/riscv: use vext_set_tail_elems_1s() in vcrypto insns

2024-03-08 Thread Daniel Henrique Barboza
Vcrypto insns should also use the same helper the regular vector insns uses to update the tail elements. Move vext_set_tail_elems_1s() to vector_internals.c and make it public. Use it in vcrypto_helper.c to set tail elements instead of vext_set_elems_1s(). Helpers must set env->vstart = 0 after

[PATCH v8 00/10] riscv: set vstart_eq_zero on mark_vs_dirty

2024-03-08 Thread Daniel Henrique Barboza
Hi, In this new version we addressed the points rose by LIU Zhiwei in the v7 version. Some patches had to go, additional patches were added: - patches 1 and 2 from v7: already queued and sent in the last PR. - patch 6 from v7: moved to patch 1 - patches 2, 3, 4 and 5 (all new): rework how we

[PATCH v8 10/10] target/riscv/vector_helper.c: optimize loops in ldst helpers

2024-03-08 Thread Daniel Henrique Barboza
Change the for loops in ldst helpers to do a single increment in the counter, and assign it env->vstart, to avoid re-reading from vstart every time. Suggested-by: Richard Henderson Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson ---

[PATCH v8 07/10] target/riscv: remove 'over' brconds from vector trans

2024-03-08 Thread Daniel Henrique Barboza
Most of the vector translations has this following pattern at the start: TCGLabel *over = gen_new_label(); tcg_gen_brcond_tl(TCG_COND_GEU, cpu_vstart, cpu_vl, over); And then right at the end: gen_set_label(over); return true; This means that if vstart >= vl we'll not set

[PATCH v8 08/10] trans_rvv.c.inc: remove redundant mark_vs_dirty() calls

2024-03-08 Thread Daniel Henrique Barboza
trans_vmv_v_i , trans_vfmv_v_f and the trans_##NAME macro from GEN_VMV_WHOLE_TRANS() are calling mark_vs_dirty() in both branches of their 'ifs'. conditionals. Call it just once in the end like other functions are doing. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson

[PATCH v8 01/10] target/riscv/vector_helper.c: set vstart = 0 in GEN_VEXT_VSLIDEUP_VX()

2024-03-08 Thread Daniel Henrique Barboza
The helper isn't setting env->vstart = 0 after its execution, as it is expected from every vector instruction that completes successfully. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/vector_helper.c | 1 + 1 file

[PATCH v8 09/10] target/riscv: Clear vstart_qe_zero flag

2024-03-08 Thread Daniel Henrique Barboza
From: Ivan Klokov The vstart_qe_zero flag is set at the beginning of the translation phase from the env->vstart variable. During the execution phase all functions will set env->vstart = 0 after a successful execution, but the vstart_eq_zero flag remains the same as at the start of the block.

[PATCH v8 04/10] target/riscv/vector_helper.c: update tail with vext_set_tail_elems_1s()

2024-03-08 Thread Daniel Henrique Barboza
Change all code that updates tail elems to use vext_set_tail_elems_1s() instead of vext_set_elems_1s(). Setting 'env->vstart=0' needs to be the very last thing a helper does because env->vstart is being checked by vext_set_tail_elems_1s(). A side effect of this change is that a lot of 'vta'

[PATCH v8 03/10] target/riscv/vector_helper.c: do vstart=0 after updating tail

2024-03-08 Thread Daniel Henrique Barboza
vext_vv_rm_1() and vext_vv_rm_2() are setting vstart = 0 before their respective callers (vext_vv_rm_2 and vext_vx_rm_2) update the tail elements. This is benign now, but we'll convert the tail updates to use vext_set_tail_elems_1s(), and this function is sensitive to vstart changes. Do vstart =

[PATCH v8 06/10] trans_rvv.c.inc: set vstart = 0 in int scalar move insns

2024-03-08 Thread Daniel Henrique Barboza
trans_vmv_x_s, trans_vmv_s_x, trans_vfmv_f_s and trans_vfmv_s_f aren't setting vstart = 0 after execution. This is usually done by a helper in vector_helper.c but these functions don't use helpers. We'll set vstart after any potential 'over' brconds, and that will also mandate a mark_vs_dirty()

[PATCH v8 02/10] target/riscv: handle vstart >= vl in vext_set_tail_elems_1s()

2024-03-08 Thread Daniel Henrique Barboza
We're going to make changes that will required each helper to be responsible for the 'vstart' management, i.e. we will relieve the 'vstart < vl' assumption that helpers have today. To do that we'll need to deal with how we're updating tail elements first. We can't update them if vstart >= vl. We

Re: [External] Re: [PATCH v3 11/20] util/dsa: Implement DSA task asynchronous submission and wait for completion.

2024-03-08 Thread hao . xiang
> > On Fri, Mar 8, 2024 at 2:11 AM Jonathan Cameron > > wrote: > > > > > On Thu, 4 Jan 2024 00:44:43 + > > > > Hao Xiang wrote: > > > > * Add a DSA task completion callback. > > > > * DSA completion thread will call the tasks's completion callback > > > > on every task/batch task

[PATCH v4 8/8] Add negative tests to validate migration QAPIs

2024-03-08 Thread Het Gala
Migration QAPI arguments - uri and channels are mutually exhaustive. Add negative validation tests, one with both arguments present and one with none present. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas Reviewed-by: Fabiano Rosas --- tests/qtest/migration-test.c | 54

[PATCH v4 6/8] Add channels parameter in migrate_qmp

2024-03-08 Thread Het Gala
Alter migrate_qmp() to allow use of channels parameter, but only fill the uri with correct port number if there are no channels. Here we don't want to allow the wrong cases of having both or none (ex: migrate_qmp_fail). Signed-off-by: Het Gala Suggested-by: Fabiano Rosas ---

[PATCH v4 5/8] Add migrate_set_ports into migrate_qmp to update migration port value

2024-03-08 Thread Het Gala
migrate_set_get_qdict gets qdict with the dst QEMU parameters migrate_set_ports() from list of channels reads each QDict for port, and fills the port with correct value in case it was 0 in the test. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 73

[PATCH v4 4/8] Add channels parameter in migrate_qmp_fail

2024-03-08 Thread Het Gala
Alter migrate_qmp_fail() to allow both uri and channels independently. For channels, convert string to a Dict. No dealing with migrate_get_socket_address() here because we will fail before starting the migration anyway. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas ---

[PATCH v4 7/8] Add multifd_tcp_plain test using list of channels instead of uri

2024-03-08 Thread Het Gala
Add a positive test to check multifd live migration but this time using list of channels (restricted to 1) as the starting point instead of simple uri string. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas --- tests/qtest/migration-test.c | 30 +++--- 1 file

[PATCH v4 2/8] Replace connect_uri and move migrate_get_socket_address inside migrate_qmp

2024-03-08 Thread Het Gala
Move the calls to migrate_get_socket_address() into migrate_qmp(). Get rid of connect_uri and replace it with args->connect_uri only because 'to' object will help to generate connect_uri with the correct port number. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas Reviewed-by: Fabiano Rosas

[PATCH v4 3/8] Replace migrate_get_connect_uri inplace of migrate_get_socket_address

2024-03-08 Thread Het Gala
migrate_get_socket_address implicitly converts SocketAddress into str. Move migrate_get_socket_address inside migrate_get_connect_uri which should return the uri string instead. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 26

[PATCH v4 1/8] Add 'to' object into migrate_qmp()

2024-03-08 Thread Het Gala
Add the 'to' object into migrate_qmp(), so we can use migrate_get_socket_address() inside migrate_qmp() to get the port value. This is not applied to other migrate_qmp* because they don't need the port. Signed-off-by: Het Gala Suggested-by: Fabiano Rosas Reviewed-by: Fabiano Rosas ---

[PATCH v4 0/8] qtest: migration: Add tests for introducing 'channels' argument in migrate QAPIs

2024-03-08 Thread Het Gala
With recent migrate QAPI changes, enabling the direct use of the 'channels' argument to avoid redundant URI string parsing is achieved. To ensure backward compatibility, both 'uri' and 'channels' are kept as optional parameters in migration QMP commands. However, they are mutually exhaustive,

Re: [PATCH] hw: gpio: introduce pcf8574 driver

2024-03-08 Thread Philippe Mathieu-Daudé
Hi Dmitriy, On 1/3/24 08:36, Dmitriy Sharikhin wrote: NXP PCF8574 and compatible ICs are simple I2C GPIO expanders. PCF8574 incorporates quasi-bidirectional IO, and simple communication protocol, when IO read is I2C byte read, and IO write is I2C byte write. User can think of it as open-drain

Re: [PATCH v6] crypto: Introduce SM4 symmetric cipher algorithm

2024-03-08 Thread Thomas Huth
On 07/12/2023 16.47, Hyman Huang wrote: Introduce the SM4 cipher algorithms (OSCCA GB/T 32907-2016). SM4 (GBT.32907-2016) is a cryptographic standard issued by the Organization of State Commercial Administration of China (OSCCA) as an authorized cryptographic algorithms for the use within

Re: [PATCH v2 3/5] gdbstub: Save target's siginfo

2024-03-08 Thread Gustavo Romero
Hi Richard, On 3/7/24 6:09 PM, Richard Henderson wrote: On 3/7/24 08:26, Gustavo Romero wrote: Save target's siginfo into gdbserver_state so it can be used later, for example, in any stub that requires the target's si_signo and si_code. This change affects only linux-user mode.

Re: [PATCH] hw/arm: Deprecate various old Arm machine types

2024-03-08 Thread Philippe Mathieu-Daudé
On 8/3/24 18:16, Peter Maydell wrote: QEMU includes some models of old Arm machine types which are a bit problematic for us because: * they're written in a very old way that uses numerous APIs that we would like to get away from (eg they don't use qdev, they use

Re: [PATCH] hw/arm: Deprecate various old Arm machine types

2024-03-08 Thread Thomas Huth
On 08/03/2024 18.16, Peter Maydell wrote: QEMU includes some models of old Arm machine types which are a bit problematic for us because: * they're written in a very old way that uses numerous APIs that we would like to get away from (eg they don't use qdev, they use

Re: [PATCH] pci: Add option to disable device level INTx masking

2024-03-08 Thread Michael S. Tsirkin
On Fri, Mar 08, 2024 at 01:02:01PM -0700, Alex Williamson wrote: > On Fri, 8 Mar 2024 14:37:06 -0500 > "Michael S. Tsirkin" wrote: > > > On Fri, Mar 08, 2024 at 10:24:14AM -0700, Alex Williamson wrote: > > > On Fri, 8 Mar 2024 11:57:38 -0500 > > > "Michael S. Tsirkin" wrote: > > > > > > > On

Re: [PATCH] pci: Add option to disable device level INTx masking

2024-03-08 Thread Alex Williamson
On Fri, 8 Mar 2024 14:37:06 -0500 "Michael S. Tsirkin" wrote: > On Fri, Mar 08, 2024 at 10:24:14AM -0700, Alex Williamson wrote: > > On Fri, 8 Mar 2024 11:57:38 -0500 > > "Michael S. Tsirkin" wrote: > > > > > On Thu, Mar 07, 2024 at 11:46:42AM -0700, Alex Williamson wrote: > > > > The PCI

Re: [PATCH v1 3/5] hw/ppc: SPI controller model - sequencer and shifter

2024-03-08 Thread Stefan Berger
On 2/7/24 11:08, Chalapathi V wrote: In this commit SPI shift engine and sequencer logic is implemented. Shift engine performs serialization and de-serialization according to the control by the sequencer and according to the setup defined in the configuration registers. Sequencer implements

Re: [PATCH] pci: Add option to disable device level INTx masking

2024-03-08 Thread Michael S. Tsirkin
On Fri, Mar 08, 2024 at 10:24:14AM -0700, Alex Williamson wrote: > On Fri, 8 Mar 2024 11:57:38 -0500 > "Michael S. Tsirkin" wrote: > > > On Thu, Mar 07, 2024 at 11:46:42AM -0700, Alex Williamson wrote: > > > The PCI 2.3 spec added definitions of the INTx disable and status bits, > > > in the

Re: [PATCH v2 3/5] gdbstub: Save target's siginfo

2024-03-08 Thread Alex Bennée
Gustavo Romero writes: > Hi Alex, > > On 3/7/24 7:33 PM, Alex Bennée wrote: >> Richard Henderson writes: >> >>> On 3/7/24 08:26, Gustavo Romero wrote: Save target's siginfo into gdbserver_state so it can be used later, for example, in any stub that requires the target's si_signo and

Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-08 Thread Michael S. Tsirkin
On Fri, Mar 08, 2024 at 12:45:13PM -0500, Jonah Palmer wrote: > > > On 3/8/24 12:36 PM, Eugenio Perez Martin wrote: > > On Fri, Mar 8, 2024 at 6: 01 PM Michael S. Tsirkin > > wrote: > > On Mon, Mar 04, 2024 at 02: 46: 06PM -0500, Jonah Palmer > > wrote: > > Prevent ioeventfd from being

[RFC PATCH INCOMPLETE] cxl: Multi-headed Single Logical Device (MHSLD)

2024-03-08 Thread Gregory Price
Implement the scaffolding for an MHSLD with a simple multi-headed command set. This device inherits the cxl-type3 device and will provide the hooks needed to serialize multi-system devices. This device requires linux, as it uses shared memory (shmem) to implement the shared state. This also

Re: [PATCH v2 4/5] gdbstub: Add Xfer:siginfo:read stub

2024-03-08 Thread Gustavo Romero
Hi Richard! On 3/7/24 6:13 PM, Richard Henderson wrote: On 3/7/24 08:26, Gustavo Romero wrote: +void gdb_handle_query_xfer_siginfo(GArray *params, void *user_ctx) +{ +    unsigned long offset, len; +    uint8_t *siginfo_offset; + +    offset = get_param(params, 0)->val_ul; +    len =

[PULL 6/9] oslib-posix: fix memory leak in touch_all_pages

2024-03-08 Thread Paolo Bonzini
touch_all_pages() can return early, before creating threads. In this case, however, it leaks the MemsetContext that it has allocated at the beginning of the function. Reported by Coverity as CID 1534922. Fixes: 04accf43df8 ("oslib-posix: initialize backend memory objects in parallel",

[PULL v2 0/9] Misc fixes and coverity CI for 2024-03-08

2024-03-08 Thread Paolo Bonzini
The following changes since commit 8f6330a807f2642dc2a3cdf33347aa28a4c00a87: Merge tag 'pull-maintainer-updates-060324-1' of https://gitlab.com/stsquad/qemu into staging (2024-03-06 16:56:20 +) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git

[PULL 4/9] hw/scsi/lsi53c895a: stop script on phase mismatch

2024-03-08 Thread Paolo Bonzini
From: Sven Schnelle Netbsd isn't happy with qemu lsi53c895a emulation: cd0(esiop0:0:2:0): command with tag id 0 reset esiop0: autoconfiguration error: phase mismatch without command esiop0: autoconfiguration error: unhandled scsi interrupt, sist=0x80 sstat1=0x0 DSA=0x23a64b1 DSP=0x50 This is

Re: [PULL 00/12] Misc fixes, i386 TSTEQ/TSTNE, coverity CI for 2024-03-08

2024-03-08 Thread Paolo Bonzini
On Fri, Mar 8, 2024 at 6:32 PM Peter Maydell wrote: > Looks like this hits a TCG assertion on aarch64 host: > https://gitlab.com/qemu-project/qemu/-/jobs/6353434430 Ok, I dropped the TSTEQ/TSTNE patches. Paolo

[PULL 5/9] hw/intc/apic: fix memory leak

2024-03-08 Thread Paolo Bonzini
deliver_bitmask is allocated on the heap in apic_deliver(), but there are many paths in the function that return before the corresponding g_free() is reached. Fix this by switching to g_autofree and, while at it, also switch to g_new. Do the same in apic_deliver_irq() as well for consistency.

[PULL 9/9] gitlab-ci: add manual job to run Coverity

2024-03-08 Thread Paolo Bonzini
Add a job that can be run, either manually or on a schedule, to upload a build to Coverity Scan. The job uses the run-coverity-scan script in multiple phases of check, download tools and upload, in order to avoid both wasting time (skip everything if you are above the upload quota) and avoid

[PULL 7/9] mips: do not list individual devices from configs/

2024-03-08 Thread Paolo Bonzini
Add new "select" and "imply" directives if needed. The resulting config-devices.mak files are the same as before. Builds without default devices will become much smaller than before, and qtests fail (as expected, though suboptimal) for mips64-softmmu because most tests do not use -nodefaults, so

[PULL 8/9] run-coverity-scan: add --check-upload-only option

2024-03-08 Thread Paolo Bonzini
Add an option to check if upload is permitted without actually attempting a build. This can be useful to add a third outcome beyond success and failure---namely, a CI job can self-cancel if the uploading quota has been reached. There is a small change here in that a failure to do the upload

[PULL 3/9] meson: Remove --warn-common ldflag

2024-03-08 Thread Paolo Bonzini
From: Akihiko Odaki --warn-common ldflag causes warnings for multiple definitions of ___asan_globals_registered when enabling AddressSanitizer with clang. The warning is somewhat obsolete so just remove it. The common block is used to allow duplicate definitions of uninitialized global

[PULL 1/9] hw/scsi/lsi53c895a: add timer to scripts processing

2024-03-08 Thread Paolo Bonzini
From: Sven Schnelle HP-UX 10.20 seems to make the lsi53c895a spinning on a memory location under certain circumstances. As the SCSI controller and CPU are not running at the same time this loop will never finish. After some time, the check loop interrupts with a unexpected device disconnect.

[PULL 2/9] system/qdev-monitor: move drain_call_rcu call under if (!dev) in qmp_device_add()

2024-03-08 Thread Paolo Bonzini
From: Dmitrii Gavrilov Original goal of addition of drain_call_rcu to qmp_device_add was to cover the failure case of qdev_device_add. It seems call of drain_call_rcu was misplaced in 7bed89958bfbf40df what led to waiting for pending RCU callbacks under happy path too. What led to overall

reminder: softfreeze coming up

2024-03-08 Thread Peter Maydell
Hi; just a reminder that QEMU softfreeze is on the 12th March, next Tuesday. That means that all feature change work should be in a pullreq on the mailing list by that date. Also, if you have outstanding bugs that you know ought to be fixed for the 9.0 release, now is a good time to make sure

Re: [PATCH] hw/arm: Deprecate various old Arm machine types

2024-03-08 Thread Richard Henderson
On 3/8/24 07:16, Peter Maydell wrote: Mark all these machine types as depprecated. Signed-off-by: Peter Maydell --- docs/about/deprecated.rst | 15 +++ hw/arm/gumstix.c | 2 ++ hw/arm/mainstone.c| 1 + hw/arm/nseries.c | 2 ++ hw/arm/palm.c

Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-08 Thread Jonah Palmer
On 3/8/24 12:36 PM, Eugenio Perez Martin wrote: On Fri, Mar 8, 2024 at 6: 01 PM Michael S. Tsirkin wrote: > > On Mon, Mar 04, 2024 at 02: 46: 06PM -0500, Jonah Palmer wrote: > > Prevent ioeventfd from being enabled/disabled when a virtio-pci > > device ZjQcmQRYFpfptBannerStart This

Re: Unmapping KVM Guest Memory from Host Kernel

2024-03-08 Thread David Woodhouse
On Fri, 2024-03-08 at 09:35 -0800, David Matlack wrote: > I think what James is looking for (and what we are also interested > in), is _eliminating_ the ability to access guest memory from the > direct map entirely. And in general, eliminate the ability to access > guest memory in as many ways as

Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-08 Thread Eugenio Perez Martin
On Fri, Mar 8, 2024 at 6:01 PM Michael S. Tsirkin wrote: > > On Mon, Mar 04, 2024 at 02:46:06PM -0500, Jonah Palmer wrote: > > Prevent ioeventfd from being enabled/disabled when a virtio-pci > > device has negotiated the VIRTIO_F_NOTIFICATION_DATA transport > > feature. > > > > Due to ioeventfd

Re: [PATCH v3 01/29] bulk: Access existing variables initialized to >F when available

2024-03-08 Thread Anthony PERARD
On Mon, Jan 29, 2024 at 05:44:43PM +0100, Philippe Mathieu-Daudé wrote: > When a variable is initialized to >field, use it > in place. Rationale: while this makes the code more concise, > this also helps static analyzers. > > Mechanical change using the following Coccinelle spatch script: > >

Re: [PULL 00/34] riscv-to-apply queue

2024-03-08 Thread Peter Maydell
available in the Git repository at: > > https://github.com/alistair23/qemu.git tags/pull-riscv-to-apply-20240308-1 > > for you to fetch changes up to 301876597112218c1e465ecc2b2fef6b27d5c27b: > > target/riscv: fix ACP

Re: [PULL 00/12] Misc fixes, i386 TSTEQ/TSTNE, coverity CI for 2024-03-08

2024-03-08 Thread Peter Maydell
On Fri, 8 Mar 2024 at 14:58, Paolo Bonzini wrote: > > The following changes since commit 8f6330a807f2642dc2a3cdf33347aa28a4c00a87: > > Merge tag 'pull-maintainer-updates-060324-1' of > https://gitlab.com/stsquad/qemu into staging (2024-03-06 16:56:20 +) > > are available in the Git

Re: [PATCH] pci: Add option to disable device level INTx masking

2024-03-08 Thread Alex Williamson
On Fri, 8 Mar 2024 11:57:38 -0500 "Michael S. Tsirkin" wrote: > On Thu, Mar 07, 2024 at 11:46:42AM -0700, Alex Williamson wrote: > > The PCI 2.3 spec added definitions of the INTx disable and status bits, > > in the command and status registers respectively. The command register > > bit,

Re: [PATCH v2 07/20] smbios: avoid mangling user provided tables

2024-03-08 Thread Igor Mammedov
On Thu, 7 Mar 2024 09:33:17 +0530 Ani Sinha wrote: > > On 06-Mar-2024, at 12:11, Ani Sinha wrote: > > > > > > > > On Tue, 5 Mar 2024, Igor Mammedov wrote: > > > >> currently smbios_entry_add() preserves internally '-smbios type=' > >> options but tables provided with '-smbios file=' are

[PATCH] hw/arm: Deprecate various old Arm machine types

2024-03-08 Thread Peter Maydell
QEMU includes some models of old Arm machine types which are a bit problematic for us because: * they're written in a very old way that uses numerous APIs that we would like to get away from (eg they don't use qdev, they use qemu_system_reset_request(), they use vmstate_register(), etc) *

Re: [PATCH] i386: load kernel on xen using DMA

2024-03-08 Thread Anthony PERARD
On Fri, Jun 18, 2021 at 09:54:14AM +0100, Alex Bennée wrote: > > Marek Marczykowski-Górecki writes: > > > Kernel on Xen is loaded via fw_cfg. Previously it used non-DMA version, > > which loaded the kernel (and initramfs) byte by byte. Change this > > to DMA, to load in bigger chunks. > > This

[PULL 1/3] hv-balloon: avoid alloca() usage

2024-03-08 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" alloca() is frowned upon, replace it with g_malloc0() + g_autofree. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Signed-off-by: Maciej S. Szmigiero --- hw/hyperv/hv-balloon.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-)

Re: [PATCH] pci: Add option to disable device level INTx masking

2024-03-08 Thread Cédric Le Goater
On 3/7/24 19:46, Alex Williamson wrote: The PCI 2.3 spec added definitions of the INTx disable and status bits, in the command and status registers respectively. The command register bit, commonly known as DisINTx in lspci, controls whether the device can assert the INTx signal. Operating

[PULL 3/3] vmbus: Print a warning when enabled without the recommended set of features

2024-03-08 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" Some Windows versions crash at boot or fail to enable the VMBus device if they don't see the expected set of Hyper-V features (enlightenments). Since this provides poor user experience let's warn user if the VMBus device is enabled without the recommended set of

[PULL 0/3] Hyper-V Dynamic Memory and VMBus misc small patches

2024-03-08 Thread Maciej S. Szmigiero
github.com/maciejsszmigiero/qemu.git tags/pull-hv-balloon-20240308 for you to fetch changes up to 6093637b4d32875f98cd59696ffc5f26884aa0b4: vmbus: Print a warning when enabled without the recommended set of features (2024-03-08 14:1

[PULL 2/3] hv-balloon: define dm_hot_add_with_region to avoid Coverity warning

2024-03-08 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" Since the presence of a hot add memory region is optional in hot add request message it wasn't part of this message declaration (struct dm_hot_add). Instead, the code allocated such enlarged message by simply adding the necessary size for this extra field to the size

Re: [RFC PATCH 4/5] hw/i386/q35: Wire virtual SMI# lines to ICH9 chipset

2024-03-08 Thread Philippe Mathieu-Daudé
On 8/3/24 17:06, Thomas Huth wrote: On 08/03/2024 09.08, Philippe Mathieu-Daudé wrote: On 7/3/24 20:43, Thomas Huth wrote: On 28/02/2024 17.43, Zhao Liu wrote: Hi Philippe, +/* + * Real ICH9 contains a single SMI output line and doesn't broadcast CPUs. + * Virtualized ICH9 allows

Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-08 Thread Michael S. Tsirkin
On Mon, Mar 04, 2024 at 02:46:06PM -0500, Jonah Palmer wrote: > Prevent ioeventfd from being enabled/disabled when a virtio-pci > device has negotiated the VIRTIO_F_NOTIFICATION_DATA transport > feature. > > Due to ioeventfd not being able to carry the extra data associated with > this feature,

Re: [PATCH v2 3/5] gdbstub: Save target's siginfo

2024-03-08 Thread Gustavo Romero
Hi Alex, On 3/7/24 7:33 PM, Alex Bennée wrote: Richard Henderson writes: On 3/7/24 08:26, Gustavo Romero wrote: Save target's siginfo into gdbserver_state so it can be used later, for example, in any stub that requires the target's si_signo and si_code. This change affects only linux-user

Re: [PATCH] pci: Add option to disable device level INTx masking

2024-03-08 Thread Michael S. Tsirkin
On Thu, Mar 07, 2024 at 11:46:42AM -0700, Alex Williamson wrote: > The PCI 2.3 spec added definitions of the INTx disable and status bits, > in the command and status registers respectively. The command register > bit, commonly known as DisINTx in lspci, controls whether the device > can assert

Re: [PATCH V4 00/14] allow cpr-reboot for vfio

2024-03-08 Thread Cédric Le Goater
On 2/22/24 18:33, Steven Sistare wrote: Peter (and David if interested): these patches still need RB: migration: notifier error checking migration: stop vm for cpr migration: update cpr-reboot description migration: options incompatible with cpr Alex, these patches still need RB:

Unmapping KVM Guest Memory from Host Kernel

2024-03-08 Thread Gowans, James
Hello KVM, MM and memfd_secret folks, Currently when using anonymous memory for KVM guest RAM, the memory all remains mapped into the kernel direct map. We are looking at options to get KVM guest memory out of the kernel’s direct map as a principled approach to mitigating speculative execution

  1   2   3   4   >