[PATCH] util/hexdump: Convert to take a void pointer argument

2020-08-22 Thread Philippe Mathieu-Daudé
Most uses of qemu_hexdump() do not take an array of char as input, forcing use of cast. Since we can use this helper to dump any kind of buffer, use a pointer to void argument instead. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu-common.h| 2 +- hw/dma/xlnx_dpdma.c | 2 +- h

Re: [PATCH] util/hexdump: Convert to take a void pointer argument

2020-08-22 Thread Peter Maydell
On Sat, 22 Aug 2020 at 16:05, Philippe Mathieu-Daudé wrote: > Most uses of qemu_hexdump() do not take an array of char > as input, forcing use of cast. Since we can use this > helper to dump any kind of buffer, use a pointer to void > argument instead. > > Signed-off-by: Philippe Mathieu-Daudé >

Re: [PATCH for-4.2 v2 3/3] block/file-posix: Let post-EOF fallocate serialize

2020-08-22 Thread Vladimir Sementsov-Ogievskiy
01.11.2019 18:25, Max Reitz wrote: The XFS kernel driver has a bug that may cause data corruption for qcow2 images as of qemu commit c8bb23cbdbe32f. We can work around it by treating post-EOF fallocates as serializing up until infinity (INT64_MAX in practice). Hi! I'm doing some investigation,

Re: [PATCH for-4.2 v2 3/3] block/file-posix: Let post-EOF fallocate serialize

2020-08-22 Thread Vladimir Sementsov-Ogievskiy
22.08.2020 20:03, Vladimir Sementsov-Ogievskiy wrote: 01.11.2019 18:25, Max Reitz wrote: The XFS kernel driver has a bug that may cause data corruption for qcow2 images as of qemu commit c8bb23cbdbe32f.  We can work around it by treating post-EOF fallocates as serializing up until infinity (INT6

Re: [PATCH] util/hexdump: Convert to take a void pointer argument

2020-08-22 Thread Philippe Mathieu-Daudé
On 8/22/20 6:18 PM, Peter Maydell wrote: > On Sat, 22 Aug 2020 at 16:05, Philippe Mathieu-Daudé wrote: >> Most uses of qemu_hexdump() do not take an array of char >> as input, forcing use of cast. Since we can use this >> helper to dump any kind of buffer, use a pointer to void >> argument inst

[PATCH v2 0/2] util/hexdump: Cleanup qemu_hexdump()

2020-08-22 Thread Philippe Mathieu-Daudé
- Pass const void* buffer - Reorder arguments Supersedes: <20200822150457.1322519-1-f4...@amsat.org> Philippe Mathieu-Daudé (2): util/hexdump: Convert to take a void pointer argument util/hexdump: Reorder qemu_hexdump() arguments include/qemu-common.h| 3 ++- hw/dma/xlnx_dpdma.c |

[PATCH v2 1/2] util/hexdump: Convert to take a void pointer argument

2020-08-22 Thread Philippe Mathieu-Daudé
Most uses of qemu_hexdump() do not take an array of char as input, forcing use of cast. Since we can use this helper to dump any kind of buffer, use a pointer to void argument instead. Signed-off-by: Philippe Mathieu-Daudé --- Since v1: - renamed argument 'bufptr' (Peter Maydell) --- include/qem

[PATCH v2 2/2] util/hexdump: Reorder qemu_hexdump() arguments

2020-08-22 Thread Philippe Mathieu-Daudé
qemu_hexdump()'s pointer to the buffer and length of the buffer are closely related arguments but are widely separated in the argument list order (also, the format of function prototypes is usually to have the FILE* argument coming first). Reorder the arguments as "fp, prefix, buf, size" which is

Re: [PATCH-for-5.2] stubs/cmos: Use correct include

2020-08-22 Thread Philippe Mathieu-Daudé
ping? On 7/24/20 10:43 AM, Philippe Mathieu-Daudé wrote: > cmos_get_fd_drive_type() is declared in "hw/block/fdc.h". > This currently works because "hw/i386/pc.h" happens to > include it. Simplify including the correct header. > > Fixes: 2055dbc1c9 ("acpi: move aml builder code for floppy device"

Re: [PATCH] hw/block/nand: Decommission the NAND museum

2020-08-22 Thread Philippe Mathieu-Daudé
ping? On 8/14/20 3:23 PM, Philippe Mathieu-Daudé wrote: > I forgot to Cc qemu-arm@, doing it now since most of the users > of this are ARM machines. > > On 8/14/20 3:21 PM, Philippe Mathieu-Daudé wrote: >> This is the QEMU equivalent of this Linux commit (but 7 years later): >> https://git.kernel

Re: [PULL 00/14] bitmaps patches for 2020-08-21

2020-08-22 Thread Peter Maydell
On Fri, 21 Aug 2020 at 15:12, Eric Blake wrote: > > bitmaps patches for 2020-08-21 > > - Andrey Shinkevich: Enhance qcow2.py for iotest inspection of qcow2 images > - Max Reitz: Add block-bitmap-mapping migration parameter iotest 03

Re: [PATCH v2 3/3] hw/sd: Add Cadence SDHCI emulation

2020-08-22 Thread Philippe Mathieu-Daudé
On 8/17/20 12:05 PM, Bin Meng wrote: > Cadence SD/SDIO/eMMC Host Controller (SD4HC) is an SDHCI compatible > controller. The SDHCI compatible registers start from offset 0x200, > which are called Slot Register Set (SRS) in its datasheet. > > This creates a Cadence SDHCI model built on top of the e

Re: [PATCH v6 5/7] virtio-scsi-pci: default num_queues to -smp N

2020-08-22 Thread Raphael Norwitz
On Tue, Aug 18, 2020 at 11:32 AM Stefan Hajnoczi wrote: > > Automatically size the number of virtio-scsi-pci, vhost-scsi-pci, and > vhost-user-scsi-pci request virtqueues to match the number of vCPUs. > Other transports continue to default to 1 request virtqueue. > > A 1:1 virtqueue:vCPU mapping e