Re: [PATCH v3 0/9] virtio-gpu: Support Venus Vulkan driver

2023-03-17 Thread Gurchetan Singh
On Mon, Mar 13, 2023 at 11:44 AM Gurchetan Singh < gurchetansi...@chromium.org> wrote: > On Mon, Mar 13, 2023 at 5:58 AM Marc-André Lureau > wrote: > > > > Hi Gurchetan > > > > On Tue, Mar 7, 2023 at 2:41 AM Gurchetan Singh > > wrote: > > > > > > On Tue, Jan 31, 2023 at 3:15 PM Dmitry Osipenko

Re: [RFC QEMU PATCH 13/18] hw/i386/xen/xen-hvm: Introduce xen_ram_block_check function

2023-03-17 Thread Stefano Stabellini
On Sun, 12 Mar 2023, Huang Rui wrote: > Introduce xen_ram_block_check function to check whether current ramblock > is xen ram memory. > > Signed-off-by: Huang Rui > --- > hw/i386/xen/xen-hvm.c | 15 +++ > include/hw/xen/xen.h | 1 + > 2 files changed, 16 insertions(+) > > diff

Re: [RFC QEMU PATCH 12/18] softmmu: Fix the size to map cache with xen for host virtual address

2023-03-17 Thread Stefano Stabellini
On Sun, 12 Mar 2023, Huang Rui wrote: > The xen_map_cache function wants to pass offset and size of this memory > block as the input parameters to map the host virtual address. However, > block->offset is too large as 0x1 (4G), if we assign the size as > block->max_length (0x11000),

Re: [PATCH] Revert "docs/about/deprecated: Deprecate 32-bit arm hosts for system emulation"

2023-03-17 Thread Liviu Ionescu
> On 17 Mar 2023, at 18:55, Thomas Huth wrote: > > This reverts commit 1d0a8eba38c028ea02c6e0b68f0a4c9a3cbf... Thank you, Thomas! Liviu

Re: [PATCH] scsi/lsi53c895a: restrict DMA engine to memory regions (CVE-2023-0330)

2023-03-17 Thread Philippe Mathieu-Daudé
On 17/3/23 19:18, Karl Heubaum wrote: Did this CVE fix fall in the cracks during the QEMU 8.0 merge window? The patch isn't reviewed, and apparently almost no active contributor understand this device enough to be sure this security patch doesn't break normal use. Fuzzed bugs are rarely

Re: [PATCH] hw/usb/imx: Fix out of bounds access in imx_usbphy_read()

2023-03-17 Thread Philippe Mathieu-Daudé
On 17/3/23 00:49, Guenter Roeck wrote: The i.MX USB Phy driver does not check register ranges, resulting in out of bounds accesses if an attempt is made to access non-existing PHY registers. Add range check and conditionally report bad accesses to fix the problem. While at it, also

Re: Call failed: MCTP Endpoint did not respond: Qemu CXL switch with mctp-1.0

2023-03-17 Thread Maverickk 78
Hi Jonathan, Thanks for the quick response, this patch works! Regards Raghu On Fri, 17 Mar 2023 at 23:42, Jonathan Cameron wrote: > > On Fri, 17 Mar 2023 16:37:20 + > Jonathan Cameron via wrote: > > > On Fri, 17 Mar 2023 00:11:10 +0530 > > Maverickk 78 wrote: > > > > > Hi > > > > > > I

Re: [PATCH v3 3/3] python/qemu/machine: use socketpair() for QMP by default

2023-03-17 Thread Vladimir Sementsov-Ogievskiy
Hi! By my investigation, this commit (bd4c0ef409140bd1be393407c04005ac077d4574) breaks long qmp output again. Simple test: $ cd python $ cat test.py #!/usr/bin/env python3 import sys from qemu.machine import QEMUMachine monitor_address = sys.argv[2] if len(sys.argv) > 2 else None vm =

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-03-17 Thread Anton Kuchin
On 01/03/2023 17:33, Michael S. Tsirkin wrote: On Tue, Feb 28, 2023 at 07:59:54PM +0200, Anton Kuchin wrote: We can't rely here entirely on destination to block this because if VM is migrated to file and then can't be loaded by destination there is no way to fallback and resume the source so we

Re: [Virtio-fs] [RFC 2/2] vhost-user-fs: Implement stateful migration

2023-03-17 Thread Anton Kuchin
On 17/03/2023 19:52, Hanna Czenczek wrote: On 17.03.23 18:19, Anton Kuchin wrote: On 13/03/2023 19:48, Hanna Czenczek wrote: A virtio-fs device's VM state consists of: - the virtio device (vring) state (VMSTATE_VIRTIO_DEVICE) - the back-end's (virtiofsd's) internal state We get/set the latter

Re: [RFC PATCH v2 03/11] hw/arm/smmuv3: Refactor stage-1 PTW

2023-03-17 Thread Eric Auger
Hi Mostafa, On 2/26/23 23:06, Mostafa Saleh wrote: > In preparation for adding stage-2 support, rename smmu_ptw_64 to > smmu_ptw_64_s1 and refactor some of the code so it can be reused in > stage-2 page table walk. > > Remove AA64 check from PTW as decode_cd already ensures that AA64 is > used,

Re: [PATCH] scsi/lsi53c895a: restrict DMA engine to memory regions (CVE-2023-0330)

2023-03-17 Thread Karl Heubaum
Did this CVE fix fall in the cracks during the QEMU 8.0 merge window? Karl > On Jan 16, 2023, at 2:42 PM, Mauro Matteo Cascella > wrote: > > This prevents the well known DMA-MMIO reentrancy problem (upstream issue #556) > leading to memory corruption bugs like stack overflow or

Re: Call failed: MCTP Endpoint did not respond: Qemu CXL switch with mctp-1.0

2023-03-17 Thread Jonathan Cameron via
On Fri, 17 Mar 2023 16:37:20 + Jonathan Cameron via wrote: > On Fri, 17 Mar 2023 00:11:10 +0530 > Maverickk 78 wrote: > > > Hi > > > > I am trying mctp & mctpd with aspeed +buildroot(master) + linux v6.2 > > with Qemu 7.2. > > > > > > I have added necessary FMAPI related patches into

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-03-17 Thread Anton Kuchin
On 06/03/2023 23:53, Michael S. Tsirkin wrote: On Mon, Mar 06, 2023 at 10:55:29PM +0200, Anton Kuchin wrote: On 01/03/2023 22:22, Michael S. Tsirkin wrote: On Wed, Mar 01, 2023 at 09:35:56PM +0200, Anton Kuchin wrote: I do trust them :) I have to, otherwise we would need to pack all the

Re: [Virtio-fs] [RFC 1/2] vhost-user: Add interface for virtio-fs migration

2023-03-17 Thread Hanna Czenczek
On 17.03.23 18:39, Anton Kuchin wrote: On 13/03/2023 19:48, Hanna Czenczek wrote: Add a virtio-fs-specific vhost-user interface to facilitate migrating back-end-internal state.  We plan to migrate the internal state simply as a binary blob after the streaming phase, so all we need is a way to

Re: [Virtio-fs] [RFC 2/2] vhost-user-fs: Implement stateful migration

2023-03-17 Thread Hanna Czenczek
On 17.03.23 18:19, Anton Kuchin wrote: On 13/03/2023 19:48, Hanna Czenczek wrote: A virtio-fs device's VM state consists of: - the virtio device (vring) state (VMSTATE_VIRTIO_DEVICE) - the back-end's (virtiofsd's) internal state We get/set the latter via the new vhost-user operations

[PATCH 4/4] iotests/iov-padding: New test

2023-03-17 Thread Hanna Czenczek
Test that even vectored IO requests with 1024 vector elements that are not aligned to the device's request alignment will succeed. Signed-off-by: Hanna Czenczek --- tests/qemu-iotests/tests/iov-padding | 85 tests/qemu-iotests/tests/iov-padding.out | 59

[PATCH 0/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-03-17 Thread Hanna Czenczek
RFC: https://lists.nongnu.org/archive/html/qemu-block/2023-03/msg00446.html Thanks for the feedback on the RFC! Sounds like we agree that this is the right way to fix the bug. Here in v1, I’ve followed Vladimir’s suggestion to inline the functionality of qemu_iovec_init_extended() in

[PATCH 3/4] util/iov: Remove qemu_iovec_init_extended()

2023-03-17 Thread Hanna Czenczek
bdrv_pad_request() was the main user of qemu_iovec_init_extended(). HEAD^ has removed that use, so we can remove qemu_iovec_init_extended() now. The only remaining user is qemu_iovec_init_slice(), which can easily inline the small part it really needs. Note that qemu_iovec_init_extended()

[PATCH 1/4] util/iov: Make qiov_slice() public

2023-03-17 Thread Hanna Czenczek
We want to inline qemu_iovec_init_extended() in block/io.c for padding requests, and having access to qiov_slice() is useful for this. (We will need to count the number of I/O vector elements of a slice there, and then later process this slice. Without qiov_slice(), we would need to call

[PATCH 2/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-03-17 Thread Hanna Czenczek
When processing vectored guest requests that are not aligned to the storage request alignment, we pad them by adding head and/or tail buffers for a read-modify-write cycle. The guest can submit I/O vectors up to IOV_MAX (1024) in length, but with this padding, the vector can exceed that limit.

Re: Using QEMU how to redirect serial /dev/ttyS2 output of guest machine to host machine.

2023-03-17 Thread Abhishek Singh Dagur
Thanks, I'll check it out. On Fri, Mar 17, 2023 at 10:54 PM Cédric Le Goater wrote: > On 3/17/23 17:06, Alex Bennée wrote: > > > > Abhishek Singh Dagur writes: > > > > (cc aspeed maintainers) > > > >> Hi all, > >> > >> We are using obmc-phosphor-image on an ast2500 board which is trying to >

Re: [RFC 1/2] vhost-user: Add interface for virtio-fs migration

2023-03-17 Thread Anton Kuchin
On 13/03/2023 19:48, Hanna Czenczek wrote: Add a virtio-fs-specific vhost-user interface to facilitate migrating back-end-internal state. We plan to migrate the internal state simply as a binary blob after the streaming phase, so all we need is a way to transfer such a blob from and to the

Re: [RFC PATCH v2 02/11] hw/arm/smmuv3: Update translation config to hold stage-2

2023-03-17 Thread Eric Auger
Hi Mostafa, On 3/17/23 15:43, Mostafa Saleh wrote: > Hi Eric, > > Thanks for reviewing the patch. > > On Fri, Mar 17, 2023 at 12:37:11PM +0100, Eric Auger wrote: >> Hi Mostafa, >> >> On 2/26/23 23:06, Mostafa Saleh wrote: >>> In preparation for adding stage-2 support, add a S2 config >>>

Re: [PULL v2 08/18] ui: keep current cursor with QemuConsole

2023-03-17 Thread Daniel P . Berrangé
On Tue, Mar 14, 2023 at 12:01:24AM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Keeping the current cursor around is useful, not only for VNC, but for > other displays. Let's move it down, see the following patches for other > usages. > > Signed-off-by: Marc-André

Re: [PULL 0/3] Trivial branch for 8.0 patches

2023-03-17 Thread Peter Maydell
--- > Trivial branch pull request 20230317 > > Fix doc > Fix sh4 cpu log output > > Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.0 for any user-visible changes. -- PMM

Re: [PATCH] qtests: avoid printing comments before g_test_init()

2023-03-17 Thread Alex Bennée
Daniel P. Berrangé writes: > The TAP protocol version line must be the first thing printed on > stdout. The migration test failed that requirement in certain > scenarios: > > # Skipping test: Userfault not available (builtdtime) > TAP version 13 > # random seed:

Re: [PULL 0/2] target/xtensa TCG test updates

2023-03-17 Thread Peter Maydell
On Thu, 16 Mar 2023 at 20:19, Max Filippov wrote: > > Hi Peter, > > please pull the following updates for the target/xtensa TCG tests. > > The following changes since commit 27a03171d02ee0de8de4e2d3bed241795d672859: > > Merge tag 'pull-tcg-20230313' of https://gitlab.com/rth7680/qemu into >

Re: [PATCH for-8.0] target/arm: Don't advertise aarch64-pauth.xml to gdb

2023-03-17 Thread Peter Maydell
On Fri, 17 Mar 2023 at 17:23, Alex Bennée wrote: > > > Peter Maydell writes: > > > Unfortunately a bug in older versions of gdb means that they will > > crash if QEMU sends them the aarch64-pauth.xml. This bug is fixed in > > gdb commit 1ba3a3222039eb25, and there are plans to backport that to

Re: Using QEMU how to redirect serial /dev/ttyS2 output of guest machine to host machine.

2023-03-17 Thread Cédric Le Goater
On 3/17/23 17:06, Alex Bennée wrote: Abhishek Singh Dagur writes: (cc aspeed maintainers) Hi all, We are using obmc-phosphor-image on an ast2500 board which is trying to communicate with other devices over serial port /dev/ttyS2. As we are trying to emulate the machine on qemu we need to

Re: [PATCH for-8.0] target/arm: Don't advertise aarch64-pauth.xml to gdb

2023-03-17 Thread Alex Bennée
Peter Maydell writes: > Unfortunately a bug in older versions of gdb means that they will > crash if QEMU sends them the aarch64-pauth.xml. This bug is fixed in > gdb commit 1ba3a3222039eb25, and there are plans to backport that to > affected gdb release branches, but since the bug affects

Re: [RFC 2/2] vhost-user-fs: Implement stateful migration

2023-03-17 Thread Anton Kuchin
On 13/03/2023 19:48, Hanna Czenczek wrote: A virtio-fs device's VM state consists of: - the virtio device (vring) state (VMSTATE_VIRTIO_DEVICE) - the back-end's (virtiofsd's) internal state We get/set the latter via the new vhost-user operations FS_SET_STATE_FD, FS_GET_STATE, and FS_SET_STATE.

Re: [PATCH 09/11] tests/tcg: disable pauth for aarch64 gdb tests

2023-03-17 Thread Luis Machado
On 3/17/23 17:12, Luis Machado wrote: On 3/17/23 17:07, Peter Maydell wrote: On Fri, 17 Mar 2023 at 16:55, Luis Machado wrote: On 3/17/23 16:37, Peter Maydell wrote: Having run into this problem in another couple of situations, one of which involved gdb 10, I think I'm increasingly favouring

Re: [PATCH 09/11] tests/tcg: disable pauth for aarch64 gdb tests

2023-03-17 Thread Luis Machado
On 3/17/23 17:07, Peter Maydell wrote: On Fri, 17 Mar 2023 at 16:55, Luis Machado wrote: On 3/17/23 16:37, Peter Maydell wrote: Having run into this problem in another couple of situations, one of which involved gdb 10, I think I'm increasingly favouring option 2 here. The affected gdbs seem

Re: [PATCH] qtests: avoid printing comments before g_test_init()

2023-03-17 Thread Peter Maydell
On Fri, 17 Mar 2023 at 17:06, Daniel P. Berrangé wrote: > > The TAP protocol version line must be the first thing printed on > stdout. The migration test failed that requirement in certain > scenarios: > > # Skipping test: Userfault not available (builtdtime) > TAP version 13 > # random

Re: [PATCH 09/11] tests/tcg: disable pauth for aarch64 gdb tests

2023-03-17 Thread Peter Maydell
On Fri, 17 Mar 2023 at 16:55, Luis Machado wrote: > On 3/17/23 16:37, Peter Maydell wrote: > > Having run into this problem in another couple of situations, one of > > which involved gdb 10, I think I'm increasingly favouring option > > 2 here. The affected gdbs seem to be quite widely deployed,

[PATCH] qtests: avoid printing comments before g_test_init()

2023-03-17 Thread Daniel P . Berrangé
The TAP protocol version line must be the first thing printed on stdout. The migration test failed that requirement in certain scenarios: # Skipping test: Userfault not available (builtdtime) TAP version 13 # random seed: R02Sc120c807f11053eb90bfea845ba1e368 1..32 # Start of x86_64

[RFC PATCH 4/4] tests/acpi: Updated DSDT and SSDT due to move of PXB info to SSDT

2023-03-17 Thread Jonathan Cameron via
Signed-off-by: Jonathan Cameron --- tests/data/acpi/q35/DSDT.cxl| Bin 9673 -> 8474 bytes tests/data/acpi/q35/DSDT.viot | Bin 9470 -> 8429 bytes tests/data/acpi/q35/SSDT.cxl| Bin 0 -> 1235 bytes tests/data/acpi/q35/SSDT.viot | Bin 0

[RFC PATCH 3/4] hw/i386/acpi: Separate PXB related parts of DSDT into an SSDT table.

2023-03-17 Thread Jonathan Cameron via
The dependencies between the CRS entries and bus numbers due to PCI eXpander Bridges taking resources from the primary bus make this a slightly complex dance. The rules we have to fit into are: 1) FACP is first table in RSDT and points to the DSDT. 2) Thus DSDT is created before FACP 3) SSDT must

Re: [PATCH 09/11] tests/tcg: disable pauth for aarch64 gdb tests

2023-03-17 Thread Luis Machado
On 3/17/23 16:37, Peter Maydell wrote: On Wed, 15 Mar 2023 at 09:51, Luis Machado wrote: On 3/13/23 11:44, Luis Machado wrote: On 3/13/23 11:22, Peter Maydell via Gdb wrote: Luis and I came up with two options: (1) leave QEMU outputting the pauth xml as-is, and tell people whose gdb 12

[RFC PATCH 2/4] tests/acpi: Allow changes to DSDT.cxl/viot and SSDT.cxl/viot

2023-03-17 Thread Jonathan Cameron via
Splitting the PXB parts out of DSDT will change these files. Signed-off-by: Jonathan Cameron --- tests/data/acpi/q35/SSDT.cxl| 0 tests/data/acpi/q35/SSDT.viot | 0 tests/qtest/bios-tables-test-allowed-diff.h | 4 3 files changed, 4 insertions(+) diff --git

[PATCH] Revert "docs/about/deprecated: Deprecate 32-bit arm hosts for system emulation"

2023-03-17 Thread Thomas Huth
This reverts commit 1d0a8eba38c028ea02c6e0b68f0a4c9a3cbf. The commit made the wrong assumption that 64-bit distros are most common these days on arm devices, but as Liviu Ionescu pointed out, the recommended OS for the very popular Raspberry Pi boards is still the 32-bit variant, and thus

[RFC PATCH 1/4] hw/acpi: Make Aml and / or crs_range_set optional in build_crs

2023-03-17 Thread Jonathan Cameron via
This allows the same code to be used for two purposes. 1) To fill in the crs_range_set as is later used to generate the actual AML for the primary PCI host bridge. 2) Create the _CRS AML for the PXB bridges. The separation is need to allow for DSDT to be generated before an SSDT for any PXB

[RFC PATCH 0/4] hw/i386: Factor out PXB parts of DSDT into an SSDT table

2023-03-17 Thread Jonathan Cameron via
Michael Tsirkin raised that we have recently had churn in the bios-tables-test and perhaps it was worth factoring some parts of DSDT out as SSDT files. This is an attempt to do that for the entries from pxb-pcie and pxb-cxl PCI root bridges. The main PCI root bridge and related elements are left

[PATCH for-8.0] target/arm: Don't advertise aarch64-pauth.xml to gdb

2023-03-17 Thread Peter Maydell
Unfortunately a bug in older versions of gdb means that they will crash if QEMU sends them the aarch64-pauth.xml. This bug is fixed in gdb commit 1ba3a3222039eb25, and there are plans to backport that to affected gdb release branches, but since the bug affects gdb 9 through 12 it is very widely

Re: [PATCH 09/11] tests/tcg: disable pauth for aarch64 gdb tests

2023-03-17 Thread Peter Maydell
On Wed, 15 Mar 2023 at 09:51, Luis Machado wrote: > On 3/13/23 11:44, Luis Machado wrote: > > On 3/13/23 11:22, Peter Maydell via Gdb wrote: > >> Luis and I came up with two options: > >> > >> (1) leave QEMU outputting the pauth xml as-is, and tell people > >> whose gdb 12 crashes that they

Re: Call failed: MCTP Endpoint did not respond: Qemu CXL switch with mctp-1.0

2023-03-17 Thread Jonathan Cameron via
On Fri, 17 Mar 2023 00:11:10 +0530 Maverickk 78 wrote: > Hi > > I am trying mctp & mctpd with aspeed +buildroot(master) + linux v6.2 > with Qemu 7.2. > > > I have added necessary FMAPI related patches into QEMU to support CLX > switch emulation > >

Re: [PATCH for 8.0 v3] memory: Prevent recursive memory access

2023-03-17 Thread Peter Maydell
On Thu, 16 Mar 2023 at 16:21, Akihiko Odaki wrote: > > A guest may request ask a memory-mapped device to perform DMA. If the > address specified for DMA is the device performing DMA, it will create > recursion. It is very unlikely that device implementations are prepared > for such an abnormal

Re: [PATCH for 8.0 v3] memory: Prevent recursive memory access

2023-03-17 Thread Cédric Le Goater
Hello, On 3/16/23 17:20, Akihiko Odaki wrote: A guest may request ask a memory-mapped device to perform DMA. If the address specified for DMA is the device performing DMA, it will create recursion. It is very unlikely that device implementations are prepared for such an abnormal access, which

Re: Using QEMU how to redirect serial /dev/ttyS2 output of guest machine to host machine.

2023-03-17 Thread Alex Bennée
Abhishek Singh Dagur writes: (cc aspeed maintainers) > Hi all, > > We are using obmc-phosphor-image on an ast2500 board which is trying to > communicate with other devices > over serial port /dev/ttyS2. > As we are trying to emulate the machine on qemu we need to redirect the > request to

[PATCH v2 5/9] accel/tcg: Pass last not end to page_reset_target_data

2023-03-17 Thread Richard Henderson
Pass the address of the last byte to be changed, rather than the first address past the last byte. This avoids overflow when the last page of the address space is involved. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 2 +-

[PATCH v2 0/9] accel/tcg: Fix page_set_flags and related [#1528]

2023-03-17 Thread Richard Henderson
The primary issue is that of overflow, where "end" for the last page of the 32-bit address space overflows to 0. The fix is to use "last" instead, which can always be represented. Changes for v2: * Leave -R 0 unchanged; whether it's currently broken, or unusable by design is unchanged by

[PATCH v2 3/9] include/exec: Replace reserved_va with max_reserved_va

2023-03-17 Thread Richard Henderson
In addition to the rename, change the semantics to be the last byte of the guest va, rather than the following byte. This avoids some overflow conditions. Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 11 ++- linux-user/arm/target_cpu.h | 2 +- bsd-user/main.c

[PATCH v2 7/9] accel/tcg: Pass last not end to page_collection_lock

2023-03-17 Thread Richard Henderson
Pass the address of the last byte to be changed, rather than the first address past the last byte. This avoids overflow when the last page of the address space is involved. Fixes a bug in the loop comparision where "<= end" would lock one more page than required. Reviewed-by: Philippe

[PATCH v2 2/9] linux-user: Rename max_reserved_va in main

2023-03-17 Thread Richard Henderson
Rename to local_max_rva, to avoid a conflict with the next patch. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index

Re: [PATCH v2 0/3] qapi: allow unions to contain further unions

2023-03-17 Thread Markus Armbruster
Daniel P. Berrangé writes: > Currently it is not possible for a union type to contain a > further union as one (or more) of its branches. This relaxes > that restriction and adds the calls needed to validate field > name uniqueness as unions are flattened. I apologize for the long delay. Sick

[PATCH v2 8/9] accel/tcg: Pass last not end to tb_invalidate_phys_page_range__locked

2023-03-17 Thread Richard Henderson
Pass the address of the last byte to be changed, rather than the first address past the last byte. This avoids overflow when the last page of the address space is involved. Properly truncate tb_last to the end of the page; the comment about tb_end being past the end of the page being ok is not

[PATCH v2 4/9] accel/tcg: Pass last not end to page_set_flags

2023-03-17 Thread Richard Henderson
Pass the address of the last byte to be changed, rather than the first address past the last byte. This avoids overflow when the last page of the address space is involved. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1528 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard

[PATCH v2 6/9] accel/tcg: Pass last not end to PAGE_FOR_EACH_TB

2023-03-17 Thread Richard Henderson
Pass the address of the last byte to be changed, rather than the first address past the last byte. This avoids overflow when the last page of the address space is involved. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/tb-maint.c | 28

[PATCH v2 1/9] linux-user: Diagnose misaligned -R size

2023-03-17 Thread Richard Henderson
We have been enforcing host page alignment for the non-R fallback of MAX_RESERVED_VA, but failing to enforce for -R. Signed-off-by: Richard Henderson --- linux-user/main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index

[PATCH v2 9/9] accel/tcg: Pass last not end to tb_invalidate_phys_range

2023-03-17 Thread Richard Henderson
Pass the address of the last byte to be changed, rather than the first address past the last byte. This avoids overflow when the last page of the address space is involved. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 +-

Re: [PATCH v2 3/3] qapi: allow unions to contain further unions

2023-03-17 Thread Markus Armbruster
Daniel P. Berrangé writes: > This extends the QAPI schema validation to permit unions inside unions, > provided the checks for clashing fields pass. > > Signed-off-by: Daniel P. Berrangé > --- > scripts/qapi/schema.py| 6 +- > tests/qapi-schema/meson.build

RE: [PATCH for 8.0] igb: Save more Tx states

2023-03-17 Thread Sriram Yagnaraman
> -Original Message- > From: Akihiko Odaki > Sent: Friday, 17 March 2023 15:21 > To: Sriram Yagnaraman > Cc: qemu-devel@nongnu.org; Jason Wang ; Dmitry > Fleytman ; quint...@redhat.com; Philippe > Mathieu-Daudé > Subject: Re: [PATCH for 8.0] igb: Save more Tx states > > On 2023/03/17

Re:[PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support

2023-03-17 Thread Viktor Prutyanov
Thank you! Personally, I agree with any way to get the elf2dmp patch series into the tree. Best regards, Viktor Prutyanov

Re: [PATCH 1/9] linux-user: Diagnose incorrect -R size

2023-03-17 Thread Peter Maydell
On Fri, 17 Mar 2023 at 14:57, Peter Maydell wrote: > > On Fri, 17 Mar 2023 at 14:46, Richard Henderson > wrote: > > > > On 3/7/23 02:17, Peter Maydell wrote: > > > It looks like we (inadvertently) broke "-R 0 means turn off" > > > in 2019 with commit dc18baaef36d95e5; prior to that the > > >

Re: [PATCH 1/9] linux-user: Diagnose incorrect -R size

2023-03-17 Thread Peter Maydell
On Fri, 17 Mar 2023 at 14:46, Richard Henderson wrote: > > On 3/7/23 02:17, Peter Maydell wrote: > > It looks like we (inadvertently) broke "-R 0 means turn off" > > in 2019 with commit dc18baaef36d95e5; prior to that the > > 64-on-32 default was set by the initial value of the global > >

[RFC PATCH for 8.1 4/6] vdpa: return errno in vhost_vdpa_get_vring_group error

2023-03-17 Thread Eugenio Pérez
We need to tell in the caller, as some errors are expected in a normal workflow. In particular, parent drivers in recent kernels with VHOST_BACKEND_F_IOTLB_ASID may not support vring groups. In that case, -ENOTSUP is returned. This is the case of vp_vdpa in Linux 6.2. Next patches in this

[RFC PATCH for 8.1 3/6] vdpa: add vhost_vdpa_set_dev_features_fd

2023-03-17 Thread Eugenio Pérez
This allows to set the features of a vhost-vdpa device from external subsystems like vhost-net. It is used in subsequent patches to negotiate features and probe for CVQ ASID isolation. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 1 + hw/virtio/vhost-vdpa.c | 20

[RFC PATCH for 8.1 6/6] vdpa: Cache cvq group in VhostVDPAState

2023-03-17 Thread Eugenio Pérez
Continue the move of code that interacts with the device from control virtqueue start to control virtqueue init. As with previous patches, it reduces the number of ioctls in the migration, reducing failure possibilities. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 40

[RFC PATCH for 8.1 0/6] Move ASID test to vhost-vdpa net initialization

2023-03-17 Thread Eugenio Pérez
QEMU v8.0.0-rc0 is able to switch dynamically between vhost-vdpa passthrough and SVQ mode as long as the net device does not have CVQ. The net device state followed (and migrated) by CVQ requires special care. A pre-requisite to add CVQ to that framework is to determine if devices with CVQ are

[RFC PATCH for 8.1 5/6] vdpa: move CVQ isolation check to net_init_vhost_vdpa

2023-03-17 Thread Eugenio Pérez
Evaluating it at start time instead of initialization time may make the guest capable of dynamically adding or removing migration blockers. Also, moving to initialization reduces the number of ioctls in the migration, reducing failure possibilities. Signed-off-by: Eugenio Pérez ---

[RFC PATCH for 8.1 2/6] vdpa: add vhost_vdpa_reset_status_fd

2023-03-17 Thread Eugenio Pérez
This allows to reset a vhost-vdpa device from external subsystems like vhost-net. It is used in subsequent patches to negotiate features and probe for CVQ ASID isolation. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 1 + hw/virtio/vhost-vdpa.c | 58

[RFC PATCH for 8.1 1/6] vdpa: Remove status in reset tracing

2023-03-17 Thread Eugenio Pérez
It is always 0 and it is not useful to route call through file descriptor. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 2 +- hw/virtio/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index

Re: [PATCH 1/9] linux-user: Diagnose incorrect -R size

2023-03-17 Thread Richard Henderson
On 3/7/23 02:17, Peter Maydell wrote: It looks like we (inadvertently) broke "-R 0 means turn off" in 2019 with commit dc18baaef36d95e5; prior to that the 64-on-32 default was set by the initial value of the global variable and could be overridden on the command line. After that we ended up

Re: [RFC PATCH v2 02/11] hw/arm/smmuv3: Update translation config to hold stage-2

2023-03-17 Thread Mostafa Saleh
Hi Eric, Thanks for reviewing the patch. On Fri, Mar 17, 2023 at 12:37:11PM +0100, Eric Auger wrote: > Hi Mostafa, > > On 2/26/23 23:06, Mostafa Saleh wrote: > > In preparation for adding stage-2 support, add a S2 config > > struct(SMMUS2Cfg), composed of the following fields and embedded in >

[PATCH for-8.0] tests/unit/test-blockjob: Disable complete_in_standby test

2023-03-17 Thread Peter Maydell
The blockjob/complete_in_standby test is flaky and fails intermittently in CI: 172/621 qemu:unit / test-blockjob ERROR 0.26s killed by signal 6 SIGABRT 11:03:46 MALLOC_PERTURB_=176 G_TEST_SRCDIR=/Users/pm215/src/qemu-for-merges/tests/unit

Re: [PATCH] target/s390x/tcg/mem_helper: Remove bad assert() statement

2023-03-17 Thread Richard Henderson
On 3/17/23 06:57, Thomas Huth wrote: The "assert(!nonfault)" statement can be triggered by running the "mvpg" s390x kvm-unit-test with TCG. According to Richard: "... the assert looks backward. We should only arrive there if nonfault was true for the probe (otherwise the probe would have raised

Re: [PATCH for 8.0] igb: Save more Tx states

2023-03-17 Thread Akihiko Odaki
On 2023/03/17 22:08, Sriram Yagnaraman wrote: -Original Message- From: Akihiko Odaki Sent: Friday, 17 March 2023 13:25 Cc: qemu-devel@nongnu.org; Jason Wang ; Dmitry Fleytman ; quint...@redhat.com; Philippe Mathieu-Daudé ; Sriram Yagnaraman ; Akihiko Odaki Subject: [PATCH for 8.0]

[PULL 3/3] docs/sphinx/kerneldoc.py: Honour --enable-werror

2023-03-17 Thread Laurent Vivier
From: Peter Maydell Currently, the kerneldoc Sphinx plugin doesn't honour the --enable-werror configure option, so its warnings are never fatal. This is because although we do pass sphinx-build the -W switch, the warnings from kerneldoc are produced by the scripts/kernel-doc script directly and

[PULL 1/3] exec/memory: Fix kernel-doc warning

2023-03-17 Thread Laurent Vivier
From: Bernhard Beschow During build the kernel-doc script complains about the following issue: src/docs/../include/exec/memory.h:1741: warning: Function parameter or member 'n' not described in 'memory_region_unmap_iommu_notifier_range' src/docs/../include/exec/memory.h:1741: warning:

[PULL 0/3] Trivial branch for 8.0 patches

2023-03-17 Thread Laurent Vivier
changes up to 364206640c6b34bae3bb9e428817e51d23a794d0: docs/sphinx/kerneldoc.py: Honour --enable-werror (2023-03-16 14:39:10 +0100) Trivial branch pull request 20230317 Fix doc Fix sh4 cpu log output

[PULL 2/3] target/sh4: Honor QEMU_LOG_FILENAME with QEMU_LOG=cpu

2023-03-17 Thread Laurent Vivier
From: Ilya Leoshkevich When using QEMU_LOG=cpu on sh4, QEMU_LOG_FILENAME is partially ignored. Fix by using qemu_fprintf() instead of qemu_printf() in the respective places. Fixes: 90c84c560067 ("qom/cpu: Simplify how CPUClass:cpu_dump_state() prints") Reviewed-by: Peter Maydell Reviewed-by:

Re: [PATCH 11/14] tests/qapi-schema: Clean up positive test for conditionals

2023-03-17 Thread Markus Armbruster
Eric Blake writes: > On Fri, Mar 17, 2023 at 07:10:52AM +0100, Markus Armbruster wrote: >> Eric Blake writes: >> >> > On Thu, Mar 16, 2023 at 08:13:22AM +0100, Markus Armbruster wrote: >> >> Union TestIfUnion is conditional on macros TEST_IF_UNION and >> >> TEST_IF_STRUCT. It uses TestIfEnum,

Re: [PATCH v2] hw/net/can: Add mcp25625 model

2023-03-17 Thread Pavel Pisa
Hello Ben, thanks for update. On Thursday 16 of March 2023 13:41:13 Ben Dooks wrote: > From: Ben Dooks > > Add support for Microchip MCP25625 SPI based CAN controller which is > very similar to the MCP2515 (and covered by the same Linux driver). > > This can be added to any machine with SPI

Re: Question about TCG liveness_pass_1

2023-03-17 Thread Richard Henderson
On 3/16/23 19:57, LIU Zhiwei wrote: Hi Richard, When I read the tcg code, I find a corner case which may be a bug in liveness_pass_1. I see all TEMP_TBs or global temps are set to TS_DEAD | TS_MEM when enter liveness_pass_1. Think about the  sequence. 1)Write_global_temp_0 // 0->TS_DEAD,

[PATCH] target/s390x/tcg/mem_helper: Remove bad assert() statement

2023-03-17 Thread Thomas Huth
The "assert(!nonfault)" statement can be triggered by running the "mvpg" s390x kvm-unit-test with TCG. According to Richard: "... the assert looks backward. We should only arrive there if nonfault was true for the probe (otherwise the probe would have raised the exception directly). I would think

Re: [PATCH] hw/usb/imx: Fix out of bounds access in imx_usbphy_read()

2023-03-17 Thread Peter Maydell
On Thu, 16 Mar 2023 at 23:49, Guenter Roeck wrote: > > The i.MX USB Phy driver does not check register ranges, resulting in out of > bounds accesses if an attempt is made to access non-existing PHY registers. > Add range check and conditionally report bad accesses to fix the problem. > > While at

Re: [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support

2023-03-17 Thread Peter Maydell
On Thu, 16 Mar 2023 at 16:48, Viktor Prutyanov wrote: > > > > > Hi, > > > > For now, elf2dmp is unable to convert ELF-dump to DMP-dump made of > > Windows Server 2022 guest. This patch series fixes it. > > > > v1: improve code-style fix > > v2: don't remove data directory entry RVA print and DOS

RE: [PATCH 0/2] Migration time prediction using calc-dirty-rate

2023-03-17 Thread Gudkov Andrei via
ping https://patchew.org/QEMU/cover.1677589218.git.gudkov.and...@huawei.com/ -Original Message- From: Gudkov Andrei Sent: Tuesday, February 28, 2023 16:16 To: qemu-devel@nongnu.org Cc: quint...@redhat.com; dgilb...@redhat.com; Gudkov Andrei Subject: [PATCH 0/2] Migration time

Using QEMU how to redirect serial /dev/ttyS2 output of guest machine to host machine.

2023-03-17 Thread Abhishek Singh Dagur
Hi all, We are using obmc-phosphor-image on an ast2500 board which is trying to communicate with other devices over serial port /dev/ttyS2. As we are trying to emulate the machine on qemu we need to redirect the request to the host machine so that it can handle this request and return

Re: [PULL 0/7] Migration 20230316 patches

2023-03-17 Thread Peter Maydell
On Thu, 16 Mar 2023 at 15:13, Juan Quintela wrote: > > The following changes since commit 9636e513255362c4a329e3e5fb2c97dab3c5ce47: > > Merge tag 'misc-next-pull-request' of https://gitlab.com/berrange/qemu into > staging (2023-03-15 17:20:04 +) > > are available in the Git repository at:

Re: [PULL 0/2] Seabios 1.16.2 20230316 patches

2023-03-17 Thread Peter Maydell
On Thu, 16 Mar 2023 at 10:41, Gerd Hoffmann wrote: > > The following changes since commit 652737c8090eb3792f8b4c4b22ab12d7cc32073f: > > Update version for v8.0.0-rc0 release (2023-03-14 19:25:05 +) > > are available in the Git repository at: > > https://gitlab.com/kraxel/qemu.git

RE: [PATCH for 8.0] igb: Save more Tx states

2023-03-17 Thread Sriram Yagnaraman
> -Original Message- > From: Akihiko Odaki > Sent: Friday, 17 March 2023 13:25 > Cc: qemu-devel@nongnu.org; Jason Wang ; Dmitry > Fleytman ; quint...@redhat.com; Philippe > Mathieu-Daudé ; Sriram Yagnaraman > ; Akihiko Odaki > Subject: [PATCH for 8.0] igb: Save more Tx states > > The

Re: test-blockjob: intermittent CI failures in msys2-64bit job

2023-03-17 Thread Thomas Huth
On 17/03/2023 11.17, Peter Maydell wrote: On Mon, 6 Mar 2023 at 11:16, Peter Maydell wrote: On Fri, 3 Mar 2023 at 18:36, Peter Maydell wrote: I've noticed that test-blockjob seems to fail intermittently on the msys2-64bit job: https://gitlab.com/qemu-project/qemu/-/jobs/3872508803

Re: [PATCH 11/14] tests/qapi-schema: Clean up positive test for conditionals

2023-03-17 Thread Eric Blake
On Fri, Mar 17, 2023 at 07:10:52AM +0100, Markus Armbruster wrote: > Eric Blake writes: > > > On Thu, Mar 16, 2023 at 08:13:22AM +0100, Markus Armbruster wrote: > >> Union TestIfUnion is conditional on macros TEST_IF_UNION and > >> TEST_IF_STRUCT. It uses TestIfEnum, which is conditional on

[PATCH for 8.0] igb: Save more Tx states

2023-03-17 Thread Akihiko Odaki
The current implementation of igb uses only part of a advanced Tx context descriptor and first data descriptor because it misses some features and sniffs the trait of the packet instead of respecting the packet type specified in the descriptor. However, we will certainly need the entire Tx context

Re: [PATCH v5 04/16] hw/9pfs: Implement Windows specific xxxdir() APIs

2023-03-17 Thread Christian Schoenebeck
On Friday, March 17, 2023 5:36:37 AM CET Shi, Guohuai wrote: [...] > > > > > > +do { > > > > > > +full_dir_entry = get_full_path_win32(hDir, > > > > > > + dd_data.name); > > > > > > + > > > > > > +if (full_dir_entry == NULL) { > > > > > > +err = ENOMEM; > > > > > >

Re: [PATCH v2 06/32] include/qemu: add documentation for memory callbacks

2023-03-17 Thread Thomas Huth
On 15/03/2023 18.43, Alex Bennée wrote: Some API documentation was missed, rectify that. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1497 Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 47 ++ 1 file changed, 43 insertions(+), 4

Re: [PATCH v2 07/32] tests/tcg: add some help output for running individual tests

2023-03-17 Thread Thomas Huth
On 15/03/2023 18.43, Alex Bennée wrote: So you can do: cd tests/tcg/aarch64-linux-user make -f ../Makefile.target help To see the list of tests. You can then run each one individually. Signed-off-by: Alex Bennée --- tests/tcg/Makefile.target | 7 +++ 1 file changed, 7

Re: [PATCH v2 1/3] qapi: improve specificity of type/member descriptions

2023-03-17 Thread Markus Armbruster
Daniel P. Berrangé writes: > When describing member types always include the context of the > containing type. Although this is often redundant, in some cases > it will help to reduce ambiguity. Unfortunately, it can also be confusing, as we shall see below. > Signed-off-by: Daniel P. Berrangé

  1   2   >