Re: [PATCH] quorum: Remove unnecessary forward declaration

2022-10-06 Thread Philippe Mathieu-Daudé via
On 6/10/22 14:26, Kevin Wolf wrote: Signed-off-by: Kevin Wolf --- block/quorum.c | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 04/13] hw/ppc/e500: Reduce usage of sysbus API

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: PlatformBusDevice has an mmio attribute which gets aliased to SysBusDevice::mmio[0]. So PlatformbusDevice::mmio can be used directly, avoiding the sysbus API. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH v2 00/13] ppc/e500: Add support for two types of flash, cleanup

2022-10-03 Thread Philippe Mathieu-Daudé via
Hi Daniel, On 3/10/22 22:31, Bernhard Beschow wrote: Cover letter: ~ This series adds support for -pflash and direct SD card access to the PPC e500 boards. The idea is to increase compatibility with "real" firmware images where only the bare minimum of drivers is compiled in.

Re: [PATCH v2 07/13] hw/ppc/e500: Remove if statement which is now always true

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: Now that the MPC8544DS board also has a platform bus, the if statement is always true. Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- hw/ppc/e500.c | 30 ++

Re: [PATCH v2 13/13] hw/ppc/e500: Add Freescale eSDHC to e500 boards

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: Adds missing functionality to emulated e500 SOCs which increases the chance of given "real" firmware images to access SD cards. Signed-off-by: Bernhard Beschow --- docs/system/ppc/ppce500.rst | 13 + hw/ppc/Kconfig | 1 +

Re: [PATCH v2 08/13] hw/block/pflash_cfi01: Error out if device length isn't a power of two

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: According to the JEDEC standard the device length is communicated to an OS as an exponent (power of two). Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng --- hw/block/pflash_cfi01.c | 8 ++-- 1 file changed, 6 insertions(+), 2

Re: [PATCH v2 09/13] hw/ppc/e500: Implement pflash handling

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: Allows e500 boards to have their root file system reside on flash using only builtin devices located in the eLBC memory region. Note that the flash memory area is only created when a -pflash argument is given, and that the size is determined by the

Re: [PATCH v2 12/13] hw/sd/sdhci: Implement Freescale eSDHC device model

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: Will allow e500 boards to access SD cards using just their own devices. Signed-off-by: Bernhard Beschow --- hw/sd/sdhci.c | 147 +- include/hw/sd/sdhci.h | 3 + 2 files changed, 149 insertions(+), 1

Re: [PATCH v2 05/13] hw/ppc/mpc8544ds: Rename wrongly named method

2022-10-03 Thread Philippe Mathieu-Daudé via
On 3/10/22 22:31, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow --- hw/ppc/mpc8544ds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2] block: Refactor get_tmp_filename()

2022-09-24 Thread Philippe Mathieu-Daudé via
On 24/9/22 13:45, Bin Meng wrote: From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret =

Re: [PATCH v1 01/10] monitor: expose monitor_puts to rest of code

2022-09-21 Thread Philippe Mathieu-Daudé via
On 21/9/22 18:07, Alex Bennée wrote: This helps us construct strings elsewhere before echoing to the monitor. It avoids having to jump through hoops like: monitor_printf(mon, "%s", s->str); It will be useful in following patches but for now convert all existing plain "%s" printfs to use the

Re: [PATCH 5/9] exec/address-spaces: Wrap address space singletons into functions

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: In the next steps, these singletons will be resolved by turning them into attributes of the system bus. The system bus is already accessible via the global current_machine variable which will be made use of later in the wrapper functions. All changes

Re: [PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 07:15, Philippe Mathieu-Daudé wrote: On 20/9/22 01:17, Bernhard Beschow wrote: The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. I thought about this while reviewing the previous patch, ...

Re: [PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. I thought about this while reviewing the previous patch, ... Signed-off-by: Bernhard Beschow ---

Re: [PATCH 8/9] softmmu/physmem: Let SysBusState absorb memory region and address space singletons

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: These singletons are actually properties of the system bus but so far it hasn't been modelled that way. Fix this to make this relationship very obvious. The idea of the patch is to restrain futher proliferation of the use of get_system_memory() and

Re: [PATCH 6/9] target/loongarch/cpu: Remove unneeded include directive

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: The cpu is used in both user and system emulation context while sysbus.h is system-only. Remove it since it's not needed anyway. Furthermore, it would cause a compile error in the next commit. Signed-off-by: Bernhard Beschow ---

Re: [PATCH 3/9] hw/core/sysbus: Resolve main_system_bus singleton

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: In QEMU, a machine and the main_system_bus always go togehter. Usually the bus is part of the machine which suggsts to host it there. "together", "suggests" Since tere is already a current_machine singleton, all code that accesses the main_system_bus

Re: [PATCH 2/9] exec/hwaddr.h: Add missing include

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: The next commit would not compile w/o the include directive. Signed-off-by: Bernhard Beschow --- include/exec/hwaddr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/hwaddr.h b/include/exec/hwaddr.h index 8f16d179a8..616255317c

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to inherit from TYPE_MACHINE. This is an inconsistency which can cause undefined behavior such as memory corruption. Change SiFiveEState to inherit from MachineState since it is

[PATCH] block/qcow2-bitmap: Add missing cast to silent GCC error

2022-09-19 Thread Philippe Mathieu-Daudé via
Commit d1258dd0c8 ("qcow2: autoloading dirty bitmaps") added the set_readonly_helper() GFunc handler, correctly casting the gpointer user_data in both the g_slist_foreach() caller and the handler. Few commits later (commit 1b6b0562db), the handler is reused in qcow2_reopen_bitmaps_rw() but missing

Re: [PATCH 00/11] ppc/e500: Add support for two types of flash, cleanup

2022-09-18 Thread Philippe Mathieu-Daudé via
On 15/9/22 17:25, Bernhard Beschow wrote: This series adds support for -pflash and direct SD card access to the PPC e500 boards. The idea is to increase compatibility with "real" firmware images where only the bare minimum of drivers is compiled in. The series is structured as follows: Patches

Re: [PATCH 03/11] docs/system/ppc/ppce500: Add heading for networking chapter

2022-09-18 Thread Philippe Mathieu-Daudé via
On 15/9/22 17:25, Bernhard Beschow wrote: The sudden change of topics is slightly confusing and makes the networking information less visible. So separate the networking chapter to improve comprehensibility. Signed-off-by: Bernhard Beschow --- docs/system/ppc/ppce500.rst | 3 +++ 1 file

Re: [PATCH 08/11] hw/sd/sdhci-internal: Unexport ESDHC defines

2022-09-18 Thread Philippe Mathieu-Daudé via
On 15/9/22 17:25, Bernhard Beschow wrote: These defines aren't used outside of sdhci.c, so can be defined there. Signed-off-by: Bernhard Beschow --- hw/sd/sdhci-internal.h | 20 hw/sd/sdhci.c | 19 +++ 2 files changed, 19 insertions(+), 20

Re: [PATCH 02/11] hw/gpio/meson: Introduce dedicated config switch for hw/gpio/mpc8xxx

2022-09-18 Thread Philippe Mathieu-Daudé via
On 15/9/22 17:25, Bernhard Beschow wrote: Having a dedicated config switch makes dependency handling cleaner. Signed-off-by: Bernhard Beschow --- hw/gpio/Kconfig | 3 +++ hw/gpio/meson.build | 2 +- hw/ppc/Kconfig | 1 + 3 files changed, 5 insertions(+), 1 deletion(-)

Re: [PATCH 05/11] hw/ppc/e500: Remove if statement which is now always true

2022-09-18 Thread Philippe Mathieu-Daudé via
On 15/9/22 17:25, Bernhard Beschow wrote: Now that the MPC8544DS board also has a platform bus, the if statement was always true. s/was/is/. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 30 ++ hw/ppc/e500.h

Re: [PATCH 01/11] hw/ppc/meson: Allow e500 boards to be enabled separately

2022-09-18 Thread Philippe Mathieu-Daudé via
On 15/9/22 17:25, Bernhard Beschow wrote: Gives users more fine-grained control over what should be compiled into QEMU. Signed-off-by: Bernhard Beschow --- configs/devices/ppc-softmmu/default.mak | 3 ++- hw/ppc/Kconfig | 8 hw/ppc/meson.build

Re: [PATCH 5/7] block/nfs: Fix 32-bit Windows build

2022-09-17 Thread Philippe Mathieu-Daudé via
On 8/9/22 15:28, Bin Meng wrote: From: Bin Meng libnfs.h declares nfs_fstat() as the following for win32: int nfs_fstat(struct nfs_context *nfs, struct nfsfh *nfsfh, struct __stat64 *st); The 'st' parameter should be of type 'struct __stat64'. The codes happen to build

Re: [PATCH v5 13/13] hw/isa/vt82c686: Create rtc-time alias in boards instead

2022-09-16 Thread Philippe Mathieu-Daudé via
On 1/9/22 13:41, Bernhard Beschow wrote: According to good QOM practice, an object should only deal with objects of its own sub tree. Having devices create an alias on the machine object doesn't respect this good practice. To resolve this, create the alias in the machine's code. Signed-off-by:

Re: [PATCH v5 00/13] Instantiate VT82xx functions in host device

2022-09-16 Thread Philippe Mathieu-Daudé via
On 12/9/22 21:50, Bernhard Beschow wrote: Am 1. September 2022 11:41:14 UTC schrieb Bernhard Beschow : Testing done: * `qemu-system-ppc -machine pegasos2 -rtc base=localtime -device ati-vga,guest_hwcursor=true,romfile="" -cdrom morphos-3.17.iso -kernel morphos-3.17/boot.img` Boots

Re: [PATCH v5 11/13] hw/mips/fuloong2e: Inline vt82c686b_southbridge_init() and remove it

2022-09-16 Thread Philippe Mathieu-Daudé via
On 1/9/22 13:41, Bernhard Beschow wrote: The previous patches moved most of this function into the via-isa device model such that it has become fairly trivial. So inline it for simplicity. Suggested-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/mips/fuloong2e.c | 28

Re: [PATCH 2/2] vvfat: allow spaces in file names

2022-09-04 Thread Philippe Mathieu-Daudé via
On 3/9/22 18:23, Hervé Poussineau wrote: In R/W mode, files with spaces were never created on host side. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1176 Fixes: c79e243ed67683d6d06692bd7040f7394da178b0 Signed-off-by: Hervé Poussineau --- block/vvfat.c | 2 +- 1 file changed, 1

Re: [PATCH 2/8] qtest: Set "-net none" in qtest_init()

2022-09-04 Thread Philippe Mathieu-Daudé via
On 2/9/22 18:51, Juan Quintela wrote: This way, we don't have networking by default. If test needs it, configure it. Signed-off-by: Juan Quintela --- tests/qtest/bios-tables-test.c | 2 +- tests/qtest/libqtest.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) Reviewed-by:

Re: [PATCH 6/8] tests: Fix error strings

2022-09-04 Thread Philippe Mathieu-Daudé via
On 2/9/22 18:51, Juan Quintela wrote: They were copy-pasted from e1000e and never changed. Signed-off-by: Juan Quintela --- tests/qtest/e1000-test.c | 2 +- tests/qtest/es1370-test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-04 Thread Philippe Mathieu-Daudé via
Hi Linus, On 3/9/22 17:03, Linus Heckemann wrote: The previous implementation would iterate over the fid table for lookup operations, resulting in an operation with O(n) complexity on the number of open files and poor cache locality -- for nearly every open, stat, read, write, etc operation.

Re: [PATCH v3 3/3] util/aio-win32: Correct the event array size in aio_poll()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 24/8/22 10:52, Bin Meng wrote: From: Bin Meng WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS object handles. Correct the event array size in aio_poll() and add a assert() to ensure it does not cause out of bound access. Signed-off-by: Bin Meng Reviewed-by: Stefan Weil

Re: Error ret=-1 with EINTR in nbd_connect_systemd_socket_activation()

2022-07-12 Thread Philippe Mathieu-Daudé via
Cc'ing qemu-block@ On 11/7/22 08:38, Motohiro Kawahito wrote: Hi, I’d like to connect to an encrypted QCOW2 file by nbd_connect_systemd_socket_activation(), but I got ret=-1 with EINTR. The arg parameter I used is qemu-nbd --object secret,id=sec0,data=abc123 --image-opts

Re: [PATCH] qsd: Do not use error_report() before monitor_init

2022-06-10 Thread Philippe Mathieu-Daudé via
On 9/6/22 14:28, Hanna Reitz wrote: error_report() only works once monitor_init_globals_core() has been called, which is not the case when parsing the --daemonize option. Use fprintf(stderr, ...) instead. Fixes: 2525edd85fec53e23fda98974a15e3b3c8957596 ("qsd: Add --daemonize") Signed-off-by:

Re: [PATCH] tests/qtest: Reduce npcm7xx_sdhci test image size

2022-06-10 Thread Philippe Mathieu-Daudé via
On 9/6/22 23:41, Hao Wu wrote: Creating 1GB image for a simple qtest is unnecessary and could lead to failures. We reduce the image size to 1MB to reduce the test overhead. Signed-off-by: Hao Wu --- tests/qtest/npcm7xx_sdhci-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH 1/1] block: use 'unsigned' for in_flight field on driver state

2022-06-02 Thread Philippe Mathieu-Daudé via
On 30/5/22 12:39, Denis V. Lunev wrote: This patch makes in_flight field 'unsigned' for BDRVNBDState and MirrorBlockJob. This matches the definition of this field on BDS and is generically correct - we should never get negative value here. Signed-off-by: Denis V. Lunev CC: John Snow CC:

Re: [PATCH v2 00/25] hw/sd: Rework models for eMMC support

2022-05-31 Thread Philippe Mathieu-Daudé via
On 31/5/22 11:19, Cédric Le Goater wrote: On 5/30/22 21:37, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Rebase/respin of Cédric RFC: https://lore.kernel.org/qemu-devel/20220318132824.1134400-1-...@kaod.org/ (sorry it took me so long guys...) Pushed at

Re: [PATCH] hw/sd/sdhci: Block Size Register bits [14:12] is lost

2022-05-31 Thread Philippe Mathieu-Daudé via
On 21/3/22 06:56, Lu Gao wrote: Block Size Register bits [14:12] is SDMA Buffer Boundary, it is missed in register write, but it is needed in SDMA transfer. e.g. it will be used in sdhci_sdma_transfer_multi_blocks to calculate boundary_ variables. Missing this field will cause wrong operation

Re: -blockdev vs -snapshot bug

2022-05-31 Thread Philippe Mathieu-Daudé via
Cc'ing qemu-block@ On 13/5/22 20:54, Michael Tokarev wrote: Hi! Now here's something.. interesting. I tested -blockdev here with a real image.  This way: qemu-system-x86_64 ... -snapshot \  -blockdev qcow2,node-name=q,file.driver=file,file.filename=w.qcow2 \  -device ide-hd,drive=q I

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-31 Thread Philippe Mathieu-Daudé via
On 31/5/22 07:58, Cédric Le Goater wrote: On 5/30/22 19:40, Philippe Mathieu-Daudé wrote: On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to

Re: [PATCH v2 00/25] hw/sd: Rework models for eMMC support

2022-05-31 Thread Philippe Mathieu-Daudé via
On Tue, May 31, 2022 at 9:56 AM Philippe Mathieu-Daudé wrote: > On 31/5/22 08:31, Cédric Le Goater wrote: > > On 5/30/22 21:37, Philippe Mathieu-Daudé wrote: > >> I plan to queue patches 1-12 via sdmmc-next later this week. > >> > >> Cédric, if you are happy with this series, it should be easy

Re: [PATCH v2 14/25] hw/sd: Basis for eMMC support

2022-05-31 Thread Philippe Mathieu-Daudé via
On 30/5/22 21:38, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé I missed something during the cherry-pick, this should be: From: Cédric Le Goater The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. Signed-off-by: Cédric Le

Re: [PATCH v2 00/25] hw/sd: Rework models for eMMC support

2022-05-31 Thread Philippe Mathieu-Daudé via
On 31/5/22 08:31, Cédric Le Goater wrote: On 5/30/22 21:37, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Rebase/respin of Cédric RFC: https://lore.kernel.org/qemu-devel/20220318132824.1134400-1-...@kaod.org/ (sorry it took me so long guys...) Pushed at

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-30 Thread Philippe Mathieu-Daudé via
On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new QOM object class for EMMC devices. Signed-off-by: Vincent

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-30 Thread Philippe Mathieu-Daudé via
On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new QOM object class for EMMC devices. Signed-off-by: Vincent

Re: [RFC PATCH 07/17] hw/sd: Add sd_cmd_SEND_OP_CMD() handler

2022-05-30 Thread Philippe Mathieu-Daudé via
On 10/5/22 08:57, Cédric Le Goater wrote: On 5/9/22 23:12, Philippe Mathieu-Daudé wrote: On 18/3/22 14:28, Cédric Le Goater wrote: From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210624142209.1193073-9-f4...@amsat.org> Signed-off-by: Cédric Le Goater ---  

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-30 Thread Philippe Mathieu-Daudé via
Hi Cédric, On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new QOM object class for EMMC devices.

Re: [PATCH] hw/sd/sdcard: Return ILLEGAL for CMD19/CMD23 prior SD spec v3.01

2022-05-30 Thread Philippe Mathieu-Daudé via
On 9/5/22 16:29, Bin Meng wrote: On Mon, May 9, 2022 at 10:13 PM Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé CMD19 (SEND_TUNING_BLOCK) and CMD23 (SET_BLOCK_COUNT) were added in the Physical SD spec v3.01. When earlier spec version nits: it should be spec v3.00, despite the

Re: [PATCH] hw/nvme: deprecate the use-intel-id compatibility parameter

2022-05-30 Thread Philippe Mathieu-Daudé via
On 29/4/22 07:41, Klaus Jensen wrote: From: Klaus Jensen Since version 5.2 commit 6eb7a071292a ("hw/block/nvme: change controller pci id"), the emulated NVMe controller has defaulted to a non-Intel PCI identifier. Deprecate the compatibility parameter so we can get rid of it once and for all.

Re: [PATCH 1/6] scsi-disk: add FORMAT UNIT command

2022-05-30 Thread Philippe Mathieu-Daudé via
On 21/4/22 08:51, Mark Cave-Ayland wrote: When initialising a drive ready to install MacOS, Apple HD SC Setup first attempts to format the drive. Add a simple FORMAT UNIT command which simply returns success to allow the format to succeed. Signed-off-by: Mark Cave-Ayland ---

Re: [PATCH v2] hw/block/fdc-sysbus: Always mark sysbus floppy controllers as not having DMA

2022-05-30 Thread Philippe Mathieu-Daudé via
On 5/5/22 12:18, Peter Maydell wrote: The sysbus floppy controllers (devices sysbus-fdc and sun-fdtwo) don't support DMA. The core floppy controller code expects this to be indicated by setting FDCtrl::dma_chann to -1. This used to be done in the device instance_init functions

Re: [PATCH 1/4] hw/ide/atapi.c: Correct typos (CD-CDROM -> CD-ROM)

2022-05-30 Thread Philippe Mathieu-Daudé via
On 28/5/22 22:46, Lev Kujawski wrote: Signed-off-by: Lev Kujawski --- hw/ide/atapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 4/4] hw/ide/piix: Ignore writes of hardwired PCI command register bits

2022-05-30 Thread Philippe Mathieu-Daudé via
On 28/5/22 22:47, Lev Kujawski wrote: One method to enable PCI bus mastering for IDE controllers, often used by x86 firmware, is to write 0x7 to the PCI command register. Neither the PIIX3 specification nor actual hardware (a Tyan S1686D system) permit modification of the Memory Space Enable

Re: [PATCH 3/4] piix_ide_reset: Use pci_set_* functions instead of direct access

2022-05-30 Thread Philippe Mathieu-Daudé via
On 28/5/22 22:47, Lev Kujawski wrote: Eliminates the remaining TODOs in hw/ide/piix.c by: - Using pci_set_{size} functions to write the PIIX PCI configuration space instead of manipulating it directly as an array; and - Documenting default register values by reference to the controlling

Re: [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug()

2022-05-30 Thread Philippe Mathieu-Daudé via
On 13/5/22 20:09, Bernhard Beschow wrote: This function was declared in a generic and public header, implemented in a device-specific source file but only used in xen_platform. Given its 'aux' parameter, this function is more xen-specific than piix-specific. Also, the hardcoded magic constants

Re: [PULL 0/9] Block patches

2022-05-28 Thread Philippe Mathieu-Daudé via
On Thu, May 12, 2022 at 12:29 AM Philippe Mathieu-Daudé wrote: > > Hi Stefan, Nicolas, > > > Nicolas Saenz Julienne (3): > > Introduce event-loop-base abstract class > > util/main-loop: Introduce the main loop into QOM > > util/event-loop-base: Introduce options to set the thread pool size

Re: [PATCH 2/2] coroutine: Revert to constant batch size

2022-05-12 Thread Philippe Mathieu-Daudé via
Hi Hiroki, On Thu, May 12, 2022 at 8:57 AM 成川 弘樹 wrote: > > Thank you for your fix. > > I confirmed that after applying this patch, my intended performance > improvement by 4c41c69e is still kept in our environment. Is that equivalent to a formal Tested-by: Hiroki Narukawa tag? > On

Re: [PULL 0/9] Block patches

2022-05-11 Thread Philippe Mathieu-Daudé via
Hi Stefan, Nicolas, On Mon, May 9, 2022 at 3:14 PM Stefan Hajnoczi wrote: > > The following changes since commit 554623226f800acf48a2ed568900c1c968ec9a8b: > > Merge tag 'qemu-sparc-20220508' of https://github.com/mcayland/qemu into > staging (2022-05-08 17:03:26 -0500) > > are available in

Re: [RFC PATCH 17/17] hw/sd: Subtract bootarea size from blk

2022-05-09 Thread Philippe Mathieu-Daudé via
Hi Joel, On 18/3/22 14:28, Cédric Le Goater wrote: From: Joel Stanley The userdata size is derived from the file the user passes on the command line, but we must take into account the boot areas. Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 6 ++ 1

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-09 Thread Philippe Mathieu-Daudé via
Hi Cédric, On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new QOM object class for EMMC devices.

Re: [RFC PATCH 07/17] hw/sd: Add sd_cmd_SEND_OP_CMD() handler

2022-05-09 Thread Philippe Mathieu-Daudé via
On 18/3/22 14:28, Cédric Le Goater wrote: From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210624142209.1193073-9-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) @@

Re: [RFC PATCH 10/17] hw/sd: Add sd_cmd_SEND_TUNING_BLOCK() handler

2022-05-09 Thread Philippe Mathieu-Daudé via
On 18/3/22 14:28, Cédric Le Goater wrote: From: Joel Stanley Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index

Re: [PATCH 2/2] .gitlab-ci.d: export meson testlog.txt as an artifact

2022-05-09 Thread Philippe Mathieu-Daudé via
On 9/5/22 14:41, Daniel P. Berrangé wrote: When running 'make check' we only get a summary of progress on the console. Fortunately meson/ninja have saved the raw test output to a logfile. Exposing this log will make it easier to debug failures that happen in CI. Signed-off-by: Daniel P.

Re: [PATCH v7 00/22] host: Support macOS 12

2022-05-09 Thread Philippe Mathieu-Daudé via
On 3/5/22 11:40, Claudio Fontana wrote: On 3/7/22 12:17 AM, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Few patches to be able to build QEMU on macOS 12 (Monterey). Missing review: 0006-hvf-Fix-OOB-write-in-RDTSCP-instruction-decode.patch

Re: [PATCH-for-7.0 v2] block-qdict: Fix -Werror=maybe-uninitialized build failure

2022-03-17 Thread Philippe Mathieu-Daudé via
On Wed, Mar 16, 2022 at 3:52 PM Markus Armbruster wrote: > > Murilo Opsfelder Araújo writes: > > > Hi, Philippe. > > > > On Monday, March 14, 2022 10:47:11 AM -03 Philippe Mathieu-Daudé wrote: > >> On 11/3/22 23:16, Murilo Opsfelder Araujo wrote: > >> > Building QEMU on Fedora 37 (Rawhide

Re: [PATCH v2] tests/qemu-iotests: Rework the checks and spots using GNU sed

2022-02-16 Thread Philippe Mathieu-Daudé via
On 16/2/22 13:54, Thomas Huth wrote: Instead of failing the iotests if GNU sed is not available (or skipping them completely in the check-block.sh script), it would be better to simply skip the bash-based tests that rely on GNU sed, so that the other tests could still be run. Thus we now

Re: [PATCH 1/4] python/utils: add enboxify() text decoration utility

2022-02-15 Thread Philippe Mathieu-Daudé via
On 16/2/22 00:53, John Snow wrote: On Tue, Feb 15, 2022 at 5:55 PM Eric Blake wrote: On Tue, Feb 15, 2022 at 05:08:50PM -0500, John Snow wrote: print(enboxify(msg, width=72, name="commit message")) ┏━ commit message ━┓ ┃ enboxify() takes a

Re: [PATCH v5 10/16] audio/coreaudio: Remove a deprecation warning on macOS 12

2022-02-14 Thread Philippe Mathieu-Daudé via
On 15/2/22 07:53, Akihiko Odaki wrote: On Tue, Feb 15, 2022 at 3:57 AM Philippe Mathieu-Daudé wrote: When building on macOS 12 we get: audio/coreaudio.c:50:5: error: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Werror,-Wdeprecated-declarations]

[PATCH v5 13/16] ui/cocoa: Add Services menu

2022-02-14 Thread Philippe Mathieu-Daudé via
From: Akihiko Odaki Services menu functionality of Cocoa is described at: https://developer.apple.com/design/human-interface-guidelines/macos/extensions/services/ Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id:

[PATCH v5 11/16] audio/dbus: Fix building with modules on macOS

2022-02-14 Thread Philippe Mathieu-Daudé via
When configuring QEMU with --enable-modules we get on macOS: --- stderr --- Dependency ui-dbus cannot be satisfied ui-dbus depends on pixman and opengl, so add these dependencies to audio-dbus. Fixes: 739362d420 ("audio: add "dbus" audio backend") Reviewed-by: Li Zhang Signed-off-by:

[PATCH v5 05/16] hvf: Fix OOB write in RDTSCP instruction decode

2022-02-14 Thread Philippe Mathieu-Daudé via
From: Cameron Esfahani A guest could craft a specific stream of instructions that will have QEMU write 0xF9 to inappropriate locations in memory. Add additional asserts to check for this. Generate a #UD if there are more than 14 prefix bytes. Found by Julian Stecklina Signed-off-by: Cameron

[PATCH v5 04/16] hvf: Use standard CR0 and CR4 register definitions

2022-02-14 Thread Philippe Mathieu-Daudé via
From: Cameron Esfahani No need to have our own definitions of these registers. Signed-off-by: Cameron Esfahani Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/vmx.h | 17 + target/i386/hvf/x86.c | 6 +++---

[PATCH v5 15/16] lcitool: refresh

2022-02-14 Thread Philippe Mathieu-Daudé via
Signed-off-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/ubuntu1804.docker | 2 -- tests/docker/dockerfiles/ubuntu2004.docker | 2 -- 2 files changed, 4 deletions(-) diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker index

[PATCH v5 16/16] gitlab-ci: Support macOS 12 via cirrus-run

2022-02-14 Thread Philippe Mathieu-Daudé via
Add support for macOS 12 build on Cirrus-CI, similarly to commit 0e103a65ba1 ("gitlab: support for ... macOS 11 via cirrus-run"), but with the following differences: - Enable modules (configure --enable-modules) - Do not run softfloat3 tests (make check-softfloat) - Run Aarch64 qtests instead

[PATCH v5 14/16] ui/cocoa: Do not alert even without block devices

2022-02-14 Thread Philippe Mathieu-Daudé via
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Message-Id: <20220213021418.2155-1-akihiko.od...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- ui/cocoa.m | 5 - 1 file changed, 5 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index becca58cb7..6cadd43309 100644 ---

[PATCH v5 08/16] hvf: Remove deprecated hv_vcpu_flush() calls

2022-02-14 Thread Philippe Mathieu-Daudé via
When building on macOS 11 [*], we get: In file included from ../target/i386/hvf/hvf.c:59: ../target/i386/hvf/vmx.h:174:5: error: 'hv_vcpu_flush' is deprecated: first deprecated in macOS 11.0 - This API has no effect and always returns HV_UNSUPPORTED [-Werror,-Wdeprecated-declarations]

[PATCH v5 10/16] audio/coreaudio: Remove a deprecation warning on macOS 12

2022-02-14 Thread Philippe Mathieu-Daudé via
When building on macOS 12 we get: audio/coreaudio.c:50:5: error: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Werror,-Wdeprecated-declarations] kAudioObjectPropertyElementMaster ^

[PATCH v5 09/16] block/file-posix: Remove a deprecation warning on macOS 12

2022-02-14 Thread Philippe Mathieu-Daudé via
When building on macOS 12 we get: block/file-posix.c:3335:18: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations] kernResult = IOMasterPort( MACH_PORT_NULL, ); ^~~~ IOMainPort Replace by

[PATCH v5 12/16] ui/cocoa: Remove allowedFileTypes restriction in SavePanel

2022-02-14 Thread Philippe Mathieu-Daudé via
setAllowedFileTypes is deprecated in macOS 12. Per Akihiko Odaki [*]: An image file, which is being chosen by the panel, can be a raw file and have a variety of file extensions and many are not covered by the provided list (e.g. "udf"). Other platforms like GTK can provide an option to

[PATCH v5 07/16] hvf: Make hvf_get_segments() / hvf_put_segments() local

2022-02-14 Thread Philippe Mathieu-Daudé via
Both hvf_get_segments/hvf_put_segments() functions are only used within x86hvf.c: do not declare them as public API. Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/x86hvf.c | 4 ++-- target/i386/hvf/x86hvf.h | 2 -- 2 files

[PATCH v5 06/16] hvf: Enable RDTSCP support

2022-02-14 Thread Philippe Mathieu-Daudé via
From: Cameron Esfahani Pass through RDPID and RDTSCP support in CPUID if host supports it. Correctly detect if CPU_BASED_TSC_OFFSET and CPU_BASED2_RDTSCP would be supported in primary and secondary processor-based VM-execution controls. Enable RDTSCP in secondary processor controls if RDTSCP

[PATCH v5 03/16] tests/fp/berkeley-testfloat-3: Ignore ignored #pragma directives

2022-02-14 Thread Philippe Mathieu-Daudé via
Since we already use -Wno-unknown-pragmas, we can also use -Wno-ignored-pragmas. This silences hundred of warnings using clang 13 on macOS Monterey: [409/771] Compiling C object tests/fp/libtestfloat.a.p/berkeley-testfloat-3_source_test_az_f128_rx.c.o

[PATCH v5 01/16] MAINTAINERS: Add Akihiko Odaki to macOS-relateds

2022-02-14 Thread Philippe Mathieu-Daudé via
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Christian Schoenebeck Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220213021215.1974-1-akihiko.od...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v5 02/16] configure: Allow passing extra Objective C compiler flags

2022-02-14 Thread Philippe Mathieu-Daudé via
We can pass C/CPP/LD flags via CFLAGS/CXXFLAGS/LDFLAGS environment variables, or via configure --extra-cflags / --extra-cxxflags / --extra-ldflags options. Provide similar behavior for Objective C: use existing flags from $OBJCFLAGS, or passed via --extra-objcflags. Signed-off-by: Philippe

[PATCH v5 00/16] host: Support macOS 12

2022-02-14 Thread Philippe Mathieu-Daudé via
Few patches to be able to build QEMU on macOS 12 (Monterey). This basically consists of adapting deprecated APIs. CI job added to avoid bitrotting. Since v4: - Use MAC_OS_X_VERSION_MIN_REQUIRED definition (Akihiko) - Include patches from Akihiko Since v3: - Fix --enable-modules - Ignore

Re: [PATCH] ui/cocoa: Do not alert even without block devices

2022-02-14 Thread Philippe Mathieu-Daudé via
On 13/2/22 03:14, Akihiko Odaki wrote: Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 5 - 1 file changed, 5 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index ac18e14ce01..271a2676026 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1715,11 +1715,6 @@ static void

Re: bdrv_is_allocated

2022-02-13 Thread Philippe Mathieu-Daudé via
On 13/2/22 15:24, 沈梦姣 wrote: Hi, I’m trying to understand this function, but seems no note in the header file, could anyone help explain this function? It will be great if there is an example. Thanks in advance! thanks Cc'ing qemu-block@ list.

Re: [PATCH] hw/block/fdc-isa: Respect QOM properties when building AML

2022-02-09 Thread Philippe Mathieu-Daudé via
On 9/2/22 20:15, Bernhard Beschow wrote: Other ISA devices such as serial-isa use the properties in their build_aml functions. fdc-isa not using them is probably an oversight. Signed-off-by: Bernhard Beschow --- hw/block/fdc-isa.c | 11 +++ 1 file changed, 7 insertions(+), 4

Re: [PATCH 1/6] tests/qemu-iotests: Improve the check for GNU sed

2022-02-08 Thread Philippe Mathieu-Daudé via
On 8/2/22 13:38, Thomas Huth wrote: On 08/02/2022 13.28, Hanna Reitz wrote: On 08.02.22 13:13, Thomas Huth wrote: On 08/02/2022 12.46, Hanna Reitz wrote: On 08.02.22 11:13, Thomas Huth wrote: Instead of failing the iotests if GNU sed is not available (or skipping them completely in the

Re: [PATCH 2/6] tests/qemu-iotests/meson.build: Improve the indentation

2022-02-08 Thread Philippe Mathieu-Daudé via
On 8/2/22 11:13, Thomas Huth wrote: By using subdir_done(), we can get rid of one level of indentation in this file. This will make it easier to add more conditions to skip the iotests in future patches. Signed-off-by: Thomas Huth --- tests/qemu-iotests/meson.build | 61

Re: [PATCH] block/vvfat: Fix memleaks in vvfat_close()

2022-02-07 Thread Philippe Mathieu-Daudé via
On 7/2/22 12:37, Hanna Reitz wrote: qcow_filename and used_clusters are allocated in enable_write_target(), but freed only in the error path of vvfat_open(). Free them in vvfat_close(), too. Signed-off-by: Hanna Reitz --- block/vvfat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v3 2/2] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Philippe Mathieu-Daudé via
When building on FreeBSD we get: [816/6851] Compiling C object libblockdev.fa.p/block_export_fuse.c.o ../block/export/fuse.c:628:16: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' if (mode & FALLOC_FL_KEEP_SIZE) { ^ ../block/export/fuse.c:651:16: error:

[PATCH v3 1/2] block/export/fuse: Rearrange if-else-if ladder in fuse_fallocate()

2022-02-01 Thread Philippe Mathieu-Daudé via
In order to safely maintain a mixture of #ifdef'ry with if-else-if ladder, rearrange the last statement (!mode) first. Since it is mutually exclusive with the other conditions, checking it first doesn't make any logical difference, but allows to add #ifdef'ry around in a more cleanly way.

[PATCH v3 0/2] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Philippe Mathieu-Daudé via
Since v2: - Rearrange if-else-if ladder first (Kevin) Philippe Mathieu-Daudé (2): block/export/fuse: Rearrange if-else-if ladder in fuse_fallocate() block/export/fuse: Fix build failure on FreeBSD block/export/fuse.c | 45 + 1 file changed, 25

Re: [RFC PATCH] block/export/fuse: Fix build failure on FreeBSD

2022-02-01 Thread Philippe Mathieu-Daudé via
On 1/27/22 17:15, Kevin Wolf wrote: > Am 22.01.2022 um 14:49 hat Philippe Mathieu-Daudé geschrieben: >> When building on FreeBSD we get: >> >> [816/6851] Compiling C object libblockdev.fa.p/block_export_fuse.c.o >> ../block/export/fuse.c:628:16: error: use of undeclared identifier >>

Re: [PATCH] block.h: remove outdated comment

2022-01-31 Thread Philippe Mathieu-Daudé via
On 31/1/22 13:56, Emanuele Giuseppe Esposito wrote: The comment "disk I/O throttling" doesn't make any sense at all any more. It was added in commit 0563e191516 to describe bdrv_io_limits_enable()/disable(), which were removed in commit 97148076, so the comment is just a forgotten leftover.

Re: [PATCH] qapi/block: Cosmetic change in BlockExportType schema

2022-01-30 Thread Philippe Mathieu-Daudé via
played with the git --from option to not appear in the list as '"Philippe Mathieu-Daudé via" ': https://lore.kernel.org/qemu-devel/efc5f304-f3d2-ff7b-99a6-673595ff0...@amsat.org/ by using a different sendemail.from (removing the acute in my lastname) to force a correct author.from. git

  1   2   >