[Qemu-devel] [PATCH v8] qemu-io: add pattern file for write command

2019-08-07 Thread Denis Plotnikov
The patch allows to provide a pattern file for write command. There was no similar ability before. Signed-off-by: Denis Plotnikov --- v8: fix according to Max's comments * get rid of unnecessary buffer for the pattern * buffer allocation just in bytes * take into account the missalign offse

Re: [Qemu-devel] [PATCH v2 0/3] add zstd cluster compression

2019-08-07 Thread Denis Plotnikov
Ping! On Jul 30 2019, at 5:45 pm, Denis Plotnikov wrote: Hi all! Is there any other comments besides Markus's one about adding zlib/zstd links to compressed cluster layout description? On Jul 4 2019, at 4:09 pm, Denis Plotnikov wrote: change log: v2: * relax the compression type setting restr

[Qemu-devel] [RFC PATCH 1/6] utils/python_api: add scripting interface for Qemu with python lib

2019-08-07 Thread Balamuruhan S
Adds scripting interface with python library to call functions in python modules from Qemu that can be used to feed input externally and without recompiling Qemu that can be used for early development, testing and can be extended to abstract some of Qemu code out to a python script to ease maintena

[Qemu-devel] [RFC PATCH 2/6] hw/ppc/pnv_xscom: extend xscom to use python interface

2019-08-07 Thread Balamuruhan S
Existing xscom access emulation for read/write can be extended with the python interface to support feeding data externally. Signed-off-by: Balamuruhan S --- hw/ppc/pnv_xscom.c | 31 --- include/sysemu/sysemu.h | 4 qemu-options.hx | 14

[Qemu-devel] [RFC PATCH 0/6] Enhancing Qemu MMIO emulation with scripting interface

2019-08-07 Thread Balamuruhan S
Hi All, This is a proposal to extend mmio callbacks in Qemu with scripting interface that is prototyped with python in this implementation. It gives ability to feed runtime data through callbacks without recompiling Qemu in generic way. This patchset adds library that provides APIs for Qemu to tal

[Qemu-devel] [RFC PATCH 4/6] hw/ppc/pnv: initialize and realize homer/occ common area

2019-08-07 Thread Balamuruhan S
homer and occ common area region base address are initialized to create device tree and realized to map the address with mmio callbacks during `pnv_chip_realize()`. `SysBusNum` enum is introduced to set sysbus for XSCOM, ICP, HOMER and OCC appropriately and chip_num to initialize and retrieve base

[Qemu-devel] [RFC PATCH 3/6] hw/ppc/pnv_homer: add homer/occ common area emulation for PowerNV

2019-08-07 Thread Balamuruhan S
Add mmio callback functions to enable homer/occ common area to emulate pstate table, occ-sensors, slw, occ static and dynamic values for Power8 and Power9 chips. It also works for multiple chips as offset remains the same whereas the base address are handled appropriately while initializing device

[Qemu-devel] [RFC PATCH 6/6] hw/ppc/pnv_homer: add python interface support for homer/occ common area

2019-08-07 Thread Balamuruhan S
use python interface APIs in homer/occ common area emulation to interact with scripts if provided else fallback to normal flow, it shows how simple to use the interface to call python methods with any number of arguments in any script placed in common -module-path provided in qemu commandline. Sig

[Qemu-devel] [RFC PATCH 5/6] hw/ppc/pnv_xscom: retrieve homer/occ base address from PBA BARs

2019-08-07 Thread Balamuruhan S
During PowerNV boot skiboot populates the device tree by retrieving base address of homer/occ common area from PBA BARs and prd ipoll mask by accessing xscom read/write accesses. Signed-off-by: Balamuruhan S --- hw/ppc/pnv_xscom.c | 27 +++ 1 file changed, 23 insertions(+

Re: [Qemu-devel] [RFC PATCH 0/6] Enhancing Qemu MMIO emulation with scripting interface

2019-08-07 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190807071445.4109-1-bal...@linux.ibm.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [RFC PATCH 0/6] Enhancing Qemu MMIO emulation with scripting interface Message

Re: [Qemu-devel] [PATCH v4 0/3] High downtime with 95+ throttle pct

2019-08-07 Thread Yury Kotov
Ping 23.07.2019, 16:42, "Yury Kotov" : > Hi, > > V4: > * The test was simplified to prevent false fails. > > V3: > * Rebase fixes (migrate_set_parameter -> migrate_set_parameter_int) > > V2: > * Added a test > * Fixed qemu_cond_timedwait for qsp > > I wrote a test for migration auto converge and f

[Qemu-devel] [PATCH v2 00/28] riscv: sifive_u: Improve the emulation fidelity of sifive_u machine

2019-08-07 Thread Bin Meng
As of today, the QEMU 'sifive_u' machine is a special target that does not boot the upstream OpenSBI/U-Boot firmware images built for the real SiFive HiFive Unleashed board. Hence OpenSBI supports a special platform "qemu/sifive_u". For U-Boot, the sifive_fu540_defconfig is referenced in the OpenSB

[Qemu-devel] [PATCH v2 04/28] riscv: hart: Extract hart realize to a separate routine

2019-08-07 Thread Bin Meng
Currently riscv_harts_realize() creates all harts based on the same cpu type given in the hart array property. With current implementation it can only create symmetric harts. Exact the hart realize to a separate routine in preparation for supporting heterogeneous hart arrays. Signed-off-by: Bin Me

[Qemu-devel] [PATCH v2 03/28] riscv: Add a sifive_cpu.h to include both E and U cpu type defines

2019-08-07 Thread Bin Meng
Group SiFive E and U cpu type defines into one header file. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- Changes in v2: None include/hw/riscv/sifive_cpu.h | 31 +++ include/hw/riscv/sifive_e.h | 7 +-- include/hw/riscv/sifive_u.h | 7 +--

[Qemu-devel] [PATCH v2 01/28] riscv: hw: Remove superfluous "linux, phandle" property

2019-08-07 Thread Bin Meng
"linux,phandle" property is optional. Remove all instances in the sifive_u and virt machine device tree. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- Changes in v2: None hw/riscv/sifive_u.c | 3 --- hw/riscv/virt.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/hw/ris

[Qemu-devel] [PATCH v2 09/28] riscv: sifive_u: Update UART base addresses

2019-08-07 Thread Bin Meng
This updates the UART base address to match the hardware. Signed-off-by: Bin Meng Reviewed-by: Jonathan Behrens Acked-by: Alistair Francis --- Changes in v2: None hw/riscv/sifive_u.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive

[Qemu-devel] [PATCH v2 12/28] riscv: sifive_e: prci: Fix a typo of hfxosccfg register programming

2019-08-07 Thread Bin Meng
It should use SIFIVE_PRCI_HFXOSCCFG_RDY and SIFIVE_PRCI_HFXOSCCFG_EN for hfxosccfg register programming. Signed-off-by: Bin Meng Acked-by: Alistair Francis --- Changes in v2: None hw/riscv/sifive_e_prci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/sifive_e_pr

[Qemu-devel] [PATCH v2 05/28] riscv: hart: Support heterogeneous harts population

2019-08-07 Thread Bin Meng
At present we only allow symmetric harts to be created. In order to support heterogeneous harts like SiFive FU540, update hart array's "cpu-type" property to allow cpu type to be set per hart, separated by delimiter ",". The frist cpu type before the delimiter is assigned to hart 0, and the second

[Qemu-devel] [PATCH v2 02/28] riscv: hw: Use qemu_fdt_setprop_cell() for property with only 1 cell

2019-08-07 Thread Bin Meng
Some of the properties only have 1 cell so we should use qemu_fdt_setprop_cell() instead of qemu_fdt_setprop_cells(). Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- Changes in v2: None hw/riscv/sifive_u.c | 16 hw/riscv/virt.c | 24 2 f

[Qemu-devel] [PATCH v2 06/28] riscv: sifive_u: Update hart configuration to reflect the real FU540 SoC

2019-08-07 Thread Bin Meng
The FU540-C000 includes a 64-bit E51 RISC-V core and four 64-bit U54 RISC-V cores. Currently the sifive_u machine only populates 4 U54 cores. Update the max cpu number to 5 to reflect the real hardware, and pass "cpu-type" to populate heterogeneous harts. The cpu nodes in the generated DTS have be

[Qemu-devel] [PATCH v2 13/28] riscv: sifive_e: prci: Update the PRCI register block size

2019-08-07 Thread Bin Meng
Currently the PRCI register block size is set to 0x8000, but in fact 0x1000 is enough, which is also what the manual says. Signed-off-by: Bin Meng --- Changes in v2: None hw/riscv/sifive_e_prci.c | 2 +- include/hw/riscv/sifive_e_prci.h | 2 ++ 2 files changed, 3 insertions(+), 1 delet

[Qemu-devel] [PATCH v2 07/28] riscv: sifive_u: Set the minimum number of cpus to 2

2019-08-07 Thread Bin Meng
It is not useful if we only have one management CPU. Signed-off-by: Bin Meng --- Changes in v2: - update the file header to indicate at least 2 harts are created hw/riscv/sifive_u.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive

[Qemu-devel] [PATCH v2 11/28] riscv: sifive: Rename sifive_prci.{c, h} to sifive_e_prci.{c, h}

2019-08-07 Thread Bin Meng
Current SiFive PRCI model only works with sifive_e machine, as it only emulates registers or PRCI block in the FE310 SoC. Rename the file name to make it clear that it is for sifive_e. Signed-off-by: Bin Meng --- Changes in v2: None hw/riscv/Makefile.objs | 2 +-

[Qemu-devel] [PATCH v2 10/28] riscv: sifive_u: Remove the unnecessary include of prci header

2019-08-07 Thread Bin Meng
sifive_u machine does not use PRCI as of today. Remove the prci header inclusion. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- Changes in v2: None hw/riscv/sifive_u.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index ea45e77..75570

[Qemu-devel] [PATCH v2 18/28] riscv: hw: Implement a model for SiFive FU540 OTP

2019-08-07 Thread Bin Meng
This implements a simple model for SiFive FU540 OTP (One-Time Programmable) Memory interface, primarily for reading out the stored serial number from the first 1 KiB of the 16 KiB OTP memory reserved by SiFive for internal use. Signed-off-by: Bin Meng --- Changes in v2: None hw/riscv/Makefile.

[Qemu-devel] [PATCH v2 08/28] riscv: sifive_u: Update PLIC hart topology configuration string

2019-08-07 Thread Bin Meng
With heterogeneous harts config, the PLIC hart topology configuration string are "M,MS,.." because of the monitor hart #0. Suggested-by: Fabien Chouteau Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- Changes in v2: None hw/riscv/sifive_u.c | 7 --- 1 file changed, 4 insertions

[Qemu-devel] [PATCH v2 17/28] riscv: sifive_u: Change UART node name in device tree

2019-08-07 Thread Bin Meng
OpenSBI for fu540 does DT fix up (see fu540_modify_dt()) by updating chosen "stdout-path" to point to "/soc/serial@...", and U-Boot will use this information to locate the serial node and probe its driver. However currently we generate the UART node name as "/soc/uart@...", causing U-Boot fail to f

[Qemu-devel] [PATCH v2 23/28] riscv: sifive_u: Fix broken GEM support

2019-08-07 Thread Bin Meng
At present the GEM support in sifive_u machine is seriously broken. - The GEM block register base was set to a weird number (0x100900FC), which for no way could work with the cadence_gem model in QEMU. - The generated DT node for GEM has a "clocks-names" which is an invalid property name. Not

[Qemu-devel] [PATCH v2 14/28] riscv: sifive: Implement PRCI model for FU540

2019-08-07 Thread Bin Meng
This adds a simple PRCI model for FU540 (sifive_u). It has different register layout from the existing PRCI model for FE310 (sifive_e). Signed-off-by: Bin Meng --- Changes in v2: None hw/riscv/Makefile.objs | 1 + hw/riscv/sifive_u_prci.c | 163 +

[Qemu-devel] [PATCH v2 15/28] riscv: sifive_u: Generate hfclk and rtcclk nodes

2019-08-07 Thread Bin Meng
To keep in sync with Linux kernel device tree, generate hfclk and rtcclk nodes in the device tree, to be referenced by PRCI node. Signed-off-by: Bin Meng --- Changes in v2: None hw/riscv/sifive_u.c | 23 +++ include/hw/riscv/sifive_u.h | 2 ++ 2 files changed, 25 i

[Qemu-devel] [PATCH v2 21/28] riscv: sifive_u: Update UART and ethernet node clock properties

2019-08-07 Thread Bin Meng
Now that we have added PRCI nodes, update existing UART and ethernet nodes to use PRCI as their clock sources, to keep in sync with the Linux kernel device tree. With above changes, the previously handcrafted "/soc/ethclk" node is no longer needed. Remove it. Signed-off-by: Bin Meng --- Changes

[Qemu-devel] [PATCH v2 25/28] riscv: hw: Remove not needed PLIC properties in device tree

2019-08-07 Thread Bin Meng
This removes "reg-names" and "riscv,max-priority" properties of the PLIC node from device tree. Signed-off-by: Bin Meng Reviewed-by: Jonathan Behrens --- Changes in v2: - keep the PLIC compatible string unchanged as OpenSBI uses that for DT fix up hw/riscv/sifive_u.c | 2 -- hw/riscv/virt.

[Qemu-devel] [PATCH v2 16/28] riscv: sifive_u: Add PRCI block to the SoC

2019-08-07 Thread Bin Meng
Add PRCI mmio base address and size mappings to sifive_u machine, and generate the corresponding device tree node. Signed-off-by: Bin Meng --- Changes in v2: None hw/riscv/sifive_u.c | 21 - include/hw/riscv/sifive_u.h | 1 + 2 files changed, 21 insertions(+), 1 de

[Qemu-devel] [PATCH v2 19/28] riscv: sifive_u: Instantiate OTP memory with a serial number

2019-08-07 Thread Bin Meng
This adds an OTP memory with a given serial number to the sifive_u machine. With such support, the upstream U-Boot for sifive_fu540 boots out of the box on the sifive_u machine. Signed-off-by: Bin Meng --- Changes in v2: None hw/riscv/sifive_u.c | 5 + include/hw/riscv/sifive_u.h |

[Qemu-devel] [PATCH v2 22/28] riscv: sifive_u: Generate an aliases node in the device tree

2019-08-07 Thread Bin Meng
The Linux kernel SiFive UART driver expects an aliases node to be present in the device tree, from which the driver extracts the port number from "serial#" in the aliases node. Signed-off-by: Bin Meng --- Changes in v2: None hw/riscv/sifive_u.c | 2 ++ 1 file changed, 2 insertions(+) diff --g

Re: [Qemu-devel] [PATCH v3 04/33] make Device and Bus Resettable

2019-08-07 Thread Damien Hedde
On 8/6/19 2:35 AM, David Gibson wrote: > On Wed, Jul 31, 2019 at 11:09:05AM +0200, Damien Hedde wrote: >> >> >> On 7/31/19 7:56 AM, David Gibson wrote: >>> On Mon, Jul 29, 2019 at 04:56:25PM +0200, Damien Hedde wrote: This add Resettable interface implementation for both Bus and Device. >>>

[Qemu-devel] [PATCH v2 24/28] riscv: sifive_u: Support loading initramfs

2019-08-07 Thread Bin Meng
The loading of initramfs is currently not supported on 'sifive_u'. Add the support to make '-initrd' command line parameter useful. Signed-off-by: Bin Meng --- Changes in v2: None hw/riscv/sifive_u.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/riscv/sif

Re: [Qemu-devel] [RFC PATCH 3/6] hw/ppc/pnv_homer: add homer/occ common area emulation for PowerNV

2019-08-07 Thread Cédric Le Goater
On 07/08/2019 09:14, Balamuruhan S wrote: > Add mmio callback functions to enable homer/occ common area > to emulate pstate table, occ-sensors, slw, occ static and > dynamic values for Power8 and Power9 chips. It also works for > multiple chips as offset remains the same whereas the base > address

[Qemu-devel] [PATCH v2 27/28] riscv: virt: Change create_fdt() to return void

2019-08-07 Thread Bin Meng
There is no need to return fdt at the end of create_fdt() because it's already saved in s->fdt. Other machines (sifive_u, spike) don't do it neither. Signed-off-by: Bin Meng --- Changes in v2: None hw/riscv/virt.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/

[Qemu-devel] [PATCH v2 28/28] riscv: sifive_u: Update model and compatible strings in device tree

2019-08-07 Thread Bin Meng
This updates model and compatible strings to use the same strings as used in the Linux kernel device tree (hifive-unleashed-a00.dts). Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- Changes in v2: None hw/riscv/sifive_u.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.2 v4 1/2] kvm: s390: split too big memory section on several memslots

2019-08-07 Thread David Hildenbrand
On 06.08.19 11:48, Igor Mammedov wrote: > Max memslot size supported by kvm on s390 is 8Tb, > move logic of splitting RAM in chunks upto 8T to KVM code. > > This way it will hide KVM specific restrictions in KVM code > and won't affect baord level design decisions. Which would allow > us to avoid

Re: [Qemu-devel] [RFC PATCH 4/6] hw/ppc/pnv: initialize and realize homer/occ common area

2019-08-07 Thread Cédric Le Goater
On 07/08/2019 09:14, Balamuruhan S wrote: > homer and occ common area region base address are initialized > to create device tree and realized to map the address with > mmio callbacks during `pnv_chip_realize()`. > > `SysBusNum` enum is introduced to set sysbus for XSCOM, ICP, > HOMER and OCC appr

Re: [Qemu-devel] [RFC PATCH 5/6] hw/ppc/pnv_xscom: retrieve homer/occ base address from PBA BARs

2019-08-07 Thread Cédric Le Goater
On 07/08/2019 09:14, Balamuruhan S wrote: > During PowerNV boot skiboot populates the device tree by retrieving > base address of homer/occ common area from PBA BARs and prd ipoll > mask by accessing xscom read/write accesses. This looks good. If you could add defines it would be better. Our comm

[Qemu-devel] [PATCH 0/8] backup improvements

2019-08-07 Thread Vladimir Sementsov-Ogievskiy
Hi all! There are some fixes and refactorings I need on my way to resend my backup-top series. It's obvious now that I need to share copying code between backup and backup-top, as backup copying code becomes smarter and more complicated. So the goal of the series is to make copying code more share

[Qemu-devel] [PATCH 6/8] block/backup: teach backup_cow_with_bounce_buffer to copy more at once

2019-08-07 Thread Vladimir Sementsov-Ogievskiy
backup_cow_with_offload can transfer more than on cluster. Let backup_cow_with_bounce_buffer behave similarly. It reduces number of IO and there are no needs to copy cluster by cluster. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 30 +++--- 1 file cha

[Qemu-devel] [PATCH 2/8] block/backup: refactor write_flags

2019-08-07 Thread Vladimir Sementsov-Ogievskiy
write flags are constant, let's store it in BackupBlockJob instead of recalculating. It also makes two boolean fields to be unused, so, drop them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- block/backup.c | 24 1 file changed, 12 insertions(+

[Qemu-devel] [PATCH 4/8] block/backup: improve unallocated clusters skipping

2019-08-07 Thread Vladimir Sementsov-Ogievskiy
Limit block_status querying to request bounds on write notifier to avoid extra seeking. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 38 +- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/block/backup.c b/block/backup.c inde

[Qemu-devel] [PATCH 5/8] block/backup: fix backup_cow_with_offload for last cluster

2019-08-07 Thread Vladimir Sementsov-Ogievskiy
We shouldn't try to copy bytes beyond EOF. Fix it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/backup.c b/block/backup.c index a4d37d2d62..eb41e4af4f 100644 --- a/block/backup.c +++ b/block/backup.c @@ -

[Qemu-devel] [PATCH 1/8] block/backup: deal with zero detection

2019-08-07 Thread Vladimir Sementsov-Ogievskiy
We have detect_zeroes option, so at least for blockdev-backup user should define it if zero-detection is needed. For drive-backup leave detection enabled by default but do it through existing option instead of open-coding. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- b

[Qemu-devel] [PATCH 8/8] block/backup: backup_do_cow: use bdrv_dirty_bitmap_next_dirty_area

2019-08-07 Thread Vladimir Sementsov-Ogievskiy
Use effective bdrv_dirty_bitmap_next_dirty_area interface. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 56 ++ 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/block/backup.c b/block/backup.c index f19c9195fe..5ed

[Qemu-devel] [PATCH 7/8] block/backup: merge duplicated logic into backup_do_cow

2019-08-07 Thread Vladimir Sementsov-Ogievskiy
backup_cow_with_offload and backup_cow_with_bounce_buffer contains a lot of duplicated logic. Move it into backup_do_cow. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 83 +++--- 1 file changed, 31 insertions(+), 52 deletions(-) dif

[Qemu-devel] [PATCH 3/8] block/io: handle alignment and max_transfer for copy_range

2019-08-07 Thread Vladimir Sementsov-Ogievskiy
copy_range ignores these limitations, let's improve it. block/backup code handles max_transfer for copy_range by itself, now it's not needed more, drop it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 11 ++- block/io.c | 41 +--

Re: [Qemu-devel] [RFC PATCH 0/6] Enhancing Qemu MMIO emulation with scripting interface

2019-08-07 Thread Cédric Le Goater
On 07/08/2019 09:14, Balamuruhan S wrote: > Hi All, > > This is a proposal to extend mmio callbacks in Qemu with scripting interface > that is prototyped with python in this implementation. It gives ability to > feed runtime data through callbacks without recompiling Qemu in generic way. > This pa

Re: [Qemu-devel] [PATCH-for-4.2 v8 6/9] hw/arm/virt: Enable device memory cold/hot plug with ACPI boot

2019-08-07 Thread Shameerali Kolothum Thodi
Hi Igor, > -Original Message- > From: Igor Mammedov [mailto:imamm...@redhat.com] > Sent: 06 August 2019 14:09 > To: Shameerali Kolothum Thodi > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; > eric.au...@redhat.com; peter.mayd...@linaro.org; sa...@linux.intel.com; > ard.biesheu...@linaro

[Qemu-devel] [PATCH] virtio-pci: Add Function Level Reset support

2019-08-07 Thread Julia Suvorova
Using FLR becomes convenient in cases where resetting the bus is impractical, for example, when debugging the behavior of individual functions. Signed-off-by: Julia Suvorova --- hw/virtio/virtio-pci.c | 10 ++ hw/virtio/virtio-pci.h | 1 + 2 files changed, 11 insertions(+) diff --git a

[Qemu-devel] [PATCH v6 00/26] Invert Endian bit in SPARCv9 MMU TTE

2019-08-07 Thread tony.nguyen
This patchset implements the IE (Invert Endian) bit in SPARCv9 MMU TTE. It is an attempt of the instructions outlined by Richard Henderson to Mark Cave-Ayland. Tested with OpenBSD on sun4u. Solaris 10 is my actual goal, but unfortunately a separate keyboard issue remains in the way. On 01/11/17

[Qemu-devel] [PATCH v6 01/26] configure: Define TARGET_ALIGNED_ONLY

2019-08-07 Thread tony.nguyen
Rename ALIGNED_ONLY to TARGET_ALIGNED_ONLY for clarity and move defines out of target/foo/cpu.h into configure, as we do with TARGET_WORDS_BIGENDIAN, so that it is always defined early. Poisoned TARGET_ALIGNED_ONLY to prevent use in common code. Signed-off-by: Tony Nguyen Reviewed-by: Philippe M

[Qemu-devel] [PATCH v6 03/26] memory: Introduce size_memop

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Introduce no-op size_memop to aid preparatory conversion of interfaces. Once interfaces are converted, size_memop will be implemented to return a MemOp from size in bytes. Signed-off-by: Tony Ng

[Qemu-devel] [PATCH v6 02/26] tcg: TCGMemOp is now accelerator independent MemOp

2019-08-07 Thread tony.nguyen
Preparation for collapsing the two byte swaps, adjust_endianness and handle_bswap, along the I/O path. Target dependant attributes are conditionalize upon NEED_CPU_H. Signed-off-by: Tony Nguyen Acked-by: David Gibson Reviewed-by: Richard Henderson --- MAINTAINERS |

[Qemu-devel] [PATCH v6 04/26] target/mips: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v6 06/26] hw/intc/armv7m_nic: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v6 07/26] hw/virtio: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v6 05/26] hw/s390x: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v6 11/26] memory: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
Convert memory_region_dispatch_{read|write} operand "unsigned size" into a "MemOp op". Signed-off-by: Tony Nguyen --- include/exec/memop.h | 18 +- include/exec/memory.h | 9 + memory.c | 7 +-- 3 files changed, 23 insertions(+), 11 deletions(-) diff

[Qemu-devel] [PATCH v6 12/26] hw/s390x: Hard code size with MO_{8|16|32|64}

2019-08-07 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoid size_memop calls. Signed-off-by: Tony

[Qemu-devel] [PATCH v6 10/26] cputlb: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v6 08/26] hw/vfio: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v6 09/26] exec: Access MemoryRegion with MemOp

2019-08-07 Thread tony.nguyen
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be conver

[Qemu-devel] [PATCH v6 13/26] target/mips: Hard code size with MO_{8|16|32|64}

2019-08-07 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoid size_memop calls. Signed-off-by: Tony

[Qemu-devel] [PATCH v6 19/26] exec: Delete DEVICE_HOST_ENDIAN

2019-08-07 Thread tony.nguyen
DEVICE_HOST_ENDIAN is conditional upon HOST_WORDS_BIGENDIAN. Code is cleaner if the single use of DEVICE_HOST_ENDIAN is instead directly conditional upon HOST_WORDS_BIGENDIAN. Signed-off-by: Tony Nguyen --- include/exec/cpu-common.h | 8 memory.c | 6 +- 2 files ch

[Qemu-devel] [PATCH v6 16/26] exec: Map device_endian onto MemOp

2019-08-07 Thread tony.nguyen
Preparation to replace device_endian with MemOp. Mapping device_endian onto MemOp limits behaviour changes to this relatively smaller patch. The next patch will replace all device_endian usages with the equivalent MemOp. That patch will be large but have no behaviour changes. A subsequent patch

[Qemu-devel] [PATCH v6 20/26] memory: Access MemoryRegion with endianness

2019-08-07 Thread tony.nguyen
Preparation for collapsing the two byte swaps adjust_endianness and handle_bswap into the former. Call memory_region_dispatch_{read|write} with endianness encoded into the "MemOp op" operand. This patch does not change any behaviour as memory_region_dispatch_{read|write} is yet to handle the endi

[Qemu-devel] [PATCH v6 14/26] exec: Hard code size with MO_{8|16|32|64}

2019-08-07 Thread tony.nguyen
Temporarily no-op size_memop was introduced to aid the conversion of memory_region_dispatch_{read|write} operand "unsigned size" into "MemOp op". Now size_memop is implemented, again hard coded size but with MO_{8|16|32|64}. This is more expressive and avoid size_memop calls. Signed-off-by: Tony

[Qemu-devel] [PATCH v6 25/26] target/sparc: Add TLB entry with attributes

2019-08-07 Thread tony.nguyen
Append MemTxAttrs to interfaces so we can pass along up coming Invert Endian TTE bit on SPARC64. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- target/sparc/mmu_helper.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/target/

[Qemu-devel] [PATCH v6 23/26] cpu: TLB_FLAGS_MASK bit to force memory slow path

2019-08-07 Thread tony.nguyen
The fast path is taken when TLB_FLAGS_MASK is all zero. TLB_FORCE_SLOW is simply a TLB_FLAGS_MASK bit to force the slow path, there are no other side effects. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson --- include/exec/cpu-all.h | 10 -- 1 file changed, 8 insertions(+),

[Qemu-devel] [PATCH v6 24/26] cputlb: Byte swap memory transaction attribute

2019-08-07 Thread tony.nguyen
Notice new attribute, byte swap, and force the transaction through the memory slow path. Required by architectures that can invert endianness of memory transaction, e.g. SPARC64 has the Invert Endian TTE bit. Suggested-by: Richard Henderson Signed-off-by: Tony Nguyen Reviewed-by: Richard Hender

[Qemu-devel] [PATCH v6 18/26] exec: Delete device_endian

2019-08-07 Thread tony.nguyen
device_endian has been made redundant by MemOp. Signed-off-by: Tony Nguyen --- include/exec/cpu-common.h | 8 1 file changed, 8 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 01a29ba..7eeb78c 100644 --- a/include/exec/cpu-common.h +++ b/include/ex

[Qemu-devel] [PATCH v6 26/26] target/sparc: sun4u Invert Endian TTE bit

2019-08-07 Thread tony.nguyen
This bit configures endianness of PCI MMIO devices. It is used by Solaris and OpenBSD sunhme drivers. Tested working on OpenBSD. Unfortunately Solaris 10 had a unrelated keyboard issue blocking testing... another inch towards Solaris 10 on SPARC64 =) Signed-off-by: Tony Nguyen Reviewed-by: Rich

[Qemu-devel] [PATCH v6 22/26] memory: Single byte swap along the I/O path

2019-08-07 Thread tony.nguyen
Now that MemOp has been pushed down into the memory API, and callers are encoding endianness, we can collapse byte swaps along the I/O path into the accelerator and target independent adjust_endianness. Collapsing byte swaps along the I/O path enables additional endian inversion logic, e.g. SPARC6

[Qemu-devel] [PATCH v6 15/26] build: Correct non-common common-obj-* to obj-*

2019-08-07 Thread tony.nguyen
Preparation for replacing device_endian with MemOp. Device realizing code with MemorRegionOps endianness as DEVICE_NATIVE_ENDIAN is not common code. Corrected devices were identified by making the declaration of DEVICE_NATIVE_ENDIAN conditional upon NEED_CPU_H and then listing what failed to comp

[Qemu-devel] [PATCH v6 21/26] cputlb: Replace size and endian operands for MemOp

2019-08-07 Thread tony.nguyen
Preparation for collapsing the two byte swaps adjust_endianness and handle_bswap into the former. Signed-off-by: Tony Nguyen --- accel/tcg/cputlb.c | 170 +-- include/exec/memop.h | 6 ++ memory.c | 11 +--- 3 files changed, 90 ins

[Qemu-devel] [PATCH] usbredir: fix buffer-overflow on vmload

2019-08-07 Thread Marc-André Lureau
If interface_count is NO_INTERFACE_INFO, let's not access the arrays out-of-bounds. ==994==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x625000243930 at pc 0x5642068086a8 bp 0x7f0b6f9ffa50 sp 0x7f0b6f9ffa40 READ of size 1 at 0x625000243930 thread T0 #0 0x5642068086a7 in usbredir_

Re: [Qemu-devel] [PATCH v3 1/3] migration: add qemu_file_update_transfer interface

2019-08-07 Thread Juan Quintela
Ivan Ren wrote: > From: Ivan Ren > > Add qemu_file_update_transfer for just update bytes_xfer for speed > limitation. This will be used for further migration feature such as > multifd migration. > > Signed-off-by: Ivan Ren > Reviewed-by: Wei Yang Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH v3 2/3] migration: add speed limit for multifd migration

2019-08-07 Thread Juan Quintela
Ivan Ren wrote: > From: Ivan Ren > > Limit the speed of multifd migration through common speed limitation > qemu file. > > Signed-off-by: Ivan Ren Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH v3 3/3] migration: update ram_counters for multifd sync packet

2019-08-07 Thread Juan Quintela
Ivan Ren wrote: > From: Ivan Ren > > Multifd sync will send MULTIFD_FLAG_SYNC flag info to destination, add > these bytes to ram_counters record. > > Signed-off-by: Ivan Ren > Suggested-by: Wei Yang Reviewed-by: Juan Quintela

Re: [Qemu-devel] [RFC PATCH 0/6] Enhancing Qemu MMIO emulation with scripting interface

2019-08-07 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190807071445.4109-1-bal...@linux.ibm.com/ Hi, This series failed build test on s390x host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that

Re: [Qemu-devel] [PATCH v2 11/28] riscv: sifive: Rename sifive_prci.{c, h} to sifive_e_prci.{c, h}

2019-08-07 Thread Chih-Min Chao
On Wed, Aug 7, 2019 at 3:49 PM Bin Meng wrote: > Current SiFive PRCI model only works with sifive_e machine, as it > only emulates registers or PRCI block in the FE310 SoC. > > Rename the file name to make it clear that it is for sifive_e. > > Signed-off-by: Bin Meng > --- > > Changes in v2: Non

Re: [Qemu-devel] [PATCH v2 12/28] riscv: sifive_e: prci: Fix a typo of hfxosccfg register programming

2019-08-07 Thread Chih-Min Chao
On Wed, Aug 7, 2019 at 3:48 PM Bin Meng wrote: > It should use SIFIVE_PRCI_HFXOSCCFG_RDY and SIFIVE_PRCI_HFXOSCCFG_EN > for hfxosccfg register programming. > > Signed-off-by: Bin Meng > Acked-by: Alistair Francis > --- > > Changes in v2: None > > hw/riscv/sifive_e_prci.c | 2 +- > 1 file chang

Re: [Qemu-devel] [PATCH v2 13/28] riscv: sifive_e: prci: Update the PRCI register block size

2019-08-07 Thread Chih-Min Chao
On Wed, Aug 7, 2019 at 3:49 PM Bin Meng wrote: > Currently the PRCI register block size is set to 0x8000, but in fact > 0x1000 is enough, which is also what the manual says. > > Signed-off-by: Bin Meng > --- > > Changes in v2: None > > hw/riscv/sifive_e_prci.c | 2 +- > include/hw/riscv

Re: [Qemu-devel] [PATCH v2 24/28] riscv: sifive_u: Support loading initramfs

2019-08-07 Thread Chih-Min Chao
On Wed, Aug 7, 2019 at 3:56 PM Bin Meng wrote: > The loading of initramfs is currently not supported on 'sifive_u'. > Add the support to make '-initrd' command line parameter useful. > > Signed-off-by: Bin Meng > --- > > Changes in v2: None > > hw/riscv/sifive_u.c | 13 - > 1 file c

Re: [Qemu-devel] [Qemu-riscv] [PATCH v2 27/28] riscv: virt: Change create_fdt() to return void

2019-08-07 Thread Chih-Min Chao
On Wed, Aug 7, 2019 at 3:54 PM Bin Meng wrote: > There is no need to return fdt at the end of create_fdt() because > it's already saved in s->fdt. Other machines (sifive_u, spike) > don't do it neither. > > Signed-off-by: Bin Meng > --- > > Changes in v2: None > > hw/riscv/virt.c | 11 -

Re: [Qemu-devel] [PATCH-for-4.2 v8 6/9] hw/arm/virt: Enable device memory cold/hot plug with ACPI boot

2019-08-07 Thread Igor Mammedov
On Wed, 7 Aug 2019 08:19:16 + Shameerali Kolothum Thodi wrote: > Hi Igor, > > > -Original Message- > > From: Igor Mammedov [mailto:imamm...@redhat.com] > > Sent: 06 August 2019 14:09 > > To: Shameerali Kolothum Thodi > > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; > > eric.au...

Re: [Qemu-devel] [PATCH v2 0/9] add failover feature for assigned network devices

2019-08-07 Thread Jens Freimann
On Tue, Aug 06, 2019 at 04:43:35AM -0400, Michael S. Tsirkin wrote: On Mon, Aug 05, 2019 at 08:49:49PM +0200, Jens Freimann wrote: On Mon, Aug 05, 2019 at 10:22:25AM -0400, Michael S. Tsirkin wrote: > On Mon, Aug 05, 2019 at 03:12:15PM +0200, Jens Freimann wrote: > > On Fri, Aug 02, 2019 at 11:2

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/2] target/arm: Factor out 'generate singlestep exception' function

2019-08-07 Thread Alex Bennée
Peter Maydell writes: > Factor out code to 'generate a singlestep exception', which is > currently repeated in four places. > > To do this we need to also pull the identical copies of the > gen-exception() function out of translate-a64.c and translate.c > into translate.h. > > (There is a bug i

Re: [Qemu-devel] [RFC PATCH 0/6] Enhancing Qemu MMIO emulation with scripting interface

2019-08-07 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190807071445.4109-1-bal...@linux.ibm.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash mak

Re: [Qemu-devel] [PATCH v2 09/28] riscv: sifive_u: Update UART base addresses

2019-08-07 Thread Chih-Min Chao
On Wed, Aug 7, 2019 at 3:48 PM Bin Meng wrote: > This updates the UART base address to match the hardware. > > Signed-off-by: Bin Meng > Reviewed-by: Jonathan Behrens > Acked-by: Alistair Francis > --- > > Changes in v2: None > > hw/riscv/sifive_u.c | 4 ++-- > 1 file changed, 2 insertions(+)

Re: [Qemu-devel] [PATCH v2 27/29] Include sysemu/sysemu.h a lot less

2019-08-07 Thread Stefan Hajnoczi
On Tue, Aug 06, 2019 at 05:14:33PM +0200, Markus Armbruster wrote: > diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h > index e5b62dd2fc..de70b7a19a 100644 > --- a/include/hw/qdev-core.h > +++ b/include/hw/qdev-core.h > @@ -5,7 +5,6 @@ > #include "qemu/bitmap.h" > #include "qom/object

Re: [Qemu-devel] [PATCH v2 06/29] trace: Eliminate use of TARGET_FMT_plx

2019-08-07 Thread Stefan Hajnoczi
On Tue, Aug 06, 2019 at 05:14:12PM +0200, Markus Armbruster wrote: > hw/tpm/trace-events uses TARGET_FMT_plx formats with uint64_t > arguments. That's wrong, TARGET_FMT_plx takes hwaddr. Since hwaddr > happens to be uint64_t, it works anyway. Messed up in commit > ec427498da5, v2.12.0. Clean up

Re: [Qemu-devel] [PATCH v2 07/29] trace: Do not include qom/cpu.h into generated trace.h

2019-08-07 Thread Stefan Hajnoczi
On Tue, Aug 06, 2019 at 05:14:13PM +0200, Markus Armbruster wrote: > docs/devel/tracing.txt explains "since many source files include > trace.h, [the generated trace.h use] a minimum of types and other > header files included to keep the namespace clean and compile times > and dependencies down." >

Re: [Qemu-devel] [PATCH] hw/sd/aspeed_sdhci: New device

2019-08-07 Thread Peter Maydell
On Tue, 6 Aug 2019 at 23:12, Eddie James wrote: > > > On 8/5/19 9:31 AM, Peter Maydell wrote: > > On Wed, 26 Jun 2019 at 19:43, Eddie James wrote: > >> diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c > >> index 7b80b1d..51a733b 100644 > >> --- a/hw/sd/sdhci.c > >> +++ b/hw/sd/sdhci.c > >> @@ -213,7 +

  1   2   3   4   >