Re: [PATCH] mailmap: Add more entries to sanitize 'git log' output

2020-01-18 Thread Philippe Mathieu-Daudé
On 1/18/20 8:10 AM, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Most of these developers have the Signed-off-by tag properly written, but not the author/commiter name. Fix this. Also we incorrectly wrote Arei Gonglei name, update and reorder. git-log does not use this file by defa

Re: [PATCH] block/backup: fix memory leak in bdrv_backup_top_append()

2020-01-18 Thread Eiichi Tsukata
ping On 2019/12/23 18:06, Eiichi Tsukata wrote: > bdrv_open_driver() allocates bs->opaque according to drv->instance_size. > There is no need to allocate it and overwrite opaque in > bdrv_backup_top_append(). > > Reproducer: > > $ QTEST_QEMU_BINARY=./x86_64-softmmu/qemu-system-x86_64 valgrind

Re: [PATCH] qapi: Fix code generation with Python 3.5

2020-01-18 Thread Philippe Mathieu-Daudé
On 1/17/20 8:41 PM, John Snow wrote: On 1/17/20 2:07 AM, Markus Armbruster wrote: John Snow writes: On 1/16/20 3:25 PM, Markus Armbruster wrote: Recent commit 3e7fb5811b "qapi: Fix code generation for empty modules" modules" switched QAPISchema.visit() from for entity in self._entity_l

Re: [PATCH] qapi: Fix code generation with Python 3.5

2020-01-18 Thread Philippe Mathieu-Daudé
On 1/17/20 11:49 AM, Markus Armbruster wrote: Thomas Huth writes: On 16/01/2020 21.25, Markus Armbruster wrote: Recent commit 3e7fb5811b "qapi: Fix code generation for empty modules" modules" switched QAPISchema.visit() from for entity in self._entity_list: effectively to for mod

Re: [PATCH v3 0/2] hw/timer/m48t59: Convert to trace events

2020-01-18 Thread Hervé Poussineau
Le 17/01/2020 à 17:58, Philippe Mathieu-Daudé a écrit : Another trivial cleanup series. v2: Rebased on 4.2 Philippe Mathieu-Daudé (2): MAINTAINERS: Add missing m48t59 files to the PReP section hw/timer/m48t59: Convert debug printf()s to trace events hw/rtc/m48t59-internal.h | 5 -

[PATCH v2 0/2] MAINTAINERS: ARM & SD fixes

2020-01-18 Thread Philippe Mathieu-Daudé
Few fixes after looking at Vladimir's commit-per-subsystem.py script: https://www.mail-archive.com/qemu-devel@nongnu.org/msg651545.html Since v1 [*]: - Rebased (dropping patch 1 merged as 1232ed1f27 via qemu-trivial) - Add qemu-...@nongnu.org to STM32F405 and Netduino Plus 2 - Added Alistair R-b t

[PATCH v2 1/2] MAINTAINERS: Cc the qemu-...@nongnu.org for the ARM machines

2020-01-18 Thread Philippe Mathieu-Daudé
Not all ARM machines sections Cc the qemu-...@nongnu.org list, fix this. Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé --- v2: Also fix STM32F405 (commit 529fc5fd3) and Netduino Plus 2 (commit 60d6c4278) --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) dif

[PATCH v2 2/2] MAINTAINERS: Move the OMAP section inside the ARM Machines one

2020-01-18 Thread Philippe Mathieu-Daudé
Add the Siemens SX1 (OMAP310) machines with the other ARM machines. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 52fbc18566..e2c148d8d8 100644 --- a/MAINTAINERS +++ b/MAINT

Re: [PATCH v3 06/17] hw/arm/allwinner: add CPU Configuration module

2020-01-18 Thread Philippe Mathieu-Daudé
On 1/15/20 12:04 AM, Niek Linnenbank wrote: On Tue, Jan 14, 2020 at 12:14 AM Philippe Mathieu-Daudé mailto:phi...@redhat.com>> wrote: On 1/8/20 9:00 PM, Niek Linnenbank wrote: > Various Allwinner System on Chip designs contain multiple processors > that can be configured and reset

Re: [PATCH v3 10/17] hw/arm/allwinner-h3: add Boot ROM support

2020-01-18 Thread Philippe Mathieu-Daudé
On 1/15/20 12:10 AM, Niek Linnenbank wrote: On Tue, Jan 14, 2020 at 12:28 AM Philippe Mathieu-Daudé mailto:phi...@redhat.com>> wrote: On 1/8/20 9:00 PM, Niek Linnenbank wrote: > A real Allwinner H3 SoC contains a Boot ROM which is the > first code that runs right after the SoC is

Re: [PATCH v3 17/17] docs: add Orange Pi PC document

2020-01-18 Thread Philippe Mathieu-Daudé
On 1/8/20 9:00 PM, Niek Linnenbank wrote: The Xunlong Orange Pi PC machine is a functional ARM machine based on the Allwinner H3 System-on-Chip. It supports mainline Linux, U-Boot, NetBSD and is covered by acceptance tests. This commit adds a documentation text file with a description of the mac

Re: [PATCH] scripts/git.orderfile: Display decodetree before C source

2020-01-18 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial@ On 12/30/19 9:28 AM, Philippe Mathieu-Daudé wrote: To avoid scrolling each instruction when reviewing tcg helpers written for the decodetree script, display the .decode files (similar to header declarations) before the C source (implementation of previous declarations). Sig

Re: [PATCH v3 13/17] tests/boot_linux_console: Add a quick test for the OrangePi PC board

2020-01-18 Thread Philippe Mathieu-Daudé
On 1/8/20 9:00 PM, Niek Linnenbank wrote: From: Philippe Mathieu-Daudé This test boots a Linux kernel on a OrangePi PC board and verify the serial output is working. The kernel image and DeviceTree blob are built by the Armbian project (based on Debian): https://www.armbian.com/orange-pi-pc/

Re: [PATCH v2 07/11] tests/ssh_linux_malta: Run tests using a snapshot image

2020-01-18 Thread Philippe Mathieu-Daudé
Cleber, Eduardo: ping? On 10/19/19 5:34 PM, Philippe Mathieu-Daudé wrote: If a test fails, it can corrupt the underlying QCow2 image, making further tests failing. Fix this by running each test with a snapshot. Signed-off-by: Philippe Mathieu-Daudé --- tests/acceptance/linux_ssh_mips_malta.p

Re: [PATCH v2 07/11] tests/ssh_linux_malta: Run tests using a snapshot image

2020-01-18 Thread Philippe Mathieu-Daudé
On Sat, Jan 18, 2020 at 12:32 PM Philippe Mathieu-Daudé wrote: > > Cleber, Eduardo: ping? Oops wrong patch =) > On 10/19/19 5:34 PM, Philippe Mathieu-Daudé wrote: > > If a test fails, it can corrupt the underlying QCow2 image, > > making further tests failing. > > Fix this by running each test w

Re: [PATCH] mailmap: Add more entries to sanitize 'git log' output

2020-01-18 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 1/18/20 8:10 AM, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> Most of these developers have the Signed-off-by tag properly >>> written, but not the author/commiter name. Fix this. >>> Also we incorrectly wrote Arei Gonglei name, update and

Re: [PATCH v2 2/2] MAINTAINERS: Move the OMAP section inside the ARM Machines one

2020-01-18 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Add the Siemens SX1 (OMAP310) machines with the other ARM machines. > > Signed-off-by: Philippe Mathieu-Daudé > --- > MAINTAINERS | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 52fbc18566

[PATCH v2 2/6] Makefile: Clarify all the codebase requires qom/ objects

2020-01-18 Thread Philippe Mathieu-Daudé
QEMU user-mode also requires the qom/ objects, it is not only used by "system emulation and qemu-img". As we will use a big if() block, move it upper in the "Common libraries for tools and emulators" section. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- Makefile.objs | 6 +

[PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user)

2020-01-18 Thread Philippe Mathieu-Daudé
In some configuration (linux-user, tools) we can ignore building various objects (and the libfdt). Tested with all the combinations of --[enable|disable]-tools, --[enable|disable]-user and --[enable|disable]-system using the following commands (suggested by Laurent Vivier in v1): $ mkdir build

[PATCH v2 1/6] configure: Do not build libfdt if not required

2020-01-18 Thread Philippe Mathieu-Daudé
We only require libfdt for system emulation, in a small set of architecture: 4077 # fdt support is mandatory for at least some target architectures, 4078 # so insist on it if we're building those system emulators. 4079 fdt_required=no 4080 for target in $target_list; do 4081case $target in

[PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode

2020-01-18 Thread Philippe Mathieu-Daudé
The user-mode code does not use this API, restrict it to the system-mode. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/Makefile.objs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs index 0edd9e635d..2fea68ccf7 100644 --- a/

[PATCH v2 3/6] Makefile: Restrict system emulation and tools objects

2020-01-18 Thread Philippe Mathieu-Daudé
Restrict all the system emulation and tools objects with a Makefile IF (CONFIG_SOFTMMU OR CONFIG_TOOLS) check. Using the same description over and over is not very helpful. Use it once, just before the if() block. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- Makefile.objs

Re: [PATCH] mailmap: Add more entries to sanitize 'git log' output

2020-01-18 Thread Philippe Mathieu-Daudé
On 1/18/20 2:27 PM, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 1/18/20 8:10 AM, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Most of these developers have the Signed-off-by tag properly written, but not the author/commiter name. Fix this. Also we incorrectly wrot

[PATCH v2 4/6] Makefile: Remove unhelpful comment

2020-01-18 Thread Philippe Mathieu-Daudé
It is pointless to keep qapi/ object separate from the other common-objects. Drop the comment. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- Makefile.objs | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index 395dd1e67

[GSoC/Outreachy QEMU project proposal] Measure and Analyze QEMU Performance

2020-01-18 Thread Aleksandar Markovic
Hi, everybody. I am going to propose several ideas for QEMU participation in GSoC/Outreachy in next few days. This is the first one. Please feel free to give an honest feedback. Yours, Aleksandar Measure and Analyze Performance of QEMU User and System Mode Emulation PLANNED ACTIVITIES PA

[PATCH v2 6/6] hw/core/Makefile: Group generic objects versus system-mode objects

2020-01-18 Thread Philippe Mathieu-Daudé
To ease review/modifications of this Makefile, group generic objects first, then system-mode specific ones, and finally peripherals (which are only used in system-mode). No logical changes introduced here. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/Makefile.objs | 28 ++--

Re: [PATCH v2 2/2] MAINTAINERS: Move the OMAP section inside the ARM Machines one

2020-01-18 Thread Philippe Mathieu-Daudé
On 1/18/20 2:30 PM, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Add the Siemens SX1 (OMAP310) machines with the other ARM machines. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MAINTAIN

Re: [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user)

2020-01-18 Thread Philippe Mathieu-Daudé
On 1/18/20 3:06 PM, Philippe Mathieu-Daudé wrote: In some configuration (linux-user, tools) we can ignore building various objects (and the libfdt). Tested with all the combinations of --[enable|disable]-tools, --[enable|disable]-user and --[enable|disable]-system using the following commands (s

[PATCH v2] mailmap: Add more entries to sanitize 'git log' output

2020-01-18 Thread Philippe Mathieu-Daudé
Most of these developers have the Signed-off-by tag properly written, but not the author/committer name. Fix this. Also we incorrectly wrote Arei Gonglei name, update and reorder. The committer name/email is displayed when using: $ git log --format=fuller (which can be set in git-config settin

Re: [PATCH v3 12/17] hw/arm/allwinner: add RTC device support

2020-01-18 Thread Philippe Mathieu-Daudé
Hi Niek, On 1/14/20 11:57 PM, Niek Linnenbank wrote: On Tue, Jan 14, 2020 at 11:52 PM Niek Linnenbank mailto:nieklinnenb...@gmail.com>> wrote: Hi Philippe, On Mon, Jan 13, 2020 at 11:57 PM Philippe Mathieu-Daudé mailto:phi...@redhat.com>> wrote: On 1/8/20 9:00 PM, Niek Li

Re: [PATCH 6/6] hw/arm/exynos4210: Connect serial port DMA busy signals with pl330

2020-01-18 Thread Guenter Roeck
On 1/17/20 10:44 AM, Peter Maydell wrote: On Fri, 17 Jan 2020 at 18:29, Guenter Roeck wrote: [ ... ] Rather than having the uart and pl330 pointers be locals, they should be fields in Exynos4210State. (Otherwise technically we leak them, though this is unnoticeable in practice because there's

Re: [PATCH v3 09/17] hw/arm/allwinner-h3: add EMAC ethernet device

2020-01-18 Thread Philippe Mathieu-Daudé
Cc'ing the maintainers, please Cc them on v4. On 1/8/20 9:00 PM, Niek Linnenbank wrote: The Allwinner Sun8i System on Chip family includes an Ethernet MAC (EMAC) which provides 10M/100M/1000M Ethernet connectivity. This commit adds support for the Allwinner EMAC from the Sun8i family (H2+, H3, A

Re: [PATCH v3 11/17] hw/arm/allwinner-h3: add SDRAM controller device

2020-01-18 Thread Philippe Mathieu-Daudé
Cc'ing Igor and Alex for this one. On 1/8/20 9:00 PM, Niek Linnenbank wrote: In the Allwinner H3 SoC the SDRAM controller is responsible for interfacing with the external Synchronous Dynamic Random Access Memory (SDRAM). Types of memory that the SDRAM controller supports are DDR2/DDR3 and capaci

Re: [PATCH v3 07/17] hw/arm/allwinner: add Security Identifier device

2020-01-18 Thread Philippe Mathieu-Daudé
Cc'ing Corey/David for good advices about using UUID. On 1/8/20 9:00 PM, Niek Linnenbank wrote: The Security Identifier device found in various Allwinner System on Chip designs gives applications a per-board unique identifier. This commit adds support for the Allwinner Security Identifier using

Re: [PATCH v3 03/17] hw/arm/allwinner-h3: add Clock Control Unit

2020-01-18 Thread Philippe Mathieu-Daudé
Hi Niek, On 1/13/20 8:18 PM, Niek Linnenbank wrote: Hi, Just a friendly reminder for review of this patch and the others in this series that don't yet have a reviewed-by tag :-) You are right to ping the list after a week. Cc'ing Damien for this particular patch, he might have good advises

Re: [PATCH v3 08/17] hw/arm/allwinner: add SD/MMC host controller

2020-01-18 Thread Philippe Mathieu-Daudé
On 1/8/20 9:00 PM, Niek Linnenbank wrote: The Allwinner System on Chip families sun4i and above contain an integrated storage controller for Secure Digital (SD) and Multi Media Card (MMC) interfaces. This commit adds support for the Allwinner SD/MMC storage controller with the following emulated

Re: [PATCH 037/104] virtiofsd: passthrough_ll: add fallback for racy ops

2020-01-18 Thread Masayoshi Mizuma
On Thu, Dec 12, 2019 at 04:37:57PM +, Dr. David Alan Gilbert (git) wrote: > From: Miklos Szeredi > > We have two operations that cannot be done race-free on a symlink in > certain cases: utimes and link. > > Add racy fallback for these if the race-free method doesn't work. We do > our best

[PATCH] qom/object: Display more helpful message when an interface is missing

2020-01-18 Thread Philippe Mathieu-Daudé
When adding new devices implementing QOM interfaces, we might forgot to add the Kconfig dependency that pulls the required objects in when building. Since QOM dependencies are resolved at runtime, we don't get any link-time failures, and QEMU aborts while starting: $ qemu ... Segmentation fau

[PATCH v2 4/7] hw/char/exynos4210_uart: Implement post_load function

2020-01-18 Thread Guenter Roeck
After restoring a VM, serial parameters need to be updated to reflect restored register values. Implement a post_load function to handle this situation. Signed-off-by: Guenter Roeck --- v4: Additional patch to implement post-load functionality in exynos uart driver. Required for next patch in

[PATCH v2 1/7] dma/pl330: Convert to support tracing

2020-01-18 Thread Guenter Roeck
Replace debug logging code with tracing. Signed-off-by: Guenter Roeck --- v2: Make call to pl330_hexdump() conditional hw/dma/pl330.c | 88 - hw/dma/trace-events | 24 + 2 files changed, 72 insertions(+), 40 deletions(-) diff --git a

[PATCH v2 0/7] Fix Exynos4210 DMA support

2020-01-18 Thread Guenter Roeck
Commit 59520dc65e ("hw/arm/exynos4210: Add DMA support for the Exynos4210") introduced DMA support for Exynos4210. Unfortunately, it never really worked. DMA interrupt line and polarity was wrong, and the serial port needs extra code to support DMA. This patch series fixes the problem. The series

[PATCH v2 2/7] hw/arm/exynos4210: Fix DMA initialization

2020-01-18 Thread Guenter Roeck
First parameter to exynos4210_get_irq() is not the SPI port number, but the interrupt group number. Interrupt groups are 20 for mdma and 21 for pdma. Interrupts are not inverted. Controllers support 32 events (pdma) or 31 events (mdma). Events must all be routed to a single interrupt line. Set othe

[PATCH v2 7/7] hw/arm/exynos4210: Connect serial port DMA busy signals with pl330

2020-01-18 Thread Guenter Roeck
The Exynos4210 serial driver uses an interrupt line to signal if receive data is available. Connect that interrupt with the DMA controller's 'peripheral busy' gpio pin to stop the DMA if there is no more receive data available. Without this patch, receive DMA runs wild and fills the entire receive

[PATCH v2 6/7] hw/char/exynos4210_uart: Add receive DMA support

2020-01-18 Thread Guenter Roeck
To support receive DMA, we need to inform the DMA controller if receive data is available. Otherwise the DMA controller keeps requesting data, causing receive errors. Implement this using an interrupt line. The instantiating code then needs to connect the interrupt with the matching DMA controller

[PATCH v2 3/7] hw/char/exynos4210_uart: Convert to support tracing

2020-01-18 Thread Guenter Roeck
Replace debug code with tracing to aid debugging. Reviewed-by: Peter Maydell Signed-off-by: Guenter Roeck --- v2: Added Reviewed-by: tag hw/char/exynos4210_uart.c | 96 --- hw/char/trace-events | 17 +++ 2 files changed, 47 insertions(+), 66 deletio

[PATCH v2 5/7] hw/char/exynos4210_uart: Implement Rx FIFO level triggers and timeouts

2020-01-18 Thread Guenter Roeck
The driver already implements a receive FIFO, but it does not handle receive FIFO trigger levels and timeout. Implement the missing functionality. Signed-off-by: Guenter Roeck --- v2: Call exynos4210_uart_rx_timeout_set() from new post_load function to set the receive timeout timer. Add t

Re: [PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-18 Thread Alberto Garcia
On Tue 14 Jan 2020 03:15:48 PM CET, Max Reitz wrote: >> @@ -3836,7 +3837,7 @@ qcow2_co_copy_range_from(BlockDriverState *bs, >> case QCOW2_CLUSTER_NORMAL: >> child = s->data_file; >> copy_offset += offset_into_cluster(s, src_offset); >> -if ((copy_off

[PATCH v3 0/5] Misc BDRV_SECTOR_SIZE updates

2020-01-18 Thread Alberto Garcia
This series gets rid of all the remaining instances of hardcoded sector sizes in the qcow2 code and adds a check for images whose virtual size is not a multiple of the sector size. See the individual patches for details. Berto v3: - Patch 2: Use offset_into_cluster() instead of QEMU_IS_ALIGNED -

[PATCH v3 4/5] qcow2: Don't require aligned offsets in qcow2_co_copy_range_from()

2020-01-18 Thread Alberto Garcia
qemu-img's convert_co_copy_range() operates at the sector level and block_copy() operates at the cluster level so this condition is always true, but it is not necessary to restrict this here, so let's leave it to the driver implementation return an error if there is any. Signed-off-by: Alberto Gar

[PATCH v3 2/5] qcow2: Tighten cluster_offset alignment assertions

2020-01-18 Thread Alberto Garcia
qcow2_alloc_cluster_offset() and qcow2_get_cluster_offset() always return offsets that are cluster-aligned so don't just check that they are sector-aligned. The check in qcow2_co_preadv_task() is also replaced by an assertion for the same reason. Signed-off-by: Alberto Garcia Reviewed-by: Max Re

[PATCH v3 3/5] qcow2: Use bs->bl.request_alignment when updating an L1 entry

2020-01-18 Thread Alberto Garcia
When updating an L1 entry the qcow2 driver writes a (512-byte) sector worth of data to avoid a read-modify-write cycle. Instead of always writing 512 bytes we should follow the alignment requirements of the storage backend. (the only exception is when the alignment is larger than the cluster size

[PATCH v3 1/5] qcow2: Don't round the L1 table allocation up to the sector size

2020-01-18 Thread Alberto Garcia
The L1 table is read from disk using the byte-based bdrv_pread() and is never accessed beyond its last element, so there's no need to allocate more memory than that. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block/qcow2-cluster.c | 5 ++--- block/qcow2-refcount.c | 2 +- block/q

[PATCH v3 5/5] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-18 Thread Alberto Garcia
This replaces all remaining instances in the qcow2 code. Signed-off-by: Alberto Garcia --- block/qcow2.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index a6b0d4ee1d..6cc13e388c 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -3273,

[PATCH 2/4] Acceptance tests: Add interrupt_interactive_console_until_pattern()

2020-01-18 Thread Philippe Mathieu-Daudé
We need a function to interrupt interactive consoles. Example: Interrupt U-Boot to set different environment values. Signed-off-by: Philippe Mathieu-Daudé --- tests/acceptance/avocado_qemu/__init__.py | 32 +-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/t

[PATCH 1/4] Acceptance tests: Extract _console_interaction()

2020-01-18 Thread Philippe Mathieu-Daudé
Since we are going to re-use the code shared between wait_for_console_pattern() and exec_command_and_wait_for_pattern(), extract the common part into a local function. Signed-off-by: Philippe Mathieu-Daudé --- tests/acceptance/avocado_qemu/__init__.py | 31 +-- 1 file changed

[PATCH 4/4] .travis.yml: Allow untrusted code and large files

2020-01-18 Thread Philippe Mathieu-Daudé
As Travis CI runs our tests in a disposable environment, we don't care much if the binaries are trusted. The more we test the better. Also, as of this commmit, the smallest available announced [1] is "approx 18GB", plenty of space to run our acceptance tests. Enable the proper environment variabl

[PATCH 3/4] tests/boot_linux_console: Test booting NetBSD via U-Boot on OrangePi PC

2020-01-18 Thread Philippe Mathieu-Daudé
This test boots U-Boot then NetBSD (stored on a SD card) on a OrangePi PC board. As it requires ~1.3GB of storage, it is disabled by default. U-Boot is built by the Debian project [1], and the SD card image is provided by the NetBSD organization [2]. Once the compressed SD card image is download

[PATCH v41 01/21] target/avr: Add outward facing interfaces and core CPU logic

2020-01-18 Thread Michael Rolnik
This includes: - CPU data structures - object model classes and functions - migration functions - GDB hooks Co-developed-by: Michael Rolnik Co-developed-by: Sarah Harris Signed-off-by: Michael Rolnik Signed-off-by: Sarah Harris Signed-off-by: Michael Rolnik Acked-by: Igor Mammedov Tested-by:

[PATCH 0/4] tests/boot_linux_console: Test booting NetBSD via U-Boot on OrangePi PC

2020-01-18 Thread Philippe Mathieu-Daudé
This series add a test on the OrangePi PC for: - SD Card booting - U-boot & UART - NetBSD 9 I simply followed Niek description in docs/orangepi.rst: https://www.mail-archive.com/qemu-devel@nongnu.org/msg669347.html The sdcard image is big, but the test runs very quick (1min), even on Travis CI: h

[PATCH v41 00/21] QEMU AVR 8 bit cores

2020-01-18 Thread Michael Rolnik
This series of patches adds 8bit AVR cores to QEMU. All instruction, except BREAK/DES/SPM/SPMX, are implemented. Not fully tested yet. However I was able to execute simple code with functions. e.g fibonacci calculation. This series of patches include a non real, sample board. No fuses support yet

[PATCH v41 14/21] hw/avr: Add example board configuration

2020-01-18 Thread Michael Rolnik
A simple board setup that configures an AVR CPU to run a given firmware image. This is all that's useful to implement without peripheral emulation as AVR CPUs include a lot of on-board peripherals. NOTE: this is not a real board NOTE: it's used for CPU testing Signed-off-by: Michael Rol

[PATCH v41 06/21] target/avr: Add instruction translation - Data Transfer Instructions

2020-01-18 Thread Michael Rolnik
This includes: - MOV, MOVW - LDI, LDS LDX LDY LDZ - LDDY, LDDZ - STS, STX STY STZ - STDY, STDZ - LPM, LPMX - ELPM, ELPMX - SPM, SPMX - IN, OUT - PUSH, POP - XCH - LAS, LAC LAT Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé --- tar

[PATCH v41 02/21] target/avr: Add instruction helpers

2020-01-18 Thread Michael Rolnik
Stubs for unimplemented instructions and helpers for instructions that need to interact with QEMU. SPM and WDR are unimplemented because they require emulation of complex peripherals. The implementation of SLEEP is very limited due to the lack of peripherals to generate wake interrupts. Memory a

[PATCH v41 08/21] target/avr: Add instruction translation - MCU Control Instructions

2020-01-18 Thread Michael Rolnik
This includes: - BREAK - NOP - SLEEP - WDR Signed-off-by: Michael Rolnik --- target/avr/translate.c | 68 ++ target/avr/insn.decode | 9 ++ 2 files changed, 77 insertions(+) diff --git a/target/avr/translate.c b/target/avr/translate.c

[PATCH v41 03/21] target/avr: Add instruction translation - Registers definition

2020-01-18 Thread Michael Rolnik
Signed-off-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- target/avr/translate.c | 172 + 1 file changed, 172 insertions(+) create mode 100644 target/avr/translate.c diff --git a/target/avr/translate.c b/tar

[PATCH v41 04/21] target/avr: Add instruction translation - Arithmetic and Logic Instructions

2020-01-18 Thread Michael Rolnik
This includes: - ADD, ADC, ADIW - SBIW, SUB, SUBI, SBC, SBCI - AND, ANDI - OR, ORI, EOR - COM, NEG - INC, DEC - MUL, MULS, MULSU - FMUL, FMULS, FMULSU - DES Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé --- target/avr/translate.c | 751 +

[PATCH v41 09/21] target/avr: Add instruction translation - CPU main translation function

2020-01-18 Thread Michael Rolnik
Co-developed-by: Richard Henderson Co-developed-by: Michael Rolnik Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé --- target/avr/translate.c | 234 + 1 file changed, 234 insertions(+) diff --git a/target/avr/translate.c b/target/avr/tr

[PATCH v41 05/21] target/avr: Add instruction translation - Branch Instructions

2020-01-18 Thread Michael Rolnik
This includes: - RJMP, IJMP, EIJMP, JMP - RCALL, ICALL, EICALL, CALL - RET, RETI - CPSE, CP, CPC, CPI - SBRC, SBRS, SBIC, SBIS - BRBC, BRBS Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé --- target/avr/translate.c | 533 ++

[PATCH v41 12/21] hw/avr: Add limited support for 16 bit timer peripheral

2020-01-18 Thread Michael Rolnik
These were designed to facilitate testing but should provide enough function to be useful in other contexts. Only a subset of the functions of each peripheral is implemented, mainly due to the lack of a standard way to handle electrical connections (like GPIO pins). Signed-off-by: Sarah Harris

[PATCH v41 10/21] target/avr: Add instruction disassembly function

2020-01-18 Thread Michael Rolnik
Provide function disassembles executed instruction when `-d in_asm` is provided Example: `./avr-softmmu/qemu-system-avr -bios free-rtos/Demo/AVR_ATMega2560_GCC/demo.elf -d in_asm` will produce something like the following ``` ... IN: 0x014a: CALL 0x3808 IN: main 0x

[PATCH v41 07/21] target/avr: Add instruction translation - Bit and Bit-test Instructions

2020-01-18 Thread Michael Rolnik
This includes: - LSR, ROR - ASR - SWAP - SBI, CBI - BST, BLD - BSET, BCLR Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé --- target/avr/translate.c | 241 + target/avr/insn.decode | 14 +++ 2 files changed, 255 in

[PATCH v41 13/21] hw/avr: Add dummy mask device

2020-01-18 Thread Michael Rolnik
This is a simple device of just one register, whenver this register is written it calls qemu_set_irq function for each of 8 bits/IRQs.. It is used to implement AVR Power Reduction Signed-off-by: Michael Rolnik --- include/hw/misc/avr_mask.h | 47 hw/misc/avr_mask.c | 11

[PATCH v41 17/21] target/avr: Add machine none test

2020-01-18 Thread Michael Rolnik
Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic --- tests/qtest/machine-none-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/machine-none-test.c b/tests/qtest/machine-none-test.c index 5953d31755..3e5c74e73e 100644 --- a/te

[PATCH v41 15/21] target/avr: Add section about AVR into QEMU documentation

2020-01-18 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- qemu-doc.texi | 51 +++ 1 file changed, 51 insertions(+) diff --git a/qemu-doc.texi b/qemu-doc.texi index 39f950471f..515aacfae9 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -1741,6 +1741,7 @@ differences are

[PATCH v41 11/21] hw/avr: Add limited support for USART peripheral

2020-01-18 Thread Michael Rolnik
These were designed to facilitate testing but should provide enough function to be useful in other contexts. Only a subset of the functions of each peripheral is implemented, mainly due to the lack of a standard way to handle electrical connections (like GPIO pins). Signed-off-by: Sarah Harris

[PATCH v41 20/21] target/avr: Add Avocado test

2020-01-18 Thread Michael Rolnik
The test is based on https://github.com/seharris/qemu-avr-tests/tree/master/free-rtos/Demo demo which. If working correctly, prints 'ABCDEFGHIJKLMNOPQRSTUVWX' out. it also demostrates that timer and IRQ are working Signed-off-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daudé Tested-by: Phil

[PATCH v41 16/21] target/avr: Register AVR support with the rest of QEMU

2020-01-18 Thread Michael Rolnik
Add AVR related definitions into QEMU Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic include/disas/dis-asm.h --- qapi/machine.json | 3 ++- include/disas/dis-asm.h| 19 +++ include/sysemu/arch_init.h | 1 + arch_

[PATCH v41 18/21] target/avr: Update build system

2020-01-18 Thread Michael Rolnik
Make AVR support buildable Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic --- configure | 7 +++ default-configs/avr-softmmu.mak | 5 + target/avr/Makefile.objs| 34 + 3 fi

[PATCH v41 19/21] target/avr: Add boot serial test

2020-01-18 Thread Michael Rolnik
Print out 'T' through serial port Signed-off-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Thomas Huth tests/Makefile.include --- tests/qtest/boot-serial-test.c | 10 ++ tests/qtest/Makefile.include | 2 ++ 2 files changed, 12 i

[PATCH v41 21/21] target/avr: Update MAINTAINERS file

2020-01-18 Thread Michael Rolnik
Include AVR maintaners in MAINTAINERS file Signed-off-by: Michael Rolnik --- MAINTAINERS | 21 + 1 file changed, 21 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 55d3642e6c..c70d77b1ae 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -163,6 +163,15 @@ S: Maintained

Re: [PATCH v3 0/2] cpu: Clarify overloading of reset QOM methods

2020-01-18 Thread Paolo Bonzini
On 16/12/19 16:01, Greg Kurz wrote: > Each cpu subclass overloads the reset method of its parent class with > its own. But since it needs to call the parent method as well, it keeps > a parent_reset pointer to do so. This causes the same not very explicit > boiler plate to be duplicated all around

Re: [PATCH 0/6] Fix more GCC9 -O3 warnings

2020-01-18 Thread Paolo Bonzini
On 18/12/19 07:05, Markus Armbruster wrote: > "Chubb, Peter (Data61, Kensington NSW)" > writes: > >>> "Philippe" == Philippe Mathieu-Daudé writes: >> >> Philippe> Fix some trivial warnings when building with -O3. >> >> For compatibility with lint and other older checkers, it'd be good to kee

Re: [PATCH 6/6] hw/arm/exynos4210: Connect serial port DMA busy signals with pl330

2020-01-18 Thread Peter Maydell
On Sat, 18 Jan 2020 at 15:08, Guenter Roeck wrote: > Do only the pointers have to be in Exynos4210State, or the entire > data structures ? In the armsse code it looks like it is the complete > data structures. Either works. Embedding the entire data structure is the more "modern" approach, but we

Re: [Qemu-devel] What should a virtual board emulate?

2020-01-18 Thread Paolo Bonzini
On 04/01/20 22:16, Philippe Mathieu-Daudé wrote: > 1/ the Radeon chip is soldered on the motherboard, > > 2/ the default BIOS expects the Radeon chip to be >    unconditionally present, > > I insist this patch is incorrect for the particular case of the > Fuloong2e board. I plan to revert it when

Re: [RFC PATCH] qapi: Incorrect attempt to fix building with MC146818RTC=n

2020-01-18 Thread Paolo Bonzini
On 13/01/20 15:01, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> When configured with --without-default-devices and setting >> MC146818RTC=n, the build fails: >> >> LINKx86_64-softmmu/qemu-system-x86_64 >> /usr/bin/ld: qapi/qapi-commands-misc-target.o: in function >> `

Re: [PATCH 1/2] pvpanic: introduce crashloaded for pvpanic

2020-01-18 Thread Paolo Bonzini
On 14/01/20 03:31, zhenwei pi wrote: > Add bit 1 for pvpanic. This bit means that guest hits a panic, but > guest wants to handle error by itself. Typical case: Linux guest runs > kdump in panic. It will help us to separate the abnormal reboot from > normal operation. > > Signed-off-by: zhenwei pi

Re: [PATCH 2/2] pvpanic: implement crashloaded event handling

2020-01-18 Thread Paolo Bonzini
On 14/01/20 03:31, zhenwei pi wrote: > +# @info: information about a panic (since 2.9) Removed this "since 2.9" and queued both patches, thanks. Paolo

Re: [PATCH] qom/object: Display more helpful message when an interface is missing

2020-01-18 Thread Paolo Bonzini
On 18/01/20 17:23, Philippe Mathieu-Daudé wrote: > When adding new devices implementing QOM interfaces, we might > forgot to add the Kconfig dependency that pulls the required > objects in when building. > > Since QOM dependencies are resolved at runtime, we don't get any > link-time failures, and

Re: [PATCH v3 06/17] hw/arm/allwinner: add CPU Configuration module

2020-01-18 Thread Niek Linnenbank
On Sat, Jan 18, 2020 at 10:06 AM Philippe Mathieu-Daudé wrote: > On 1/15/20 12:04 AM, Niek Linnenbank wrote: > > On Tue, Jan 14, 2020 at 12:14 AM Philippe Mathieu-Daudé > > mailto:phi...@redhat.com>> wrote: > > > > On 1/8/20 9:00 PM, Niek Linnenbank wrote: > > > Various Allwinner System

Re: [PATCH v3 10/17] hw/arm/allwinner-h3: add Boot ROM support

2020-01-18 Thread Niek Linnenbank
On Sat, Jan 18, 2020 at 10:09 AM Philippe Mathieu-Daudé wrote: > On 1/15/20 12:10 AM, Niek Linnenbank wrote: > > On Tue, Jan 14, 2020 at 12:28 AM Philippe Mathieu-Daudé > > mailto:phi...@redhat.com>> wrote: > > > > On 1/8/20 9:00 PM, Niek Linnenbank wrote: > > > A real Allwinner H3 SoC c

Re: [PATCH v3 17/17] docs: add Orange Pi PC document

2020-01-18 Thread Niek Linnenbank
Hi Philippe, On Sat, Jan 18, 2020 at 10:38 AM Philippe Mathieu-Daudé wrote: > On 1/8/20 9:00 PM, Niek Linnenbank wrote: > > The Xunlong Orange Pi PC machine is a functional ARM machine > > based on the Allwinner H3 System-on-Chip. It supports mainline > > Linux, U-Boot, NetBSD and is covered by

Commit 3e7fb5811b or something in that series breaks build?

2020-01-18 Thread BALATON Zoltan
Hello, I'm getting errors about missing headers in qapi/* and build fails on current master. I've tried bisecting it which lead to commit 3e7fb5811b where I get: CC qapi/qapi-types-audio.o cc: error: qapi/qapi-types-audio.c: No such file or directory cc: fatal error: no input files (T

Re: [PATCH v3 12/17] hw/arm/allwinner: add RTC device support

2020-01-18 Thread Niek Linnenbank
Hi Philippe, On Sat, Jan 18, 2020 at 4:05 PM Philippe Mathieu-Daudé wrote: > Hi Niek, > > On 1/14/20 11:57 PM, Niek Linnenbank wrote: > > On Tue, Jan 14, 2020 at 11:52 PM Niek Linnenbank > > mailto:nieklinnenb...@gmail.com>> wrote: > > > > Hi Philippe, > > > > On Mon, Jan 13, 2020 at 11:

Re: [PATCH v3 13/17] tests/boot_linux_console: Add a quick test for the OrangePi PC board

2020-01-18 Thread Niek Linnenbank
On Sat, Jan 18, 2020 at 12:22 PM Philippe Mathieu-Daudé wrote: > On 1/8/20 9:00 PM, Niek Linnenbank wrote: > > From: Philippe Mathieu-Daudé > > > > This test boots a Linux kernel on a OrangePi PC board and verify > > the serial output is working. > > > > The kernel image and DeviceTree blob are

Re: Commit 3e7fb5811b or something in that series breaks build?

2020-01-18 Thread Peter Maydell
On Sat, 18 Jan 2020 at 22:41, BALATON Zoltan wrote: > I'm getting errors about missing headers in qapi/* and build fails on > current master. > > I've tried bisecting it which lead to commit 3e7fb5811b where I get: > >CC qapi/qapi-types-audio.o > cc: error: qapi/qapi-types-audio.c: No suc

Re: [PATCH v3 03/17] hw/arm/allwinner-h3: add Clock Control Unit

2020-01-18 Thread Niek Linnenbank
Hi Philippe, On Sat, Jan 18, 2020 at 4:37 PM Philippe Mathieu-Daudé wrote: > Hi Niek, > > On 1/13/20 8:18 PM, Niek Linnenbank wrote: > > Hi, > > > > Just a friendly reminder for review of this patch and the others in this > > series > > that don't yet have a reviewed-by tag :-) > > You are right

Re: Commit 3e7fb5811b or something in that series breaks build?

2020-01-18 Thread BALATON Zoltan
On Sat, 18 Jan 2020, Peter Maydell wrote: On Sat, 18 Jan 2020 at 22:41, BALATON Zoltan wrote: I'm getting errors about missing headers in qapi/* and build fails on current master. I've tried bisecting it which lead to commit 3e7fb5811b where I get: CC qapi/qapi-types-audio.o cc: error

Re: Commit 3e7fb5811b or something in that series breaks build?

2020-01-18 Thread BALATON Zoltan
On Sun, 19 Jan 2020, BALATON Zoltan wrote: On Sat, 18 Jan 2020, Peter Maydell wrote: On Sat, 18 Jan 2020 at 22:41, BALATON Zoltan wrote: I'm getting errors about missing headers in qapi/* and build fails on current master. I've tried bisecting it which lead to commit 3e7fb5811b where I get:

Re: [PATCH 3/4] tests/boot_linux_console: Test booting NetBSD via U-Boot on OrangePi PC

2020-01-18 Thread Niek Linnenbank
Hi Philippe, On Sat, Jan 18, 2020 at 8:16 PM Philippe Mathieu-Daudé wrote: > This test boots U-Boot then NetBSD (stored on a SD card) on > a OrangePi PC board. > > As it requires ~1.3GB of storage, it is disabled by default. > > U-Boot is built by the Debian project [1], and the SD card image >

Re: [PATCH 1/4] Acceptance tests: Extract _console_interaction()

2020-01-18 Thread Niek Linnenbank
On Sat, Jan 18, 2020 at 8:16 PM Philippe Mathieu-Daudé wrote: > Since we are going to re-use the code shared between > wait_for_console_pattern() and exec_command_and_wait_for_pattern(), > extract the common part into a local function. > > Signed-off-by: Philippe Mathieu-Daudé > Tested-by: Niek

  1   2   >