[PATCH-for-9.1 v2 2/3] hw/display/pxa2xx_lcd: Set rotation angle using qemu_console_set_rotate

2024-03-18 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/display/pxa2xx_lcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/pxa2xx_lcd.c b/hw/display/pxa2xx_lcd.c index a9d0d981a0..7d03fa57d0 100644 --- a/hw/display/pxa2xx_lcd.c +++ b/hw/display/pxa2xx_lcd.c @@ -1439,6 +1439,7 @@

Re: [PATCH-for-9.1 3/3] ui/console: Add 'rotate_arcdegree' field to allow per-console rotation

2024-03-18 Thread Philippe Mathieu-Daudé
On 18/3/24 11:36, Akihiko Odaki wrote: On 2024/03/18 19:05, Philippe Mathieu-Daudé wrote: Add the 'rotate_arcdegree' field to QemuConsole and remove the use of the 'graphic_rotate' global. I think QemuGraphicConsole is a better place to put the field. Good point. Regards, Akihiko Odaki

Re: [PATCH for-9.0] mirror: Don't call job_pause_point() under graph lock

2024-03-18 Thread Kevin Wolf
Am 14.03.2024 um 15:29 hat Stefan Hajnoczi geschrieben: > On Wed, Mar 13, 2024 at 04:30:00PM +0100, Kevin Wolf wrote: > > Calling job_pause_point() while holding the graph reader lock > > potentially results in a deadlock: bdrv_graph_wrlock() first drains > > everything, including the mirror job,

Re: [PATCH v4] qemu-img: Fix Column Width and Improve Formatting in snapshot list

2024-03-18 Thread Kevin Wolf
Am 23.01.2024 um 06:03 hat Abhiram Tilak geschrieben: > When running the command `qemu-img snapshot -l SNAPSHOT` the output of > VM_CLOCK (measures the offset between host and VM clock) cannot to > accommodate values in the order of thousands (4-digit). > > This line [1] hints on the problem.

Re: [PATCH 0/9] tests/qemu-iotests: Fix running with "check -ssh -qcow2"

2024-03-18 Thread Kevin Wolf
Am 15.03.2024 um 12:10 hat Thomas Huth geschrieben: > I recently wanted to check for some changes that I did to the URI handling > in the block layer code, but I had to discover that a lot of iotests only > work with the raw file format when using a protocol that is not "file", > i.e. "./check

Re: [QEMU PATCH v6 1/1] virtio-pci: implement No_Soft_Reset bit

2024-03-18 Thread Chen, Jiqian
On 2024/3/18 16:04, Michael S. Tsirkin wrote: > On Thu, Feb 22, 2024 at 11:40:10AM +0800, Jiqian Chen wrote: >> In current code, when guest does S3, virtio devices are reset due to >> the bit No_Soft_Reset is not set. After resetting, the display resources >> of virtio-gpu are destroyed, then the

Re: [PATCH 08/10] qapi: Correct error message for 'vcpu_dirty_limit' parameter

2024-03-18 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 12/3/24 16:26, Zhao Liu wrote: >> On Tue, Mar 12, 2024 at 03:13:41PM +0100, Markus Armbruster wrote: >>> Date: Tue, 12 Mar 2024 15:13:41 +0100 >>> From: Markus Armbruster >>> Subject: [PATCH 08/10] qapi: Correct error message for 'vcpu_dirty_limit' >>>

Re: [PATCH 2/4] ui/vnc: Do not use console_select()

2024-03-18 Thread Akihiko Odaki
On 2024/03/18 17:21, Marc-André Lureau wrote: Hi On Mon, Mar 18, 2024 at 11:58 AM Akihiko Odaki wrote: console_select() is shared by other displays and a console_select() call from one of them triggers console switching also in ui/curses, circumventing key state reinitialization that needs

[PATCH-for-9.1 3/3] ui/console: Add 'rotate_arcdegree' field to allow per-console rotation

2024-03-18 Thread Philippe Mathieu-Daudé
Add the 'rotate_arcdegree' field to QemuConsole and remove the use of the 'graphic_rotate' global. Signed-off-by: Philippe Mathieu-Daudé --- ui/console-priv.h | 1 + ui/console.c | 7 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/console-priv.h

[PATCH-for-9.1 0/3] ui/display: Introduce API to change console orientation

2024-03-18 Thread Philippe Mathieu-Daudé
Hi, The idea behind this series is to reduce the use of the 'graphic_rotate' global. It is only used by the Spitz machine, so we could convert the '-rotate' argument to a sugar property on the PXA2XX_LCD_TYPE model, but since the Spitz machine has been deprecated recently (commit a2531bb855

[PATCH-for-9.1 1/3] ui/console: Introduce API to change console orientation

2024-03-18 Thread Philippe Mathieu-Daudé
Extract the following methods: - qemu_console_set_rotate() - qemu_console_is_rotated() - qemu_console_get_rotate_arcdegree() Signed-off-by: Philippe Mathieu-Daudé --- include/ui/console.h | 3 +++ ui/console.c | 16 ui/input.c | 9 - 3 files

[PATCH-for-9.1 2/3] hw/display/pxa2xx_lcd: Set rotation angle using qemu_console_set_rotate

2024-03-18 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/display/pxa2xx_lcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/pxa2xx_lcd.c b/hw/display/pxa2xx_lcd.c index a9d0d981a0..7d03fa57d0 100644 --- a/hw/display/pxa2xx_lcd.c +++ b/hw/display/pxa2xx_lcd.c @@ -1439,6 +1439,7 @@

Re: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-18 Thread Jonathan Cameron via
On Mon, 18 Mar 2024 10:29:28 +0800 Yuquan Wang wrote: > The dev_dbg info for Clear Event Records mailbox command would report > the handle of the next record to clear not the current one. > > This was because the index 'i' had incremented before printing the > current handle value. > >

[PULL 12/15] tests/qemu-iotests: Restrict tests that use --image-opts to the 'file' protocol

2024-03-18 Thread Kevin Wolf
From: Thomas Huth These tests 188, 189 and 198 use qemu-io with --image-opts with additional hard-coded parameters for the file protocol, so they cannot work for other protocols. Thus we have to limit these tests to the file protocol only. Signed-off-by: Thomas Huth Message-ID:

[PULL 08/15] tests/qemu-iotests: Restrict test 114 to the 'file' protocol

2024-03-18 Thread Kevin Wolf
From: Thomas Huth iotest 114 uses "truncate" and the qcow2.py script on the destination file, which both cannot deal with URIs. Thus this test needs the "file" protocol, otherwise it fails with an error message like this: truncate: cannot open

[PULL 07/15] tests/qemu-iotests: Restrict test 066 to the 'file' protocol

2024-03-18 Thread Kevin Wolf
From: Thomas Huth The hand-crafted json statement in this test only works if the test is run with the "file" protocol, so mark this test accordingly. Signed-off-by: Thomas Huth Message-ID: <2024031508.153201-3-th...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf ---

[PULL 00/15] Block layer patches

2024-03-18 Thread Kevin Wolf
The following changes since commit ba49d760eb04630e7b15f423ebecf6c871b8f77b: Merge tag 'pull-maintainer-final-130324-1' of https://gitlab.com/stsquad/qemu into staging (2024-03-13 15:12:14 +) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream

[PULL 10/15] tests/qemu-iotests: Restrict test 134 and 158 to the 'file' protocol

2024-03-18 Thread Kevin Wolf
From: Thomas Huth Commit b25b387fa592 updated the iotests 134 and 158 to use the --image-opts parameter for qemu-io with file protocol related options, but forgot to update the _supported_proto line accordingly. So let's do that now. Fixes: b25b387fa5 ("qcow2: convert QCow2 to use QCryptoBlock

[PULL 01/15] mirror: Don't call job_pause_point() under graph lock

2024-03-18 Thread Kevin Wolf
Calling job_pause_point() while holding the graph reader lock potentially results in a deadlock: bdrv_graph_wrlock() first drains everything, including the mirror job, which pauses it. The job is only unpaused at the end of the drain section, which is when the graph writer lock has been

[PULL 06/15] tests/qemu-iotests: Fix test 033 for running with non-file protocols

2024-03-18 Thread Kevin Wolf
From: Thomas Huth When running iotest 033 with the ssh protocol, it fails with: 033 fail [14:48:31] [14:48:41] 10.2soutput mismatch --- /.../tests/qemu-iotests/033.out +++ /.../tests/qemu-iotests/scratch/qcow2-ssh-033/033.out.bad @@ -174,6 +174,7 @@ 512 bytes, X

[PULL 13/15] tests/qemu-iotests: Fix some tests that use --image-opts for other protocols

2024-03-18 Thread Kevin Wolf
From: Thomas Huth Tests 263, 284 and detect-zeroes-registered-buf use qemu-io with --image-opts so we have to enforce IMGOPTSSYNTAX=true here to get $TEST_IMG in shape for other protocols than "file". Signed-off-by: Thomas Huth Message-ID: <2024031508.153201-9-th...@redhat.com>

[PULL 04/15] blockdev: Fix blockdev-snapshot-sync error reporting for no medium

2024-03-18 Thread Kevin Wolf
From: Markus Armbruster When external_snapshot_abort() rejects a BlockDriverState without a medium, it creates an error like this: error_setg(errp, "Device '%s' has no medium", device); Trouble is @device can be null. My system formats null as "(null)", but other systems might crash.

Re: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback

2024-03-18 Thread Eric Auger
On 2/28/24 04:58, Zhenzhong Duan wrote: > Introduce host_iommu_device_create callback and a wrapper for it. > > This callback is used to allocate a host iommu device instance and > initialize it based on type. > > Signed-off-by: Zhenzhong Duan > --- > include/hw/vfio/vfio-common.h | 1

[PULL 10/24] smbios: avoid mangling user provided tables

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov currently smbios_entry_add() preserves internally '-smbios type=' options but tables provided with '-smbios file=' are stored directly into blob that eventually will be exposed to VM. And then later QEMU adds default/'-smbios type' entries on top into the same blob. It makes

[PULL 01/24] SMBIOS: fix long lines

2024-03-18 Thread Michael S. Tsirkin
Break up long lines to fit under 80/90 char limit. Fixes: 04f143d828 ("Implement SMBIOS type 9 v2.6") Fixes: 735eee07d1 ("Implement base of SMBIOS type 9 descriptor.") Cc: "Felix Wu" Cc: Nabih Estefan Reviewed-by: Ani Sinha Signed-off-by: Michael S. Tsirkin --- hw/smbios/smbios.c | 9

[PULL 24/24] smbios: add extra comments to smbios_get_table_legacy()

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20240314152302.2324164-22-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/smbios/smbios_legacy.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/smbios/smbios_legacy.c

[PULL 20/24] smbios: error out when building type 4 table is not possible

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov If SMBIOS v2 version is requested but number of cores/threads are more than it's possible to describe with v2, error out instead of silently ignoring the fact and filling core/thread count with bogus values. This will help caller to decide if it should fallback to SMBIOSv3

[PULL 05/24] tests: smbios: add test for -smbios type=11 option

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner Message-Id: <20240314152302.2324164-3-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 17 +

[PULL 12/24] smbios: add smbios_add_usr_blob_size() helper

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov it will be used by follow up patch when legacy handling is moved out into a separate file. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Message-Id: <20240314152302.2324164-10-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL 07/24] smbios: cleanup smbios_get_tables() from legacy handling

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov smbios_get_tables() bails out right away if leagacy mode is enabled and won't generate any SMBIOS tables. At the same time x86 specific fw_cfg_build_smbios() will genarate legacy tables and then proceed to preparing temporary mem_array for useless call to smbios_get_tables()

[PULL 15/24] smbios: handle errors consistently

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov Current code uses mix of error_report()+exit(1) and error_setg() to handle errors. Use newer error_setg() everywhere, beside consistency it will allow to detect error condition without killing QEMU and attempt switch-over to SMBIOS3.x tables/entrypoint in follow up patch.

[PULL 13/24] smbios: rename/expose structures/bitmaps used by both legacy and modern code

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov As a preparation to move legacy handling into a separate file, add prefix 'smbios_' to type0/type1/have_binfile_bitmap/have_fields_bitmap and expose them in smbios.h so that they can be reused in legacy and modern code. Doing it as a separate patch to avoid rename cluttering

Re: Regression in v7.2.10 - ui-dbus.so requires -fPIC

2024-03-18 Thread Michael Tokarev
18.03.2024 10:35, Marc-André Lureau wrote: .. dbus-display1 is also used with static linking for the unit test. It looks like the simplest is to let the actual target decide how it is built, even if it is compiled multiple time then: - dbus_display1_lib = static_library('dbus-display1',

[PULL 23/24] tests: acpi: update expected SSDT.dimmpxm blob

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov address shift is caused by switch to 32-bit SMBIOS entry point which has slightly different size from 64-bit one and happens to trigger a bit different memory layout. Expected diff: -Name (MEMA, 0x07FFE000) +Name (MEMA, 0x07FFF000) Signed-off-by: Igor Mammedov

[PULL 18/24] smbios: extend smbios-entry-point-type with 'auto' value

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov later patches will use it to pick SMBIOS version at runtime depending on configuration. Signed-off-by: Igor Mammedov Acked-by: Markus Armbruster Reviewed-by: Ani Sinha Tested-by: Fiona Ebner Message-Id: <20240314152302.2324164-16-imamm...@redhat.com> Reviewed-by: Michael

Re: [PATCH 2/2] hw/usb/hcd-xhci.c: allow unaligned access to Capability Registers

2024-03-18 Thread Peter Xu
On Mon, Dec 11, 2023 at 01:57:42PM +, Peter Maydell wrote: > On Mon, 11 Dec 2023 at 07:13, Tomoyuki HIROSE > wrote: > > > > According to xHCI spec rev 1.2, unaligned access to xHCI Host > > Controller Capability Registers is not prohibited. In Addition, the > > limit of access size is also

[PULL 08/24] smbios: get rid of smbios_smp_sockets global

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov it makes smbios_validate_table() independent from smbios_smp_sockets global, which in turn lets smbios_get_tables() avoid using not related legacy code. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Tested-by: Fiona Ebner Message-Id:

Re: [PATCH v1 00/11] Add a host IOMMU device abstraction

2024-03-18 Thread Eric Auger
On 2/28/24 04:58, Zhenzhong Duan wrote: > Hi, > > Based on Joao's suggestion, the iommufd nesting prerequisite series [1] > is further splitted to host IOMMU device abstract part and vIOMMU > check/sync part. This series implements the 1st part. > > This split also faciliates the dirty tracking

[PATCH v5 20/24] replay: simple auto-snapshot mode for record

2024-03-18 Thread Nicholas Piggin
record makes an initial snapshot when the machine is created, to enable reverse-debugging. Often the issue being debugged appears near the end of the trace, so it is important for performance to keep snapshots close to the end. This implements a periodic snapshot mode that keeps a rolling set of

[PATCH v5 22/24] target/ppc: fix timebase register reset state

2024-03-18 Thread Nicholas Piggin
(H)DEC and PURR get reset before icount does, which causes them to be skewed and not match the init state. This can cause replay to not match the recorded trace exactly. For DEC and HDEC this is usually not noticable since they tend to get programmed before affecting the target machine. PURR has

[PATCH v5 24/24] tests/avocado: replay_linux.py add ppc64 pseries test

2024-03-18 Thread Nicholas Piggin
Add a ppc64 pseries test. IO in SLOF is very slow when running in record-replay modes, so this test uses guestfish to extract the kernel and initrd and boot them directly, bypassing SLOF. Signed-off-by: Nicholas Piggin --- tests/avocado/replay_linux.py | 72 ++-

[PATCH v5 13/24] tests/avocado: replay_linux.py remove the timeout expected guards

2024-03-18 Thread Nicholas Piggin
replay_linux tests with virtio on aarch64 gciv3 and x86-64 q35 machines seems to be more reliable now, so timeouts are no longer expected. pc_i440fx, gciv2, and non-virtio still have problems, so mark them as flaky: they are not just long-running, but can hang indefinitely. These tests take about

[PATCH v5 16/24] tests/avocado: reverse_debugging.py verify addresses between record and replay

2024-03-18 Thread Nicholas Piggin
gdb is only attached in the replay phase, and the recorded trace is single-stepped to build up an address map that is used to then verify reverse-step and reverse-continue. This change attaches gdb in the record phase, and builds the address map by single-stepping the live machine. That address

[PATCH v5 15/24] tests/avocado: reverse_debugging.py add test for x86-64 q35 machine

2024-03-18 Thread Nicholas Piggin
The x86-64 pc machine has a problem with record/replay. q35 seems to work well. Add a new q35 test and update the flaky message for pc. Signed-off-by: Nicholas Piggin --- tests/avocado/reverse_debugging.py | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git

[PATCH v5 14/24] tests/avocado: reverse_debugging.py mark aarch64 and pseries as not flaky

2024-03-18 Thread Nicholas Piggin
These seem to be quite solid, including on several gitlab CI runs. Enabling them should help catch breakage in future. And update the powernv comment -- gitlab isn't the problem, there are known gaps in implementation. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Nicholas

[PATCH v5 21/24] tests/avocado: reverse_debugging.py test auto-snapshot mode

2024-03-18 Thread Nicholas Piggin
This runs the recording phase with a periodic auto-snapshot. It also runs the machine for 5 seconds after creating the initial address map, so as to alow time for a some auto snapshots to be taken. In the replay mode a reverse-debugging sequence is added where the test is run to the end, and

Re: [PATCH] configure: Fix error message when C compiler is not working

2024-03-18 Thread Thomas Huth
On 08/03/2024 07.00, Thomas Huth wrote: If you try to run the configure script on a system without a working C compiler, you get a very misleading error message: ERROR: Unrecognized host OS (uname -s reports 'Linux') We should rather tell the user that we were not able to use the C compiler

Re: [PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines

2024-03-18 Thread Cédric Le Goater
--- a/migration/ram.c +++ b/migration/ram.c @@ -2836,18 +2836,31 @@ static void migration_bitmap_clear_discarded_pages(RAMState *rs) static void ram_init_bitmaps(RAMState *rs) { +Error *local_err = NULL; +bool ret = true; + qemu_mutex_lock_ramlist();

[PULL 19/24] smbios: in case of entry point is 'auto' try to build v2 tables 1st

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov QEMU for some time now uses SMBIOS 3.0 for PC/Q35 machines by default, however Windows has a bug in locating SMBIOS 3.0 entrypoint and fails to find tables when booted on SeaBIOS (on UEFI SMBIOS 3.0 tables work fine since firmware hands over tables in another way) Missing

[PULL 11/24] smbios: don't check type4 structures in legacy mode

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov legacy mode doesn't support structures of type 2 and more, and CLI has a check for '-smbios type' option, however it's still possible to sneak in type4 as a blob with '-smbios file' option. However doing the later makes SMBIOS tables broken since SeaBIOS doesn't expect that.

[PULL 21/24] tests: acpi/smbios: whitelist expected blobs

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Acked-by: Ani Sinha Message-Id: <20240314152302.2324164-19-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff

Re: [PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines

2024-03-18 Thread Cédric Le Goater
On 3/16/24 03:41, Yong Huang wrote: On Wed, Mar 6, 2024 at 9:35 PM Cédric Le Goater mailto:c...@redhat.com>> wrote: Now that the log_global*() handlers take an Error** parameter and return a bool, do the same for memory_global_dirty_log_start() and memory_global_dirty_log_stop().

[PULL 17/24] smbios: clear smbios_type4_count before building tables

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov it will help to keep type 4 tables accounting correct in case SMBIOS tables are built multiple times. Signed-off-by: Igor Mammedov Tested-by: Fiona Ebner Message-Id: <20240314152302.2324164-15-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[PULL 22/24] pc/q35: set SMBIOS entry point type to 'auto' by default

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov Use smbios-entry-point-type='auto' for newer machine types as a workaround for Windows not detecting SMBIOS tables. Which makes QEMU pick SMBIOS tables based on configuration (with 2.x preferred and fallback to 3.x if the former isn't compatible with configuration) Default

[PULL 02/24] qapi: document PCIe Gen5/Gen6 speeds since 9.0

2024-03-18 Thread Michael S. Tsirkin
Document that PCIe Gen5/Gen6 speeds are only in QAPI since 9.0 - the rest is since 4.0. Cc: Lukas Stockner Cc: Marcel Apfelbaum Fixes: c08da86dc4 ("pcie: Support PCIe Gen5/Gen6 link speeds") Suggested-by: Markus Armbruster Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-18 Thread fan
On Mon, Mar 18, 2024 at 10:29:28AM +0800, Yuquan Wang wrote: > The dev_dbg info for Clear Event Records mailbox command would report > the handle of the next record to clear not the current one. > > This was because the index 'i' had incremented before printing the > current handle value. > >

Re: [PULL 0/4] machine development tool

2024-03-18 Thread Vladimir Sementsov-Ogievskiy
On 08.03.24 06:47, Peter Xu wrote: On Thu, Mar 07, 2024 at 12:06:59PM +0300, Maksim Davydov wrote: On 3/6/24 04:57, Peter Xu wrote: On Tue, Mar 05, 2024 at 03:43:41PM +0100, Markus Armbruster wrote: Peter Maydell writes: On Mon, 4 Mar 2024 at 13:52, Maksim Davydov wrote: The following

Re: [PATCH 0/3] 64 Bit support for hppa gdbstub

2024-03-18 Thread Richard Henderson
On 3/17/24 20:32, Sven Schnelle wrote: Hi Richard, Sven Schnelle writes: Hi List, this patchset allows to debug the hppa target when running in wide (64 bit) mode. gdb needs a small patch to switch to 64 bit mode. I pushed the patch to

Re: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback

2024-03-18 Thread Eric Auger
Hi ZHenzhong, On 2/28/24 04:58, Zhenzhong Duan wrote: > Introduce host_iommu_device_create callback and a wrapper for it. > > This callback is used to allocate a host iommu device instance and > initialize it based on type. > > Signed-off-by: Zhenzhong Duan > --- > include/hw/vfio/vfio-common.h

Re: Unmapping KVM Guest Memory from Host Kernel

2024-03-18 Thread Brendan Jackman
On Fri, 8 Mar 2024 at 18:36, David Matlack wrote: > I'm not sure if ASI provides a solution to the problem James is trying > to solve. ASI creates a separate "restricted" address spaces where, yes, > guest memory can be not mapped. But any access to guest memory is > still allowed. An access

Re: [PATCH v1 11/11] backends/iommufd: Introduce helper function iommufd_device_get_info()

2024-03-18 Thread Eric Auger
Hi Joao, On 3/18/24 16:09, Joao Martins wrote: > On 18/03/2024 07:54, Eric Auger wrote: >> Hi Zhenzhong, >> >> On 2/28/24 04:59, Zhenzhong Duan wrote: >>> Introduce a helper function iommufd_device_get_info() to get >>> host IOMMU related information through iommufd uAPI. >> Looks strange to have

[PATCH] ppc/pnv: I2C controller is not user creatable

2024-03-18 Thread Cédric Le Goater
The I2C controller is a subunit of the processor. Make it so and avoid QEMU crashes. $ build/qemu-system-ppc64 -S -machine powernv9 -device pnv-i2c qemu-system-ppc64: ../hw/ppc/pnv_i2c.c:521: pnv_i2c_realize: Assertion `i2c->chip' failed. Aborted (core dumped) Cc: Glenn Miles

Re: [PATCH] ppc/pnv: I2C controller is not user creatable

2024-03-18 Thread Cédric Le Goater
On 3/18/24 16:53, Thomas Huth wrote: On 18/03/2024 16.44, Cédric Le Goater wrote: The I2C controller is a subunit of the processor. Make it so and avoid QEMU crashes.    $ build/qemu-system-ppc64 -S -machine powernv9 -device pnv-i2c    qemu-system-ppc64: ../hw/ppc/pnv_i2c.c:521:

Re: [PATCH 9/9] docs/system: Add documentation on support for IGVM

2024-03-18 Thread Daniel P . Berrangé
On Mon, Mar 18, 2024 at 03:59:31PM +, Roy Hopkins wrote: > On Fri, 2024-03-01 at 17:10 +, Daniel P. Berrangé wrote: > > On Tue, Feb 27, 2024 at 02:50:15PM +, Roy Hopkins wrote: > > > IGVM support has been implemented for Confidential Guests that support > > > AMD SEV and AMD SEV-ES.

Re: [PATCH v3 1/4] tests/avocado: update sbsa-ref firmware

2024-03-18 Thread Philippe Mathieu-Daudé
On 18/3/24 15:08, Marcin Juszkiewicz wrote: We now have CI job to build those and publish in space with readable urls. Firmware is built using Debian 'bookworm' cross toolchain (gcc 12.2.0). Used versions: - Trusted Firmware v2.10.2 - Tianocore EDK2 stable202402 - Tianocore EDK2 Platforms

Re: [PATCH v3 0/4] tests/avocado: update sbsa-ref firmware to latest

2024-03-18 Thread Philippe Mathieu-Daudé
On 18/3/24 17:30, Philippe Mathieu-Daudé wrote: Hi Marcin, On 18/3/24 15:08, Marcin Juszkiewicz wrote: Updating sbsa-ref firmware for QEMU CI was manual task. Now it is replaced by CI job run on CodeLinaro Gitlab instance. This patchset updates to current state: - Trusted Firmware v2.10.2

qemu-img: very bad performance with the default number of coroutines (8) in presence of compression. Fixed adding "-m 1" to the cmdline.

2024-03-18 Thread Claudio Fontana
Hello, pretty much the $Subject. We had reports of very bad performance with the default options when running: $ time qemu-img convert -c -p -O qcow2 file.qcow2 file.disk real7m13.220s user6m56.682s sys 0m13.038s I studied this and noticed that for every coroutine a thread was

Re: [PATCH v7 3/8] tests/qtest/migration: Replace migrate_get_connect_uri inplace of migrate_get_socket_address

2024-03-18 Thread Fabiano Rosas
Het Gala writes: > On 15/03/24 6:28 pm, Fabiano Rosas wrote: >> Het Gala writes: >> >>> Refactor migrate_get_socket_address to internally utilize 'socket-address' >>> parameter, reducing redundancy in the function definition. >>> >>> migrate_get_socket_address implicitly converts SocketAddress

Re: [PATCH v1 09/11] hw/pci: Introduce pci_device_set/unset_iommu_device()

2024-03-18 Thread Eric Auger
Hi Zhenzhong, On 2/28/24 04:58, Zhenzhong Duan wrote: > From: Yi Liu > > This adds pci_device_set/unset_iommu_device() to set/unset > HostIOMMUDevice for a given PCIe device. Caller of set > should fail if set operation fails. > > Extract out pci_device_get_iommu_bus_devfn() to facilitate >

Re: [PATCH v2] vfio/pci: migration: Skip config space check for vendor specific capability during restore/load

2024-03-18 Thread Alex Williamson
On Fri, 15 Mar 2024 23:22:22 +0530 Vinayak Kale wrote: > On 11/03/24 8:32 pm, Alex Williamson wrote: > > External email: Use caution opening links or attachments > > > > > > On Mon, 11 Mar 2024 17:45:19 +0530 > > Vinayak Kale wrote: > > > >> In case of migration, during restore operation,

Re: [PATCH v1 11/11] backends/iommufd: Introduce helper function iommufd_device_get_info()

2024-03-18 Thread Joao Martins
On 18/03/2024 07:54, Eric Auger wrote: > Hi Zhenzhong, > > On 2/28/24 04:59, Zhenzhong Duan wrote: >> Introduce a helper function iommufd_device_get_info() to get >> host IOMMU related information through iommufd uAPI. > Looks strange to have this patch in this series. I Would rather put it > in

Re: [PATCH v3 2/3] kvm: add support for guest physical bits

2024-03-18 Thread Gerd Hoffmann
Hi, > > +if (cpu->guest_phys_bits > cpu->host_phys_bits_limit) { > > +cpu->guest_phys_bits = cpu->host_phys_bits_limit; > > host_phys_bits_limit is zero by default, so I think it is better to be > like: > > if (cpu->host_phys_bits_limit && >

[PATCH v5 00/24] replay: fixes and new test cases

2024-03-18 Thread Nicholas Piggin
Since v4, - Fixed a 32-bit compile bug and leftover debugging prints. - Dropped the patch to change virtio net guest announce timers for now. - Increased replay_kernel.py timeout because patch 3 was just nudging x86_64 test over the 120s timeout when run on gitlab. - New patch to add a

[PATCH v5 02/24] scripts/replay-dump.py: rejig decoders in event number order

2024-03-18 Thread Nicholas Piggin
Sort decoder functions to be ascending in order of event number, same as the decoder tables. Reviewed-by: Alex Bennée Signed-off-by: Nicholas Piggin --- scripts/replay-dump.py | 56 +- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git

[PATCH v5 03/24] tests/avocado: excercise scripts/replay-dump.py in replay tests

2024-03-18 Thread Nicholas Piggin
This runs replay-dump.py after recording a trace, and fails the test if the script fails. replay-dump.py is modified to exit with non-zero if an error is encountered while parsing, to support this. Reviewed-by: Alex Bennée Reviewed-by: Pavel Dovgalyuk Signed-off-by: Nicholas Piggin ---

[PATCH v5 07/24] chardev: set record/replay on the base device of a muxed device

2024-03-18 Thread Nicholas Piggin
chardev events to a muxed device don't get recorded because e.g., qemu_chr_be_write() checks whether the base device has the record flag set. This can be seen when replaying a trace that has characters typed into the console, an examination of the log shows they are not recorded. Setting

[PATCH v5 01/24] scripts/replay-dump.py: Update to current rr record format

2024-03-18 Thread Nicholas Piggin
The v12 format support for replay-dump has a few issues still. This fixes async decoding; adds event, shutdown, and end decoding; fixes audio in / out events, fixes checkpoint checking of following async events. Reviewed-by: Alex Bennée Signed-off-by: Nicholas Piggin --- scripts/replay-dump.py

[PATCH v5 04/24] replay: allow runstate shutdown->running when replaying trace

2024-03-18 Thread Nicholas Piggin
When replaying a trace, it is possible to go from shutdown to running with a reverse-debugging step. This can be useful if the problem being debugged triggers a reset or shutdown. This can be tested by making a recording of a machine that shuts down, then using -action shutdown=pause when

[PATCH v5 08/24] replay: Fix migration use of clock

2024-03-18 Thread Nicholas Piggin
Migration reads host clocks when not holding the replay_mutex, which asserts when recording a trace. It seems that these migration times should be host times like other statistics in MigrationState. These do not require the replay_mutex. Signed-off-by: Nicholas Piggin --- migration/migration.c

[PATCH v5 06/24] tests/avocado: replay_kernel.py add x86-64 q35 machine test

2024-03-18 Thread Nicholas Piggin
The x86-64 pc machine is flaky with record/replay, but q35 is more stable. Add a q35 test to replay_kernel.py. Signed-off-by: Nicholas Piggin --- tests/avocado/replay_kernel.py | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/avocado/replay_kernel.py

Re: [PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines

2024-03-18 Thread Cédric Le Goater
On 3/15/24 12:34, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:29PM +0100, Cédric Le Goater wrote: Now that the log_global*() handlers take an Error** parameter and return a bool, do the same for memory_global_dirty_log_start() and memory_global_dirty_log_stop(). The error is reported in the

[PULL 14/24] smbios: build legacy mode code only for 'pc' machine

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov basically moving code around without functional change. And exposing some symbols so that they could be shared between smbbios.c and new smbios_legacy.c plus some meson magic to build smbios_legacy.c only for 'pc' machine and otherwise replace it with stub if not selected.

Re: [PATCH v3 0/4] tests/avocado: update sbsa-ref firmware to latest

2024-03-18 Thread Philippe Mathieu-Daudé
Hi Marcin, On 18/3/24 15:08, Marcin Juszkiewicz wrote: Updating sbsa-ref firmware for QEMU CI was manual task. Now it is replaced by CI job run on CodeLinaro Gitlab instance. This patchset updates to current state: - Trusted Firmware v2.10.2 (latest LTS) - Tianocore EDK2 stable202402 (latest

Re: [PATCH v2] ppc/pnv: I2C controller is not user creatable

2024-03-18 Thread Philippe Mathieu-Daudé
On 18/3/24 16:58, Cédric Le Goater wrote: The I2C controller is a subunit of the processor. Make it so and avoid QEMU crashes. $ build/qemu-system-ppc64 -S -machine powernv9 -device pnv-i2c qemu-system-ppc64: ../hw/ppc/pnv_i2c.c:521: pnv_i2c_realize: Assertion `i2c->chip' failed.

Re: [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice

2024-03-18 Thread Eric Auger
Hi Zhenzhong, On 2/28/24 04:58, Zhenzhong Duan wrote: > HostIOMMUDevice will be inherited by two sub classes, > legacy and iommufd currently. As this patch introduces the object, you describe what the object is meant for and used for. Maybe reuse text from the cover letter Thanks Eric > >

Re: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback

2024-03-18 Thread Eric Auger
On 3/18/24 14:52, Eric Auger wrote: > Hi ZHenzhong, > > On 2/28/24 04:58, Zhenzhong Duan wrote: >> Introduce host_iommu_device_create callback and a wrapper for it. >> >> This callback is used to allocate a host iommu device instance and >> initialize it based on type. >> >> Signed-off-by:

Re: [PATCH v4 13/25] memory: Add Error** argument to .log_global_start() handler

2024-03-18 Thread Cédric Le Goater
On 3/15/24 12:18, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:28PM +0100, Cédric Le Goater wrote: diff --git a/system/memory.c b/system/memory.c index a229a79988fce2aa3cb77e3a130db4c694e8cd49..3600e716149407c10a1f6bf8f0a81c2611cf15ba 100644 --- a/system/memory.c +++ b/system/memory.c @@

Re: [PATCH 9/9] docs/system: Add documentation on support for IGVM

2024-03-18 Thread Roy Hopkins
On Fri, 2024-03-01 at 17:10 +, Daniel P. Berrangé wrote: > On Tue, Feb 27, 2024 at 02:50:15PM +, Roy Hopkins wrote: > > IGVM support has been implemented for Confidential Guests that support > > AMD SEV and AMD SEV-ES. Add some documentation that gives some > > background on the IGVM

[PATCH v2] ppc/pnv: I2C controller is not user creatable

2024-03-18 Thread Cédric Le Goater
The I2C controller is a subunit of the processor. Make it so and avoid QEMU crashes. $ build/qemu-system-ppc64 -S -machine powernv9 -device pnv-i2c qemu-system-ppc64: ../hw/ppc/pnv_i2c.c:521: pnv_i2c_realize: Assertion `i2c->chip' failed. Aborted (core dumped) Fixes: 263b81ee15af

[PULL 00/24] virtio,pc,pci: bugfixes

2024-03-18 Thread Michael S. Tsirkin
The following changes since commit ba49d760eb04630e7b15f423ebecf6c871b8f77b: Merge tag 'pull-maintainer-final-130324-1' of https://gitlab.com/stsquad/qemu into staging (2024-03-13 15:12:14 +) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git

[PULL 16/24] smbios: get rid of global smbios_ep_type

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Acked-by: Daniel Henrique Barboza Reviewed-by: Ani Sinha Tested-by: Fiona Ebner Message-Id: <20240314152302.2324164-14-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/fw_cfg.h |

Re: [PATCH v2 1/2] system/memory.c: support unaligned access

2024-03-18 Thread Peter Xu
Hi, On Thu, Feb 01, 2024 at 05:13:12PM +0900, Tomoyuki HIROSE wrote: > The previous code ignored 'impl.unaligned' and handled unaligned accesses > as is. But this implementation cannot emulate specific registers of some > devices that allow unaligned access such as xHCI Host Controller Capability

[PULL 03/24] docs/specs/pvpanic: mark shutdown event as not implemented

2024-03-18 Thread Michael S. Tsirkin
From: Thomas Weißschuh Mention the fact that this event is not yet implemented to avoid confusion. As requested by Michael. Signed-off-by: Thomas Weißschuh Message-Id: <20240313-pvpanic-note-v1-1-7f2571cda...@t-8ch.de> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL 09/24] smbios: get rid of smbios_legacy global

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov clean up smbios_set_defaults() which is reused by legacy and non legacy machines from being aware of 'legacy' notion and need to turn it off. And push legacy handling up to PC machine code where it's relevant. Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha Acked-by:

[PULL 04/24] tests: smbios: make it possible to write SMBIOS only test

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov Cureently it not possible to run SMBIOS test without ACPI one, which gets into the way when testing ACPI-less configs. Extract SMBIOS testing into separate routines that could also be run without ACPI dependency and use that for testing SMBIOS. As the 1st user add

[PULL 06/24] tests: smbios: add test for legacy mode CLI options

2024-03-18 Thread Michael S. Tsirkin
From: Igor Mammedov Unfortunately having 2.0 machine type deprecated is not enough to get rid of legacy SMBIOS handling since 'isapc' also uses that and it's staying around. Hence add test for CLI options handling to be sure that it ain't broken during SMBIOS code refactoring. Signed-off-by:

Re: [PATCH v4 13/25] memory: Add Error** argument to .log_global_start() handler

2024-03-18 Thread Peter Xu
On Mon, Mar 18, 2024 at 03:54:28PM +0100, Cédric Le Goater wrote: > On 3/15/24 12:18, Peter Xu wrote: > > > @@ -3009,13 +3045,16 @@ static void > > > listener_add_address_space(MemoryListener *listener, > > > { > > > FlatView *view; > > > FlatRange *fr; > > > +Error *local_err =

Re: [PATCH 12/22] plugins: Remove plugin helpers

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > These placeholder helpers are no longer required. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 0/3] 64 Bit support for hppa gdbstub

2024-03-18 Thread Sven Schnelle
Richard Henderson writes: > On 3/17/24 20:32, Sven Schnelle wrote: >> Hi Richard, >> Sven Schnelle writes: >> >>> Hi List, >>> >>> this patchset allows to debug the hppa target when running in wide (64 bit) >>> mode. gdb needs a small patch to switch to 64 bit mode. I pushed the >>> patch to

Re: [PATCH v1 04/11] vfio: Add HostIOMMUDevice handle into VFIODevice

2024-03-18 Thread Eric Auger
On 2/28/24 04:58, Zhenzhong Duan wrote: > This handle points to either IOMMULegacyDevice or IOMMUFDDevice variant, > neither both. I would reword into: store an handle to the HostIOMMUDevice the VFIODevice is associated with . Its actual nature depends on the backend in use (VFIO or IOMMUFD).

<    1   2   3   4   >