Re: [PATCH v5 02/11] pcie_sriov: Validate NumVFs

2024-02-19 Thread Akihiko Odaki
On 2024/02/19 2:36, Michael S. Tsirkin wrote: On Sun, Feb 18, 2024 at 01:56:07PM +0900, Akihiko Odaki wrote: The guest may write NumVFs greater than TotalVFs and that can lead to buffer overflow in VF implementations. Cc: qemu-sta...@nongnu.org Fixes: 7c0fa8dff811 ("pcie: Add support for Single

[PATCH 3/7] hw/ide: Move IDE device related definitions to ide-dev.h

2024-02-19 Thread Thomas Huth
Let's start to unentangle internal.h by moving public IDE device related definitions to ide-dev.h. Signed-off-by: Thomas Huth --- include/hw/ide/ide-dev.h | 145 +- include/hw/ide/internal.h | 145 +- hw/ide/ide-dev.c

[PATCH 0/7] hw/ide: Clean up hw/ide/qdev.c and include/hw/ide/internal.h

2024-02-19 Thread Thomas Huth
While trying to make it possible to compile-out the CompactFlash IDE device in downstream distributions (first patch), we noticed that there are more things in the IDE code that could use a proper clean up: First, hw/ide/qdev.c is quite a mix between IDE BUS specific functions and (disk) device sp

[PATCH 2/7] hw/ide: Split qdev.c into ide-bus.c and ide-dev.c

2024-02-19 Thread Thomas Huth
qdev.c is a mixture between IDE bus specific functions and IDE device functions. Let's split it up to make it more obvious which part is related to bus handling and which part is related to device handling. Signed-off-by: Thomas Huth --- hw/ide/ide-bus.c | 111 +++

[PATCH 1/7] hw/ide: Add the possibility to disable the CompactFlash device in the build

2024-02-19 Thread Thomas Huth
For distros like downstream RHEL, it would be helpful to allow to disable the CompactFlash device. For making this possible, we need a separate Kconfig switch for this device, and the code should reside in a separate file. Let's also introduce a new header ide-dev.h which can be used to collect def

[PATCH 4/7] hw/ide: Move IDE bus related definitions to a new header ide-bus.h

2024-02-19 Thread Thomas Huth
Let's consolidate the public IDE bus related functions in a separate header. Signed-off-by: Thomas Huth --- include/hw/ide/ide-bus.h | 41 +++ include/hw/ide/internal.h | 38 +--- 2 files changed, 42 insertions(+), 37 deletions

[PATCH 7/7] hw/ide: Stop exposing internal.h to non-IDE files

2024-02-19 Thread Thomas Huth
include/hw/ide/internal.h is currently included by include/hw/ide/pci.h and thus exposed to a lot of files that are not part of the IDE subsystem. Stop including internal.h there and use the appropriate new headers ide-bus.h and ide-dma.h instead. Signed-off-by: Thomas Huth --- include/hw/ide/pc

[PATCH 5/7] hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h

2024-02-19 Thread Thomas Huth
These definitions are required outside of the hw/ide/ code, too, so lets's move them from internal.h to a new header called ide-dma.h. Signed-off-by: Thomas Huth --- include/hw/ide/ide-dma.h | 30 ++ include/hw/ide/internal.h | 27 +-- 2 files

[PATCH 6/7] hw/ide: Remove the include/hw/ide.h legacy file

2024-02-19 Thread Thomas Huth
There was only one prototype left in this legacy file. Move it to ide-dev.h to finally get rid of it. Signed-off-by: Thomas Huth --- include/hw/ide.h | 9 - include/hw/ide/ide-dev.h | 2 ++ include/hw/ide/internal.h | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) dele

[PATCH v2] xlnx-versal-ospi: disable reentrancy detection for iomem_dac

2024-02-19 Thread Sai Pavan Boddu
The OSPI DMA reads flash data through the OSPI linear address space (the iomem_dac region), because of this the reentrancy guard introduced in commit a2e1753b ("memory: prevent dma-reentracy issues") is disabled for the memory region. Signed-off-by: Sai Pavan Boddu --- Changes for V2: Add

Re: [PATCH 3/7] hw/ide: Move IDE device related definitions to ide-dev.h

2024-02-19 Thread Philippe Mathieu-Daudé
On 19/2/24 11:49, Thomas Huth wrote: Let's start to unentangle internal.h by moving public IDE device related definitions to ide-dev.h. Signed-off-by: Thomas Huth --- include/hw/ide/ide-dev.h | 145 +- include/hw/ide/internal.h | 145 +

Re: [PATCH 0/7] hw/ide: Clean up hw/ide/qdev.c and include/hw/ide/internal.h

2024-02-19 Thread Philippe Mathieu-Daudé
On 19/2/24 11:49, Thomas Huth wrote: While trying to make it possible to compile-out the CompactFlash IDE device in downstream distributions (first patch), we noticed that there are more things in the IDE code that could use a proper clean up: First, hw/ide/qdev.c is quite a mix between IDE BUS

Re: [PATCH 2/7] hw/ide: Split qdev.c into ide-bus.c and ide-dev.c

2024-02-19 Thread BALATON Zoltan
On Mon, 19 Feb 2024, Thomas Huth wrote: qdev.c is a mixture between IDE bus specific functions and IDE device functions. Let's split it up to make it more obvious which part is related to bus handling and which part is related to device handling. Signed-off-by: Thomas Huth --- hw/ide/ide-bus.c

Re: [PATCH 5/7] hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h

2024-02-19 Thread BALATON Zoltan
On Mon, 19 Feb 2024, Thomas Huth wrote: These definitions are required outside of the hw/ide/ code, too, so lets's move them from internal.h to a new header called ide-dma.h. Signed-off-by: Thomas Huth --- include/hw/ide/ide-dma.h | 30 ++ include/hw/ide/internal.h |

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Markus Armbruster
I apologize for the delayed review. Sam Li writes: > To configure the zoned format feature on the qcow2 driver, it > requires settings as: the device size, zone model, zone size, > zone capacity, number of conventional zones, limits on zone > resources (max append bytes, max open zones, and max_

Re: [PATCH 04/21] hw/tricore/testboard: Use qdev_new() instead of QOM basic API

2024-02-19 Thread Bastian Koppelmann
On Fri, Feb 16, 2024 at 12:02:55PM +0100, Philippe Mathieu-Daudé wrote: > Prefer QDev API for QDev objects, avoid the underlying QOM layer. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/tricore/tricore_testdevice.h | 3 --- > hw/tricore/tricore_testboard.c | 4 +--- > 2 f

Re: [PATCH v5 01/11] hw/nvme: Use pcie_sriov_num_vfs()

2024-02-19 Thread Klaus Jensen
On Feb 18 13:56, Akihiko Odaki wrote: > nvme_sriov_pre_write_ctrl() used to directly inspect SR-IOV > configurations to know the number of VFs being disabled due to SR-IOV > configuration writes, but the logic was flawed and resulted in > out-of-bound memory access. > > It assumed PCI_SRIOV_NUM_VF

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Markus Armbruster
One more thing... Markus Armbruster writes: > I apologize for the delayed review. > > Sam Li writes: > >> To configure the zoned format feature on the qcow2 driver, it >> requires settings as: the device size, zone model, zone size, >> zone capacity, number of conventional zones, limits on zone

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Sam Li
Markus Armbruster 于2024年2月19日周一 13:05写道: > > One more thing... > > Markus Armbruster writes: > > > I apologize for the delayed review. No problems. Thanks for reviewing! > > > > Sam Li writes: > > > >> To configure the zoned format feature on the qcow2 driver, it > >> requires settings as: the

Re: [PATCH 19/21] hw/s390x/zpci-bus: Add QOM parentship relation with zPCI devices

2024-02-19 Thread Thomas Huth
On 16/02/2024 12.03, Philippe Mathieu-Daudé wrote: QDev objects created with qdev_*new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/s390-pci-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/s

Re: [PATCH 19/21] hw/s390x/zpci-bus: Add QOM parentship relation with zPCI devices

2024-02-19 Thread Philippe Mathieu-Daudé
On 19/2/24 14:38, Thomas Huth wrote: On 16/02/2024 12.03, Philippe Mathieu-Daudé wrote: QDev objects created with qdev_*new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé ---   hw/s390x/s390-pci-bus.c | 1 +   1 file chan

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2024年2月19日周一 13:05写道: >> >> One more thing... >> >> Markus Armbruster writes: >> >> > I apologize for the delayed review. > > No problems. Thanks for reviewing! > >> > >> > Sam Li writes: >> > >> >> To configure the zoned format feature on the qcow2 driver,

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Sam Li
Markus Armbruster 于2024年2月19日周一 15:40写道: > > Sam Li writes: > > > Markus Armbruster 于2024年2月19日周一 13:05写道: > >> > >> One more thing... > >> > >> Markus Armbruster writes: > >> > >> > I apologize for the delayed review. > > > > No problems. Thanks for reviewing! > > > >> > > >> > Sam Li writes:

Re: [PATCH] iotests: adapt to output change for recently introduced 'detached header' field

2024-02-19 Thread Daniel P . Berrangé
On Fri, Feb 16, 2024 at 11:14:15AM +0100, Fiona Ebner wrote: > Failure was noticed when running the tests for the qcow2 image format. > > Fixes: 0bd779e27e ("crypto: Introduce 'detached-header' field in > QCryptoBlockInfoLUKS") > Signed-off-by: Fiona Ebner > --- > tests/qemu-iotests/198.out | 2

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2024年2月19日周一 15:40写道: >> >> Sam Li writes: >> >> > Markus Armbruster 于2024年2月19日周一 13:05写道: >> >> >> >> One more thing... >> >> >> >> Markus Armbruster writes: >> >> >> >> > I apologize for the delayed review. >> > >> > No problems. Thanks for reviewing! >>

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Sam Li
Markus Armbruster 于2024年2月19日周一 16:56写道: > > Sam Li writes: > > > Markus Armbruster 于2024年2月19日周一 15:40写道: > >> > >> Sam Li writes: > >> > >> > Markus Armbruster 于2024年2月19日周一 13:05写道: > >> >> > >> >> One more thing... > >> >> > >> >> Markus Armbruster writes: > >> >> > >> >> > I apologize fo

Re: [PATCH 2/7] hw/ide: Split qdev.c into ide-bus.c and ide-dev.c

2024-02-19 Thread Thomas Huth
On 19/02/2024 12.45, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Thomas Huth wrote: qdev.c is a mixture between IDE bus specific functions and IDE device functions. Let's split it up to make it more obvious which part is related to bus handling and which part is related to device handling. Signe

Re: [PATCH 3/7] hw/ide: Move IDE device related definitions to ide-dev.h

2024-02-19 Thread Thomas Huth
On 19/02/2024 12.32, Philippe Mathieu-Daudé wrote: On 19/2/24 11:49, Thomas Huth wrote: Let's start to unentangle internal.h by moving public IDE device related definitions to ide-dev.h. Signed-off-by: Thomas Huth ---   include/hw/ide/ide-dev.h  | 145 +-   i

Re: [PATCH 5/7] hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h

2024-02-19 Thread Thomas Huth
On 19/02/2024 12.53, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Thomas Huth wrote: These definitions are required outside of the hw/ide/ code, too, so lets's move them from internal.h to a new header called ide-dma.h. Signed-off-by: Thomas Huth --- include/hw/ide/ide-dma.h  | 30 ++

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2024年2月19日周一 16:56写道: >> >> Sam Li writes: >> >> > Markus Armbruster 于2024年2月19日周一 15:40写道: >> >> >> >> Sam Li writes: >> >> >> >> > Markus Armbruster 于2024年2月19日周一 13:05写道: >> >> >> >> >> >> One more thing... >> >> >> >> >> >> Markus Armbruster writes: >

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Sam Li
Markus Armbruster 于2024年2月19日周一 21:42写道: > > Sam Li writes: > > > Markus Armbruster 于2024年2月19日周一 16:56写道: > >> > >> Sam Li writes: > >> > >> > Markus Armbruster 于2024年2月19日周一 15:40写道: > >> >> > >> >> Sam Li writes: > >> >> > >> >> > Markus Armbruster 于2024年2月19日周一 13:05写道: > >> >> >> > >> >

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2024年2月19日周一 21:42写道: >> >> Sam Li writes: >> >> > Markus Armbruster 于2024年2月19日周一 16:56写道: >> >> >> >> Sam Li writes: >> >> >> >> > Markus Armbruster 于2024年2月19日周一 15:40写道: >> >> >> >> >> >> Sam Li writes: >> >> >> >> >> >> > Markus Armbruster 于2024年2月1

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Damien Le Moal
On 2/20/24 06:15, Markus Armbruster wrote: > Making this member @size mandatory means we must specify it when > BlockdevCreateOptionsQcow2 member @zone is present and @zone's member > @mode is "host-managed". Feels right to me. Am I missing anything? That's right. And the ch

Re: [PATCH 3/7] hw/ide: Move IDE device related definitions to ide-dev.h

2024-02-19 Thread Philippe Mathieu-Daudé
On 19/2/24 20:17, Thomas Huth wrote: On 19/02/2024 12.32, Philippe Mathieu-Daudé wrote: On 19/2/24 11:49, Thomas Huth wrote: Let's start to unentangle internal.h by moving public IDE device related definitions to ide-dev.h. Signed-off-by: Thomas Huth ---   include/hw/ide/ide-dev.h  | 145