[Qemu-devel] [RFC PATCH] virtio-mmio: support for multiple irqs

2014-11-04 Thread Shannon Zhao
? is there other ways to make virtio-mmio support multiple irq? Hope for feedback. Thanks. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- drivers/virtio/virtio_mmio.c | 234 -- 1 files changed, 203 insertions(+), 31 deletions(-) diff --git

[Qemu-devel] [PATCH 0/4] ioeventfd support for virtio-mmio

2014-11-04 Thread Shannon Zhao
to make virtio-mmio work with vhost-net on arm/arm64. Shannon Zhao (4): virtio-mmio: introduce set_host_notifier() virtio-mmio: introduce set_guest_notifiers virtio-mmio: start ioeventfd when status gets DRIVER_OK virtio-mmio: add a new property for ioeventfd hw/net/virtio-net.c|1

[Qemu-devel] [PATCH 2/4] virtio-mmio: introduce set_guest_notifiers

2014-11-04 Thread Shannon Zhao
-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/virtio/virtio-mmio.c | 60 +++ 1 files changed, 60 insertions(+), 0 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index d8ec2d1..b741f50 100644 --- a/hw/virtio/virtio-mmio.c +++ b

[Qemu-devel] [PATCH 4/4] virtio-mmio: add a new property for ioeventfd

2014-11-04 Thread Shannon Zhao
-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/net/virtio-net.c|1 + hw/virtio/virtio-mmio.c|3 ++- include/hw/virtio/virtio.h |1 + 3 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 9b88775..d89d4a6 100644

[Qemu-devel] [PATCH 1/4] virtio-mmio: introduce set_host_notifier()

2014-11-04 Thread Shannon Zhao
set_host_notifier() is introduced into virtio-mmio now. Most of codes came from virtio-pci. Signed-off-by: Ying-Shiuan Pan yingshiuan@gmail.com Signed-off-by: Li Liu john.li...@huawei.com Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/virtio/virtio-mmio.c | 70

[Qemu-devel] [PATCH 3/4] virtio-mmio: start ioeventfd when status gets DRIVER_OK

2014-11-04 Thread Shannon Zhao
Signed-off-by: Ying-Shiuan Pan yingshiuan@gmail.com Signed-off-by: Li Liu john.li...@huawei.com Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/virtio/virtio-mmio.c | 45 + 1 files changed, 45 insertions(+), 0 deletions(-) diff --git

Re: [Qemu-devel] [RFC PATCH] virtio-mmio: support for multiple irqs

2014-11-05 Thread Shannon Zhao
On 2014/11/4 17:35, Shannon Zhao wrote: As the current virtio-mmio only support single irq, so some advanced features such as vhost-net with irqfd are not supported. And the net performance is not the best without vhost-net and irqfd supporting. Hi Joel, Peter, Mst, Some virtio-net

Re: [Qemu-devel] The status about vhost-net on kvm-arm?

2014-11-05 Thread Shannon Zhao
Hi Nikolay, From this mail I know you guys have done some work about ioeventfd support on kvm-arm before. Do you have plan to rework your patch based on the new branch? If not, I think we should send a patch to make eventfd support on kvm-arm and make vhost-net work. Based on the new kvm-arm

Re: [Qemu-devel] [RFC PATCH] virtio-mmio: support for multiple irqs

2014-11-05 Thread Shannon Zhao
to the HOST to see how far we are from a native configuration... Agree! Also, I assume a pending Qemu patch is necessary to assign multiple irqs ? I'm correct ? Yes, the patch is on it's way :) Thanks a lot, Best regards Rémy -Message d'origine- De : Shannon Zhao [mailto:zhaoshengl

Re: [Qemu-devel] [PATCH 0/4] ioeventfd support for virtio-mmio

2014-11-05 Thread Shannon Zhao
On 2014/11/4 20:47, Shannon Zhao wrote: Add host/guest notifiers support for virtio-mmio, so that qemu can enable vhost-net for kvm-arm. Refer to the patches from Ying-Shiuan Pan https://lists.gnu.org/archive/html/qemu-devel/2014-02/msg00715.html As vhost-net can improve the net

Re: [Qemu-devel] [RFC PATCH 0/2] virtio-mmio: add irqfd support for vhost-net based on virtio-mmio

2014-11-05 Thread Shannon Zhao
On 2014/11/5 16:43, Eric Auger wrote: On 10/27/2014 12:23 PM, Li Liu wrote: On 2014/10/27 17:37, Peter Maydell wrote: On 25 October 2014 09:24, john.liuli john.li...@huawei.com wrote: To get the interrupt reason to support such VIRTIO_NET_F_STATUS features I add a new register offset

Re: [Qemu-devel] [RFC PATCH] virtio-mmio: support for multiple irqs

2014-11-05 Thread Shannon Zhao
On 2014/11/5 23:27, Joel Schopp wrote: On 11/05/2014 03:12 AM, Shannon Zhao wrote: Hi Rémy, On 2014/11/5 16:26, GAUGUEY Rémy 228890 wrote: Hi Shannon, Type of backend bandwith(GBytes/sec) virtio-net 0.66 vhost-net 1.49 vhost-net with irqfd2.01

Re: [Qemu-devel] [RFC PATCH] virtio-mmio: support for multiple irqs

2014-11-06 Thread Shannon Zhao
On 2014/11/6 17:34, Michael S. Tsirkin wrote: On Tue, Nov 04, 2014 at 05:35:12PM +0800, Shannon Zhao wrote: As the current virtio-mmio only support single irq, so some advanced features such as vhost-net with irqfd are not supported. And the net performance is not the best without vhost-net

Re: [Qemu-devel] [RFC PATCH] virtio-mmio: support for multiple irqs

2014-11-06 Thread Shannon Zhao
On 2014/11/6 19:09, Michael S. Tsirkin wrote: On Thu, Nov 06, 2014 at 05:54:54PM +0800, Shannon Zhao wrote: On 2014/11/6 17:34, Michael S. Tsirkin wrote: On Tue, Nov 04, 2014 at 05:35:12PM +0800, Shannon Zhao wrote: As the current virtio-mmio only support single irq, so some advanced features

Re: [Qemu-devel] [RFC PATCH] virtio-mmio: support for multiple irqs

2014-11-12 Thread Shannon Zhao
On 2014/11/11 23:11, Pawel Moll wrote: On Tue, 2014-11-04 at 09:35 +, Shannon Zhao wrote: As the current virtio-mmio only support single irq, so some advanced features such as vhost-net with irqfd are not supported. And the net performance is not the best without vhost-net and irqfd

Re: [Qemu-devel] [RFC PATCH] virtio-mmio: support for multiple irqs

2014-11-13 Thread Shannon Zhao
On 2014/11/13 2:33, Pawel Moll wrote: On Wed, 2014-11-12 at 08:32 +, Shannon Zhao wrote: On 2014/11/11 23:11, Pawel Moll wrote: On Tue, 2014-11-04 at 09:35 +, Shannon Zhao wrote: As the current virtio-mmio only support single irq, so some advanced features such as vhost-net with irqfd

Re: [Qemu-devel] [PATCH 1/4] virtio-mmio: introduce set_host_notifier()

2014-11-20 Thread Shannon Zhao
On 2014/11/19 15:47, Fam Zheng wrote: On Tue, 11/04 20:47, Shannon Zhao wrote: set_host_notifier() is introduced into virtio-mmio now. Most of codes came from virtio-pci. Signed-off-by: Ying-Shiuan Pan yingshiuan@gmail.com Signed-off-by: Li Liu john.li...@huawei.com Signed-off

Re: [Qemu-devel] [PATCH v4 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb

2014-11-27 Thread Shannon Zhao
Hi Eric, On 2014/10/31 21:53, Eric Auger wrote: load_dtb is renamed into arm_load_dtb and becomes non static. it will be used by machvirt for dynamic instantiation of platform devices Signed-off-by: Eric Auger eric.au...@linaro.org --- v2 - v3: load_dtb renamed into arm_load_dtb

Re: [Qemu-devel] [PATCH v4 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb

2014-11-27 Thread Shannon Zhao
On 2014/11/27 17:19, Eric Auger wrote: On 11/27/2014 10:00 AM, Shannon Zhao wrote: Hi Eric, On 2014/10/31 21:53, Eric Auger wrote: load_dtb is renamed into arm_load_dtb and becomes non static. it will be used by machvirt for dynamic instantiation of platform devices Signed-off-by: Eric

Re: [Qemu-devel] [PATCH v4 5/6] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-11-27 Thread Shannon Zhao
On 2014/10/31 21:53, Eric Auger wrote: This new C module will be used by ARM machine files to generate platform bus node and their dynamic sysbus device tree nodes. Dynamic sysbus device node addition is done in a machine init done notifier. arm_register_platform_bus_fdt_creator does the

Re: [Qemu-devel] [PATCH v4 5/6] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-11-27 Thread Shannon Zhao
On 2014/11/27 20:25, Eric Auger wrote: On 11/27/2014 01:07 PM, Shannon Zhao wrote: On 2014/10/31 21:53, Eric Auger wrote: This new C module will be used by ARM machine files to generate platform bus node and their dynamic sysbus device tree nodes. Dynamic sysbus device node addition is done

Re: [Qemu-devel] [PATCH v4 5/6] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-11-27 Thread Shannon Zhao
On 2014/11/27 21:16, Eric Auger wrote: On 11/27/2014 01:56 PM, Shannon Zhao wrote: On 2014/11/27 20:25, Eric Auger wrote: On 11/27/2014 01:07 PM, Shannon Zhao wrote: On 2014/10/31 21:53, Eric Auger wrote: This new C module will be used by ARM machine files to generate platform bus node

[Qemu-devel] [RFC PATCH] hw/arm/virt: Add support for NUMA on ARM64

2014-12-02 Thread Shannon Zhao
from Proximity Domain/Numa node i to every other node j in the system (including itself). Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/boot.c | 25 hw/arm/virt.c | 120 +--- 2 files

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: Add support for NUMA on ARM64

2014-12-14 Thread Shannon Zhao
On 2014/12/8 21:49, Peter Maydell wrote: On 2 December 2014 at 12:56, Shannon Zhao zhaoshengl...@huawei.com wrote: Add support for NUMA on ARM64. Tested successfully running a guest Linux kernel with the following patch applied: I'm still hoping for review from somebody who better

Re: [Qemu-devel] [PATCH v6 3/3] hw/arm/virt: add dynamic sysbus device support

2014-12-15 Thread Shannon Zhao
On 2014/12/9 18:29, Eric Auger wrote: Allows sysbus devices to be instantiated from command line by using -device option. Machvirt creates a platform bus at init. The dynamic sysbus devices are attached to this platform bus device. The platform bus device registers a machine init done

Re: [Qemu-devel] [PATCH v6 1/3] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-12-15 Thread Shannon Zhao
On 2014/12/9 18:29, Eric Auger wrote: This new C module will be used by ARM machine files to generate platform bus node and their dynamic sysbus device tree nodes. Dynamic sysbus device node addition is done in a machine init done notifier. arm_register_platform_bus_fdt_creator does the

Re: [Qemu-devel] [PATCH v7 0/3] machvirt dynamic sysbus device instantiation

2014-12-16 Thread Shannon Zhao
module, hw/arm/sysbus-fdt.c and not in the machine file. Machvirt transformations and sysbus-fdt are largely inspired from Alex work. The patch series can be found at: http://git.linaro.org/people/eric.auger/qemu.git branch official_dynsysbus_v7 Reviewed-by: Shannon Zhao zhaoshengl

[Qemu-devel] [RFC PATCH v2] hw/arm/boot: Add support for NUMA on ARM64

2014-12-31 Thread Shannon Zhao
in the system (including itself). Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/boot.c | 98 +++-- hw/arm/virt.c |7 +--- 2 files changed, 97 insertions(+), 8 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index

Re: [Qemu-devel] [RFC PATCH v2 09/11] hw/arm/virt-acpi-build: Generate XSDT table

2015-02-06 Thread Shannon Zhao
On 2015/2/4 0:51, Laszlo Ersek wrote: On 02/03/15 17:19, Igor Mammedov wrote: On Thu, 29 Jan 2015 16:37:11 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: XDST points to other tables except FACS DSDT. Is there any reason to use XSDT instead of RSDT? If ACPI tables are below 4Gb which

[Qemu-devel] [RFC PATCH 2/7] hw/arm/virt-acpi-build: Add GPIO controller in ACPI DSDT table

2015-02-17 Thread Shannon Zhao
Add GPIO controller in ACPI DSDT table. It can be used for device hotplug. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 21 + hw/arm/virt.c|2 ++ include/hw/arm/virt-acpi-build.h |2 ++ 3 files

[Qemu-devel] [RFC PATCH 3/7] hw/acpi/virt-hotplug: Add a hotplug device for machine virt

2015-02-17 Thread Shannon Zhao
Add a hotplug device for machine virt. This can be used for virt to support device hotplug. At the moment this hotplug device just include a mmio region which shows the present status of cpus. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- default-configs/arm-softmmu.mak |2 + hw

[Qemu-devel] [RFC PATCH 1/7] hw/arm/virt: Add a GPIO controller

2015-02-17 Thread Shannon Zhao
Add a GPIO controller in machine virt, in order to support cpu hotplug. Here we use pl061. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt.c | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c

[Qemu-devel] [RFC PATCH v3 05/11] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-02-16 Thread Shannon Zhao
Template for the 32-Bit Fixed Memory Range and the Extended Interrupt Descriptors. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 133 ++ 1 files changed, 133 insertions(+), 0 deletions(-) diff --git a/hw/arm/virt-acpi

[Qemu-devel] [RFC PATCH v3 00/11] Generate ACPI v5.1 tables and expose it to guest over fw_cfg on ARM

2015-02-16 Thread Shannon Zhao
rsdt instead of xsdt according to Igor Mammedov's suggestion changes since v1: * fix bug found by Laszlo * move common helpers into dedictated file and change generating table order according to Igor's comments * fix copyright and function name according to Michael's comments Shannon

[Qemu-devel] [RFC PATCH v3 06/11] hw/arm/virt-acpi-build: Generate FADT table and update ACPI headers

2015-02-16 Thread Shannon Zhao
In the case of mach virt, it is used to set the Hardware Reduced bit and enable PSCI SMP booting through HVC. So ignore FACS and FADT points to DSDT. Update the header definitions for FADT taking into account the new additions of ACPI v5.1 in `include/hw/acpi/acpi-defs.h` Signed-off-by: Shannon

[Qemu-devel] [RFC PATCH v3 04/11] hw/acpi/aml-build: Add aml_memory32_fixed() and aml_interrupt()

2015-02-16 Thread Shannon Zhao
Add aml_memory32_fixed() for describing device mmio region in resource template. Add aml_interrupt() for describing device interrupt in resource template. These can be used to generating DSDT table for ACPI on ARM. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/acpi/aml-build.c

[Qemu-devel] [RFC PATCH v3 09/11] hw/arm/virt-acpi-build: Generate RSDT table

2015-02-16 Thread Shannon Zhao
RDST points to other tables FADT, MADT, GTDT. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 31 ++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index

[Qemu-devel] [RFC PATCH v3 01/11] hw/i386: Move ACPI header definitions in an arch-independent location

2015-02-16 Thread Shannon Zhao
The ACPI related header file acpi-defs.h, includes definitions that apply on other architectures as well. Move it in `include/hw/acpi/` to sanely include it from other architectures. Signed-off-by: Alvise Rigo a.r...@virtualopensystems.com Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com

[Qemu-devel] [RFC PATCH v3 07/11] hw/arm/virt-acpi-build: Generate MADT table

2015-02-16 Thread Shannon Zhao
MADT describes GIC enabled ARM platforms. The GICC and GICD subtables are used to define the GIC regions. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 62 ++ include/hw/acpi/acpi-defs.h | 36

[Qemu-devel] [RFC PATCH v3 11/11] hw/arm/virt: Enable dynamic generation of ACPI v5.1 tables

2015-02-16 Thread Shannon Zhao
Expose the needed device information to the table generation insfrastructure and register a machine_init_done notify to call virt_acpi_build(). Add CONFIG_ACPI to arm-softmmu.mak. Maybe this way is not right, fix me please. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- default

[Qemu-devel] [RFC PATCH v3 02/11] hw/i386/acpi-build: move generic acpi building helpers into dedictated file

2015-02-16 Thread Shannon Zhao
Move generic acpi building helpers into dedictated file and this can be shared with other machines. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/acpi/aml-build.c | 58 hw/i386/acpi-build.c| 104

[Qemu-devel] [RFC PATCH v3 03/11] hw/arm/virt-acpi-build: Basic framework for building ACPI tables on ARM

2015-02-16 Thread Shannon Zhao
information about the machine - GTDT: Generic timer description table - MADT: Multiple APIC description table - DSDT: Holds all information about system devices/peripherals, pointed by FADT Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/Makefile.objs |1 + hw/arm/virt

[Qemu-devel] [RFC PATCH v3 10/11] hw/arm/virt-acpi-build: Generate RSDP table

2015-02-16 Thread Shannon Zhao
RSDP points to RSDT which in turn points to other tables. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 32 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c

[Qemu-devel] [RFC PATCH v3 08/11] hw/arm/virt-acpi-build: Generate GTDT table

2015-02-16 Thread Shannon Zhao
ACPI v5.1 defines GTDT for ARM devices as a place to describe timer related information in the system. The Arch Timer interrupts must be provided for GTDT. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c| 31 +++ include/hw/acpi

[Qemu-devel] [RFC PATCH 0/7] hw/arm/virt: Add cpu-add way cpu hotplug support

2015-02-17 Thread Shannon Zhao
by guest now. Any comments are welcome. Thanks, Shannon Shannon Zhao (7): hw/arm/virt: Add a GPIO controller hw/arm/virt-acpi-build: Add GPIO controller in ACPI DSDT table hw/acpi/virt-hotplug: Add a hotplug device for machine virt topology: Move topology.h to an arch-independent location

[Qemu-devel] [RFC PATCH 7/7] hw/arm/virt-acpi-build: Add cpu hotplug support in ACPI

2015-02-17 Thread Shannon Zhao
Add cpu hotplug support in ACPI. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/acpi/aml-build.c | 135 hw/acpi/virt-hotplug.c | 11 +++ hw/arm/virt-acpi-build.c | 179 +- hw/arm

[Qemu-devel] [RFC PATCH 6/7] hw/arm/virt: Add cpu hotplug support

2015-02-17 Thread Shannon Zhao
Add a hotplug device in machine virt and add cpu hotplug support using cpu-add. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt.c | 159 +++- include/hw/acpi/virt-hotplug.h |1 + 2 files changed, 159 insertions(+), 1

[Qemu-devel] [RFC PATCH 4/7] topology: Move topology.h to an arch-independent location

2015-02-17 Thread Shannon Zhao
Move topology.h to an arch-independent location and the apicid_foo can be reused by other architectures. And remove the x86 prefix. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- include/hw/acpi/topology.h | 134 target-i386/cpu.c

[Qemu-devel] [RFC PATCH 5/7] target-arm/cpu: Add apic_id property for ARMCPU

2015-02-17 Thread Shannon Zhao
Add apic_id property for ARMCPU. It can be used for cpu hotplug. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- target-arm/cpu-qom.h |1 + target-arm/cpu.c | 77 ++ target-arm/cpu.h |2 + 3 files changed, 80 insertions

Re: [Qemu-devel] [RFC PATCH 02/11] hw/arm/virt-acpi-build: Basic framework for building ACPI tables

2015-01-26 Thread Shannon Zhao
On 2015/1/26 18:19, Igor Mammedov wrote: On Sat, 24 Jan 2015 17:21:11 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: Introduce a preliminary framework in virt-acpi-build.c with the main ACPI build functions. It exposes the generated ACPI contents to guest over fw_cfg. Some codes

Re: [Qemu-devel] [RFC PATCH 03/11] hw/arm/virt-acpi-build: Generate RSDP table

2015-01-26 Thread Shannon Zhao
On 2015/1/26 18:22, Igor Mammedov wrote: On Sat, 24 Jan 2015 17:21:12 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: RSDP points to XSDT which in turn points to other tables. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 22

Re: [Qemu-devel] [RFC PATCH 10/11] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-01-26 Thread Shannon Zhao
On 2015/1/26 18:40, Igor Mammedov wrote: On Sat, 24 Jan 2015 17:21:19 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: DSDT consists of the usual common table header plus a definition block in AML encoding which describes all devices in the platform. After initializing DSDT

Re: [Qemu-devel] [RFC PATCH 03/11] hw/arm/virt-acpi-build: Generate RSDP table

2015-01-27 Thread Shannon Zhao
On 2015/1/26 18:22, Igor Mammedov wrote: On Sat, 24 Jan 2015 17:21:12 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: RSDP points to XSDT which in turn points to other tables. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 22

Re: [Qemu-devel] [RFC PATCH 02/11] hw/arm/virt-acpi-build: Basic framework for building ACPI tables

2015-01-27 Thread Shannon Zhao
On 2015/1/27 18:30, Igor Mammedov wrote: On Tue, 27 Jan 2015 14:47:44 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: On 2015/1/26 18:19, Igor Mammedov wrote: On Sat, 24 Jan 2015 17:21:11 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: Introduce a preliminary framework in virt-acpi

Re: [Qemu-devel] [PATCH v2 42/47] acpi: add acpi_def_block() term

2015-01-29 Thread Shannon Zhao
On 2015/1/22 22:50, Igor Mammedov wrote: Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/acpi/acpi-build-utils.c | 47 ++ hw/i386/acpi-build.c | 1 - include/hw/acpi/acpi-build-utils.h | 8 +++ 3 files changed, 55

[Qemu-devel] [RFC PATCH v2 08/11] hw/arm/virt-acpi-build: Generate GTDT table

2015-01-29 Thread Shannon Zhao
ACPI v5.1 defines GTDT for ARM devices as a place to describe timer related information in the system. The Arch Timer interrupts must be provided for GTDT. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c| 31 +++ include/hw/acpi

[Qemu-devel] [RFC PATCH v2 01/11] hw/i386: Move ACPI header definitions in an arch-independent location

2015-01-29 Thread Shannon Zhao
The ACPI related header file acpi-defs.h, includes definitions that apply on other architectures as well. Move it in `include/hw/acpi/` to sanely include it from other architectures. Signed-off-by: Alvise Rigo a.r...@virtualopensystems.com Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com

[Qemu-devel] [RFC PATCH v2 11/11] hw/arm/virt: Enable dynamic generation of ACPI v5.1 tables

2015-01-29 Thread Shannon Zhao
. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- default-configs/arm-softmmu.mak |1 + default-configs/i386-softmmu.mak |3 ++ default-configs/mips-softmmu.mak |3 ++ default-configs/mips64-softmmu.mak |3 ++ default-configs/mips64el-softmmu.mak |3 ++ default

[Qemu-devel] [RFC PATCH v2 06/11] hw/arm/virt-acpi-build: Generate FADT table and update ACPI headers

2015-01-29 Thread Shannon Zhao
In the case of mach virt, it is used to set the Hardware Reduced bit and enable PSCI SMP booting through HVC. So ignore FACS and FADT points to DSDT. Update the header definitions for FADT taking into account the new additions of ACPI v5.1 in `include/hw/acpi/acpi-defs.h` Signed-off-by: Shannon

[Qemu-devel] [RFC PATCH v2 10/11] hw/arm/virt-acpi-build: Generate RSDP table

2015-01-29 Thread Shannon Zhao
RSDP points to XSDT which in turn points to other tables. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c

[Qemu-devel] [RFC PATCH v2 07/11] hw/arm/virt-acpi-build: Generate MADT table

2015-01-29 Thread Shannon Zhao
MADT describes GIC enabled ARM platforms. The GICC and GICD subtables are used to define the GIC regions. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 62 ++ include/hw/acpi/acpi-defs.h | 36

[Qemu-devel] [RFC PATCH v2 03/11] hw/arm/virt-acpi-build: Basic framework for building ACPI tables on ARM

2015-01-29 Thread Shannon Zhao
) - FADT: Generic information about the machine - GTDT: Generic timer description table - MADT: Multiple APIC description table - DSDT: Holds all information about system devices/peripherals, pointed by FADT Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/Makefile.objs |1

[Qemu-devel] [RFC PATCH v2 05/11] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-01-29 Thread Shannon Zhao
Template for the 32-Bit Fixed Memory Range and the Extended Interrupt Descriptors. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 131 ++ 1 files changed, 131 insertions(+), 0 deletions(-) diff --git a/hw/arm/virt-acpi

[Qemu-devel] [RFC PATCH v2 02/11] hw/i386/acpi-build: move generic acpi building helpers into dedictated file

2015-01-29 Thread Shannon Zhao
Move generic acpi building helpers into dedictated file and this can be shared with other machines. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/acpi/acpi-build-utils.c | 63 - hw/i386/acpi-build.c | 111

[Qemu-devel] [RFC PATCH v2 09/11] hw/arm/virt-acpi-build: Generate XSDT table

2015-01-29 Thread Shannon Zhao
XDST points to other tables except FACS DSDT. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c| 32 +++- include/hw/acpi/acpi-defs.h |9 + 2 files changed, 40 insertions(+), 1 deletions(-) diff --git a/hw/arm/virt

[Qemu-devel] [RFC PATCH v2 00/11] Generate ACPI v5.1 tables and expose it to guest over fw_cfg on ARM

2015-01-29 Thread Shannon Zhao
into dedictated file and change generating table order according to Igor's comments * fix copyright and function name according to Michael's comments Shannon Zhao (11): hw/i386: Move ACPI header definitions in an arch-independent location hw/i386/acpi-build: move generic acpi building helpers

[Qemu-devel] [RFC PATCH v2 04/11] hw/acpi/acpi-build-utils: Add acpi_memory32_fixed() and acpi_interrupt()

2015-01-29 Thread Shannon Zhao
Add acpi_memory32_fixed() for describing device mmio region in resource template. Add acpi_interrupt() for describing device interrupt in resource template. These can be used to generating DSDT table for ACPI on ARM. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/acpi/acpi-build

Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append()

2015-01-28 Thread Shannon Zhao
On 2015/1/28 18:00, Igor Mammedov wrote: On Wed, 28 Jan 2015 09:56:26 +0200 Michael S. Tsirkin m...@redhat.com wrote: I've tried redo series with passing alloc list as first argument, looks ugly as hell I tried too. Not too bad at all. See below: diff --git a/hw/i386/acpi-build.c

Re: [Qemu-devel] [PATCH v2 42/47] acpi: add acpi_def_block() term

2015-01-29 Thread Shannon Zhao
On 2015/1/29 16:45, Igor Mammedov wrote: On Thu, 29 Jan 2015 16:02:47 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: On 2015/1/22 22:50, Igor Mammedov wrote: Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/acpi/acpi-build-utils.c | 47

[Qemu-devel] [RFC PATCH 02/11] hw/arm/virt-acpi-build: Basic framework for building ACPI tables

2015-01-24 Thread Shannon Zhao
- XSDT: Points to all other tables (except FACS DSDT) - FADT: Generic information about the machine - DSDT: Holds all information about system devices/peripherals - FACS: Needs to be pointed from FADT Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/Makefile.objs |1

[Qemu-devel] [RFC PATCH 08/11] hw/arm/virt-acpi-build: Generate FACS table and update ACPI headers

2015-01-24 Thread Shannon Zhao
FACS table is created as a mockup, as with the Hardware Reduced bit set it will not be used. Update the header definitions for FACS taking into account the new additions of ACPI v5.1 in `include/hw/acpi/acpi-defs.h` Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi

[Qemu-devel] [RFC PATCH 09/11] hw/acpi/acpi-build-utils: Add acpi_fixed_memory32() and acpi_extended_irq()

2015-01-24 Thread Shannon Zhao
Add acpi_fixed_memory32() for describing device mmio region in resource template. Add acpi_extended_irq() for describing device interrupt in resource template. These can be used to generating DSDT table for ACPI on ARM. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/acpi/acpi-build

[Qemu-devel] [RFC PATCH 06/11] hw/arm/virt-acpi-build: Generate GTDT table

2015-01-24 Thread Shannon Zhao
ACPI v5.1 defines GTDT for ARM devices as a place to describe timer related information in the system. The Arch Timer interrupts must be provided for GTDT Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c| 21 + include/hw/acpi/acpi

[Qemu-devel] [RFC PATCH 01/11] hw/i386: Move ACPI header definitions in an arch-independent location

2015-01-24 Thread Shannon Zhao
The ACPI related header file acpi-defs.h, includes definitions that apply on other architectures as well. Move it in `include/hw/acpi/` to sanely include it from other architectures. Signed-off-by: Alvise Rigo a.r...@virtualopensystems.com Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com

[Qemu-devel] [RFC PATCH 07/11] hw/arm/virt-acpi-build: Generate FADT table and update ACPI headers

2015-01-24 Thread Shannon Zhao
FADT points to FACS and DSDT, in the case of mach virt, it is also used to set the Hardware Reduced bit and enable PSCI SMP booting through HVC. Update the header definitions for FADT taking into account the new additions of ACPI v5.1 in `include/hw/acpi/acpi-defs.h` Signed-off-by: Shannon Zhao

[Qemu-devel] [RFC PATCH 05/11] hw/arm/virt-acpi-build: Generate MADT table

2015-01-24 Thread Shannon Zhao
MADT describes GIC enabled ARM platforms. The GICC and GICD subtables are used to define the GIC regions. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c| 30 ++ include/hw/acpi/acpi-defs.h | 37

[Qemu-devel] [RFC PATCH 03/11] hw/arm/virt-acpi-build: Generate RSDP table

2015-01-24 Thread Shannon Zhao
RSDP points to XSDT which in turn points to other tables. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index

[Qemu-devel] [RFC PATCH 11/11] hw/arm/virt: Enable dynamic generation of ACPI v5.1 tables

2015-01-24 Thread Shannon Zhao
. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- default-configs/arm-softmmu.mak |1 + default-configs/i386-softmmu.mak |3 ++ default-configs/mips-softmmu.mak |3 ++ default-configs/mips64-softmmu.mak |3 ++ default-configs/mips64el-softmmu.mak |3 ++ default

[Qemu-devel] [RFC PATCH 04/11] hw/arm/virt-acpi-build: Generate XSDT table and add a build_header function

2015-01-24 Thread Shannon Zhao
XDST points to other tables except FACS DSDT. Implement a common header helper functions for generating ACPI tables. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c| 34 ++ include/hw/acpi/acpi-defs.h |9 + 2

[Qemu-devel] [RFC PATCH 10/11] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-01-24 Thread Shannon Zhao
Template for the 32-Bit Fixed Memory Range and the Extended Interrupt Descriptors. The following devices are included in the DSDT: - CPUs - UART - RTC - NAND Flash - virtio-mmio Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 120

[Qemu-devel] [RFC PATCH 00/11] Generate ACPI v5.1 tables and expose it to guest over fw_cfg on ARM

2015-01-24 Thread Shannon Zhao
that if qemu can expose the generated ACPI tables over fw_cfg, he can quickly add support in UEFI. So just send this out and make it go forward. Todo: 1) add GPIO controller in virt and expose it through ACPI 2) add cpu hotplug support Any comments are welcome. Thanks, Shannon Shannon Zhao (11

Re: [Qemu-devel] [RFC PATCH v3 2/3] hw/arm/virt: Don't add memory node in creat_fdt

2015-01-06 Thread Shannon Zhao
On 2015/1/6 17:55, Peter Maydell wrote: On 6 January 2015 at 05:57, Shannon Zhao zhaoshengl...@huawei.com wrote: To support memory NUMA, don't add memory node in creat_fdt. But add it in a new function which takes into accout NUMA topology. Signed-off-by: Shannon Zhao zhaoshengl

Re: [Qemu-devel] [RFC PATCH v3 3/3] hw/arm/boot: Generate memory dtb according to NUMA topology

2015-01-06 Thread Shannon Zhao
On 2015/1/6 17:58, Peter Maydell wrote: On 6 January 2015 at 05:57, Shannon Zhao zhaoshengl...@huawei.com wrote: Add a new function arm_generate_memory_dtb which is used to generate memory dtb according to NUMA topology and set the NUMA topology property of every cpu. Signed-off-by: Shannon

Re: [Qemu-devel] [PATCH] vl.c: fix -usb option assertion failure in qemu_opt_get_bool_helper()

2015-01-05 Thread Shannon Zhao
On 2015/1/6 10:37, Chen, Tiejun wrote: On 2015/1/5 20:14, Marcel Apfelbaum wrote: On 01/05/2015 01:50 PM, Stefan Hajnoczi wrote: On Mon, Jan 5, 2015 at 11:37 AM, Jan Kiszka jan.kis...@siemens.com wrote: On 2015-01-05 12:22, Stefan Hajnoczi wrote: Commit

[Qemu-devel] [RFC PATCH v3 0/3] Add support for NUMA on ARM64

2015-01-05 Thread Shannon Zhao
to calculate the associativity. Shannon Zhao (3): hw/arm/virt: Use memory_region_allocate_system_memory to allocate memory hw/arm/virt: Don't add memory node in creat_fdt hw/arm/boot: Add arm_generate_memory_dtb to generate memory dtb according to NUMA topology hw/arm/boot.c | 80

[Qemu-devel] [RFC PATCH v3 3/3] hw/arm/boot: Generate memory dtb according to NUMA topology

2015-01-05 Thread Shannon Zhao
Add a new function arm_generate_memory_dtb which is used to generate memory dtb according to NUMA topology and set the NUMA topology property of every cpu. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/boot.c | 80 ++-- 1

[Qemu-devel] [RFC PATCH v3 1/3] hw/arm/virt: Use memory_region_allocate_system_memory to allocate memory

2015-01-05 Thread Shannon Zhao
Use memory_region_allocate_system_memory to allocate memory. The function is sensitive to NUMA and can allocate memory for NUMA topology. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/arm

[Qemu-devel] [RFC PATCH v3 2/3] hw/arm/virt: Don't add memory node in creat_fdt

2015-01-05 Thread Shannon Zhao
To support memory NUMA, don't add memory node in creat_fdt. But add it in a new function which takes into accout NUMA topology. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm

Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-proxy: Fix possible overflow

2015-03-16 Thread Shannon Zhao
On 2015/3/16 15:58, Aneesh Kumar K.V wrote: Shannon Zhao zhaoshengl...@huawei.com writes: It's detected by coverity. As max of sockaddr_un.sun_path is sizeof(helper.sun_path), should check the length of source and use strncpy instead of strcpy. Signed-off-by: Shannon Zhao zhaoshengl

[Qemu-devel] [PATCH] fsdev/virtfs-proxy-helper: Fix improper use of negative value

2015-03-15 Thread Shannon Zhao
It's detected by coverity. Check the return value of proxy_marshal. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com Signed-off-by: Shannon Zhao shannon.z...@linaro.org --- fsdev/virtfs-proxy-helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev

Re: [Qemu-devel] [PATCH v2] qga/commands-posix: Fix resource leak

2015-03-15 Thread Shannon Zhao
On 2015/3/14 17:56, Stefan Weil wrote: Am 14.03.2015 um 10:52 schrieb Shannon Zhao: It's detected by coverity. Close the dirfd. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com Signed-off-by: Shannon Zhao shannon.z...@linaro.org --- v1-v2: close after use [Stefan Weil] --- qga

Re: [Qemu-devel] [PATCH v2] qga/commands-posix: Fix resource leak

2015-03-15 Thread Shannon Zhao
On 2015/3/16 9:27, zhanghailiang wrote: On 2015/3/14 17:52, Shannon Zhao wrote: It's detected by coverity. Close the dirfd. Reviewed-by: zhanghailiang zhang.zhanghaili...@huawei.com Hi zhanghailiang, Thanks for your review. Shannon Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com

Re: [Qemu-devel] [PATCH] hw/net/e1000: fix integer endianness

2015-03-17 Thread Shannon Zhao
On 2015/3/18 1:05, Stefan Hajnoczi wrote: On Fri, Mar 13, 2015 at 01:21:59PM +0800, Shannon Zhao wrote: It's detected by coverity.In is_vlan_packet s-mac_reg[VET] is unsigned int but is dereferenced as a narrower unsigned short. This may lead to unexpected results depending on machine

Re: [Qemu-devel] [Linaro-acpi] [RFC PATCH 0/7] hw/arm/virt: Dynamic ACPI v5.1 table generation

2015-03-09 Thread Shannon Zhao
On 2015/3/9 20:28, Peter Maydell wrote: On 9 March 2015 at 21:12, Leif Lindholm leif.lindh...@linaro.org wrote: Sorry for being late to the party, missed this set when it went out. You seem to be replying to an email thread which is now many months old and at a part of the conversation which

Re: [Qemu-devel] [PATCH RFC] Implement GIC-500 from GICv3 family for arm64

2015-03-09 Thread Shannon Zhao
On 2015/3/9 22:41, shlomo.pongr...@toganetworks.com wrote: From: Shlomo Pongratz shlomo.pongr...@huawei.com This patch is a first step toward 128 cores support for arm64. At first only 64 cores are supported for two reasons: First the largest integer type has the size of 64 bits and

Re: [Qemu-devel] [PATCH v4 for-2.3 02/25] acpi: add aml_or() term

2015-03-09 Thread Shannon Zhao
On 2015/3/8 19:16, Marcel Apfelbaum wrote: Add encoding for ACPI DefOr Opcode. Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/acpi/aml-build.c | 10 ++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 11

Re: [Qemu-devel] [PATCH v4 for-2.3 04/25] acpi: add aml_lless() term

2015-03-09 Thread Shannon Zhao
On 2015/3/8 19:16, Marcel Apfelbaum wrote: Add encoding for ACPI DefLLess Opcode. Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com Reviewed-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/acpi/aml-build.c | 9 + include/hw

Re: [Qemu-devel] [PATCH v4 for-2.3 08/25] acpi: add aml_increment() term

2015-03-09 Thread Shannon Zhao
On 2015/3/8 19:16, Marcel Apfelbaum wrote: Add encoding for ACPI DefIncrement Opcode. Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com Reviewed-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/acpi/aml-build.c | 8 include

Re: [Qemu-devel] [PATCH v4 for-2.3 09/25] acpi: add aml_while() term

2015-03-09 Thread Shannon Zhao
On 2015/3/8 19:16, Marcel Apfelbaum wrote: Add encoding for ACPI DefWhile Opcode. Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com Reviewed-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/acpi/aml-build.c | 8 include/hw

Re: [Qemu-devel] [PATCH v4 for-2.3 08/25] acpi: add aml_increment() term

2015-03-09 Thread Shannon Zhao
On 2015/3/8 19:16, Marcel Apfelbaum wrote: Add encoding for ACPI DefIncrement Opcode. Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9

  1   2   3   4   5   6   7   8   9   >