[Qemu-devel] [RFC v2] translate-all: protect code_gen_buffer with RCU

2016-04-23 Thread Emilio G. Cota
[ Applies on top of bennee/mttcg/enable-mttcg-for-armv7-v1 after reverting "translate-all: introduces tb_flush_safe". A trivial conflict must be solved after applying. ] This is a first attempt at making tb_flush not have to stop all CPUs. There are issues as pointed out below, but this could be a

Re: [Qemu-devel] [RFC] translate-all: protect code_gen_buffer with RCU

2016-04-23 Thread Emilio G. Cota
On Fri, Apr 22, 2016 at 15:41:13 +0100, Alex Bennée wrote: > Emilio G. Cota writes: (snip) > > Known issues: > > - Basically compile-tested only, since I've only run this with > > single-threaded TCG; I also tried running it with linux-user, > > but in order to trigger tb_flush I had to make c

Re: [Qemu-devel] ARM PC-relative Loads, and TBs in soft MMU

2016-04-23 Thread Peter Maydell
On 22 April 2016 at 16:06, Tom Spink wrote: > So, my question is, how can a TB for a particular block containing a > constant folded *virtual* PC work, if the MMU mappings change and a > different virtual address is used to access the same physical address? > > E.g. assume we have an instruction s

[Qemu-devel] [PATCH for 2.7 1/1] qcow2: improve qcow2_co_write_zeroes()

2016-04-23 Thread Denis V. Lunev
Unfortunately Linux kernel could send non-aligned requests to qemu-nbd if the caller is using O_DIRECT and does not align in-memory data to page. Thus qemu-nbd will call block layer with non-aligned requests. qcow2_co_write_zeroes forcibly asks the caller to supply block-aligned data. In the other

[Qemu-devel] [PATCH v2 2/3] Add ENET/Gbps Ethernet support to FEC device

2016-04-23 Thread Jean-Christophe Dubois
The ENET device (present in i.MX6) is "derived" from FEC and backward compatible with it. This patch add the necessary support of the added feature in the ENET device to allow Linux to use it (on supported processors). Signed-off-by: Jean-Christophe Dubois --- hw/arm/fsl-imx25.c | 3 +

[Qemu-devel] [PATCH v2 3/3] Add ENET device to i.MX6 SOC.

2016-04-23 Thread Jean-Christophe Dubois
This adds the ENET device to the i.MX6 SOC. This was tested by booting Linux on an Qemu i.MX6 instance and accessing the internet from the linux guest. Signed-off-by: Jean-Christophe Dubois --- hw/arm/fsl-imx6.c | 17 + include/hw/arm/fsl-imx6.h | 2 ++ 2 files changed,

[Qemu-devel] [PATCH v2 0/3] Add Ethernet device for i.MX6 SOC

2016-04-23 Thread Jean-Christophe Dubois
This patch series adds Gb ENET Ethernet device to the i.MX6 SOC. The ENET device is an evolution of the FEC device present on the i.MX25 SOC and is backward compatible with it. Therefore the ENET support has been added to the actual Qemu FEC device. The Patch has been tested by: * Booting linux

[Qemu-devel] [PATCH v2 1/3] net: improve UDP/TCP checksum computation.

2016-04-23 Thread Jean-Christophe Dubois
This patch adds: * based on Eth, UDP, TCP struct present in eth.h instead of hardcoded indexes. * based on various macros present in eth.h. * allow to account for optional VLAN header. Signed-off-by: Jean-Christophe Dubois --- net/checksum.c | 83 --

Re: [Qemu-devel] [PATCH v3 41/44] nbd: Implement NBD_CMD_WRITE_ZEROES on server

2016-04-23 Thread Pavel Borzenkov
On Fri, Apr 22, 2016 at 05:40:49PM -0600, Eric Blake wrote: > Upstream NBD protocol recently added the ability to efficiently > write zeroes without having to send the zeroes over the wire, > along with a flag to control whether the client wants a hole. > > Signed-off-by: Eric Blake > > --- > v3

[Qemu-devel] [PATCH v2 0/3] Add guest PMU in machine virt

2016-04-23 Thread Shannon Zhao
From: Shannon Zhao KVM-ARM64 supports guest PMU now. This series add the support in machine virt so that guest could use PMU. Changes since v1: * rebase on master * Address Andrew's comments, add a macro PPI, fix code style, add cpu_to_le32() Shannon Zhao (3): target-arm: kvm64: set guest P

[Qemu-devel] [PATCH v2 1/3] target-arm: kvm64: set guest PMUv3 feature bit if supported

2016-04-23 Thread Shannon Zhao
From: Shannon Zhao Check if kvm supports guest PMUv3. If so, set the corresponding feature bit for vcpu. Signed-off-by: Shannon Zhao --- target-arm/cpu-qom.h | 2 ++ target-arm/kvm64.c | 5 + 2 files changed, 7 insertions(+) diff --git a/target-arm/cpu-qom.h b/target-arm/cpu-qom.h index

[Qemu-devel] [PATCH v2 3/3] hw/arm/virt-acpi-build: Add PMU IRQ number in ACPI table

2016-04-23 Thread Shannon Zhao
From: Shannon Zhao Add PMU IRQ number in ACPI table, then we can use PMU in guest through ACPI. Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index f51fe39..5031232 100644 ---

[Qemu-devel] [PATCH v2 2/3] hw/arm/virt: Add PMU node for virt machine

2016-04-23 Thread Shannon Zhao
From: Shannon Zhao Add a virtual PMU device for virt machine while use PPI 7 for PMU overflow interrupt number. Signed-off-by: Shannon Zhao --- hw/arm/virt.c | 31 +++ include/hw/arm/virt.h | 4 include/sysemu/kvm.h | 1 + stubs/kvm.c | 5

[Qemu-devel] [PATCH v6 4/5] ACPI: move acpi_build_srat_memory to common place

2016-04-23 Thread Shannon Zhao
From: Shannon Zhao Move acpi_build_srat_memory to common place so that it could be reused by ARM. Cc: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Shannon Zhao --- hw/acpi/aml-build.c | 12 hw/i386/acpi-build.c| 20 include/hw/acpi/aml

[Qemu-devel] [PATCH v6 3/5] ACPI: Add GICC Affinity Structure

2016-04-23 Thread Shannon Zhao
From: Shannon Zhao Cc: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Shannon Zhao Reviewed-by: Andrew Jones --- hw/i386/acpi-build.c| 2 +- include/hw/acpi/acpi-defs.h | 15 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/

[Qemu-devel] [PATCH v6 1/5] ARM: Virt: Set numa-node-id for CPUs

2016-04-23 Thread Shannon Zhao
From: Shannon Zhao Add a numa-node-id property to specify NUMA information for CPUs. Signed-off-by: Shannon Zhao Reviewed-by: Andrew Jones --- hw/arm/virt.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 56d35c7..fe6b11d 100644 --- a/hw/arm/vir

[Qemu-devel] [PATCH v6 2/5] ARM: Add numa-node-id for /memory node

2016-04-23 Thread Shannon Zhao
From: Shannon Zhao When specifying NUMA for ARM machine, generate /memory node according to NUMA topology. Signed-off-by: Shannon Zhao --- hw/arm/boot.c | 43 +-- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.

[Qemu-devel] [PATCH v6 0/5] ARM: Add NUMA support for machine virt

2016-04-23 Thread Shannon Zhao
From: Shannon Zhao Add NUMA support for machine virt. Tested successfully running a guest Linux kernel with the following patch applied: - [PATCH v16 0/6] arm64, numa: Add numa support for arm64 platforms https://lkml.org/lkml/2016/4/8/571 - [PATCH v5 00/14] ACPI NUMA support for ARM64 https://l

[Qemu-devel] [PATCH v6 5/5] ACPI: Virt: Generate SRAT table

2016-04-23 Thread Shannon Zhao
From: Shannon Zhao To support NUMA, it needs to generate SRAT ACPI table. Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 52 1 file changed, 52 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index f51

[Qemu-devel] [PATCH 1/2] drive-backup: added support for data compression

2016-04-23 Thread Denis V. Lunev
From: Pavel Butsykin The idea is simple - backup is "written-once" data. It is written block by block and it is large enough. It would be nice to save storage space and compress it. The patch adds a flag to the qmp/hmp drive-backup command which enables block compression. Compression should be i

[Qemu-devel] [PATCH for 2.7 0/2] backup compression

2016-04-23 Thread Denis V. Lunev
The idea is simple - backup is "written-once" data. It is written block by block and it is large enough. It would be nice to save storage space and compress it. These patches add the ability to compress data during backup. This functionality is implemented by means of adding options to the qmp/hmp

[Qemu-devel] [PATCH 2/2] blockdev-backup: added support for data compression

2016-04-23 Thread Denis V. Lunev
From: Pavel Butsykin The idea is simple - backup is "written-once" data. It is written block by block and it is large enough. It would be nice to save storage space and compress it. Signed-off-by: Pavel Butsykin Signed-off-by: Denis V. Lunev CC: Jeff Cody CC: Markus Armbruster CC: Eric Blake

[Qemu-devel] emulation details of qemu

2016-04-23 Thread tutu sky
Hi everybody. I want to know that is it possible to access registers or micro-architectural part of a core/cpu in qemu during run time? if it is not possible, how we can hotplug a core in this emulator? thanks a lot.

Re: [Qemu-devel] [PATCH v3 21/44] block: Switch blk_write_zeroes() to byte interface

2016-04-23 Thread Denis V. Lunev
On 04/23/2016 02:40 AM, Eric Blake wrote: Sector-based blk_write() should die; convert the one-off variant blk_write_zeroes(). Signed-off-by: Eric Blake --- include/sysemu/block-backend.h | 4 ++-- block/block-backend.c | 8 block/parallels.c | 3 ++- qemu-im

Re: [Qemu-devel] [PATCH v3 09/44] block: Allow BDRV_REQ_FUA through blk_pwrite()

2016-04-23 Thread Denis V. Lunev
On 04/23/2016 02:40 AM, Eric Blake wrote: We have several block drivers that understand BDRV_REQ_FUA, and emulate it in the block layer for the rest by a full flush. But without a way to actually request BDRV_REQ_FUA during a pass-through blk_pwrite(), FUA-aware block drivers like NBD are forced

Re: [Qemu-devel] [PATCH v5 3/5] ARM: Add numa-node-id for /memory node

2016-04-23 Thread Shannon Zhao
On 2016/4/23 15:45, Andrew Jones wrote: @@ -456,14 +460,39 @@ static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo, > >> goto fail; > >> } > >> > >> +mem_len = (nb_numa_nodes > 0) ? numa_info[0].node_mem : > >> binfo->ram_size

Re: [Qemu-devel] [PATCH 2/3] hw/arm/virt: Add PMU node for virt machine

2016-04-23 Thread Andrew Jones
On Sat, Apr 23, 2016 at 09:01:01AM +0800, Shannon Zhao wrote: > > > On 2016/4/22 22:32, Andrew Jones wrote: > > On Fri, Mar 25, 2016 at 05:46:20PM +0800, Shannon Zhao wrote: > >> From: Shannon Zhao > >> > >> Add a virtual PMU device for virt machine while use PPI 7 for PMU > >> overflow interrup

Re: [Qemu-devel] [PATCH v5 3/5] ARM: Add numa-node-id for /memory node

2016-04-23 Thread Andrew Jones
On Sat, Apr 23, 2016 at 09:16:11AM +0800, Shannon Zhao wrote: > > > On 2016/4/22 20:48, Andrew Jones wrote: > > On Thu, Apr 21, 2016 at 02:23:52PM +0800, Shannon Zhao wrote: > >> From: Shannon Zhao > >> > >> When specifying NUMA for ARM machine, generate /memory node according to > >> NUMA topol

Re: [Qemu-devel] [PATCH v5 1/5] ARM: Virt: Add /distance-map node for NUMA

2016-04-23 Thread Shannon Zhao
On 2016/4/23 15:03, Andrew Jones wrote: > On Sat, Apr 23, 2016 at 09:17:25AM +0800, Shannon Zhao wrote: >> > >> > >> > On 2016/4/22 20:25, Andrew Jones wrote: >>> > > On Thu, Apr 21, 2016 at 02:23:50PM +0800, Shannon Zhao wrote: > > >> > From: Shannon Zhao > > >> > > > >> > This /

Re: [Qemu-devel] [PATCH v5 1/5] ARM: Virt: Add /distance-map node for NUMA

2016-04-23 Thread Andrew Jones
On Sat, Apr 23, 2016 at 09:17:25AM +0800, Shannon Zhao wrote: > > > On 2016/4/22 20:25, Andrew Jones wrote: > > On Thu, Apr 21, 2016 at 02:23:50PM +0800, Shannon Zhao wrote: > >> > From: Shannon Zhao > >> > > >> > This /distance-map node is used to describe the accessing distance > >> > between