Re: [PATCH] target/riscv: Fix PMU node property for virt machine

2023-04-26 Thread Yu-Chien Peter Lin
Hi Conor, Thank you for your prompt response. On Fri, Apr 21, 2023 at 06:59:40PM +0100, Conor Dooley wrote: > On Fri, Apr 21, 2023 at 09:14:37PM +0800, Yu Chien Peter Lin wrote: > > The length of fdt_event_ctr_map[20] will add 5 dummy cells in > > "riscv,event-to-mhpmcounters" property, so

Re: [PATCH] hw/nvram: Avoid unnecessary Xilinx eFuse backstore write

2023-04-26 Thread Alistair Francis
On Thu, Apr 27, 2023 at 10:31 AM Tong Ho wrote: > > Add a check in the bit-set operation to write the backstore > only if the affected bit is 0 before. > > With this in place, there will be no need for callers to > do the checking in order to avoid unnecessary writes. > > Signed-off-by: Tong Ho

Re: [PATCH v2 0/6] target/i386: Support new Intel platform Instructions in CPUID enumeration

2023-04-26 Thread Tao Su
On Wed, Apr 26, 2023 at 02:24:18PM +0200, Paolo Bonzini wrote: > Queued, thanks. > > Paolo > Paolo, thanks! Tao

Re: [RFC PATCH v2 3/4] target/riscv: check smstateen fcsr flag

2023-04-26 Thread Weiwei Li
On 2023/4/27 01:18, Mayuresh Chitale wrote: On Sat, Apr 15, 2023 at 6:55 AM Weiwei Li wrote: On 2023/4/15 00:02, Mayuresh Chitale wrote: If misa.F and smstateen_fcsr_ok flag are clear then all the floating point instructions must generate an appropriate exception. Signed-off-by: Mayuresh

[PATCH] hw/nvram: Avoid unnecessary Xilinx eFuse backstore write

2023-04-26 Thread Tong Ho
Add a check in the bit-set operation to write the backstore only if the affected bit is 0 before. With this in place, there will be no need for callers to do the checking in order to avoid unnecessary writes. Signed-off-by: Tong Ho --- hw/nvram/xlnx-efuse.c | 11 +-- 1 file changed, 9

[PATCH 2/2] tests/tcg/s390x: Test EXECUTE of relative branches

2023-04-26 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/ex-branch.c | 158 2 files changed, 159 insertions(+) create mode 100644 tests/tcg/s390x/ex-branch.c diff --git

[PATCH 1/2] target/s390x: Fix EXECUTE of relative branches

2023-04-26 Thread Ilya Leoshkevich
Fix a problem similar to the one fixed by commit 703d03a4aaf3 ("target/s390x: Fix EXECUTE of relative long instructions"), but now for relative branches. Reported-by: Nina Schoetterl-Glausch Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/translate.c | 81

[PATCH 0/2] target/s390x: Fix EXECUTE of relative branches

2023-04-26 Thread Ilya Leoshkevich
Hi, This series fixes EXECUTing relative branches: currently the offset is incorrectly applied to EXECUTE and not the branch itself. This is similar to what I previously fixed for load/store instructions. Unfortunately here it's not feaisble to use the ri2 field, since it would break the direct

[PATCH v2 1/1] ui/gtk: Added an input mode

2023-04-26 Thread Singh, Satyeshwar
In a multi-seat scenario where multiple keyboards and mice are connected to the host but some are dedicated for the guests only (through pass through mode) and some are only for the host, there is a strong use case where a customer does not want a HID device connected to the host to be able to

Re: [PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops

2023-04-26 Thread BALATON Zoltan
On Wed, 26 Apr 2023, Bernhard Beschow wrote: Am 26. April 2023 11:41:54 UTC schrieb Mark Cave-Ayland : On 22/04/2023 16:07, Bernhard Beschow wrote: Allows to unexport pci_ide_{cmd,data}_le_ops and models TYPE_SII3112_PCI as a standard-compliant PCI IDE device. Signed-off-by: Bernhard

Re: [PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-26 Thread Mike Maslenkin
On Mon, Apr 24, 2023 at 12:44 PM Alexander Ivanov wrote: > > Cluster offsets must be unique among all the BAT entries. Find duplicate > offsets in the BAT and fix it by copying the content of the relevant > cluster to a newly allocated cluster and set the new cluster offset to the > duplicated

RE: [PATCH 08/21] Hexagon (target/hexagon) Clean up pred_written usage

2023-04-26 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Wednesday, April 26, 2023 4:23 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: phi...@linaro.org; a...@rev.ng; a...@rev.ng; Brian Cain > ; Matheus Bernardino (QUIC) > > Subject: Re: [PATCH 08/21] Hexagon (target/hexagon)

[PATCH] aio-posix: zero out io_uring sqe user_data

2023-04-26 Thread Stefan Hajnoczi
liburing does not clear sqe->user_data. We must do it ourselves to avoid undefined behavior in process_cqe() when user_data is used. Note that fdmon-io_uring is currently disabled, so this is a latent bug that does not affect users. Let's merge this fix now to make it easier to enable

Re: [PATCH 08/21] Hexagon (target/hexagon) Clean up pred_written usage

2023-04-26 Thread Richard Henderson
On 4/26/23 01:42, Taylor Simpson wrote: Only endloop instructions will conditionally write to a predicate. When there is an endloop instruction, we preload the values into new_pred_value. The only place pred_written is needed is when HEX_DEBUG is on. We remove the last use of check_for_attrib.

Re: [PATCH 07/21] Hexagon (target/hexagon) Eliminate uses of log_pred_write function

2023-04-26 Thread Richard Henderson
On 4/26/23 01:41, Taylor Simpson wrote: These instructions have implicit writes to registers, so we don't want them to be helpers when idef-parser is off. The following instructions are overriden S2_cabacdecbin SA1_cmpeqi Remove the log_pred_write function from op_helper.c Remove

Re: [PATCH 06/21] Hexagon (target/hexagon) Remove log_reg_write from op_helper.[ch]

2023-04-26 Thread Richard Henderson
On 4/26/23 01:41, Taylor Simpson wrote: With the overrides added in prior commits, this function is not used Remove references in macros.h Signed-off-by: Taylor Simpson --- target/hexagon/macros.h| 14 -- target/hexagon/op_helper.h | 4 target/hexagon/op_helper.c | 17

Re: [PATCH 05/21] Hexagon (target/hexagon) Add overrides for clr[tf]new

2023-04-26 Thread Richard Henderson
On 4/26/23 01:41, Taylor Simpson wrote: These instructions have implicit reads from p0, so we don't want them in helpers when idef-parser is off. Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h | 18 ++ target/hexagon/macros.h | 4 2 files changed, 18

RE: [PATCH 1/9] Hexagon (target/hexagon) Add support for v68/v69/v71/v73

2023-04-26 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Wednesday, April 26, 2023 1:06 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; phi...@linaro.org; a...@rev.ng; Brian Cain > ; Matheus Bernardino (QUIC) > > Subject: Re: [PATCH 1/9] Hexagon

Re: [PATCH 12/13] hw/ide/sii3112: Reuse PCIIDEState::bmdma_ops

2023-04-26 Thread Bernhard Beschow
Am 26. April 2023 11:44:29 UTC schrieb Mark Cave-Ayland : >On 22/04/2023 16:07, Bernhard Beschow wrote: > >> Allows to unexport bmdma_addr_ioport_ops and models TYPE_SII3112_PCI as a >> standard-compliant PCI IDE device. > >Nice! I think it's worth adding a brief mention that you've added

Re: [PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops

2023-04-26 Thread Bernhard Beschow
Am 26. April 2023 11:41:54 UTC schrieb Mark Cave-Ayland : >On 22/04/2023 16:07, Bernhard Beschow wrote: > >> Allows to unexport pci_ide_{cmd,data}_le_ops and models TYPE_SII3112_PCI as a >> standard-compliant PCI IDE device. >> >> Signed-off-by: Bernhard Beschow >> --- >> include/hw/ide/pci.h

Re: [PATCH 10/13] hw/ide/piix: Reuse PCIIDEState::{cmd,data}_ops

2023-04-26 Thread Bernhard Beschow
Am 26. April 2023 18:18:35 UTC schrieb Bernhard Beschow : > > >Am 26. April 2023 11:37:48 UTC schrieb Mark Cave-Ayland >: >>On 22/04/2023 16:07, Bernhard Beschow wrote: >> >>> Now that PCIIDEState::{cmd,data}_ops are initialized in the base class >>> constructor there is an opportunity for

[PATCH v5 2/2] migration: Make dirty_bytes_last_sync atomic

2023-04-26 Thread Juan Quintela
As we set its value, it needs to be operated with atomics. We rename it from remaining to better reflect its meaning. Statistics always return the real reamaining bytes. This was used to store how much pages where dirty on the previous generation, so we can calculate the expected downtime as:

[PATCH v5 0/2] Migration: Make more ram_counters atomic

2023-04-26 Thread Juan Quintela
Hi In this v5: Not only change the type of the counters, also use the __nocheck() variants of the functions. Please, review. [v4] - Change aligned_uint64_t to size_t to make (some) 32bit hosts happy. Please review. [v3] - Addressed reviews - All counters are now atomic, either Stat64 or

[PATCH v5 1/2] migration: Make dirty_pages_rate atomic

2023-04-26 Thread Juan Quintela
In this case we use qatomic operations instead of Stat64 wrapper because there is no stat64_set(). Defining the 64 bit wrapper is trivial. The one without atomics is more interesting. Signed-off-by: Juan Quintela Reviewed-by: Peter Xu --- Don't use __nocheck() variants ---

Re: [PATCH v2 3/3] pci: ROM preallocation for incoming migration

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 26.04.23 07:43, Michael S. Tsirkin wrote: On Tue, Apr 25, 2023 at 07:14:34PM +0300, Vladimir Sementsov-Ogievskiy wrote: On incoming migration we have the following sequence to load option ROM: 1. On device realize we do normal load ROM from the file 2. Than, on incoming migration we

Re: [PATCH v4 0/2] Migration: Make more ram_counters atomic

2023-04-26 Thread Juan Quintela
Juan Quintela wrote: > Hi > > In this v4: > - Change aligned_uint64_t to size_t to make (some) 32bit hosts happy. > > Please review. self-NACK Still missing the removal of the __nocheck() functions. > > [v3] > - Addressed reviews > - All counters are now atomic, either Stat64 or atomic. > -

Re: [PATCH v9 0/3] Eliminate multifd flush

2023-04-26 Thread Peter Xu
On Wed, Apr 26, 2023 at 08:18:58PM +0200, Juan Quintela wrote: > Juan Quintela (3): > multifd: Create property multifd-flush-after-each-section > multifd: Protect multifd_send_sync_main() calls > multifd: Only flush once each full round of memory Acked-by: Peter Xu -- Peter Xu

Re: [PATCH v3 09/13] migration: Create migrate_tls_creds() function

2023-04-26 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 24.04.23 21:32, Juan Quintela wrote: >> Signed-off-by: Juan Quintela > > Reviewed-by: Vladimir Sementsov-Ogievskiy > could be stricter "const char *" I change changed the patch just to reflect this. > >> @@ -34,20 +34,19 @@

Re: [PATCH 01/13] hw/ide/pci: Expose legacy interrupts as GPIOs

2023-04-26 Thread Bernhard Beschow
Am 26. April 2023 10:41:30 UTC schrieb Mark Cave-Ayland : >On 22/04/2023 16:07, Bernhard Beschow wrote: > >> Exposing the legacy IDE interrupts as GPIOs allows them to be connected in >> the >> parent device through qdev_connect_gpio_out(), i.e. without accessing private >> data of

Re: [RFC PATCH v3 00/20] configure: create a python venv and ensure meson, sphinx

2023-04-26 Thread Paolo Bonzini
On 4/26/23 18:32, John Snow wrote: mkvenv: Creating {isolated|non-isolated} virtual environment [based on /home/pbonzini/myvenv] "based on ..." for nested venv case only? Yes. and when creating the console-scripts shims: mkvenv: Found avocado v90.0 Sure. Up to the user

Re: [PATCH v11 00/12] parallels: Refactor the code of images checks and fix a bug

2023-04-26 Thread Alexander Ivanov
The patchests are the same, but the first one has incorrect receivers. Please just ignore it. I've sent a email about it, but i mistook twice and sent it to qemu-devel@nongnu.org only. On 4/26/23 17:07, Denis V. Lunev wrote: On 4/24/23 11:31, Alexander Ivanov wrote: Fix image inflation when

Re: [PATCH 1/2] Fix libvhost-user.c compilation.

2023-04-26 Thread Paolo Bonzini
On 4/7/23 09:56, Michael S. Tsirkin wrote: On Wed, Apr 05, 2023 at 02:59:19PM +0200, David 'Digit' Turner wrote: The source file uses VIRTIO_F_VERSION_1 which is not defined by on Debian 10. The system-provided which does not include the macro definition is included through , so fix the

Re: [PATCH 0/2] vmstate-static-checker: Fix VMS_ARRAY comparisons

2023-04-26 Thread Peter Xu
On Wed, Apr 26, 2023 at 08:54:02PM +0200, Juan Quintela wrote: > This is why I mean that I want the "diff" to be a bit more intelligent > and "record" the things that we tell them that are correct. I think I see what you meant. :) > I will start with the default machine devices. > Once the

Re: [PATCH v3 13/13] migration: Move migration_properties to options.c

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 24.04.23 21:32, Juan Quintela wrote: Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 0/2] Fix QEMU compilation on Debian 10

2023-04-26 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [RFC PATCH v3 00/20] configure: create a python venv and ensure meson, sphinx

2023-04-26 Thread Paolo Bonzini
On 4/26/23 18:16, John Snow wrote: > - I am ambivalent about keeping --enable/--disable-pypi in the first > committed patchset, but in any case I would move patches 16 and 20 > before patch 15 I might be stubborn but I think I want to keep it in for now. If it needs redesigned

Re: [PATCH v3 08/13] migration: Remove MigrationState from block_cleanup_parameters()

2023-04-26 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 24.04.23 21:32, Juan Quintela wrote: >> This makes the function more regular with everything else. >> Signed-off-by: Juan Quintela > > Reviewed-by: Vladimir Sementsov-Ogievskiy Thanks. >> --- >> migration/migration.c | 4 ++-- >> migration/options.c

Re: [PATCH v3 06/13] migration: Move migrate_set_block_incremental() to options.c

2023-04-26 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 24.04.23 21:32, Juan Quintela wrote: >> Once there, make it more regular and remove th eneed for > > some type here Thanks, fixed. > >> MigrationState parameter. > > Reviewed-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH v3 12/13] migration: Create migrate_block_bitmap_mapping() function

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 24.04.23 21:32, Juan Quintela wrote: Notice that we changed the test of ->has_block_bitmap_mapping for the test that block_bitmap_mapping is not NULL. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/block-dirty-bitmap.c | 14 --

Re: [PATCH v3 11/13] migration: Create migrate_tls_hostname() function

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 24.04.23 21:32, Juan Quintela wrote: Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy [same recommendations] -- Best regards, Vladimir

Re: [PATCH v3 10/13] migration: Create migrate_tls_authz() function

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 24.04.23 21:32, Juan Quintela wrote: Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy Still same recommendations: "const char *" and "s" becomes unused in migration_tls_channel_process_incoming() -- Best regards, Vladimir

Re: [PATCH v3 09/13] migration: Create migrate_tls_creds() function

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 24.04.23 21:32, Juan Quintela wrote: Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/options.c | 7 +++ migration/options.h | 1 + migration/tls.c | 9 - 3 files changed, 12 insertions(+), 5 deletions(-) diff --git

Re: [PATCH 0/2] vmstate-static-checker: Fix VMS_ARRAY comparisons

2023-04-26 Thread Juan Quintela
Peter Xu wrote: > On Wed, Apr 26, 2023 at 06:36:00PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > I'm doing some machine type checks to make sure nothing breaks for >> > 7.2<->8.0. Along the way I found one false negative report on e1000e using >> > the static checker, turns out to be an

Re: [PATCH v3 08/13] migration: Remove MigrationState from block_cleanup_parameters()

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 24.04.23 21:32, Juan Quintela wrote: This makes the function more regular with everything else. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 4 ++-- migration/options.c | 4 +++- migration/options.h | 2 +- 3 files changed,

Re: [PATCH v3 07/13] migration: Move block_cleanup_parameters() to options.c

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 24.04.23 21:32, Juan Quintela wrote: Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v3 06/13] migration: Move migrate_set_block_incremental() to options.c

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 26.04.23 21:45, Vladimir Sementsov-Ogievskiy wrote: On 24.04.23 21:32, Juan Quintela wrote: Once there, make it more regular and remove th eneed for some type here haha, and my typo here MigrationState parameter. Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards,

Re: [PATCH v3 06/13] migration: Move migrate_set_block_incremental() to options.c

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 24.04.23 21:32, Juan Quintela wrote: Once there, make it more regular and remove th eneed for some type here MigrationState parameter. Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v3 05/13] migration: Create migrate_downtime_limit() function

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 24.04.23 21:32, Juan Quintela wrote: Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 05/13] hw/ide: Extract pci_ide_class_init()

2023-04-26 Thread Bernhard Beschow
Am 26. April 2023 11:04:30 UTC schrieb Mark Cave-Ayland : >On 22/04/2023 16:07, Bernhard Beschow wrote: > >> Resolves redundant code in every PCI IDE device model. > >I think this needs to mention that it's moving the PCIDeviceClass::exit() >function from all of the PCI IDE controller

Re: [PATCH 09/13] hw/ide/piix: Disuse isa_get_irq()

2023-04-26 Thread Bernhard Beschow
Am 26. April 2023 11:33:40 UTC schrieb Mark Cave-Ayland : >On 22/04/2023 16:07, Bernhard Beschow wrote: > >> isa_get_irq() asks for an ISADevice which piix-ide doesn't provide. >> Passing a NULL pointer works but causes the isabus global to be used >> then. By fishing out TYPE_ISA_BUS from the

Re: [PATCH 10/13] hw/ide/piix: Reuse PCIIDEState::{cmd,data}_ops

2023-04-26 Thread Bernhard Beschow
Am 26. April 2023 11:37:48 UTC schrieb Mark Cave-Ayland : >On 22/04/2023 16:07, Bernhard Beschow wrote: > >> Now that PCIIDEState::{cmd,data}_ops are initialized in the base class >> constructor there is an opportunity for PIIX to reuse these attributes. This >> resolves usage of

Re: [PATCH 08/13] hw/ide: Rename PCIIDEState::*_bar attributes

2023-04-26 Thread Bernhard Beschow
Am 26. April 2023 11:21:28 UTC schrieb Mark Cave-Ayland : >On 22/04/2023 16:07, Bernhard Beschow wrote: > >> The attributes represent memory regions containing operations which are >> mapped >> by the device models into PCI BARs. Reflect this by changing the suffic into >> "_ops". >> >> Note

Re: [PATCH v3 04/13] migration: Make all functions check have the same format

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 24.04.23 21:32, Juan Quintela wrote: Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 0/2] vmstate-static-checker: Fix VMS_ARRAY comparisons

2023-04-26 Thread Peter Xu
On Wed, Apr 26, 2023 at 06:36:00PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > I'm doing some machine type checks to make sure nothing breaks for > > 7.2<->8.0. Along the way I found one false negative report on e1000e using > > the static checker, turns out to be an issue in the checker

Re: [PATCH v3 03/13] migration: Create migrate_params_init() function

2023-04-26 Thread Vladimir Sementsov-Ogievskiy
On 24.04.23 21:32, Juan Quintela wrote: Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH v9 2/3] multifd: Protect multifd_send_sync_main() calls

2023-04-26 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 Acked-by:

[PATCH v9 3/3] multifd: Only flush once each full round of memory

2023-04-26 Thread Juan Quintela
We need to add a new flag to mean to flush at that point. Notice that we still flush 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. In the previous version, the check that changes the default

[PATCH v9 1/3] multifd: Create property multifd-flush-after-each-section

2023-04-26 Thread Juan Quintela
We used to flush all channels at the end of each RAM section sent. That is not needed, so preparing to only flush after a full iteration through all the RAM. Default value of the property is false. But we return "true" in migrate_multifd_flush_after_each_section() until we implement the code in

[PATCH v9 0/3] Eliminate multifd flush

2023-04-26 Thread Juan Quintela
Hi Changes in v9: - rebase over migration-pull-20230424 this means that we need to change things for options.c creation. - make the property be set for 8.0 not 7.0 (thanks peter) - the check that disabled the property was lost on some rebase, put it back. Please, review. [v8] - rebase over

[PULL 0/7] Migration 20230426 patches

2023-04-26 Thread Juan Quintela
The following changes since commit 9c894df3a37d675652390f7dbbe2f65b7bad7efa: migration: Create migrate_max_bandwidth() function (2023-04-24 15:01:47 +0200) are available in the Git repository at: https://gitlab.com/juan.quintela/qemu.git tags/migration-20230426-pull-request for you

[PULL 4/7] migration: Move qmp_migrate_set_parameters() to options.c

2023-04-26 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 420 -- migration/options.c | 418 + migration/options.h | 11 ++ 3 files changed, 429 insertions(+), 420

[PULL 5/7] migration: Allow postcopy_ram_supported_by_host() to report err

2023-04-26 Thread Juan Quintela
From: Peter Xu Instead of print it to STDERR, bring the error upwards so that it can be reported via QMP responses. E.g.: { "execute": "migrate-set-capabilities" , "arguments": { "capabilities": [ { "capability": "postcopy-ram", "state": true } ] } } { "error": { "class":

[PULL 3/7] migration: Move migrate_use_tls() to options.c

2023-04-26 Thread Juan Quintela
Once there, rename it to migrate_tls() and make it return bool for consistency. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- Fix typos found by fabiano --- migration/migration.c | 9 - migration/migration.h | 2 -- migration/options.c | 11

[PULL 7/7] vmstate-static-checker: Recognize "num" field

2023-04-26 Thread Juan Quintela
From: Peter Xu Recognize this field for VMS_ARRAY typed vmsd fields, then we can do proper size matching with previous patch. Note that this is compatible with old -dump-vmstate output, because when "num" is not there we'll still use the old "size" only. Signed-off-by: Peter Xu Reviewed-by:

[PULL 2/7] MAINTAINERS: Add Leonardo and Peter as reviewers

2023-04-26 Thread Juan Quintela
Now that David has stepped down with Migration maintainership, Leonardo and Peter has volunteer to review the migration patches. This way they got CC'd on every migration patch. Signed-off-by: Juan Quintela Acked-by: Peter Xu Acked-by: Leonardo Bras --- MAINTAINERS | 2 ++ 1 file changed, 2

[PULL 6/7] migration/vmstate-dump: Dump array size too as "num"

2023-04-26 Thread Juan Quintela
From: Peter Xu For VMS_ARRAY typed vmsd fields, also dump the number of entries in the array in -vmstate-dump. Without such information, vmstate static checker can report false negatives of incompatible vmsd on VMS_ARRAY typed fields, when the src/dst do not have the same type of array defined.

[PULL 1/7] migration: Disable postcopy + multifd migration

2023-04-26 Thread Juan Quintela
From: Leonardo Bras Since the introduction of multifd, it's possible to perform a multifd migration and finish it using postcopy. A bug introduced by yank (fixed on cfc3bcf373) was previously preventing a successful use of this migration scenario, and now thing should be working on most

Re: [PATCH 1/9] Hexagon (target/hexagon) Add support for v68/v69/v71/v73

2023-04-26 Thread Anton Johansson via
On 4/26/23 04:30, Taylor Simpson wrote: Add support for the ELF flags Move target/hexagon/cpu.[ch] to be v73 Change the compiler flag used by "make check-tcg" The decbin instruction is removed in Hexagon v73, so check the version before trying to compile the instruction. Signed-off-by:

[PATCH v11 01/13] target/arm: Move cortex sysregs into a separate file

2023-04-26 Thread Fabiano Rosas
The file cpu_tcg.c is about to be moved into the tcg/ directory, so move the register definitions into a new file. Also move the function declaration to the more appropriate cpregs.h. Reviewed-by: Richard Henderson Signed-off-by: Fabiano Rosas --- target/arm/cortex-regs.c | 69

[PATCH v11 05/13] target/arm: Move 64-bit TCG CPUs into tcg/

2023-04-26 Thread Fabiano Rosas
Move the 64-bit CPUs that are TCG-only: - cortex-a35 - cortex-a55 - cortex-a72 - cortex-a76 - a64fx - neoverse-n1 Keep the CPUs that can be used with KVM: - cortex-a57 - cortex-a53 - max - host Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson --- hw/arm/virt.c | 6 +-

[PATCH v11 10/13] arm/Kconfig: Always select SEMIHOSTING when TCG is present

2023-04-26 Thread Fabiano Rosas
We are about to enable the build without TCG, so CONFIG_SEMIHOSTING and CONFIG_ARM_COMPATIBLE_SEMIHOSTING cannot be unconditionally set in default.mak anymore. So reflect the change in a Kconfig. Instead of using semihosting/Kconfig, use a target-specific file, so that the change doesn't affect

[PATCH v11 06/13] tests/qtest: Adjust and document query-cpu-model-expansion test for arm

2023-04-26 Thread Fabiano Rosas
We're about to move the 32-bit CPUs under CONFIG_TCG, so adjust the query-cpu-model-expansion test to check against the cortex-a7, which is already under CONFIG_TCG. That allows the next patch to contain only code movement. While here add comments clarifying what we're testing. Signed-off-by:

[PATCH v11 07/13] target/arm: move cpu_tcg to tcg/cpu32.c

2023-04-26 Thread Fabiano Rosas
From: Claudio Fontana move the module containing cpu models definitions for 32bit TCG-only CPUs to tcg/ and rename it for clarity. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Acked-by: Thomas Huth --- hw/arm/virt.c | 2

[PATCH v11 08/13] tests/qtest: Fix tests when no KVM or TCG are present

2023-04-26 Thread Fabiano Rosas
It is possible to have a build with both TCG and KVM disabled due to Xen requiring the i386 and x86_64 binaries to be present in an aarch64 host. If we build with --disable-tcg on the aarch64 host, we will end-up with a QEMU binary (x86) that does not support TCG nor KVM. Skip tests that crash

[PATCH v11 11/13] arm/Kconfig: Do not build TCG-only boards on a KVM-only build

2023-04-26 Thread Fabiano Rosas
Move all the CONFIG_FOO=y from default.mak into "default y if TCG" statements in Kconfig. That way they won't be selected when CONFIG_TCG=n. I'm leaving CONFIG_ARM_VIRT in default.mak because it allows us to keep the two default.mak files not empty and keep aarch64-default.mak including

[PATCH v11 13/13] gitlab-ci: Check building KVM-only aarch64 target

2023-04-26 Thread Fabiano Rosas
From: Philippe Mathieu-Daudé Add a manual new job to cross-build the aarch64 target with only the KVM accelerator enabled (in particular, no TCG). Re-enable running the similar job on the project Aarch64 custom runner. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas

[PATCH v11 12/13] tests/qtest: Restrict tpm-tis-i2c-test to CONFIG_TCG

2023-04-26 Thread Fabiano Rosas
The test set -accel tcg, so restrict it to when TCG is present. Signed-off-by: Fabiano Rosas --- tests/qtest/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index cfc66ade6f..48cd35b5b2 100644 ---

[PATCH v11 04/13] target/arm: Do not expose all -cpu max features to qtests

2023-04-26 Thread Fabiano Rosas
We're about to move the TCG-only -cpu max configuration code under CONFIG_TCG. To be able to do that we need to make sure the qtests still have some cpu configured even when no other accelerator is available. Delineate now what is used with TCG-only and what is also used with qtests to make the

[PATCH v11 00/13] target/arm: Allow CONFIG_TCG=n builds

2023-04-26 Thread Fabiano Rosas
Hi, Some minor changes: - new patch to move a test under CONFIG_TCG (broken on master); - new patch to document the unsupported CPU test (Philippe); - changed the test skip message when no KVM or TCG are present (Igor). CI run: https://gitlab.com/farosas/qemu/-/pipelines/849926795 v10:

[PATCH v11 09/13] tests/avocado: Pass parameters to migration test

2023-04-26 Thread Fabiano Rosas
The migration tests are currently broken for an aarch64 host because the tests pass no 'machine' and 'cpu' options on the QEMU command line. Add a separate class to each architecture so that we can specify 'machine' and 'cpu' options instead of relying on defaults. Add a skip decorator to keep

[PATCH v11 03/13] target/arm: Extract TCG -cpu max code into a function

2023-04-26 Thread Fabiano Rosas
Introduce aarch64_max_tcg_initfn that contains the TCG-only part of -cpu max configuration. We'll need that to be able to restrict this code to a TCG-only config in the next patches. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Fabiano Rosas ---

[PATCH v11 02/13] target/arm: Remove dead code from cpu_max_set_sve_max_vq

2023-04-26 Thread Fabiano Rosas
The sve-max-vq property has been removed from the -cpu max used with KVM, so code under kvm_enabled in cpu_max_set_sve_max_vq is not reachable. Fixes: 0baa21be49 ("target/arm: Make KVM -cpu max exactly like -cpu host") Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson

Re: [PATCH] multifd: Fix the number of channels ready

2023-04-26 Thread Fabiano Rosas
Juan Quintela writes: > We don't wait in the sem when we are doing a sync_main. Make it wait > there. To make things clearer, we mark the channel ready at the > begining of the thread loop. > > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH] multifd: Fix the number of channels ready

2023-04-26 Thread Fabiano Rosas
Juan Quintela writes: > Fabiano Rosas wrote: >> Juan Quintela writes: >> >>> We don't wait in the sem when we are doing a sync_main. Make it wait >>> there. To make things clearer, we mark the channel ready at the >>> begining of the thread loop. >> >> So in other words we're estabilishing

Re: [PATCH 04/21] Hexagon (target/hexagon) Add overrides for allocframe/deallocframe

2023-04-26 Thread Richard Henderson
On 4/26/23 01:41, Taylor Simpson wrote: +#ifndef CONFIG_HEXAGON_IDEF_PARSER +/* frame = ((LR << 32) | FP) ^ (FRAMEKEY << 32)) */ +static void gen_frame_scramble(TCGv_i64 result) +{ +TCGv_i64 framekey = tcg_temp_new_i64(); +tcg_gen_extu_i32_i64(framekey, hex_gpr[HEX_REG_FRAMEKEY]); +

Re: [PATCH] multifd: Fix the number of channels ready

2023-04-26 Thread Juan Quintela
Fabiano Rosas wrote: > Juan Quintela writes: > >> We don't wait in the sem when we are doing a sync_main. Make it wait >> there. To make things clearer, we mark the channel ready at the >> begining of the thread loop. > > So in other words we're estabilishing that "channel ready" means ready >

Re: [PATCH 03/21] Hexagon (target/hexagon) Add overrides for loop setup instructions

2023-04-26 Thread Richard Henderson
On 4/26/23 01:41, Taylor Simpson wrote: These instructions have implicit writes to registers, so we don't want them to be helpers when idef-parser is off. Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h | 21 +++ target/hexagon/genptr.c | 44

RE: [PATCH 01/21] meson.build Add CONFIG_HEXAGON_IDEF_PARSER

2023-04-26 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Wednesday, April 26, 2023 12:32 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: phi...@linaro.org; a...@rev.ng; a...@rev.ng; Brian Cain > ; Matheus Bernardino (QUIC) > ; pbonz...@redhat.com; > marcandre.lur...@redhat.com;

Re: [PATCH 02/21] Hexagon (target/hexagon) Add DisasContext arg to gen_log_reg_write

2023-04-26 Thread Richard Henderson
On 4/26/23 01:41, Taylor Simpson wrote: Add DisasContext arg to gen_log_reg_write_pair also Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h| 2 +- target/hexagon/genptr.h | 2 +- target/hexagon/genptr.c | 10 +-

[PATCH v2] Hexagon (target/hexagon) Additional instructions handled by idef-parser

2023-04-26 Thread Taylor Simpson
Changes in v2 Fix bug in imm_print identified in clang build Currently, idef-parser skips all floating point instructions. However, there are some floating point instructions that can be handled. The following instructions are now parsed F2_sfimm_p F2_sfimm_n F2_dfimm_p

Re: [PATCH 01/21] meson.build Add CONFIG_HEXAGON_IDEF_PARSER

2023-04-26 Thread Richard Henderson
On 4/26/23 01:40, Taylor Simpson wrote: Enable conditional compilation depending on whether idef-parser is configured Signed-off-by: Taylor Simpson --- meson.build | 1 + 1 file changed, 1 insertion(+) Are you not at the point where you want this unconditionally? How long do you intend to

Re: [PATCH] multifd: Fix the number of channels ready

2023-04-26 Thread Fabiano Rosas
Juan Quintela writes: > We don't wait in the sem when we are doing a sync_main. Make it wait > there. To make things clearer, we mark the channel ready at the > begining of the thread loop. So in other words we're estabilishing that "channel ready" means ready to send, regardless of having

Re: [PATCH v4] acpi: pcihp: allow repeating hot-unplug requests

2023-04-26 Thread Kashyap Chamarthy
On Wed, Apr 26, 2023 at 07:40:02PM +0300, Michael Tokarev wrote: > 18.04.2023 12:04, Igor Mammedov wrote: > > with Q35 using ACPI PCI hotplug by default, user's request to unplug > > device is ignored when it's issued before guest OS has been booted. > > And any additional attempt to request

Re: [RFC PATCH v2 3/4] target/riscv: check smstateen fcsr flag

2023-04-26 Thread Mayuresh Chitale
On Sat, Apr 15, 2023 at 6:55 AM Weiwei Li wrote: > > > On 2023/4/15 00:02, Mayuresh Chitale wrote: > > If misa.F and smstateen_fcsr_ok flag are clear then all the floating > > point instructions must generate an appropriate exception. > > > > Signed-off-by: Mayuresh Chitale > > --- > >

Re: [RFC PATCH v2 2/4] target/riscv: Reuse TB_FLAGS.MSTATUS_HFS_FS

2023-04-26 Thread Mayuresh Chitale
On Sat, Apr 15, 2023 at 7:15 AM Weiwei Li wrote: > > > On 2023/4/15 00:02, Mayuresh Chitale wrote: > > When misa.F is clear, TB_FLAGS.MSTATUS_HS_FS field is unused and can > > be used to save the current state of smstateen0.FCSR check which is > > needed by the floating point translation

Re: [RFC PATCH v2 1/4] target/riscv: smstateen check for fcsr

2023-04-26 Thread Mayuresh Chitale
On Sat, Apr 15, 2023 at 6:32 AM Weiwei Li wrote: > > > On 2023/4/15 00:01, Mayuresh Chitale wrote: > > If smstateen is implemented and smtateen0.fcsr is clear and misa.F > > is off then the floating point operations must return illegal > > instruction exception or virtual instruction trap, if

Re: [PATCH] scsi: check inquiry buffer length to prevent crash

2023-04-26 Thread Théo Maillart
Le mer. 26 avr. 2023 à 15:38, Théo Maillart a écrit : > Using linux 6.x guest, at boot time, an inquiry makes qemu crash. > Here is a trace of the scsi inquiry in question: > > scsi_req_parsed target 1 lun 0 tag 0x2cffb48 command 18 dir 1 length 4 > scsi_req_parsed_lba target 1 lun 0 tag

Re: [RFC] hw/arm/virt: Provide DT binding generation for PCI eXpander Bridges

2023-04-26 Thread Jonathan Cameron via
On Tue, 25 Apr 2023 21:15:25 +0100 Peter Maydell wrote: > On Tue, 25 Apr 2023 at 18:37, Jonathan Cameron > wrote: > > We could explore only solving the problem for pxb-cxl for now. > > However, we would still be talking infrastructure in kernel only > > to support emulated CXL devices and I can

Re: [PATCH v8 1/3] multifd: Create property multifd-flush-after-each-section

2023-04-26 Thread Juan Quintela
Peter Xu wrote: > On Tue, Apr 25, 2023 at 06:31:12PM +0200, Juan Quintela wrote: >> We used to flush all channels at the end of each RAM section >> sent. That is not needed, so preparing to only flush after a full >> iteration through all the RAM. >> >> Default value of the property is false.

Re: [PATCH v4] acpi: pcihp: allow repeating hot-unplug requests

2023-04-26 Thread Michael Tokarev
18.04.2023 12:04, Igor Mammedov wrote: with Q35 using ACPI PCI hotplug by default, user's request to unplug device is ignored when it's issued before guest OS has been booted. And any additional attempt to request device hot-unplug afterwards results in following error: "Device XYZ is

  1   2   3   >