Re: [PULL 0/2] SD/MMC patches for 2022-01-04

2022-01-04 Thread Richard Henderson
://github.com/philmd/qemu.git tags/sdmmc-20220104 for you to fetch changes up to d666c7b529c503381a714b97d2e174848b5aad8d: hw/sd: Add SDHC support for SD card SPI-mode (2022-01-04 08:50:27 +0100) SD/MMC patches queue - Add SDHC support

Re: [PATCH v2 8/9] hw/dma: Use dma_addr_t type definition when relevant

2022-01-04 Thread Peter Xu
On Tue, Jan 04, 2022 at 09:54:30AM +0100, Philippe Mathieu-Daudé wrote: > diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c > index 462f79a1f60..c3c49176110 100644 > --- a/hw/nvme/ctrl.c > +++ b/hw/nvme/ctrl.c > @@ -1147,7 +1147,7 @@ static uint16_t nvme_tx(NvmeCtrl *n, NvmeSg *sg, > uint8_t *ptr,

[PATCH v2 8/9] hw/dma: Use dma_addr_t type definition when relevant

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Update the obvious places where dma_addr_t should be used (instead of uint64_t, hwaddr, size_t, int32_t types). This allows to have _addr_t type portable on 32/64-bit hosts. Move QEMUSGList declaration after dma_addr_t declaration so this structure can use the new

[PATCH v2 9/9] hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Since the previous commit, dma_buf_rw() returns a MemTxResult type. Do not discard it, return it to the caller. Since both dma_buf_read/dma_buf_write functions were previously returning the QEMUSGList size not consumed, add an extra argument where the unconsummed

[PATCH v2 6/9] hw/scsi: Rename SCSIRequest::resid as 'residual'

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The 'resid' field is slightly confusing and could be interpreted as some ID. Rename it as 'residual' which is clearer to review. No logical change. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- include/hw/scsi/scsi.h | 4 ++--

[PATCH v2 7/9] hw/dma: Fix format string issues using dma_addr_t

2022-01-04 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci.c| 2 +- hw/rdma/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 205dfdc6622..6c727dd0c08 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1159,7 +1159,7 @@

[PATCH v2 4/9] hw/dma: Remove CONFIG_USER_ONLY check

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé DMA API should not be included in user-mode emulation. If so, build should fail. Remove the CONFIG_USER_ONLY check. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/dma.h | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH v2 5/9] hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Various APIs use 'pval' naming for 'pointer to val'. rdma_pci_dma_map() uses 'plen' for 'PCI length', but since 'PCI' is already explicit in the function name, simplify and rename the argument 'len'. No logical change. Signed-off-by: Philippe Mathieu-Daudé

[PATCH v2 2/9] hw/pci: Restrict pci-bus stub to sysemu

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Neither tools nor user-mode emulation require the PCI bus stub. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- stubs/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/meson.build

[PATCH v2 3/9] hw/pci: Document pci_dma_map()

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- include/hw/pci/pci.h | 12 1 file changed, 12 insertions(+) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 5b36334a28a..07f08aa0626 100644 ---

[PATCH v2 1/9] hw/nvram: Restrict stub to sysemu and tools

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé User-mode emulation doesn't need the fw_cfg stub. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- hw/nvram/meson.build | 6 -- stubs/meson.build| 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH v2 0/9] hw/dma: Use dma_addr_t type definition when relevant

2022-01-04 Thread Philippe Mathieu-Daudé
Since v1: - Addressed David review comment (stick to dma_addr_t type) - Addressed Peter review comment (incorrect doc string) Hi, This series aims to clarify a bit the DMA API, in particular the 'size' argument which is not clear enough (as we use multiple types for it). This helps avoiding

[PULL 2/2] hw/sd: Add SDHC support for SD card SPI-mode

2022-01-04 Thread Philippe Mathieu-Daudé
From: Frank Chang In SPI-mode, SD card's OCR register: Card Capacity Status (CCS) bit is not set to 1 correclty when the assigned SD image size is larger than 2GB (SDHC). This will cause the SD card to be indentified as SDSC incorrectly. CCS bit should be set to 1 if we are using SDHC. Also, as

[PULL 1/2] hw/sd/sdcard: Rename Write Protect Group variables

2022-01-04 Thread Philippe Mathieu-Daudé
'wp_groups' holds a bitmap, rename it as 'wp_group_bmap'. 'wpgrps_size' is the bitmap size (in bits), rename it as 'wp_group_bits'. Patch created mechanically using: $ sed -i -e s/wp_groups/wp_group_bmap/ \ -e s/wpgrps_size/wp_group_bits/ hw/sd/sd.c Signed-off-by: Philippe

[PULL 0/2] SD/MMC patches for 2022-01-04

2022-01-04 Thread Philippe Mathieu-Daudé
The following changes since commit b5a3d8bc9146ba22a25116cb748c97341bf99737: Merge tag 'pull-misc-20220103' of https://gitlab.com/rth7680/qemu into staging (2022-01-03 09:34:41 -0800) are available in the Git repository at: https://github.com/philmd/qemu.git tags/sdmmc-20220104 for you