Re: [PATCH v28 03/17] vfio: Add save and load functions for VFIO PCI devices

2020-10-24 Thread Yan Zhao
On Sat, Oct 24, 2020 at 08:16:30AM -0600, Alex Williamson wrote: > On Sat, 24 Oct 2020 19:53:39 +0800 > Yan Zhao wrote: > > > hi > > when I migrating VFs, the PCI_COMMAND is not properly saved. and the > > target side would meet below bug > > root@tester:~# [ 189.360671] ++>> reset start

Re: [PATCH v3 00/18] Support Multifd for RDMA migration

2020-10-24 Thread Zheng Chuan
On 2020/10/24 3:02, Dr. David Alan Gilbert wrote: > * Zheng Chuan (zhengch...@huawei.com) wrote: >> >> >> On 2020/10/21 17:25, Zhanghailiang wrote: >>> Hi zhengchuan, >>> -Original Message- From: zhengchuan Sent: Saturday, October 17, 2020 12:26 PM To: quint...@redhat

Re: [RFC PATCH 4/4] tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

2020-10-24 Thread Bin Meng
Hi Niek, On Sun, Oct 25, 2020 at 5:01 AM Niek Linnenbank wrote: > > Hi Philippe, > > I have ran this series with the new Armbian 20.08 test and noticed this > failure: > > -console: /dev/mmcblk0p1: The filesystem size (according to the superrandom: > fast init done > console: block) is 264192 b

Re: [PATCH 01/20] loader.c: Add support Motrola S-record format.

2020-10-24 Thread Philippe Mathieu-Daudé
Cc'ing Alistair and Su Hang. On 8/27/20 2:38 PM, Yoshinori Sato wrote: Signed-off-by: Yoshinori Sato --- include/hw/loader.h | 14 +++ hw/core/loader.c| 208 2 files changed, 222 insertions(+) diff --git a/include/hw/loader.h b/include/hw/l

Re: [PATCH 0/3] sh4: Trivial clean-ups for sh_timer.c

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/20/20 5:39 PM, Thomas Huth wrote: Fix coding style, add fallthrough anonotations and remove superfluous break statements in hw/timer/sh_timer.c. Thomas Huth (3): hw/timer/sh_timer: Coding style clean-up hw/timer/sh_timer: Silence warnings about missing fallthrough statements

Re: [PATCH V2 09/14] sh4/: fix some comment spelling errors

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/9/20 8:44 AM, zhaolichang wrote: I found that there are many spelling errors in the comments of qemu/target/sh4. I used spellcheck to check the spelling errors and found some errors in the folder. Signed-off-by: zhaolichang Reviewed-by: David Edmondson Reviewed-by: Philippe Mathieu-Daud

Re: [PATCH] tests/acceptance: expand Orange Pi PC SD images for NetBSD, Armbian above nearest power of two

2020-10-24 Thread Philippe Mathieu-Daudé
Hi Niek, On 10/24/20 11:52 PM, Niek Linnenbank wrote: The acceptance tests for the Orange Pi PC need to expand the SD card images to a size which is a power of two. As Qemu uses the size of the SD image file as well for the size of the emulated SD card, this can sometimes give problems for guest

Re: [PATCH 12/20] hw/rx/rx62n: Use New SCI module.

2020-10-24 Thread Philippe Mathieu-Daudé
On 8/27/20 2:38 PM, Yoshinori Sato wrote: Signed-off-by: Yoshinori Sato --- include/hw/rx/rx62n.h | 2 +- hw/rx/rx62n.c | 7 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/hw/rx/rx62n.h b/include/hw/rx/rx62n.h index 1182ca24de..f463148799 100644 --- a/

[Bug 1901359] [NEW] ignore bit 0 in pci CONFIG_ADDRESS register write for Type 1 access

2020-10-24 Thread cinap_lenrek
Public bug reported: I'v recently stumbled upon a bug in the Plan9 PCI config space access routines for config mode #1. The code used to set bit 0 in the CONFIG_ADDRESS register for a Type 1 access. This was most likely a misreading of the PCI local bus specification on our side. However, in th

Re: [PATCH 08/20] hw/timer: Renesas TMU/CMT module.

2020-10-24 Thread Philippe Mathieu-Daudé
On 8/27/20 2:38 PM, Yoshinori Sato wrote: TMU - SH4 Timer module. CMT - Compare and match timer used by some Renesas MCUs. The two modules have similar interfaces and have been merged. Signed-off-by: Yoshinori Sato --- include/hw/timer/renesas_timer.h | 103 + hw/timer/renesas_timer.c

Re: [PATCH 05/20] hw/rx: Add RX62N Clock generator

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/24/20 11:56 PM, Philippe Mathieu-Daudé wrote: On 8/27/20 2:38 PM, Yoshinori Sato wrote: This module generated core and peripheral clock. Signed-off-by: Yoshinori Sato ---   include/hw/rx/rx62n-cpg.h |  72   include/hw/rx/rx62n.h |   5 +-   hw/rx/rx62n-cpg.c | 344 +++

Re: [PATCH 05/20] hw/rx: Add RX62N Clock generator

2020-10-24 Thread Philippe Mathieu-Daudé
On 8/27/20 2:38 PM, Yoshinori Sato wrote: This module generated core and peripheral clock. Signed-off-by: Yoshinori Sato --- include/hw/rx/rx62n-cpg.h | 72 include/hw/rx/rx62n.h | 5 +- hw/rx/rx62n-cpg.c | 344 ++ hw/rx/rx62n.c

[PATCH] tests/acceptance: expand Orange Pi PC SD images for NetBSD, Armbian above nearest power of two

2020-10-24 Thread Niek Linnenbank
The acceptance tests for the Orange Pi PC need to expand the SD card images to a size which is a power of two. As Qemu uses the size of the SD image file as well for the size of the emulated SD card, this can sometimes give problems for guests that assume a certain minimum size of the SD card. Thi

Re: Should we keep using Avocado for functional testing? (was: Re: [PULL 22/23] hw/sd: Fix incorrect populated function switch status data structure)

2020-10-24 Thread Niek Linnenbank
Hi Philippe, On Fri, Oct 23, 2020 at 11:34 AM Philippe Mathieu-Daudé wrote: > On 10/23/20 11:23 AM, Philippe Mathieu-Daudé wrote: > > On 10/23/20 4:02 AM, Bin Meng wrote: > >> Hi Niek, > >> > >> On Thu, Oct 22, 2020 at 11:20 PM Niek Linnenbank > >> wrote: > >>> > >>> Hi Bin, Philippe, > >>> > >

Re: [PATCH 11/20] hw/char: Renesas SCI module.

2020-10-24 Thread Philippe Mathieu-Daudé
Cc'ing Marc-André, maintainer of character devices. On 8/27/20 2:38 PM, Yoshinori Sato wrote: This module supported SCI / SCIa / SCIF. Hardware manual. SCI / SCIF https://www.renesas.com/us/en/doc/products/mpumcu/001/r01uh0457ej0401_sh7751.pdf SCIa https://www.renesas.com/us/en/doc/products/mpu

Re: [PATCH 16/20] hw/net: Add Renesas On-chip Ethernet MAC

2020-10-24 Thread Philippe Mathieu-Daudé
Cc'ing Jason Wang, maintainer of network devices. On 8/27/20 2:38 PM, Yoshinori Sato wrote: Signed-off-by: Yoshinori Sato --- include/hw/net/renesas_eth.h | 57 +++ hw/net/renesas_eth.c | 875 +++ hw/net/Kconfig | 5 + hw/net/meson.b

Re: [PATCH 06/20] hw/timer: Renesas 8bit timer emulation.

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/24/20 11:27 PM, Philippe Mathieu-Daudé wrote: On 8/27/20 2:38 PM, Yoshinori Sato wrote: Rewrite for clock API. Signed-off-by: Yoshinori Sato ---   include/hw/timer/renesas_tmr.h  |  55   include/hw/timer/renesas_tmr8.h |  67   hw/timer/renesas_tmr.c  | 477 -

Re: [PATCH 06/20] hw/timer: Renesas 8bit timer emulation.

2020-10-24 Thread Philippe Mathieu-Daudé
On 8/27/20 2:38 PM, Yoshinori Sato wrote: Rewrite for clock API. Signed-off-by: Yoshinori Sato --- include/hw/timer/renesas_tmr.h | 55 include/hw/timer/renesas_tmr8.h | 67 hw/timer/renesas_tmr.c | 477 hw/timer/renesas_tmr8.c | 5

Re: [RFC PATCH 1/4] Revert "hw/sd: Fix incorrect populated function switch status data structure"

2020-10-24 Thread Niek Linnenbank
Tested-by: Niek Linnenbank Reviewed-by: Niek Linnenbank On Fri, Oct 23, 2020 at 3:18 PM Philippe Mathieu-Daudé wrote: > This reverts commit b638627c723a8d0d2bb73489bc6bf9ff09b8d53a. > > Currently booting U-Boot on the Orange Pi PC we get: > > console: U-Boot SPL 2020.04-armbian (Sep 02 2020

Re: [RFC PATCH 2/4] tests/acceptance: Allow running Orange Pi test using cached artifacts

2020-10-24 Thread Niek Linnenbank
As a temporary solution this should be fine, until we have decided on which reliable storage location to use. Reviewed-by: Niek Linnenbank On Fri, Oct 23, 2020 at 3:18 PM Philippe Mathieu-Daudé wrote: > Unfortunately the Armbian 19.11.3 image has been removed from the > dl.armbian.com file ser

Re: [RFC PATCH 4/4] tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

2020-10-24 Thread Niek Linnenbank
Hi Philippe, I have ran this series with the new Armbian 20.08 test and noticed this failure: -console: /dev/mmcblk0p1: The filesystem size (according to the superrandom: fast init done console: block) is 264192 blocks console: The physical size of the device is 261120 blocks console: Either the

Re: [RFC PATCH v2] hw/display/tcx: Allow 64-bit accesses to framebuffer stippler and blitter

2020-10-24 Thread Philippe Mathieu-Daudé
On 8/30/20 9:32 AM, Mark Cave-Ayland wrote: On 29/08/2020 17:45, Philippe Mathieu-Daudé wrote: Le sam. 29 août 2020 18:14, Michael mailto:macallan1...@gmail.com>> a écrit : Hello, since I wrote the NetBSD code in question, here are my 2 cent: On Sat, 29 Aug 2020 08:41:43 -0700

[PATCH v3] hw/display/tcx: Allow 64-bit accesses to framebuffer stippler and blitter

2020-10-24 Thread Philippe Mathieu-Daudé
The S24/TCX datasheet is listed as "Unable to locate" on [1]. However the NetBSD revision 1.32 of the driver introduced 64-bit accesses to the stippler and blitter [2]. It is safe to assume these memory regions are 64-bit accessible. QEMU implementation is 32-bit, so fill the 'impl' fields. Micha

Re: [PATCH] sabre: increase number of PCI bus IRQs from 32 to 64

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/21/20 11:27 AM, Mark Cave-Ayland wrote: On 11/10/2020 09:13, Mark Cave-Ayland wrote: The rework of the sabre IRQs in commit 6864fa3897 "sun4u: update PCI topology to include simba PCI bridges" changed the IRQ routing so that both PCI and legacy OBIO IRQs are routed through the sabre PCI

[PATCH v2 2/2] pci: Assert irqnum is between 0 and bus->nirqs in pci_bus_change_irq_level

2020-10-24 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland These assertions similar to those in the adjacent pci_bus_get_irq_level() function ensure that irqnum lies within the valid PCI bus IRQ range. Signed-off-by: Mark Cave-Ayland Message-Id: <20201011082022.3016-1-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Philippe Mathieu

[PATCH v2 1/2] hw/pci: Extract pci_bus_change_irq_level() from pci_change_irq_level()

2020-10-24 Thread Philippe Mathieu-Daudé
Extract pci_bus_change_irq_level() from pci_change_irq_level() to make it clearer it operates on the bus. Reported-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé --- hw/pci/pci.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c

[PATCH v2 0/2] pci: assert that irqnum is between 0 and bus->nirqs in pci_change_irq_level()

2020-10-24 Thread Philippe Mathieu-Daudé
Respin of Mark's patch: https://www.mail-archive.com/qemu-devel@nongnu.org/msg749459.html Supersedes: <20201011082022.3016-1-mark.cave-ayl...@ilande.co.uk> Mark Cave-Ayland (1): pci: Assert irqnum is between 0 and bus->nirqs in pci_bus_change_irq_level Philippe Mathieu-Daudé (1): hw/pci:

Re: [PATCH v28 07/17] vfio: Register SaveVMHandlers for VFIO device

2020-10-24 Thread Kirti Wankhede
On 10/24/2020 4:56 PM, Yan Zhao wrote: On Fri, Oct 23, 2020 at 04:10:33PM +0530, Kirti Wankhede wrote: Define flags to be used as delimiter in migration stream for VFIO devices. Added .save_setup and .save_cleanup functions. Map & unmap migration region from these functions at source during s

Re: [PATCH] pci: assert that irqnum is between 0 and bus->nirqs in pci_change_irq_level()

2020-10-24 Thread Philippe Mathieu-Daudé
+Igor/Julia On 10/11/20 10:27 AM, Mark Cave-Ayland wrote: On 11/10/2020 09:20, Mark Cave-Ayland wrote: These assertions similar to those in the adjacent pci_bus_get_irq_level() function ensure that irqnum lies within the valid PCI bus IRQ range. Signed-off-by: Mark Cave-Ayland --- This wou

Re: [PATCH v28 05/17] vfio: Add VM state change handler to know state of VM

2020-10-24 Thread Kirti Wankhede
On 10/23/2020 5:02 PM, Cornelia Huck wrote: On Fri, 23 Oct 2020 16:10:31 +0530 Kirti Wankhede wrote: VM state change handler is called on change in VM's state. Based on VM state, VFIO device state should be changed. Added read/write helper functions for migration region. Added function to s

Re: [PATCH v28 03/17] vfio: Add save and load functions for VFIO PCI devices

2020-10-24 Thread Alex Williamson
On Sun, 25 Oct 2020 01:18:37 +0530 Kirti Wankhede wrote: > On 10/24/2020 7:46 PM, Alex Williamson wrote: > > On Sat, 24 Oct 2020 19:53:39 +0800 > > Yan Zhao wrote: > > > >> hi > >> when I migrating VFs, the PCI_COMMAND is not properly saved. and the > >> target side would meet below bug > >>

Re: [PATCH v28 04/17] vfio: Add migration region initialization and finalize function

2020-10-24 Thread Kirti Wankhede
On 10/23/2020 4:54 PM, Cornelia Huck wrote: On Fri, 23 Oct 2020 16:10:30 +0530 Kirti Wankhede wrote: Whether the VFIO device supports migration or not is decided based of migration region query. If migration region query is successful and migration region initialization is successful then m

Re: [PATCH 3/3] hw/timer/sh_timer: Remove superfluous "break" statements

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/20/20 5:39 PM, Thomas Huth wrote: hw_error() is marked as QEMU_NORETURN, so the "break" statements after this function are just dead code. Signed-off-by: Thomas Huth --- hw/timer/sh_timer.c | 3 --- 1 file changed, 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 2/3] hw/timer/sh_timer: Silence warnings about missing fallthrough statements

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/20/20 5:39 PM, Thomas Huth wrote: When compiling with -Werror=implicit-fallthrough, gcc complains about missing fallthrough annotations in this file. Looking at the code, the fallthrough is very likely intended here, so add some comments to silence the compiler warnings. Fixes: cd1a3f684

Re: [PATCH 1/3] hw/timer/sh_timer: Coding style clean-up

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/20/20 5:39 PM, Thomas Huth wrote: Replace TAB characters with spaces, put code after case-statement on separate lines and add some curly braces in related lines to keep checkpatch.pl happy. Signed-off-by: Thomas Huth --- hw/timer/sh_timer.c | 89 +

Re: [PATCH 02/15] python/qmp: add qom script entry points

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/21/20 8:51 PM, John Snow wrote: Add the 'qom', 'qom-set', 'qom-get', 'qom-list', and 'qom-tree' scripts to the qemu.qmp package. When you install this package, these scripts will become available on your command line. Signed-off-by: John Snow --- python/setup.cfg | 8 1 file c

Re: [PATCH 03/15] scripts/qmp: redirect qom-xxx scripts to python/qemu/qmp/

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/21/20 8:51 PM, John Snow wrote: Redirect to the new qom scripts. These forwarders can be deleted eventually when there has been more time for the dust on the Python packaging to settle and people understand how to find these commands. Note: You can run these by setting $PYTHONPATH in your

Re: [PATCH 04/15] scripts/qom-fuse: apply isort rules

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/21/20 8:51 PM, John Snow wrote: Hint: you can use symlinks to create qom_fuse.py in python/qemu/qmp/ and point to scripts/qom-fuse to apply the standard linting rules to this script. Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 12 +--- 1 file changed, 9 insertions(+), 3

Re: [PATCH 14/15] scripts/qom-fuse: add redirection shim to python/qemu/qmp/qom-fuse.py

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/21/20 8:52 PM, John Snow wrote: By leaving the script absent for a commit, git-blame travels to the new file instead of staying on the shim. Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 11 +++ 1 file changed, 11 insertions(+) create mode 100755 scripts/qmp/qom-fuse

Re: [PATCH 07/15] scripts/qom-fuse: Apply pylint rules

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/21/20 8:52 PM, John Snow wrote: - Catch specific exceptions from QMP - Reraise errors with explicit context - method parameters should match parent's names Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 16 1 file changed, 8 insertions(+), 8 deletions(-) Reviewe

Re: [PATCH 11/15] scripts/qom-fuse: ensure QOMFuse.read always returns bytes

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/21/20 8:52 PM, John Snow wrote: - Use FuseOSError to signal ENOENT instead of returning it - Wrap qom-get in str(), as we don't always know its type - The empty return should be b'', not ''. Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 6 +++--- 1 file changed, 3 insertions(+),

Re: [PATCH 13/15] scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/21/20 8:52 PM, John Snow wrote: Move qom-fuse over to the python package now that it passes the linter. Update the import paradigms so that it passes. Signed-off-by: John Snow --- scripts/qmp/qom-fuse => python/qemu/qmp/qom_fuse.py | 12 ++-- 1 file changed, 2 insertions(+), 10

Re: [PATCH 03/16] util/vfio-helpers: Pass minimum page size to qemu_vfio_open_pci()

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/22/20 4:00 PM, Stefan Hajnoczi wrote: On Tue, Oct 20, 2020 at 07:24:15PM +0200, Philippe Mathieu-Daudé wrote: @@ -724,7 +725,7 @@ static int nvme_init(BlockDriverState *bs, const char *device, int namespace, goto out; } -s->page_size = MAX(4096, 1u << (12 + NVME_CA

Re: [PATCH v28 03/17] vfio: Add save and load functions for VFIO PCI devices

2020-10-24 Thread Kirti Wankhede
On 10/24/2020 7:46 PM, Alex Williamson wrote: On Sat, 24 Oct 2020 19:53:39 +0800 Yan Zhao wrote: hi when I migrating VFs, the PCI_COMMAND is not properly saved. and the target side would meet below bug root@tester:~# [ 189.360671] ++>> reset starts here: iavf_reset_task !!! [ 199

Re: [PATCH] hw/sd: Zero out function selection fields before being populated

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/24/20 3:49 AM, Bin Meng wrote: From: Bin Meng The function selection fields (399:376) should be zeroed out to prevent leftover from being or'ed into the switch function status data structure. This fixes the boot failure as seen in the acceptance testing on the orangepi target. Fixes: b6

Re: [PATCH v28 00/17] Add migration support for VFIO devices

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/24/20 7:48 PM, Kirti Wankhede wrote: On 10/24/2020 10:26 PM, Philippe Mathieu-Daudé wrote: Hi Kirti, On 10/23/20 12:40 PM, Kirti Wankhede wrote: Hi, This Patch set adds migration support for VFIO devices in QEMU. ... Since there is no device which has hardware support for system memm

Re: [PATCH v28 00/17] Add migration support for VFIO devices

2020-10-24 Thread Kirti Wankhede
On 10/24/2020 10:26 PM, Philippe Mathieu-Daudé wrote: Hi Kirti, On 10/23/20 12:40 PM, Kirti Wankhede wrote: Hi, This Patch set adds migration support for VFIO devices in QEMU. ... Since there is no device which has hardware support for system memmory dirty bitmap tracking, right now ther

Re: [PATCH 4/6] tests/acceptance: Introduce tesseract_ocr() helper

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/24/20 9:37 AM, Philippe Mathieu-Daudé wrote: On 10/24/20 8:40 AM, Thomas Huth wrote: On 24/10/2020 08.35, Thomas Huth wrote: On 21/10/2020 12.50, Philippe Mathieu-Daudé wrote: We are going to reuse the tesseract OCR code. Create a new tesseract_ocr() helper and use it. Signed-off-by: Ph

Re: [PATCH v2 1/2] hw/misc: add an EMC141{3,4} device model

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/8/20 7:19 PM, Cédric Le Goater wrote: On 10/8/20 11:02 AM, John Wang wrote: Largely inspired by the TMP421 temperature sensor, here is a model for the EMC1413 temperature sensors. Specs can be found here : https://pdf1.alldatasheet.com/datasheet-pdf/view/533713/SMSC/EMC1413.html Signe

Re: [PATCH v2 1/2] hw/misc: add an EMC141{3,4} device model

2020-10-24 Thread Philippe Mathieu-Daudé
Hi John, On 10/8/20 11:02 AM, John Wang wrote: Largely inspired by the TMP421 temperature sensor, here is a model for the EMC1413 temperature sensors. "EMC1413/EMC1414" as you aim to model both. Specs can be found here : https://pdf1.alldatasheet.com/datasheet-pdf/view/533713/SMSC/EMC141

[PATCH v4 8/9] hw/arm/raspi: Add the Raspberry Pi Zero machine

2020-10-24 Thread Philippe Mathieu-Daudé
Similarly to the Pi A, the Pi Zero uses a BCM2835 SoC (ARMv6Z core). The only difference between the revision 1.2 and 1.3 is the latter exposes a CSI camera connector. As we do not implement the Unicam peripheral, there is no point in exposing a camera connector :) Therefore we choose to model the

[PATCH v4 7/9] hw/arm/raspi: Add the Raspberry Pi A+ machine

2020-10-24 Thread Philippe Mathieu-Daudé
The Pi A is almost the first machine released. It uses a BCM2835 SoC which includes a ARMv6Z core. Example booting the machine using content from [*] (we use the device tree from the B model): $ qemu-system-arm -M raspi1ap -serial stdio \ -kernel raspberrypi/firmware/boot/kernel.img \

[PATCH v4 6/9] hw/arm/bcm2836: Introduce the BCM2835 SoC

2020-10-24 Thread Philippe Mathieu-Daudé
Reviewed-by: Luc Michel Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/bcm2836.h | 1 + hw/arm/bcm2836.c | 34 ++ hw/arm/raspi.c | 2 ++ 3 files changed, 37 insertions(+) diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836

[PATCH v4 5/9] hw/arm/bcm2836: Split out common realize() code

2020-10-24 Thread Philippe Mathieu-Daudé
The realize() function is clearly composed of two parts, each described by a comment: void realize() { /* common peripherals from bcm2835 */ ... /* bcm2836 interrupt controller (and mailboxes, etc.) */ ... } Split the two part, so we can reuse the common part with other

[PATCH v4 3/9] hw/arm/bcm2836: Introduce BCM283XClass::core_count

2020-10-24 Thread Philippe Mathieu-Daudé
The BCM2835 has only one core. Introduce the core_count field to be able to use values different than BCM283X_NCPUS (4). Reviewed-by: Luc Michel Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/bcm2836.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/arm/bcm2836.c b/

[PATCH v4 1/9] hw/arm/bcm2836: Restrict BCM283XInfo declaration to C source

2020-10-24 Thread Philippe Mathieu-Daudé
No code out of bcm2836.c uses (or requires) the BCM283XInfo declarations. Move it locally to the C source file. Reviewed-by: Luc Michel Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/bcm2836.h | 8 hw/arm/bcm2836.c | 14 ++ 2 files changed, 14 insertions(

[PATCH v4 9/9] hw/arm/raspi: Add the Raspberry Pi 3 model A+

2020-10-24 Thread Philippe Mathieu-Daudé
The Pi 3A+ is a stripped down version of the 3B: - 512 MiB of RAM instead of 1 GiB - no on-board ethernet chipset Add it as it is a closer match to what we model. Reviewed-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/raspi.c | 13 + 1 file changed, 13 insertio

[PATCH v4 4/9] hw/arm/bcm2836: Only provide "enabled-cpus" property to multicore SoCs

2020-10-24 Thread Philippe Mathieu-Daudé
It makes no sense to set enabled-cpus=0 on single core SoCs. Reviewed-by: Luc Michel Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/bcm2836.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index c5d46a8e805..fcb2c9c3e73

[PATCH v4 0/9] hw/arm: Add raspi Zero, 1A+ and 3A+ machines

2020-10-24 Thread Philippe Mathieu-Daudé
Add the raspi0/1/3A+ machines. All series reviewed :) Since v3: - Addressed Igor's review comment and added his R-b tag Since v2: - Rebased - Addressed Igor comment - Added Luc R-b - Added model 3A+ Since v1: - Use more specific machine names Philippe Mathieu-Daudé (9): hw/arm/bcm2836: Restr

[PATCH v4 2/9] hw/arm/bcm2836: QOM'ify more by adding class_init() to each SoC type

2020-10-24 Thread Philippe Mathieu-Daudé
Remove usage of TypeInfo::class_data. Instead fill the fields in the corresponding class_init(). So far all children use the same values for almost all fields, but we are going to add the BCM2711/BCM2838 SoC for the raspi4 machine which use different fields. Reviewed-by: Igor Mammedov Signed-off

Re: [PATCH v28 00/17] Add migration support for VFIO devices

2020-10-24 Thread Philippe Mathieu-Daudé
Hi Kirti, On 10/23/20 12:40 PM, Kirti Wankhede wrote: Hi, This Patch set adds migration support for VFIO devices in QEMU. ... Since there is no device which has hardware support for system memmory dirty bitmap tracking, right now there is no other API from vendor driver to VFIO IOMMU module

Re: [RFC PATCH 0/4] tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

2020-10-24 Thread Bin Meng
Hi Philippe, On Sat, Oct 24, 2020 at 3:34 PM Philippe Mathieu-Daudé wrote: > > On 10/24/20 3:06 AM, Bin Meng wrote: > > Hi Philippe, > > > > On Sat, Oct 24, 2020 at 1:56 AM Philippe Mathieu-Daudé > > wrote: > >> > >> On 10/23/20 7:42 PM, Bin Meng wrote: > >>> Hi Philippe, > >>> > >>> On Fri, Oc

Re: [PATCH] riscv: Add semihosting support [v8]

2020-10-24 Thread Alistair Francis
On Fri, Oct 23, 2020 at 10:56 PM Keith Packard wrote: > > Alistair Francis writes: > > Thanks much for taking time to review this patch in detail. I've left > the indicated changes in a new version of my riscv-semihost branch here: > > https://github.com/keith-packard/qemu/tree/riscv-semi

Re: [PATCH v28 04/17] vfio: Add migration region initialization and finalize function

2020-10-24 Thread Kirti Wankhede
On 10/24/2020 7:51 PM, Alex Williamson wrote: On Sat, 24 Oct 2020 15:09:14 +0530 Kirti Wankhede wrote: On 10/23/2020 10:22 PM, Alex Williamson wrote: On Fri, 23 Oct 2020 16:10:30 +0530 Kirti Wankhede wrote: Whether the VFIO device supports migration or not is decided based of migrati

Re: [RFC PATCH] contrib/gitdm: Add more individual contributors

2020-10-24 Thread Jean-Christophe DUBOIS
Acked-by Jean-Christophe Dubois On 04/10/2020 20:25, Philippe Mathieu-Daudé wrote: These individual contributors have a number of contributions, add them to the 'individual' group map. Cc: Ahmed Karaman Cc: Aleksandar Markovic Cc: Alistair Francis Cc: Artyom Tarasenko Cc: David Carlier Cc

Re: [PATCH v28 04/17] vfio: Add migration region initialization and finalize function

2020-10-24 Thread Alex Williamson
On Sat, 24 Oct 2020 15:09:14 +0530 Kirti Wankhede wrote: > On 10/23/2020 10:22 PM, Alex Williamson wrote: > > On Fri, 23 Oct 2020 16:10:30 +0530 > > Kirti Wankhede wrote: > > > >> Whether the VFIO device supports migration or not is decided based of > >> migration region query. If migration r

Re: [PATCH v28 03/17] vfio: Add save and load functions for VFIO PCI devices

2020-10-24 Thread Alex Williamson
On Sat, 24 Oct 2020 19:53:39 +0800 Yan Zhao wrote: > hi > when I migrating VFs, the PCI_COMMAND is not properly saved. and the > target side would meet below bug > root@tester:~# [ 189.360671] ++>> reset starts here: iavf_reset_task > !!! > [ 199.360798] iavf :00:04.0: Reset never

Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings

2020-10-24 Thread Daniele Buono
On 10/24/2020 1:17 AM, Thomas Huth wrote: Compiling all code with -Wno-void-pointer-to-enum-cast sounds like the wrong approach to me, since this might hide some real bugs in other spots instead. Could you please try to cast the value through (uintptr_t) first, e.g. : S390Feat feat = (S390

Re: [PATCH v28 10/17] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled

2020-10-24 Thread Yan Zhao
Reviewed-by: Yan Zhao On Fri, Oct 23, 2020 at 04:10:36PM +0530, Kirti Wankhede wrote: > mr->ram_block is NULL when mr->is_iommu is true, then fr.dirty_log_mask > wasn't set correctly due to which memory listener's log_sync doesn't > get called. > This patch returns log_mask with DIRTY_MEMORY_MIGRA

Re: [PATCH v28 09/17] vfio: Add load state functions to SaveVMHandlers

2020-10-24 Thread Yan Zhao
Reviewed-by: Yan Zhao On Fri, Oct 23, 2020 at 04:10:35PM +0530, Kirti Wankhede wrote: > Sequence during _RESUMING device state: > While data for this device is available, repeat below steps: > a. read data_offset from where user application should write data. > b. write data of data_size to migr

Re: [PATCH v28 08/17] vfio: Add save state functions to SaveVMHandlers

2020-10-24 Thread Yan Zhao
Reviewed-by: Yan Zhao On Fri, Oct 23, 2020 at 04:10:34PM +0530, Kirti Wankhede wrote: > Added .save_live_pending, .save_live_iterate and .save_live_complete_precopy > functions. These functions handles pre-copy and stop-and-copy phase. > > In _SAVING|_RUNNING device state or pre-copy phase: > -

Re: [PATCH v2 0/6] Add support for Control-Flow Integrity

2020-10-24 Thread Daniele Buono
On 10/23/2020 4:33 PM, Eric Blake wrote: On 10/23/20 3:06 PM, Daniele Buono wrote: v2: Several months (and structural changes in QEMU) have passed since v1. While the spirit of the patch is similar, the implementation is changed in multiple points, and should address most if not all the comments

Re: [PATCH v28 14/17] vfio: Dirty page tracking when vIOMMU is enabled

2020-10-24 Thread Yan Zhao
Reviewed-by: Yan Zhao On Fri, Oct 23, 2020 at 04:10:40PM +0530, Kirti Wankhede wrote: > When vIOMMU is enabled, add MAP notifier from log_sync when all > devices in container are in stop and copy phase of migration. Call replay > and then from notifier callback, get dirty pages. > > Suggested-by

Re: [PATCH v28 03/17] vfio: Add save and load functions for VFIO PCI devices

2020-10-24 Thread Yan Zhao
hi when I migrating VFs, the PCI_COMMAND is not properly saved. and the target side would meet below bug root@tester:~# [ 189.360671] ++>> reset starts here: iavf_reset_task !!! [ 199.360798] iavf :00:04.0: Reset never finished (0) [ 199.380504] kernel BUG at drivers/pci/msi.c:352!

Re: [PATCH v4 05/12] tests/qtest/qos-test: dump qos graph if verbose

2020-10-24 Thread Christian Schoenebeck
On Samstag, 24. Oktober 2020 08:01:55 CEST Thomas Huth wrote: > On 08/10/2020 20.34, Christian Schoenebeck wrote: > > If qtests were run in verbose mode (i.e. if --verbose CL argument was > > provided) then dump the generated qos graph (all nodes and edges, > > along with their current individual a

Re: [PATCH v28 07/17] vfio: Register SaveVMHandlers for VFIO device

2020-10-24 Thread Yan Zhao
On Fri, Oct 23, 2020 at 04:10:33PM +0530, Kirti Wankhede wrote: > Define flags to be used as delimiter in migration stream for VFIO devices. > Added .save_setup and .save_cleanup functions. Map & unmap migration > region from these functions at source during saving or pre-copy phase. > > Set VFIO

Re: [PATCH v4 04/12] libqos/qgraph: add qos_dump_graph()

2020-10-24 Thread Christian Schoenebeck
On Samstag, 24. Oktober 2020 08:04:20 CEST Thomas Huth wrote: > On 08/10/2020 20.34, Christian Schoenebeck wrote: > > This new function is purely for debugging purposes. It prints the > > current qos graph to stdout and allows to identify problems in the > > created qos graph e.g. when writing new

Re: [PATCH v4 06/12] tests/qtest/qos-test: dump environment variables if verbose

2020-10-24 Thread Christian Schoenebeck
On Samstag, 24. Oktober 2020 07:56:10 CEST Thomas Huth wrote: > On 08/10/2020 20.34, Christian Schoenebeck wrote: > > If qtests are run in verbose mode (i.e. if --verbose CL argument > > was provided) then print all environment variables to stdout > > before running the individual tests. > > Why?

Re: [PATCH v4 01/12] libqos/qgraph: add qemu_name to QOSGraphNode

2020-10-24 Thread Christian Schoenebeck
On Samstag, 24. Oktober 2020 08:08:59 CEST Thomas Huth wrote: > On 19/10/2020 12.35, Christian Schoenebeck wrote: > > On Donnerstag, 8. Oktober 2020 20:34:56 CEST Christian Schoenebeck wrote: > >> Add new member variable 'qemu_name' to struct QOSGraphNode. > >> > >> This new member may be optional

Re: [PATCH v7 19/21] simplebench/results_to_text: add difference line to the table

2020-10-24 Thread Vladimir Sementsov-Ogievskiy
21.10.2020 17:58, Vladimir Sementsov-Ogievskiy wrote: @@ -39,21 +43,70 @@ def result_to_text(result): return 'FAILED' -def results_to_text(results): -"""Return text representation of bench() returned dict.""" -from tabulate import tabulate - +def results_dimension(results

Re: [PATCH v5 11/12] nbd: Expose actual depth in qemu:allocation-depth

2020-10-24 Thread Vladimir Sementsov-Ogievskiy
23.10.2020 21:36, Eric Blake wrote: Preserve the tri-state encoding in the low bits, as that still remains a valuable way to utilize qemu-img map with x-dirty-bitmap for accessing quick information without needing a third-party NBD client. Hmm.. that doesn't sound as a good reason for redundant

Re: [PATCH v5 10/12] block: Return depth level during bdrv_is_allocated_above

2020-10-24 Thread Vladimir Sementsov-Ogievskiy
23.10.2020 21:36, Eric Blake wrote: When checking for allocation across a chain, it's already easy to count the depth within the chain at which the allocation is found. Instead of throwing that information away, return it to the caller. Existing callers only cared about allocated/non-allocated, b

Re: [PATCH v28 04/17] vfio: Add migration region initialization and finalize function

2020-10-24 Thread Kirti Wankhede
On 10/23/2020 10:22 PM, Alex Williamson wrote: On Fri, 23 Oct 2020 16:10:30 +0530 Kirti Wankhede wrote: Whether the VFIO device supports migration or not is decided based of migration region query. If migration region query is successful and migration region initialization is successful the

Re: [External] Re: [PATCH v2 1/2] hw/misc: add an EMC141{3, 4} device model

2020-10-24 Thread John Wang
Ping :) On Fri, Oct 9, 2020 at 1:19 AM Cédric Le Goater wrote: > > On 10/8/20 11:02 AM, John Wang wrote: > > Largely inspired by the TMP421 temperature sensor, here is a model for > > the EMC1413 temperature sensors. > > > > Specs can be found here : > > https://pdf1.alldatasheet.com/datasheet

Re: [PATCH v5 03/12] nbd: Utilize QAPI_CLONE for type conversion

2020-10-24 Thread Vladimir Sementsov-Ogievskiy
23.10.2020 21:36, Eric Blake wrote: Rather than open-coding the translation from the deprecated NbdServerAddOptions type to the preferred BlockExportOptionsNbd, it's better to utilize QAPI_CLONE_MEMBERS. This solves a couple of issues: first, if we do any more refactoring of the base type (which

Re: [PATCH v5 02/12] qapi: Make QAPI_LIST_ADD() public

2020-10-24 Thread Vladimir Sementsov-Ogievskiy
23.10.2020 21:36, Eric Blake wrote: We have a useful macro for inserting at the front of any QAPI-generated list; move it from block.c to qapi/util.h so more places can use it, including one earlier place in block.c. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake Reviewed

Re: [PATCH v5 01/12] qapi: Move GenericList to qapi/util.h

2020-10-24 Thread Vladimir Sementsov-Ogievskiy
23.10.2020 21:36, Eric Blake wrote: Placing GenericList in util.h will make it easier for the next patch to promote QAPI_LIST_ADD() into a public macro without requiring more files to include the unrelated visitor.h. However, we can't also move GenericAlternate; this is because it would introduc

Re: [RFC PATCH 0/4] tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

2020-10-24 Thread Paolo Bonzini
On 24/10/20 09:34, Philippe Mathieu-Daudé wrote: >> >> Oops, I took it for granted that the `make check-acceptance` will >> automatically rebuild the QEMU binary, which is not the case. Should >> we enforce the rebuild before testing in Makefiles? > > Well I'm not sure, because I don't want to hav

Re: [PATCH 4/6] tests/acceptance: Introduce tesseract_ocr() helper

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/24/20 8:40 AM, Thomas Huth wrote: On 24/10/2020 08.35, Thomas Huth wrote: On 21/10/2020 12.50, Philippe Mathieu-Daudé wrote: We are going to reuse the tesseract OCR code. Create a new tesseract_ocr() helper and use it. Signed-off-by: Philippe Mathieu-Daudé --- tests/acceptance/machine

Re: [RFC PATCH 0/4] tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/24/20 3:06 AM, Bin Meng wrote: Hi Philippe, On Sat, Oct 24, 2020 at 1:56 AM Philippe Mathieu-Daudé wrote: On 10/23/20 7:42 PM, Bin Meng wrote: Hi Philippe, On Fri, Oct 23, 2020 at 9:18 PM Philippe Mathieu-Daudé wrote: Series meant to help Bin Meng to debug the SD card issue reporte

Re: [PATCH v4 2/4] tests: Add tests for query-netdev command

2020-10-24 Thread Thomas Huth
On 21/09/2020 21.19, Alexey Kirillov wrote: > Signed-off-by: Alexey Kirillov > --- > tests/qtest/meson.build | 3 + > tests/qtest/test-query-netdev.c | 115 > 2 files changed, 118 insertions(+) > create mode 100644 tests/qtest/test-query-netdev.c [...]