Re: [PULL 00/10] ppc queue

2023-05-28 Thread Nicholas Piggin
On Mon May 29, 2023 at 4:01 PM AEST, Michael Tokarev wrote: > 29.05.2023 05:18, Nicholas Piggin wrote: > .. > > >> 01/10 target/ppc: Fix fallback to MFSS for MFFS* instructions on pre 3.0 > >> ISAs > >> 02/10 target/ppc: Fix width of some 32-bit SPRs > >> 03/10 target/ppc: Alignment faults do not

Re: [PULL 00/10] ppc queue

2023-05-28 Thread Michael Tokarev
29.05.2023 05:18, Nicholas Piggin wrote: .. 01/10 target/ppc: Fix fallback to MFSS for MFFS* instructions on pre 3.0 ISAs 02/10 target/ppc: Fix width of some 32-bit SPRs 03/10 target/ppc: Alignment faults do not set DSISR in ISA v3.0 onward 05/10 hw/ppc/prep: Fix wiring of PIC -> CPU interrupt

Re: [PATCH v3] target: ppc: Use MSR_HVB bit to get the target endianness for memory dump

2023-05-28 Thread Nicholas Piggin
On Tue May 23, 2023 at 2:02 AM AEST, Narayana Murty N wrote: > Changes since V2: > commit message modified as per feedbak from Nicholas Piggin. > Changes since V1: > https://lore.kernel.org/qemu-devel/20230420145055.10196-1-nnmli...@linux.ibm.com/ > The approach to solve the issue was changed based

Re: [PATCH v3] target: ppc: Use MSR_HVB bit to get the target endianness for memory dump

2023-05-28 Thread Nicholas Piggin
On Tue May 23, 2023 at 2:02 AM AEST, Narayana Murty N wrote: > Currently on PPC64 qemu always dumps the guest memory in > Big Endian (BE) format even though the guest running in Little Endian > (LE) mode. The guest? Are you talking about the immediate target, or a KVM guest running under that? Or

Re: [PATCH v1] hw/loongarch: Add numa support

2023-05-28 Thread Tianrui Zhao
在 2023年05月18日 17:06, Song Gao 写道: 1. Implement some functions for LoongArch numa support; 2. Implement fdt_add_memory_node() for fdt; 3. build_srat() fills node_id and adds build numa memory. Base-on: https://patchew.org/QEMU/20230518014115.117869-1-gaos...@loongson.cn/ Signed-off-by: Song G

Re: [PATCH] igb: Add Function Level Reset to PF and VF

2023-05-28 Thread Akihiko Odaki
On 2023/05/28 19:50, Sriram Yagnaraman wrote: -Original Message- From: Cédric Le Goater Sent: Friday, 26 May 2023 19:31 To: qemu-devel@nongnu.org Cc: Akihiko Odaki ; Sriram Yagnaraman ; Jason Wang ; Cédric Le Goater Subject: [PATCH] igb: Add Function Level Reset to PF and VF The Inte

[PATCH] igb: Remove obsolete workaround for Windows

2023-05-28 Thread Akihiko Odaki
I confirmed it works with Windows even without this workaround. It is likely to be a mistake so remove it. Fixes: 3a977deebe ("Intrdocue igb device emulation") Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/net/igb_

Re: [PATCH v1] hw/loongarch: Add numa support

2023-05-28 Thread Song Gao
在 2023/5/29 上午8:41, maobibo 写道: Hi gaosong, I reply inline 在 2023/5/18 17:06, Song Gao 写道: 1. Implement some functions for LoongArch numa support; 2. Implement fdt_add_memory_node() for fdt; 3. build_srat() fills node_id and adds build numa memory. Base-on: https://patchew.org/QEMU/2023051

Re: [PATCH v1] hw/loongarch: Add numa support

2023-05-28 Thread Song Gao
在 2023/5/29 上午8:49, maobibo 写道: 在 2023/5/18 17:06, Song Gao 写道: 1. Implement some functions for LoongArch numa support; 2. Implement fdt_add_memory_node() for fdt; 3. build_srat() fills node_id and adds build numa memory. Base-on: https://patchew.org/QEMU/20230518014115.117869-1-gaos...@loo

Re: [PULL 00/10] ppc queue

2023-05-28 Thread Nicholas Piggin
On Mon May 29, 2023 at 3:36 AM AEST, Michael Tokarev wrote: > 28.05.2023 19:49, Daniel Henrique Barboza wrote: > > > >https://gitlab.com/danielhb/qemu.git tags/pull-ppc-20230528 > > > > ppc patch queue for 2023-05-28: > > > > This queue includes

Re: [PATCH] ppc/pnv: Add initial P9/10 SBE model

2023-05-28 Thread Nicholas Piggin
On Fri May 26, 2023 at 10:20 PM AEST, Cédric Le Goater wrote: > On 8/11/22 10:04, Cédric Le Goater wrote: > > On 8/11/22 09:54, Nicholas Piggin wrote: [snip] > >> + > >> +#define sbe_cmd_dbg(fmt, ...) do { \ > >> +    if (DEBUG_SBE_CMD) { \ > >> +    fprintf(stderr, "SBE cmd: %s: " fmt, __fun

Re: [PATCH v3 0/9] target/ppc: Assorted ppc target fixes

2023-05-28 Thread Nicholas Piggin
On Sun May 28, 2023 at 4:05 AM AEST, Daniel Henrique Barboza wrote: > > > On 5/15/23 06:26, Nicholas Piggin wrote: > > Hopefully these are getting close to ready now. There is still the > > question about doing better with adding test cases for all this, I > > haven't exactly got a good answer yet

Re: [PATCH v1] hw/loongarch: Add numa support

2023-05-28 Thread maobibo
在 2023/5/18 17:06, Song Gao 写道: > 1. Implement some functions for LoongArch numa support; > 2. Implement fdt_add_memory_node() for fdt; > 3. build_srat() fills node_id and adds build numa memory. > > Base-on: > https://patchew.org/QEMU/20230518014115.117869-1-gaos...@loongson.cn/ > > Signed-of

Re: [PATCH v1] hw/loongarch: Add numa support

2023-05-28 Thread maobibo
Hi gaosong, I reply inline 在 2023/5/18 17:06, Song Gao 写道: > 1. Implement some functions for LoongArch numa support; > 2. Implement fdt_add_memory_node() for fdt; > 3. build_srat() fills node_id and adds build numa memory. > > Base-on: > https://patchew.org/QEMU/20230518014115.117869-1-gaos...@l

Re: [PATCH] ppc/pegasos2: Change default CPU to 7457

2023-05-28 Thread BALATON Zoltan
On Sun, 28 May 2023, Rene Engel wrote: --- Ursprüngliche Nachricht --- Von: BALATON Zoltan Datum: 28.05.2023 17:29:37 An: qemu-devel@nongnu.org, qemu-...@nongnu.org Betreff: [PATCH] ppc/pegasos2: Change default CPU to 7457 Previously 7400 was selected as a safe choice as that is used by ot

Re: [PATCH 4/4] tests/tcg/s390x: Test LOCFHR

2023-05-28 Thread David Hildenbrand
On 26.05.23 20:12, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/locfhr.c| 29 + 2 files changed, 30 insertions(+)

Re: [PATCH 2/4] tests/tcg/s390x: Test LCBB

2023-05-28 Thread David Hildenbrand
On 26.05.23 20:12, Ilya Leoshkevich wrote: Add a test to prevent regressions. Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/lcbb.c | 51 + 2 files changed, 52 insertions(+) cr

Re: [PATCH 3/4] target/s390x: Fix LOCFHR taking the wrong half of R2

2023-05-28 Thread David Hildenbrand
On 26.05.23 20:12, Ilya Leoshkevich wrote: LOCFHR should write top-to-top, but QEMU erroneously writes bottom-to-top. Fixes: 45aa9aa3b773 ("target/s390x: Implement load-on-condition-2 insns") Cc: qemu-sta...@nongnu.org Reported-by: Mikhail Mitskevich Closes: https://gitlab.com/qemu-project/qemu

Re: [PATCH 1/4] target/s390x: Fix LCBB overwriting the top 32 bits

2023-05-28 Thread David Hildenbrand
On 26.05.23 20:12, Ilya Leoshkevich wrote: LCBB is supposed to overwrite only the bottom 32 bits, but QEMU erroneously overwrites the entire register. Fixes: 6d9303322ed9 ("s390x/tcg: Implement LOAD COUNT TO BLOCK BOUNDARY") Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich --- targe

Re: [PULL 04/12] configure: unset harmful environment variables

2023-05-28 Thread Juan Quintela
Michael Tokarev wrote: > 26.05.2023 19:08, Paolo Bonzini wrote: > .. >> # Unset some variables known to interfere with behavior of common tools, >> -# just as autoconf does. >> -CLICOLOR_FORCE= GREP_OPTIONS= >> -unset CLICOLOR_FORCE GREP_OPTIONS >> +# just as autoconf does. Unlike autoconf, we

QEMU developers fortnightly call for agenda - 2023-05-29

2023-05-28 Thread juan . quintela
Hi If you had any topics for Tuesday call, please let's us know. Thanks, Juan. QEMU developers fortnightly conference call Tuesday 2023-05-30 ⋅ 15:00 – 16:00 Central European Time - Madrid Location https://meet.jit.si/kvmcallmeeting https://www.google.com/url?q=https%3A%2F%2Fmeet.jit.si%

Re: [PULL 00/19] Ui patches

2023-05-28 Thread Michael Tokarev
28.05.2023 16:19, marcandre.lur...@redhat.com wrote: https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request UI queue - virtio: add virtio-multitouch device - sdl: various keyboard grab fixes - gtk: enable multi-touc

Re: [PULL 00/10] ppc queue

2023-05-28 Thread Michael Tokarev
28.05.2023 19:49, Daniel Henrique Barboza wrote: https://gitlab.com/danielhb/qemu.git tags/pull-ppc-20230528 ppc patch queue for 2023-05-28: This queue includes several assorted fixes for PowerPC SPR emulation, a change in the default Pegasos2 CPU, the addition of AIL mode 3 for spapr, a

[PULL 09/10] target/ppc: Add POWER9 DD2.2 model

2023-05-28 Thread Daniel Henrique Barboza
From: Nicholas Piggin POWER9 DD2.1 and earlier had significant limitations when running KVM, including lack of "mixed mode" MMU support (ability to run HPT and RPT mode on threads of the same core), and a translation prefetch issue which is worked around by disabling "AIL" mode for the guest. Th

[PULL 01/10] target/ppc: Fix fallback to MFSS for MFFS* instructions on pre 3.0 ISAs

2023-05-28 Thread Daniel Henrique Barboza
From: Richard Purdie The following commits changed the code such that the fallback to MFSS for MFFSCRN, MFFSCRNI, MFFSCE and MFFSL on pre 3.0 ISAs was removed and became an illegal instruction: bf8adfd88b547680aa857c46098f3a1e94373160 - target/ppc: Move mffscrn[i] to decodetree 394c2e2fda

[PULL 10/10] ppc/pegasos2: Change default CPU to 7457

2023-05-28 Thread Daniel Henrique Barboza
From: BALATON Zoltan Previously 7400 was selected as a safe choice as that is used by other machines so it's better tested but AmigaOS does not know this CPU and disables some features when running on it. The real hardware has 7447/7457 G4 CPU so change the default to match that now that it was c

[PULL 07/10] pnv_lpc: disable reentrancy detection for lpc-hc

2023-05-28 Thread Daniel Henrique Barboza
From: Alexander Bulekov As lpc-hc is designed for re-entrant calls from xscom, mark it re-entrancy safe. Reported-by: Thomas Huth Signed-off-by: Alexander Bulekov [clg: mark opb_master_regs as re-entrancy safe also ] Signed-off-by: Cédric Le Goater Reviewed-by: Frederic Barrat Tested-by: Tho

[PULL 06/10] target/ppc: Use SMT4 small core chip type in POWER9/10 PVRs

2023-05-28 Thread Daniel Henrique Barboza
From: Nicholas Piggin QEMU's PVR value for POWER9 DD2.0 has chip type 1, which is the SMT4 "small core" type that OpenPOWER processors use. QEMU's PVR for all other POWER9/10 have chip type 0, which "enterprise" systems use. The difference does not really matter to QEMU (because it does not care

[PULL 05/10] hw/ppc/prep: Fix wiring of PIC -> CPU interrupt

2023-05-28 Thread Daniel Henrique Barboza
From: Bernhard Beschow Commit cef2e7148e32 ("hw/isa/i82378: Remove intermediate IRQ forwarder") passes s->cpu_intr to i8259_init() in i82378_realize() directly. However, s- >cpu_intr isn't initialized yet since that happens after the south bridge's pci_realize_and_unref() in board code. Fix this

[PULL 03/10] target/ppc: Alignment faults do not set DSISR in ISA v3.0 onward

2023-05-28 Thread Daniel Henrique Barboza
From: Nicholas Piggin This optional behavior was removed from the ISA in v3.0, see Summary of Changes preface: Data Storage Interrupt Status Register for Alignment Interrupt: Simplifies the Alignment interrupt by remov- ing the Data Storage Interrupt Status Register (DSISR) from the set of

[PULL 08/10] target/ppc: Merge COMPUTE_CLASS and COMPUTE_FPRF

2023-05-28 Thread Daniel Henrique Barboza
From: Richard Henderson Instead of computing an artificial "class" bitmask then converting that to the fprf value, compute the final value from the start. Reorder the tests to check the most likely cases first. Signed-off-by: Richard Henderson Tested-by: Alex Bennée Reviewed-by: Alex Bennée

[PULL 04/10] spapr: Add SPAPR_CAP_AIL_MODE_3 for AIL mode 3 support for H_SET_MODE hcall

2023-05-28 Thread Daniel Henrique Barboza
From: Nicholas Piggin The behaviour of the Address Translation Mode on Interrupt resource is not consistently supported by all CPU versions or all KVM versions: KVM HV does not support mode 2, and does not support mode 3 on POWER7 or early POWER9 processesors. KVM PR only supports mode 0. TCG sup

[PULL 02/10] target/ppc: Fix width of some 32-bit SPRs

2023-05-28 Thread Daniel Henrique Barboza
From: Nicholas Piggin Some 32-bit SPRs are incorrectly implemented as 64-bits on 64-bit targets. This changes VRSAVE, DSISR, HDSISR, DAWRX0, PIDR, LPIDR, DEXCR, HDEXCR, CTRL, TSCR, MMCRH, and PMC[1-6] from to be 32-bit registers. This only goes by the 32/64 classification in the architecture, i

[PULL 00/10] ppc queue

2023-05-28 Thread Daniel Henrique Barboza
The following changes since commit ac84b57b4d74606f7f83667a0606deef32b2049d: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-05-26 14:40:55 -0700) are available in the Git repository at: https://gitlab.com/danielhb/qemu.git tags/pull-ppc-20230528

Re: [PATCH] ppc/pegasos2: Change default CPU to 7457

2023-05-28 Thread Daniel Henrique Barboza
On 5/28/23 12:29, BALATON Zoltan wrote: Previously 7400 was selected as a safe choice as that is used by other machines so it's better tested but AmigaOS does not know this CPU and disables some features when running on it. The real hardware has 7447/7457 G4 CPU so change the default to match

Re: [PATCH v4] target/ppc: Add POWER9 DD2.2 model

2023-05-28 Thread Daniel Henrique Barboza
On 5/15/23 13:02, Nicholas Piggin wrote: POWER9 DD2.1 and earlier had significant limitations when running KVM, including lack of "mixed mode" MMU support (ability to run HPT and RPT mode on threads of the same core), and a translation prefetch issue which is worked around by disabling "AIL" m

[PATCH] ppc/pegasos2: Change default CPU to 7457

2023-05-28 Thread BALATON Zoltan
Previously 7400 was selected as a safe choice as that is used by other machines so it's better tested but AmigaOS does not know this CPU and disables some features when running on it. The real hardware has 7447/7457 G4 CPU so change the default to match that now that it was confirmed to work better

[PATCH v4 7/9] vfio/migration: Add VFIO migration pre-copy support

2023-05-28 Thread Avihai Horon
Pre-copy support allows the VFIO device data to be transferred while the VM is running. This helps to accommodate VFIO devices that have a large amount of data that needs to be transferred, and it can reduce migration downtime. Pre-copy support is optional in VFIO migration protocol v2. Implement

[PATCH v4 8/9] vfio/migration: Add x-allow-pre-copy VFIO device property

2023-05-28 Thread Avihai Horon
Add a new VFIO device property x-allow-pre-copy to keep migration compatibility to/from older QEMU versions that don't have VFIO pre-copy support. Signed-off-by: Avihai Horon --- include/hw/vfio/vfio-common.h | 1 + hw/core/machine.c | 1 + hw/vfio/migration.c | 3 ++- hw/v

[PATCH v4 3/9] migration: Enable switchover ack capability

2023-05-28 Thread Avihai Horon
Now that switchover ack logic has been implemented, enable the capability. Signed-off-by: Avihai Horon Reviewed-by: Juan Quintela Reviewed-by: Peter Xu --- migration/options.c | 4 1 file changed, 4 deletions(-) diff --git a/migration/options.c b/migration/options.c index 16007afca6..5a9

[PATCH v4 4/9] tests: Add migration switchover ack capability test

2023-05-28 Thread Avihai Horon
Add migration switchover ack capability test. The test runs without devices that support this capability, but is still useful to make sure it didn't break anything. Signed-off-by: Avihai Horon Reviewed-by: Juan Quintela Reviewed-by: Peter Xu --- tests/qtest/migration-test.c | 26 ++

[PATCH v4 9/9] vfio/migration: Add support for switchover ack capability

2023-05-28 Thread Avihai Horon
Loading of a VFIO device's data can take a substantial amount of time as the device may need to allocate resources, prepare internal data structures, etc. This can increase migration downtime, especially for VFIO devices with a lot of resources. To solve this, VFIO migration uAPI defines "initial

[PATCH v4 6/9] vfio/migration: Store VFIO migration flags in VFIOMigration

2023-05-28 Thread Avihai Horon
VFIO migration flags are queried once in vfio_migration_init(). Store them in VFIOMigration so they can be used later to check the device's migration capabilities without re-querying them. This will be used in the next patch to check if the device supports precopy migration. Signed-off-by: Avihai

[PATCH v4 5/9] vfio/migration: Refactor vfio_save_block() to return saved data size

2023-05-28 Thread Avihai Horon
Refactor vfio_save_block() to return the size of saved data on success and -errno on error. This will be used in next patch to implement VFIO migration pre-copy support. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Reviewed-by: Juan Quintela --- hw/vfio/migration.c | 17 +

[PATCH v4 2/9] migration: Implement switchover ack logic

2023-05-28 Thread Avihai Horon
Implement switchover ack logic. This prevents the source from stopping the VM and completing the migration until an ACK is received from the destination that it's OK to do so. To achieve this, a new SaveVMHandlers handler switchover_ack_needed() and a new return path message MIG_RP_MSG_SWITCHOVER_

[PATCH v4 1/9] migration: Add switchover ack capability

2023-05-28 Thread Avihai Horon
Migration downtime estimation is calculated based on bandwidth and remaining migration data. This assumes that loading of migration data in the destination takes a negligible amount of time and that downtime depends only on network speed. While this may be true for RAM, it's not necessarily true f

[PATCH v4 0/9] migration: Add switchover ack capability and VFIO precopy support

2023-05-28 Thread Avihai Horon
Hello everyone, This is v4 of the switchover ack series. Changes from v3 [5]: * Rebased on latest master branch. * Simplified switchover ack logic (call switchover_ack_needed only in destination). (Peter) * Moved caching of VFIO migration flags to a separate patch. (Cedric) * Moved adding of x-

[PATCH] hw/acpi: Fix PM control register access

2023-05-28 Thread BALATON Zoltan
On pegasos2 which has ACPI as part of VT8231 south bridge the board firmware writes PM control register by accessing the second byte so addr will be 1. This wasn't handled correctly and the write went to addr 0 instead. This fixes ACPI shutdown with pegasos2 firmware. Signed-off-by: BALATON Zolt

[PULL 09/19] ui/dbus: add a FIXME about texture/dmabuf scanout handling

2023-05-28 Thread marcandre . lureau
From: Marc-André Lureau Except SDL, display backends seem to fail at handing full scanout geometry correctly. It would need some test/reproducer to actually check it. In the meantime, fill some missing fields, and leave a FIXME. Signed-off-by: Marc-André Lureau Message-Id: <20230515132537.10263

[PULL 17/19] virtio-input-pci: add virtio-multitouch-pci

2023-05-28 Thread marcandre . lureau
From: Sergio Lopez Add virtio-multitouch-pci, a Multitouch-capable input device, to the list of devices that can be provided by virtio-input-pci. Signed-off-by: Sergio Lopez Reviewed-by: Marc-André Lureau Message-Id: <20230526112925.38794-5-...@redhat.com> --- hw/virtio/virtio-input-pci.c | 2

[PULL 08/19] gtk: add gl-area support on win32

2023-05-28 Thread marcandre . lureau
From: Marc-André Lureau On Windows, we don't use the low-level GBM/EGL helpers (no dmabuf etc), we can turn on GL area support for the rest of rendering. (fwiw, GDK backend may be either WGL or EGL) Signed-off-by: Marc-André Lureau Tested-by: Bernhard Beschow Message-Id: <20230515132527.10260

[PULL 15/19] ui: add the infrastructure to support MT events

2023-05-28 Thread marcandre . lureau
From: Sergio Lopez Add the required infrastructure to support generating multitouch events. Signed-off-by: Sergio Lopez Reviewed-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-Id: <20230526112925.38794-3-...@redhat.com> --- qapi/ui.json | 68 +++

[PULL 02/19] ui/gtk: use widget size for cursor motion event

2023-05-28 Thread marcandre . lureau
From: Erico Nunes The gd_motion_event size has some calculations for the cursor position, which also take into account things like different size of the framebuffer compared to the window size. The use of window size makes things more difficult though, as at least in the case of Wayland includes

[PULL 12/19] ui/sdl2: disable SDL_HINT_GRAB_KEYBOARD on Windows

2023-05-28 Thread marcandre . lureau
From: Volker Rümelin Windows sends an extra left control key up/down input event for every right alt key up/down input event for keyboards with international layout. Since commit 830473455f ("ui/sdl2: fix handling of AltGr key on Windows") QEMU uses a Windows low level keyboard hook procedure to

[PULL 13/19] ui/cursor: make width/height unsigned 16-bit integer

2023-05-28 Thread marcandre . lureau
From: Mauro Matteo Cascella Although not actually exploitable at the moment, a negative width/height could make datasize wrap around and potentially lead to buffer overflow. Since there is no reason a negative width/height is ever appropriate, modify QEMUCursor struct and cursor_alloc prototype t

[PULL 11/19] ui/sdl2: Grab Alt+F4 also under Windows

2023-05-28 Thread marcandre . lureau
From: Bernhard Beschow SDL doesn't grab Alt+F4 under Windows by default. Pressing Alt+F4 thus closes the VM immediately without confirmation, possibly leading to data loss. Fix this by always grabbing Alt+F4 on Windows hosts, too. Signed-off-by: Bernhard Beschow Reviewed-by: Volker Rümelin Mes

[PULL 10/19] ui/sdl2: Grab Alt+Tab also in fullscreen mode

2023-05-28 Thread marcandre . lureau
From: Bernhard Beschow By default, SDL grabs Alt+Tab only in non-fullscreen mode. This causes Alt+Tab to switch tasks on the host rather than in the VM in fullscreen mode while it switches tasks in non-fullscreen mode in the VM. Fix this confusing behavior by grabbing Alt+Tab in fullscreen mode,

[PULL 19/19] ui/gtk: enable backend to send multi-touch events

2023-05-28 Thread marcandre . lureau
From: Sergio Lopez GTK3 provides the infrastructure to receive and process multi-touch events through the "touch-event" signal and the GdkEventTouch type. Make use of it to transpose events from the host to the guest. This allows users of machines with hardware capable of receiving multi-touch e

[PULL 18/19] ui: add helpers for virtio-multitouch events

2023-05-28 Thread marcandre . lureau
From: Sergio Lopez Add helpers for generating Multi-touch events from the UI backends that can be sent to the guest through a virtio-multitouch device. Signed-off-by: Sergio Lopez Reviewed-by: Marc-André Lureau Message-Id: <20230526112925.38794-6-...@redhat.com> --- include/ui/input.h | 5 ++

[PULL 16/19] virtio-input: add a virtio-mulitouch device

2023-05-28 Thread marcandre . lureau
From: Sergio Lopez Add a virtio-multitouch device to the family of devices emulated by virtio-input implementing the Multi-touch protocol as descripted here: https://www.kernel.org/doc/html/latest/input/multi-touch-protocol.html?highlight=multi+touch This patch just add the device itself, witho

[PULL 06/19] win32: wrap socket close() with an exception handler

2023-05-28 Thread marcandre . lureau
From: Marc-André Lureau Since commit abe34282 ("win32: avoid mixing SOCKET and file descriptor space"), we set HANDLE_FLAG_PROTECT_FROM_CLOSE on the socket FD, to prevent closing the HANDLE with CloseHandle. This raises an exception which under gdb is fatal, and qemu exits. Let's catch the expec

[PULL 14/19] virtio-input: generalize virtio_input_key_config()

2023-05-28 Thread marcandre . lureau
From: Sergio Lopez As there are other bitmap-based config properties that need to be dealt in a similar fashion as VIRTIO_INPUT_CFG_EV_BITS, generalize the function to receive select and subsel as arguments, and rename it to virtio_input_extend_config() Signed-off-by: Sergio Lopez Reviewed-by:

[PULL 04/19] ui/sdl2: fix surface_gl_update_texture: Assertion 'gls' failed

2023-05-28 Thread marcandre . lureau
From: Marc-André Lureau Before sdl2_gl_update() is called, sdl2_gl_switch() may decide to destroy the console window and its associated shaders. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1644 Fixes: c84ab0a500a8 ("ui/console: optionally update after gfx switch") Signed-off-by: Mar

[PULL 07/19] virtio-gpu: add a FIXME for virtio_gpu_load()

2023-05-28 Thread marcandre . lureau
From: Marc-André Lureau It looks like the virtio_gpu_load() does not compute and set the offset, the same way virtio_gpu_set_scanout() does. This probably results in incorrect display until the scanout/framebuffer is updated again, I guess we should fix it, although I haven't checked this yet. S

[PULL 03/19] ui/gtk-egl: fix scaling for cursor position in scanout mode

2023-05-28 Thread marcandre . lureau
From: Erico Nunes vc->gfx.w and vc->gfx.h are not updated appropriately in this code path, which leads to a different scaling factor for rendering the cursor on some edge cases (e.g. the focus has left and re-entered the gtk window). This can be reproduced using vhost-user-gpu with the gtk ui on

[PULL 01/19] ui/gtk: fix passing y0_top parameter to scanout

2023-05-28 Thread marcandre . lureau
From: Erico Nunes The dmabuf->y0_top flag is passed to .dpy_gl_scanout_dmabuf(), however in the gtk ui both implementations dropped it when doing the next scanout_texture call. Fixes flipped linux console using vhost-user-gpu with the gtk ui display. Signed-off-by: Erico Nunes Reviewed-by: Mar

[PULL 05/19] ui/dbus: fix compilation when GBM && !OPENGL

2023-05-28 Thread marcandre . lureau
From: Marc-André Lureau commit 4814d3cbf ("ui/dbus: restrict opengl to gbm-enabled config") assumes that whenever GBM is available, OpenGL is. This is not always the case, let's further restrict opengl-related paths and fix some compilation issues. Signed-off-by: Marc-André Lureau Message-Id: <

[PULL 00/19] Ui patches

2023-05-28 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit ac84b57b4d74606f7f83667a0606deef32b2049d: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-05-26 14:40:55 -0700) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.git ta

Re: [PATCH v3 2/7] migration: Implement switchover ack logic

2023-05-28 Thread Avihai Horon
On 25/05/2023 15:44, Peter Xu wrote: External email: Use caution opening links or attachments On Thu, May 25, 2023 at 12:51:46PM +0300, Avihai Horon wrote: However, there is one issue -- we can't send the ACK up here [1], as at that point the return path has not been created yet. A possible

Re: Re: [PATCH] cryptodev: fix memory leak during stats query

2023-05-28 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 04:34:21PM +0800, zhenwei pi wrote: > > > On 5/3/23 20:59, Peter Maydell wrote: > > On Wed, 3 May 2023 at 12:54, zhenwei pi wrote: > > > > > > object_get_canonical_path already returns newly allocated memory, this > > > means no additional g_strdup required. Remove g_str

RE: [PATCH] igb: Add Function Level Reset to PF and VF

2023-05-28 Thread Sriram Yagnaraman
> -Original Message- > From: qemu-devel-bounces+sriram.yagnaraman=est.t...@nongnu.org > On Behalf > Of Sriram Yagnaraman > Sent: Sunday, 28 May 2023 12:51 > To: Cédric Le Goater ; qemu-devel@nongnu.org > Cc: Akihiko Odaki ; Jason Wang > > Subject: RE: [PATCH] igb: Add Function Level Reset

RE: [PATCH] igb: Add Function Level Reset to PF and VF

2023-05-28 Thread Sriram Yagnaraman
> -Original Message- > From: Cédric Le Goater > Sent: Friday, 26 May 2023 19:31 > To: qemu-devel@nongnu.org > Cc: Akihiko Odaki ; Sriram Yagnaraman > ; Jason Wang ; Cédric > Le Goater > Subject: [PATCH] igb: Add Function Level Reset to PF and VF > > The Intel 82576EB GbE Controller say

Re: [PATCH] target/ppc: Merge COMPUTE_CLASS and COMPUTE_FPRF

2023-05-28 Thread Daniel Henrique Barboza
On 5/23/23 17:25, Richard Henderson wrote: Instead of computing an artifical "class" bitmask then converting that to the fprf value, compute the final value from the start. Reorder the tests to check the most likely cases first. Queued in ppc-next ("artifical" typo fixed). Thanks, Daniel

[Stable-7.2.3 52/53] hw/scsi/lsi53c895a: Fix reentrancy issues in the LSI controller (CVE-2023-0330)

2023-05-28 Thread Michael Tokarev
From: Thomas Huth We cannot use the generic reentrancy guard in the LSI code, so we have to manually prevent endless reentrancy here. The problematic lsi_execute_script() function has already a way to detect whether too many instructions have been executed - we just have to slightly change the lo

[Stable-7.2.3 v3 00/42] Patch Round-up for stable 7.2.3, frozen on 2023-05-27

2023-05-28 Thread Michael Tokarev
The following patches are queued for QEMU stable v7.2.3: https://gitlab.com/qemu-project/qemu/-/commits/staging-7.2 Patch freeze is 2023-05-27, and the release is planned for 2023-05-29: https://wiki.qemu.org/Planning/7.2 Please respond here or CC qemu-sta...@nongnu.org on any additional pa

[Stable-7.2.3 48/53] e1000x: Fix BPRC and MPRC

2023-05-28 Thread Michael Tokarev
From: Akihiko Odaki Before this change, e1000 and the common code updated BPRC and MPRC depending on the matched filter, but e1000e and igb decided to update those counters by deriving the packet type independently. This inconsistency caused a multicast packet to be counted twice. Updating BPRC

[Stable-8.0.1 69/73] util/vfio-helpers: Use g_file_read_link()

2023-05-28 Thread Michael Tokarev
From: Akihiko Odaki When _FORTIFY_SOURCE=2, glibc version is 2.35, and GCC version is 12.1.0, the compiler complains as follows: In file included from /usr/include/features.h:490, from /usr/include/bits/libc-header-start.h:33, from /usr/include/stdint.h:26,

[Stable-7.2.3 49/53] rtl8139: fix large_send_mss divide-by-zero

2023-05-28 Thread Michael Tokarev
From: Stefan Hajnoczi If the driver sets large_send_mss to 0 then a divide-by-zero occurs. Even if the division wasn't a problem, the for loop that emits MSS-sized packets would never terminate. Solve these issues by skipping offloading when large_send_mss=0. This issue was found by OSS-Fuzz as

[Stable-8.0.1 67/73] igb: Always copy ethernet header

2023-05-28 Thread Michael Tokarev
From: Akihiko Odaki igb_receive_internal() used to check the iov length to determine copy the iovs to a contiguous buffer, but the check is flawed in two ways: - It does not ensure that iovcnt > 0. - It does not take virtio-net header into consideration. The size of this copy is just 22 octets,

[Stable-7.2.3 46/53] e1000: Count CRC in Tx statistics

2023-05-28 Thread Michael Tokarev
From: Akihiko Odaki The Software Developer's Manual 13.7.4.5 "Packets Transmitted (64 Bytes) Count" says: > This register counts the number of packets transmitted that are > exactly 64 bytes (from through , > inclusively) in length. It also says similar for the other Tx statistics registers. Ad

[Stable-7.2.3 51/53] usb/ohci: Set pad to 0 after frame update

2023-05-28 Thread Michael Tokarev
From: Paolo Bonzini When the OHCI controller's framenumber is incremented, HccaPad1 register should be set to zero (Ref OHCI Spec 4.4) ReactOS uses hccaPad1 to determine if the OHCI hardware is running, consequently it fails this check in current qemu master. Signed-off-by: Ryan Wendland Resol

[Stable-8.0.1 62/73] igb: Fix Rx packet type encoding

2023-05-28 Thread Michael Tokarev
From: Akihiko Odaki igb's advanced descriptor uses a packet type encoding different from one used in e1000e's extended descriptor. Fix the logic to encode Rx packet type accordingly. Fixes: 3a977deebe ("Intrdocue igb device emulation") Signed-off-by: Akihiko Odaki Reviewed-by: Sriram Yagnaraman

[Stable-7.2.3 53/53] machine: do not crash if default RAM backend name has been stolen

2023-05-28 Thread Michael Tokarev
From: Igor Mammedov QEMU aborts when default RAM backend should be used (i.e. no explicit '-machine memory-backend=' specified) but user has created an object which 'id' equals to default RAM backend name used by board. $QEMU -machine pc \ -object memory-backend-ram,id=pc.ram,size=429496

[Stable-7.2.3 50/53] util/vfio-helpers: Use g_file_read_link()

2023-05-28 Thread Michael Tokarev
From: Akihiko Odaki When _FORTIFY_SOURCE=2, glibc version is 2.35, and GCC version is 12.1.0, the compiler complains as follows: In file included from /usr/include/features.h:490, from /usr/include/bits/libc-header-start.h:33, from /usr/include/stdint.h:26,

[Stable-8.0.1 65/73] net/net_rx_pkt: Use iovec for net_rx_pkt_set_protocols()

2023-05-28 Thread Michael Tokarev
From: Akihiko Odaki igb does not properly ensure the buffer passed to net_rx_pkt_set_protocols() is contiguous for the entire L2/L3/L4 header. Allow it to pass scattered data to net_rx_pkt_set_protocols(). Fixes: 3a977deebe ("Intrdocue igb device emulation") Signed-off-by: Akihiko Odaki Reviewe

[Stable-7.2.3 47/53] e1000e: Fix tx/rx counters

2023-05-28 Thread Michael Tokarev
From: "timothee.coca...@gmail.com" The bytes and packets counter registers are cleared on read. Copying the "total counter" registers to the "good counter" registers has side effects. If the "total" register is never read by the OS, it only gets incremented. This leads to exponential growth of t

[Stable-8.0.1 68/73] rtl8139: fix large_send_mss divide-by-zero

2023-05-28 Thread Michael Tokarev
From: Stefan Hajnoczi If the driver sets large_send_mss to 0 then a divide-by-zero occurs. Even if the division wasn't a problem, the for loop that emits MSS-sized packets would never terminate. Solve these issues by skipping offloading when large_send_mss=0. This issue was found by OSS-Fuzz as

[Stable-8.0.1 71/73] hw/scsi/lsi53c895a: Fix reentrancy issues in the LSI controller (CVE-2023-0330)

2023-05-28 Thread Michael Tokarev
From: Thomas Huth We cannot use the generic reentrancy guard in the LSI code, so we have to manually prevent endless reentrancy here. The problematic lsi_execute_script() function has already a way to detect whether too many instructions have been executed - we just have to slightly change the lo