Re: [PULL 09/35] readline: Extract readline_add_completion_of() from monitor

2023-02-08 Thread Philippe Mathieu-Daudé
On 3/2/23 09:45, Markus Armbruster wrote: monitor/misc.h has static add_completion_option(). It's useful elsewhere in the monitor. Since it's not monitor-specific, move it to util/readline.c renamed to readline_add_completion_of(), and put it to use. 52f50b1e9f8fd410d4293a211d549ec61b902728 i

[PATCH v2] tests/docker: Use binaries for debian-tricore-cross

2023-02-08 Thread Bastian Koppelmann
since binutils is pretty old, it fails our CI repeatedly during the compilation of tricore-binutils. We created a precompiled version using the debian docker image and download it instead of building it ourself. We also updated the package to include a newer version of binutils, gcc, and newlib. T

Re: [PATCH] Hexagon (meson.build): define min bison version

2023-02-08 Thread Bastian Koppelmann
Hi Phil, On Tue, Feb 07, 2023 at 05:11:10PM +0100, Philippe Mathieu-Daudé wrote: > +Bastian > > On 7/2/23 16:08, Thomas Huth wrote: > > On 07/02/2023 15.54, Philippe Mathieu-Daudé wrote: > > > Cc'ing Paolo/Daniel/Thomas > > > > > > On 7/2/23 15:52, Matheus Tavares Bernardino wrote: > > > > Hexag

Re: [PATCH v2] tests/docker: Use binaries for debian-tricore-cross

2023-02-08 Thread Philippe Mathieu-Daudé
On 8/2/23 09:48, Bastian Koppelmann wrote: since binutils is pretty old, it fails our CI repeatedly during the compilation of tricore-binutils. We created a precompiled version using the debian docker image and download it instead of building it ourself. We also updated the package to include a

Re: [PATCH v4 3/4] qemu-io: add -r option to register I/O buffer

2023-02-08 Thread Hanna Czenczek
On 07.02.23 21:37, Stefan Hajnoczi wrote: The blk_register_buf() API is an optimization hint that allows some block drivers to avoid I/O buffer housekeeping or bounce buffers. Add an -r option to register the I/O buffer so that qemu-io can be used to test the blk_register_buf() API. The next com

Re: [PATCH v15 09/11] machine: adding s390 topology to query-cpu-fast

2023-02-08 Thread Pierre Morel
On 2/7/23 19:26, Nina Schoetterl-Glausch wrote: On Wed, 2023-02-01 at 14:20 +0100, Pierre Morel wrote: S390x provides two more topology containers above the sockets, books and drawers. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by: Pierre Morel --- qapi

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-08 Thread Michael S. Tsirkin
On Tue, Feb 07, 2023 at 07:33:09PM -0300, Jason A. Donenfeld wrote: > On Tue, Feb 7, 2023 at 7:31 PM Michael S. Tsirkin wrote: > > > > On Tue, Feb 07, 2023 at 07:17:58PM -0300, Jason A. Donenfeld wrote: > > > On Tue, Feb 07, 2023 at 04:45:19PM -0500, Michael S. Tsirkin wrote: > > > > On Tue, Feb 0

[PULL 06/12] tests/tcg/tricore: Add tests for RRPW_DEXTR

2023-02-08 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Message-Id: <20230202120432.1268-7-kbast...@mail.uni-paderborn.de> Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/macros.h| 8 + tests/tcg/tricore/test_dextr.S| 40 ++

[PULL 00/12] tricore queue

2023-02-08 Thread Bastian Koppelmann
ll-tricore-20230208 for you to fetch changes up to 6e34f54d88184b25db4fbc4dd1665d9be1a9e21c: tests/tcg/tricore: Add test for ld.h (2023-02-08 10:02:46 +0100) tricore insn bugfixes fo

[PULL 03/12] target/tricore: Fix OPC2_32_RCRW_INSERT translation

2023-02-08 Thread Bastian Koppelmann
we were mixing up the "c" and "d" registers. We used "d" as a destination register und "c" as the source. According to the TriCore ISA manual 1.6 vol 2 it is the other way round. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Resolves: https://gitlab.com/qemu-project/qemu/-/iss

[PULL 04/12] tests/tcg/tricore: Add test for OPC2_32_RCRW_INSERT

2023-02-08 Thread Bastian Koppelmann
DREG_RS2 and DREG_CALC_RESULT were mapped to the same register which would not trigger https://gitlab.com/qemu-project/qemu/-/issues/653. So let's make each register unique. Signed-off-by: Bastian Koppelmann Message-Id: <20230202120432.1268-5-kbast...@mail.uni-paderborn.de> Signed-off-by: Bastian

[PULL 02/12] tests/tcg/tricore: Add test for OPC2_32_RCRW_IMASK

2023-02-08 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Message-Id: <20230202120432.1268-3-kbast...@mail.uni-paderborn.de> Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/macros.h| 7 +++ tests/tcg/tricore/test_imask.S| 10

[PULL 09/12] target/tricore: Fix OPC2_32_BO_LD_BU_PREINC

2023-02-08 Thread Bastian Koppelmann
we were sign extending the result of the load, while the instruction clearly states that the result should be unsigned. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Message-Id: <20230202120432.1268-10-kbast...@mail.uni-paderborn.de> Signed-off-by: Bastian Koppelmann --- tar

[PULL 08/12] tests/tcg/tricore: Add OPC2_32_RRRR_DEXTR tests

2023-02-08 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Message-Id: <20230202120432.1268-9-kbast...@mail.uni-paderborn.de> Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/macros.h | 9 + tests/tcg/tricore/test_dextr.S | 35 ++ 2 files changed, 44 insertions(+) dif

[PULL 12/12] tests/tcg/tricore: Add test for ld.h

2023-02-08 Thread Bastian Koppelmann
this exercises the error reported in https://gitlab.com/qemu-project/qemu/-/issues/652. Signed-off-by: Bastian Koppelmann Message-Id: <20230203132132.511254-1-kbast...@mail.uni-paderborn.de> Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricor

[PULL 11/12] target/tricore: Fix OPC1_16_SRO_LD_H translation

2023-02-08 Thread Bastian Koppelmann
From: Anton Kochkov Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bastian Koppelmann Signed-off-by: Eitan Eliahu Resolves: https://gitlab.com/qemu-project/qemu/-/issues/652 Message-Id: <20230112142258.514079-1-anton.koch...@proton.me> Signed-off-by: Bastian Koppelmann --- target/tricore/t

[PULL 07/12] target/tricore: Fix OPC2_32_RRRR_DEXTR

2023-02-08 Thread Bastian Koppelmann
if cpu_gpr_d[r3] == 0 then we were shifting the lower register to the right by 32 which is undefined behaviour. In this case the TriCore would do nothing an just return the higher register cpu_reg_d[r1]. We fixed that by detecting whether cpu_gpr_d[r3] was zero and cleared the lower register. Revi

[PULL 01/12] target/tricore: Fix OPC2_32_RCRW_IMASK translation

2023-02-08 Thread Bastian Koppelmann
we were mixing up the "c" and "d" registers. We used "d" as a destination register und "c" as the source. According to the TriCore ISA manual 1.6 vol 2 it is the other way round. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Resolves: https://gitlab.com/qemu-project/qemu/-/iss

[PULL 10/12] tests/tcg/tricore: Add LD.BU tests

2023-02-08 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Message-Id: <20230202120432.1268-11-kbast...@mail.uni-paderborn.de> Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/macros.h| 23 +++ tests/tcg/tricore/test_ld_bu.S

[PULL 05/12] target/tricore: Fix RRPW_DEXTR

2023-02-08 Thread Bastian Koppelmann
if we used const16 == 0 we would crash qemu with the error: ../tcg/tcg-op.c:196: tcg_gen_shri_i32: Assertion `arg2 >= 0 && arg2 < 32' failed This whole instruction can be handled by 'tcg_gen_extract2_tl' which takes care of this special case as well. Reviewed-by: Richard Henderson Signed-off-by:

Re: [PATCH] target/tricore: Fix OPC1_16_SRO_LD_H translation

2023-02-08 Thread Bastian Koppelmann
On Thu, Feb 02, 2023 at 03:55:53PM +, Anton Kochkov wrote: > --- Original Message --- > On Friday, January 13th, 2023 at 5:03 AM, Bastian Koppelmann > wrote: > > > > > > > > On Thu, Jan 12, 2023 at 02:24:02PM +, Anton Kochkov wrote: > > > > > Signed-off-by: Eitan Eliahu eitan

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-08 Thread Daniel P . Berrangé
On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: > Recent feature to supply RNG seed to the guest kernel modifies the > kernel command-line by adding extra data at its end; this breaks > measured boot with SEV and OVMF, and possibly signed boot. I presume you mean whether it impacts Secu

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-08 Thread Daniel P . Berrangé
On Tue, Feb 07, 2023 at 04:45:19PM -0500, Michael S. Tsirkin wrote: > On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: > > Recent feature to supply RNG seed to the guest kernel modifies the > > kernel command-line by adding extra data at its end; this breaks > > measured boot with SEV and

[PATCH v2 0/6] migration: Modified 'migrate' QAPI command for migration

2023-02-08 Thread Het Gala
This is v2 patchset for modified 'migrate' QAPI design for migration connection. Links to previous versions: v1: https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg04339.html Thanks to Daniel, Markus and Dr. David for their valuable insights. v1->v2 changelog: - major improvements in restr

[PATCH v2 1/6] migration: moved hmp_split_at_commma() helper func to qapi-util.c file

2023-02-08 Thread Het Gala
renamed hmp_split_at_comma() --> str_split_at_comma() Shifted helper function to qapi-util.c file. Give external linkage, as this function will be handy in coming commit for migration. Minor correction: g_strsplit(str ?: "", ",", -1) --> g_strsplit(str ? str : "", ",", -1) Suggested-by: Daniel P.

[PATCH v2 5/6] migration: Modified 'migrate-incoming' QAPI and HMP side changes on the destination interface.

2023-02-08 Thread Het Gala
'migrate-incoming' QAPI design have been modified into well-defined MigrateChannel struct to prevent multiple encoding of uri strings on the destination side.'uri' parameter is kept for backward compatibility. Suggested-by: Daniel P. Berrange Suggested-by: Manish Mishra Suggested-by: Aravind Ret

[PATCH v2 2/6] migration: Updated QAPI format for 'migrate' qemu monitor command

2023-02-08 Thread Het Gala
Existing 'migrate' QAPI design enforces transport mechanism, ip address of destination interface and corresponding port number in the form of a unified string 'uri' parameter for initiating a migration stream. This scheme has a significant flaw in it - double encoding of existing URIs to extract mi

[PATCH v2 4/6] migration: Avoid multiple parsing of uri in migration code flow

2023-02-08 Thread Het Gala
In existing senario, 'migrate' QAPI argument - string uri, is encoded twice to extract migration parameters for stream connection. This is not a good representation of migration wire protocol as it is a data encoding scheme within a data encoding scheme. Qemu should be able to directly work with re

[PATCH v2 3/6] migration: HMP side changes for modified 'migrate' QAPI design

2023-02-08 Thread Het Gala
hmp_migrate() stores modified QAPI 'migrate' arguments from qdict into well defined MigrateChannel struct with help of migrate_channel_from_qdict(). hmp_migrate() also accepts uri string as modified QAPI a 'migrate' argument (for backward compatibility). Suggested-by: Daniel P. Berrange Suggested

[PATCH v2 6/6] migration: Established connection for listener sockets on the dest interface

2023-02-08 Thread Het Gala
Modified 'migrate-incoming' QAPI design supports MigrateChannel parameters. This well-defined struct replaces uri string to prevent multiple encodings. (uri paramter is kept for backward compatibility). socket_start_incoming_migration() has been deprecated and socket_start_incoming_migration_inte

[PATCH v1 2/2] loongarch: Add smbios command line option.

2023-02-08 Thread Song Gao
LoongArch has enabled CONFIG_SMBIOS, but didn't enable CLI '-smbios'. Signed-off-by: Song Gao --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 88e93c6103..2aa6709466 100644 --- a/qemu-options.hx +++ b/qemu-options.hx

[PATCH v1 1/2] docs/system/loongarch: update loongson3.rst and rename it to virt.rst

2023-02-08 Thread Song Gao
Since the EDK2 had already support LoongArch, update build bios, and update cpu type, cross-tools. Signed-off-by: Song Gao --- .../loongarch/{loongson3.rst => virt.rst} | 97 --- 1 file changed, 38 insertions(+), 59 deletions(-) rename docs/system/loongarch/{loongson3.rst =>

[PATCH v2 00/13] Dynamycally switch to vhost shadow virtqueues at vdpa net migration

2023-02-08 Thread Eugenio Pérez
It's possible to migrate vdpa net devices if they are shadowed from the start. But to always shadow the dataplane is to effectively break its host passthrough, so its not convenient in vDPA scenarios. This series enables dynamically switching to shadow mode only at migration time. This allows fu

[PATCH v2 05/13] vdpa: rewind at get_base, not set_base

2023-02-08 Thread Eugenio Pérez
At this moment it is only possible to migrate to a vdpa device running with x-svq=on. As a protective measure, the rewind of the inflight descriptors was done at the destination. That way if the source sent a virtqueue with inuse descriptors they are always discarded. Since this series allows to m

[PATCH v2 10/13] vdpa: block migration if device has unsupported features

2023-02-08 Thread Eugenio Pérez
A vdpa net device must initialize with SVQ in order to be migratable at this moment, and initialization code verifies some conditions. If the device is not initialized with the x-svq parameter, it will not expose _F_LOG so the vhost subsystem will block VM migration from its initialization. Next

[PATCH v2 06/13] vdpa net: allow VHOST_F_LOG_ALL

2023-02-08 Thread Eugenio Pérez
Since some actions move to the start function instead of init, the device features may not be the parent vdpa device's, but the one returned by vhost backend. If transition to SVQ is supported, the vhost backend will return _F_LOG_ALL to signal the device is migratable. Add VHOST_F_LOG_ALL. HW d

[PATCH v2 01/13] vdpa net: move iova tree creation from init to start

2023-02-08 Thread Eugenio Pérez
Only create iova_tree if and when it is needed. The cleanup keeps being responsible of last VQ but this change allows it to merge both cleanup functions. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- net/vhost-vdpa.c | 99 ++-- 1 file changed

[PATCH v2 11/13] vdpa: block migration if dev does not have _F_SUSPEND

2023-02-08 Thread Eugenio Pérez
Next patches enable devices to be migrated even if vdpa netdev has not been started with x-svq. However, not all devices are migratable, so we need to block migration if we detect that. Block vhost-vdpa device migration if it does not offer _F_SUSPEND and it has not been started with x-svq. Signe

[PATCH v2 09/13] vdpa net: block migration if the device has CVQ

2023-02-08 Thread Eugenio Pérez
Devices with CVQ needs to migrate state beyond vq state. Leaving this to future series. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index bca13f97fd..309861e56c 100644 --- a/net/vhost-vdpa.c +++

[PATCH v2 02/13] vdpa: Negotiate _F_SUSPEND feature

2023-02-08 Thread Eugenio Pérez
This is needed for qemu to know it can suspend the device to retrieve its status and enable SVQ with it, so all the process is transparent to the guest. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --g

[PATCH v2 08/13] vdpa: disable RAM block discard only for the first device

2023-02-08 Thread Eugenio Pérez
Although it does not make a big difference, its more correct and simplifies the cleanup path in subsequent patches. Move ram_block_discard_disable(false) call to the top of vhost_vdpa_cleanup because: * We cannot use vhost_vdpa_first_dev after dev->opaque = NULL assignment. * Improve the stack o

[PATCH v2 13/13] vdpa: return VHOST_F_LOG_ALL in vhost-vdpa devices

2023-02-08 Thread Eugenio Pérez
vhost-vdpa devices can return this features now that blockers have been set in case some features are not met. Expose VHOST_F_LOG_ALL only in that case. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/virtio/vhost-

[PATCH v2 12/13] vdpa: block migration if SVQ does not admit a feature

2023-02-08 Thread Eugenio Pérez
Next patches enable devices to be migrated even if vdpa netdev has not been started with x-svq. However, not all devices are migratable, so we need to block migration if we detect that. Block migration if we detect the device expose a feature SVQ does not know how to work with. Signed-off-by: Eug

[PATCH v2 07/13] vdpa: add vdpa net migration state notifier

2023-02-08 Thread Eugenio Pérez
This allows net to restart the device backend to configure SVQ on it. Ideally, these changes should not be net specific. However, the vdpa net backend is the one with enough knowledge to configure everything because of some reasons: * Queues might need to be shadowed or not depending on its kind (

[PATCH v2 04/13] vdpa: move vhost reset after get vring base

2023-02-08 Thread Eugenio Pérez
The function vhost.c:vhost_dev_stop calls vhost operation vhost_dev_start(false). In the case of vdpa it totally reset and wipes the device, making the fetching of the vring base (virtqueue state) totally useless. The kernel backend does not use vhost_dev_start vhost op callback, but vhost-user do

[PATCH v2 03/13] vdpa: add vhost_vdpa_suspend

2023-02-08 Thread Eugenio Pérez
The function vhost.c:vhost_dev_stop fetches the vring base so the vq state can be migrated to other devices. However, this is unreliable in vdpa, since we didn't signal the device to suspend the queues, making the value fetched useless. Suspend the device if possible before fetching first and sub

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-08 Thread Michael S. Tsirkin
On Wed, Feb 08, 2023 at 09:35:21AM +, Daniel P. Berrangé wrote: > On Tue, Feb 07, 2023 at 04:45:19PM -0500, Michael S. Tsirkin wrote: > > On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: > > > Recent feature to supply RNG seed to the guest kernel modifies the > > > kernel command-line

Re: [PATCH v1 2/2] loongarch: Add smbios command line option.

2023-02-08 Thread Michael S. Tsirkin
On Wed, Feb 08, 2023 at 05:41:33PM +0800, Song Gao wrote: > LoongArch has enabled CONFIG_SMBIOS, but didn't enable CLI '-smbios'. > > Signed-off-by: Song Gao Acked-by: Michael S. Tsirkin > --- > qemu-options.hx | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qemu-op

Re: [PATCH v1 2/2] loongarch: Add smbios command line option.

2023-02-08 Thread Markus Armbruster
Song Gao writes: > LoongArch has enabled CONFIG_SMBIOS, but didn't enable CLI '-smbios'. > Suggest Fixes: 3efa6fa1e629 ("hw/loongarch: Add smbios support") > Signed-off-by: Song Gao > --- > qemu-options.hx | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qemu-option

Re: [PATCH v2 00/13] Dynamycally switch to vhost shadow virtqueues at vdpa net migration

2023-02-08 Thread Alvaro Karsz
HI Eugenio, thanks for the series! I tested the series with our DPU, SolidNET. The test went as follow: - Create 2 virtio net vdpa devices, every device in a separated VF. - Start 2 VMs with the vdpa device as a single network device, without shadow vq. The source VM with "-netdev vhost-vdpa,

[PATCH] cirrus.yml: Improve the windows_msys2_task

2023-02-08 Thread Thomas Huth
There's no need to run a full-blown bash just to create a directory. And we can skip the "cd build" each time by doing it once at the beginning. Additionally, let's exclude some targets (that we already compile-test with MinGW in the gitlab jobs) from the build, since the build time of this task i

Re: [PULL 0/5] Update CentOS 8 custom runner to use Python 3.8

2023-02-08 Thread Peter Maydell
On Tue, 7 Feb 2023 at 11:38, Paolo Bonzini wrote: > > The following changes since commit b52388129bf0097954515c097e83e6112de1b579: > > Merge tag 'pull-tcg-20230204' of https://gitlab.com/rth7680/qemu into > staging (2023-02-04 19:12:41 +) > > are available in the Git repository at: > > ht

Re: [PULL 09/35] readline: Extract readline_add_completion_of() from monitor

2023-02-08 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 3/2/23 09:45, Markus Armbruster wrote: >> monitor/misc.h has static add_completion_option(). It's useful >> elsewhere in the monitor. Since it's not monitor-specific, move it to >> util/readline.c renamed to readline_add_completion_of(), and put it to >> use.

Re: [PATCH 11/12] tests/qtest: bios-tables-test: Skip if missing configs

2023-02-08 Thread Igor Mammedov
On Tue, 7 Feb 2023 09:42:45 -0500 "Michael S. Tsirkin" wrote: > On Tue, Feb 07, 2023 at 03:35:56PM +0100, Thomas Huth wrote: > > On 06/02/2023 16.04, Fabiano Rosas wrote: > > > If we build with --without-default-devices, CONFIG_HPET and > > > CONFIG_PARALLEL are set to N, which makes the respec

Re: [PATCH 1/1] readline: fix hmp completion issue

2023-02-08 Thread Philippe Mathieu-Daudé
On 7/2/23 05:52, Dongli Zhang wrote: The auto completion does not work in some cases. Case 1. 1. (qemu) info reg 2. Press 'Tab'. 3. It does not auto complete. Case 2. 1. (qemu) block_resize flo 2. Press 'Tab'. 3. It does not auto complete 'floppy0'. Since the readline_add_completion_of() may

Re: [PULL 09/35] readline: Extract readline_add_completion_of() from monitor

2023-02-08 Thread Philippe Mathieu-Daudé
On 8/2/23 11:53, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 3/2/23 09:45, Markus Armbruster wrote: monitor/misc.h has static add_completion_option(). It's useful elsewhere in the monitor. Since it's not monitor-specific, move it to util/readline.c renamed to readline_add_com

[PATCH] virtio-blk: add missing AioContext lock

2023-02-08 Thread Emanuele Giuseppe Esposito
virtio_blk_update_config() calls blk_get_geometry and blk_getlength, and both functions eventually end up calling bdrv_poll_co when not running in a coroutine: - blk_getlength is a co_wrapper_mixed function - blk_get_geometry calls bdrv_get_geometry -> bdrv_nb_sectors, a co_wrapper_mixed function

Re: [PULL 03/38] pflash: Only read non-zero parts of backend image

2023-02-08 Thread Cédric Le Goater
On 2/7/23 13:48, Kevin Wolf wrote: Am 07.02.2023 um 10:19 hat Cédric Le Goater geschrieben: On 2/7/23 09:38, Kevin Wolf wrote: Am 06.02.2023 um 16:54 hat Cédric Le Goater geschrieben: On 1/20/23 13:25, Kevin Wolf wrote: From: Xiang Zheng Currently we fill the VIRT_FLASH memory space with tw

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-08 Thread Philippe Mathieu-Daudé
On 8/2/23 01:18, Bernhard Beschow wrote: Am 7. Februar 2023 20:52:02 UTC schrieb Mark Cave-Ayland : On 06/02/2023 23:40, Bernhard Beschow wrote: Am 5. Februar 2023 22:32:03 UTC schrieb Mark Cave-Ayland : On 05/02/2023 22:21, BALATON Zoltan wrote: On Sun, 5 Feb 2023, Mark Cave-Ayland wro

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-08 Thread Dov Murik
Hi Michael, On 08/02/2023 11:11, Michael S. Tsirkin wrote: > On Tue, Feb 07, 2023 at 07:33:09PM -0300, Jason A. Donenfeld wrote: >> On Tue, Feb 7, 2023 at 7:31 PM Michael S. Tsirkin wrote: >>> >>> On Tue, Feb 07, 2023 at 07:17:58PM -0300, Jason A. Donenfeld wrote: On Tue, Feb 07, 2023 at 04:

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-08 Thread Dov Murik
Hi Daniel, On 08/02/2023 11:30, Daniel P. Berrangé wrote: > On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: >> Recent feature to supply RNG seed to the guest kernel modifies the >> kernel command-line by adding extra data at its end; this breaks >> measured boot with SEV and OVMF, and p

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-08 Thread Dov Murik
On 08/02/2023 1:24, Jason A. Donenfeld wrote: > Hi Tom, > > On Tue, Feb 7, 2023 at 8:21 PM Tom Lendacky wrote: >> >> On 2/7/23 15:45, Michael S. Tsirkin wrote: >>> On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: Recent feature to supply RNG seed to the guest kernel modifies the

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-08 Thread Dov Murik
On 08/02/2023 1:21, Tom Lendacky wrote: > On 2/7/23 15:45, Michael S. Tsirkin wrote: >> On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: >>> Recent feature to supply RNG seed to the guest kernel modifies the >>> kernel command-line by adding extra data at its end; this breaks >>> measu

Re: [RFC PATCH 03/16] target/arm/kvm-rme: Initialize realm

2023-02-08 Thread Jean-Philippe Brucker
Hi Richard, Thanks a lot for the review On Fri, Jan 27, 2023 at 10:37:12AM -1000, Richard Henderson wrote: > At present I would expect exactly one object class to be present in the > qemu-system-aarch64 binary that would pass the > machine_check_confidential_guest_support test done by core code.

Re: [RFC PATCH 04/16] hw/arm/virt: Add support for Arm RME

2023-02-08 Thread Jean-Philippe Brucker
On Fri, Jan 27, 2023 at 11:07:35AM -1000, Richard Henderson wrote: > > +/* > > + * Since the devicetree is included in the initial measurement, it must > > + * not contain random data. > > + */ > > +if (virt_machine_is_confidential(vms)) { > > +vms->dtb_randomness = fals

Re: [RFC PATCH 06/16] target/arm/kvm-rme: Initialize vCPU

2023-02-08 Thread Jean-Philippe Brucker
On Fri, Jan 27, 2023 at 12:37:12PM -1000, Richard Henderson wrote: > On 1/27/23 05:07, Jean-Philippe Brucker wrote: > > +static int kvm_arm_rme_get_core_regs(CPUState *cs) > > +{ > > +int i, ret; > > +struct kvm_one_reg reg; > > +ARMCPU *cpu = ARM_CPU(cs); > > +CPUARMState *env = &c

Re: [RFC PATCH 08/16] target/arm/kvm-rme: Populate the realm with boot images

2023-02-08 Thread Jean-Philippe Brucker
On Fri, Jan 27, 2023 at 01:54:23PM -1000, Richard Henderson wrote: > > static void rme_vm_state_change(void *opaque, bool running, RunState > > state) > > { > > int ret; > > @@ -72,6 +115,9 @@ static void rme_vm_state_change(void *opaque, bool > > running, RunState state) > >

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

2023-02-08 Thread Isaku Yamahata
On Tue, Jan 24, 2023 at 01:27:50AM +, Sean Christopherson wrote: > On Thu, Jan 19, 2023, Isaku Yamahata wrote: > > On Thu, Jan 19, 2023 at 03:25:08PM +, > > Sean Christopherson wrote: > > > > > On Thu, Jan 19, 2023, Isaku Yamahata wrote: > > > > On Sat, Jan 14, 2023 at 12:37:59AM +,

Re: [PATCH 1/1] readline: fix hmp completion issue

2023-02-08 Thread Markus Armbruster
Dongli Zhang writes: > The auto completion does not work in some cases. > > Case 1. > > 1. (qemu) info reg > 2. Press 'Tab'. > 3. It does not auto complete. > > Case 2. > > 1. (qemu) block_resize flo > 2. Press 'Tab'. > 3. It does not auto complete 'floppy0'. > > Since the readline_add_completion

Re: [PATCH] virtio-blk: add missing AioContext lock

2023-02-08 Thread Lukáš Doktor
Dne 08. 02. 23 v 12:11 Emanuele Giuseppe Esposito napsal(a): > virtio_blk_update_config() calls blk_get_geometry and blk_getlength, > and both functions eventually end up calling bdrv_poll_co when not > running in a coroutine: > - blk_getlength is a co_wrapper_mixed function > - blk_get_geometry ca

Re: [PATCH 2/3] Replace `TARGET_TB_PCREL` with `CF_PCREL`

2023-02-08 Thread Anton Johansson via
On 2/7/23 12:26, Philippe Mathieu-Daudé wrote: Possibly: #ifdef CONFIG_DEBUG_TCG -    assert(!TARGET_TB_PCREL); +    assert(!(tb_cflags(last_tb) & CF_PCREL));   assert(cc->set_pc); #endif Or maybe clearer, use tcg_debug_assert()?   cc->set_pc(cpu,

Re: [PATCH 3/3] target: Set `CF_PCREL` for arm and i386 frontends

2023-02-08 Thread Anton Johansson via
On 2/7/23 12:27, Philippe Mathieu-Daudé wrote: Better to split in 2 distinct patches since two different subsystems are modified. Will do, thanks! What do think you of the previous patch in terms of splitting on subsystems? I was a bit torn between keeping it as giga-patch and splitting it

[PATCH] Updated the FSF address to

2023-02-08 Thread Khadija Kamran
diff --git a/contrib/gitdm/filetypes.txt b/contrib/gitdm/filetypes.txt index d2d6f6db8d..b1d01c0992 100644 --- a/contrib/gitdm/filetypes.txt +++ b/contrib/gitdm/filetypes.txt @@ -12,8 +12,7 @@ # GNU Library General Public License for more details. # # You should have received a copy of the GNU G

Re: [PATCH v5 10/14] Hexagon (tests/tcg/hexagon) Enable HVX tests

2023-02-08 Thread Anton Johansson via
On 1/31/23 23:56, Taylor Simpson wrote: +HEX_TESTS += hvx_histogram HEX_TESTS += test_abs HEX_TESTS += test_bitcnt @@ -78,3 +82,10 @@ TESTS += $(HEX_TESTS) usr: usr.c $(CC) $(CFLAGS) -mv67t -O2 -Wno-inline-asm -Wno-expansion-to-defined $< -o $@ $(LDFLAGS) +scatter_gather:

Re: [PATCH] Updated the FSF address to

2023-02-08 Thread Khadija Kamran
Hey Markus! Thank you for the help with the git rebase command. I was able to combine my commits to one, create a patch and email it. :) On Wed, Feb 8, 2023 at 12:52 PM Khadija Kamran < kkamran.bese16se...@seecs.edu.pk> wrote: > diff --git a/contrib/gitdm/filetypes.txt b/contrib/gitdm/filetypes.t

Re: [PATCH V2 1/4] qapi: strList_from_string

2023-02-08 Thread Steven Sistare
On 2/8/2023 1:43 AM, Marc-André Lureau wrote: > Hi > > On Tue, Feb 7, 2023 at 10:50 PM Steve Sistare > wrote: >> >> Generalize hmp_split_at_comma() to take any delimiter character, rename >> as strList_from_string(), and move it to qapi/util.c. >> >> No functional change. > > The g_strsplit() v

Re: [PATCH v9 07/14] vfio/migration: Block multiple devices migration

2023-02-08 Thread Avihai Horon
On 08/02/2023 0:34, Alex Williamson wrote: External email: Use caution opening links or attachments On Mon, 6 Feb 2023 14:31:30 +0200 Avihai Horon wrote: Currently VFIO migration doesn't implement some kind of intermediate quiescent state in which P2P DMAs are quiesced before stopping or r

Re: [PATCH v9 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-02-08 Thread Avihai Horon
On 08/02/2023 1:42, Alex Williamson wrote: External email: Use caution opening links or attachments On Mon, 6 Feb 2023 14:31:33 +0200 Avihai Horon wrote: @@ -523,6 +745,41 @@ static int vfio_save_iterate(QEMUFile *f, void *opaque) return 0; } +static int vfio_save_complete_precopy(

Re: [PATCH v9 14/14] docs/devel: Align VFIO migration docs to v2 protocol

2023-02-08 Thread Avihai Horon
On 08/02/2023 1:49, Alex Williamson wrote: External email: Use caution opening links or attachments On Mon, 6 Feb 2023 14:31:37 +0200 Avihai Horon wrote: Now that VFIO migration protocol v2 has been implemented and v1 protocol has been removed, update the documentation according to v2 prot

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-08 Thread Michael S. Tsirkin
On Wed, Feb 08, 2023 at 01:23:48PM +0200, Dov Murik wrote: > Hi Michael, > > On 08/02/2023 11:11, Michael S. Tsirkin wrote: > > On Tue, Feb 07, 2023 at 07:33:09PM -0300, Jason A. Donenfeld wrote: > >> On Tue, Feb 7, 2023 at 7:31 PM Michael S. Tsirkin wrote: > >>> > >>> On Tue, Feb 07, 2023 at 07:

Re: [PULL v2 00/19] Header cleanup patches for 2023-02-06

2023-02-08 Thread Peter Maydell
On Wed, 8 Feb 2023 at 06:49, Markus Armbruster wrote: > > The following changes since commit 969d09c3a6186c0a4bc8a41db0c1aba1c76081fc: > > Merge tag 'pull-aspeed-20230207' of https://github.com/legoater/qemu into > staging (2023-02-07 20:13:38 +) > > are available in the Git repository at:

[PATCH v3 0/6] Eliminate multifd flush

2023-02-08 Thread Juan Quintela
Hi In this v3: - update to latest upstream. - fix checkpatch errors. Please, review. In this v2: - update to latest upstream - change 0, 1, 2 values to defines - Add documentation for SAVE_VM_FLAGS - Add missing qemu_fflush(), it made random hangs for migration test (only for tls, no clue why)

[PATCH v3 2/6] multifd: Protect multifd_send_sync_main() calls

2023-02-08 Thread Juan Quintela
We only need to do that on the ram_save_iterate() call on sending and on destination when we get a RAM_SAVE_FLAG_EOS. In setup() and complete() we need to synch in both new and old cases, so don't add a check there. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by:

[PATCH v3 3/6] migration: Simplify ram_find_and_save_block()

2023-02-08 Thread Juan Quintela
We will need later that find_dirty_block() return errors, so simplify the loop. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Juan Quintela --- migration/ram.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/migration/ra

[PATCH v3 6/6] ram: Document migration ram flags

2023-02-08 Thread Juan Quintela
0x80 is RAM_SAVE_FLAG_HOOK, it is in qemu-file now. Bigger usable flag is 0x200, noticing that. We can reuse RAM_SAVE_FLAG_FULL. Signed-off-by: Juan Quintela --- migration/ram.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 795

[PATCH v3 4/6] migration: Make find_dirty_block() return a single parameter

2023-02-08 Thread Juan Quintela
We used to return two bools, just return a single int with the following meaning: old return / again / new return falsefalse PAGE_ALL_CLEAN falsetruePAGE_TRY_AGAIN true truePAGE_DIRTY_FOUND /* We don't care about again at all */ Signed-off-by: Juan Quintela ---

[PATCH v3 1/6] multifd: Create property multifd-sync-after-each-section

2023-02-08 Thread Juan Quintela
We used to synchronize all channels at the end of each RAM section sent. That is not needed, so preparing to only synchronize once every full round in latests patches. Notice that we initialize the property as true. We will change the default when we introduce the new mechanism. Signed-off-by:

[PATCH v3 5/6] multifd: Only sync once each full round of memory

2023-02-08 Thread Juan Quintela
We need to add a new flag to mean to sync at that point. Notice that we still synchronize at the end of setup and at the end of complete stages. Signed-off-by: Juan Quintela --- Add missing qemu_fflush(), now it passes all tests always. --- migration/migration.c | 2 -- migration/ram.c

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-08 Thread Jason A. Donenfeld
On Wed, Feb 08, 2023 at 08:20:17AM -0500, Michael S. Tsirkin wrote: > On Wed, Feb 08, 2023 at 01:23:48PM +0200, Dov Murik wrote: > > Hi Michael, > > > > On 08/02/2023 11:11, Michael S. Tsirkin wrote: > > > On Tue, Feb 07, 2023 at 07:33:09PM -0300, Jason A. Donenfeld wrote: > > >> On Tue, Feb 7, 20

Re: [PATCH V2] memory: flat section iterator

2023-02-08 Thread David Hildenbrand
On 07.02.23 22:28, Steven Sistare wrote: On 2/7/2023 3:10 PM, Peter Xu wrote: On Tue, Feb 07, 2023 at 11:03:29AM -0800, Steve Sistare wrote: Add an iterator over the sections of a flattened address space. This will be needed by cpr to issue vfio ioctl's on the same memory ranges that are alread

[PATCH 0/3] Remove res_compatible parameter

2023-02-08 Thread Juan Quintela
Hi This series are the redo of the series from vfio. Vladimir Sementsov-Ogievskiy asked that I split the change in ram.c (only place that set res_compatible), and the rest of the patches. So I ended: - change ram.c to put the memory in res_postcopy - remove res_compatible - rename res_postcopy/p

[PATCH 1/3] migration: In case of postcopy, the memory ends in res_postcopy_only

2023-02-08 Thread Juan Quintela
So remove last assignation of res_compatible. Signed-off-by: Juan Quintela --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index b966e148c2..85ccbf88ad 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -3474,7 +3474,7

[PATCH 3/3] migration: Remove _only suffix for res_postcopy/precopy

2023-02-08 Thread Juan Quintela
Once that res_compatible is removed, they don't make sense anymore. Signed-off-by: Juan Quintela --- include/migration/register.h | 18 -- migration/savevm.h | 8 hw/s390x/s390-stattrib.c | 7 +++ hw/vfio/migration.c| 10 --

[PATCH 2/3] migration: Remove unused res_compatible

2023-02-08 Thread Juan Quintela
Nothing assigns to it after previous commit. Signed-off-by: Juan Quintela --- include/migration/register.h | 7 ++- migration/savevm.h | 2 -- hw/s390x/s390-stattrib.c | 1 - hw/vfio/migration.c| 3 +-- migration/block-dirty-bitmap.c | 1 - migration/bloc

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-08 Thread Michael S. Tsirkin
On Wed, Feb 08, 2023 at 02:30:30PM +0100, Jason A. Donenfeld wrote: > On Wed, Feb 08, 2023 at 08:20:17AM -0500, Michael S. Tsirkin wrote: > > On Wed, Feb 08, 2023 at 01:23:48PM +0200, Dov Murik wrote: > > > Hi Michael, > > > > > > On 08/02/2023 11:11, Michael S. Tsirkin wrote: > > > > On Tue, Feb

[PATCH v3 2/2] migration: Calculate ram size once

2023-02-08 Thread Juan Quintela
We are recalculating ram size continously, when we know that it don't change during migration. Create a field in RAMState to track it. Signed-off-by: Juan Quintela --- migration/ram.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c in

[PATCH v3 1/2] migration: Split ram_bytes_total_common() in two functions

2023-02-08 Thread Juan Quintela
It is just a big if in the middle of the function, and we need two functions anways. Signed-off-by: Juan Quintela --- migration/ram.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index b966e148c2..24c96ea822 100

[PATCH v3 0/2] migration: Store ram size value

2023-02-08 Thread Juan Quintela
Hi This is just a rebase on top of latest upstream and make scripts/checkpatch.pl happy. Please, review. [v2] I just resized this patch for latest upstream, we still have the same trouble for huge guests, we are doing lots of RCU operations that are not needed at all. As David explained on the

Re: [PATCH V2 1/4] qapi: strList_from_string

2023-02-08 Thread Alex Bennée
Steven Sistare writes: > On 2/8/2023 1:43 AM, Marc-André Lureau wrote: >> Hi >> >> On Tue, Feb 7, 2023 at 10:50 PM Steve Sistare >> wrote: >>> >>> Generalize hmp_split_at_comma() to take any delimiter character, rename >>> as strList_from_string(), and move it to qapi/util.c. >>> >>> No func

Re: [PATCH] virtio-blk: add missing AioContext lock

2023-02-08 Thread Michael S. Tsirkin
On Wed, Feb 08, 2023 at 06:11:48AM -0500, Emanuele Giuseppe Esposito wrote: > virtio_blk_update_config() calls blk_get_geometry and blk_getlength, > and both functions eventually end up calling bdrv_poll_co when not > running in a coroutine: > - blk_getlength is a co_wrapper_mixed function > - blk_

  1   2   3   4   >