[Qemu-devel] Multiple QMP socket clients

2016-10-11 Thread Samuel Ortiz
Hi, On a qemu instance started with a qmp unix socket: -qmp unix:/tmp/ctrl.sock,server,nowait I am trying to have multiple clients working on that socket but although the qmp server seems to accept the connections, only the first connected client gets his request processed. The next client reque

Re: [Qemu-devel] [PATCH v5 03/24] hw: acpi: The RSDP build API can return void

2018-11-06 Thread Samuel Ortiz
On Tue, Nov 06, 2018 at 11:23:39AM +0100, Paolo Bonzini wrote: > On 05/11/2018 02:40, Samuel Ortiz wrote: > > /* RSDP */ > > -static GArray * > > +static void > > build_rsdp(GArray *rsdp_table, BIOSLinker *linker, unsigned > > xsdt_tbl_offset) > &g

Re: [Qemu-devel] QEMU and Kconfig

2018-11-07 Thread Samuel Ortiz
Hi Paolo, On Thu, Sep 27, 2018 at 10:55:59AM +0200, Paolo Bonzini wrote: > > What is the syntactic thing in this example which distinguishes > > "user can toggle this" (ESP_PCI, ARM_VIRT, SUN4M) from "user > > can't toggle this, it's just an internal thing selected by > > other nodes" (the rest) ?

Re: [Qemu-devel] QEMU and Kconfig

2018-11-08 Thread Samuel Ortiz
On Wed, Nov 07, 2018 at 05:24:14PM -0200, Eduardo Habkost wrote: > On Wed, Nov 07, 2018 at 06:39:54PM +0100, Paolo Bonzini wrote: > > On 07/11/2018 16:41, Samuel Ortiz wrote: > > > - The Kconfig parser would be used to generate the equivalent of what we > > > currently

Re: [Qemu-devel] [PATCH v5 05/24] hw: acpi: Implement XSDT support for RSDP

2018-11-08 Thread Samuel Ortiz
Hi Igor, On Thu, Nov 08, 2018 at 03:16:23PM +0100, Igor Mammedov wrote: > On Mon, 5 Nov 2018 02:40:28 +0100 > Samuel Ortiz wrote: > > > XSDT is the 64-bit version of the legacy ACPI RSDT (Root System > > Description Table). RSDT only allow for 32-bit addressses a

[Qemu-devel] [PATCH 04/13] target: arm: Move all interrupt and exception handlers into their own file

2018-11-13 Thread Samuel Ortiz
Most of them are TCG dependent so we want to be able to not build them in order to support TCG disablement with ARM. Signed-off-by: Samuel Ortiz Tested-by: Philippe Mathieu-Daudé Reviewed-by: Robert Bradford --- target/arm/excp_helper.c | 550 +++ target

[Qemu-devel] [PATCH 09/13] target: arm: Move CPU state dumping routines to helper.c

2018-11-13 Thread Samuel Ortiz
They're not TCG specific and should be living the generic helper file instead. Signed-off-by: Samuel Ortiz Reviewed-by: Robert Bradford --- target/arm/internals.h | 12 +++ target/arm/translate.h | 7 -- target/arm/helper.c| 214 + t

[Qemu-devel] [PATCH 13/13] target: arm: Do not build TCG objects when TCG is off

2018-11-13 Thread Samuel Ortiz
We can now safely turn all TCG dependent build off when CONFIG_TCG is off. This allows building ARM binaries with --disable-tcg. Signed-off-by: Samuel Ortiz Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Robert Bradford --- target/arm/Makefile.objs | 14

[Qemu-devel] [PATCH 10/13] target: arm: Move watchpoints APIs to helper.c

2018-11-13 Thread Samuel Ortiz
Here again, those APIs are not TCG dependent and can move to the always built helper.c. Signed-off-by: Samuel Ortiz Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Robert Bradford --- target/arm/internals.h | 6 ++ target/arm/helper.c| 204

[Qemu-devel] [PATCH 08/13] target: arm: Move all VFP helpers into their own file

2018-11-13 Thread Samuel Ortiz
Since softfloat is only relevant with TCG, we move all ARM VFP helpers into their own file (vfp_helper.c), in order to support TCG disablement on ARM. Signed-off-by: Samuel Ortiz Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé

[Qemu-devel] [PATCH 01/13] target: arm: Add copyright boilerplate

2018-11-13 Thread Samuel Ortiz
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Robert Bradford Reviewed-by: Samuel Ortiz --- target/arm/helper.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/arm/helper.c b/target/arm/helper.c index 0da1424f72..3d4e9c5c8a 100644 --- a

[Qemu-devel] [PATCH 02/13] target: arm: Remove unused headers

2018-11-13 Thread Samuel Ortiz
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Robert Bradford Reviewed-by: Samuel Ortiz --- target/arm/helper.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 3d4e9c5c8a..27d9285e1e 100644 --- a/target

[Qemu-devel] [PATCH 06/13] target: arm: Make ARM TLB filling routine static

2018-11-13 Thread Samuel Ortiz
It's only used in op_helper.c, it does not need to be exported and moreover it should only be build when TCG is enabled. Signed-off-by: Samuel Ortiz Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Robert Bradford --- target/arm/internals.h

[Qemu-devel] [PATCH 11/13] target: arm: Define TCG dependent functions when TCG is enabled

2018-11-13 Thread Samuel Ortiz
do_interrupt, do_unaligned_access, do_transaction_failed and debug_excp are only relevant in the TCG context, so we should not define them when TCG is disabled. Signed-off-by: Samuel Ortiz Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Robert Bradford

[Qemu-devel] [PATCH 05/13] target: arm: Move the DC ZVA helper into op_helper

2018-11-13 Thread Samuel Ortiz
Signed-off-by: Samuel Ortiz Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Robert Bradford --- target/arm/helper.c| 84 -- target/arm/op_helper.c | 84 ++ 2 files changed

[Qemu-devel] [PATCH 12/13] target: arm: Makefile cleanup

2018-11-13 Thread Samuel Ortiz
Group objects with the same build dependencies together. Signed-off-by: Samuel Ortiz Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Robert Bradford --- target/arm/Makefile.objs | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff

[Qemu-devel] [PATCH 07/13] target: arm: Remove the LDST headers

2018-11-13 Thread Samuel Ortiz
They are no longer needed. Signed-off-by: Samuel Ortiz Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Robert Bradford --- target/arm/helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 689879c23a

[Qemu-devel] [PATCH 00/13] Support disabling TCG on ARM

2018-11-13 Thread Samuel Ortiz
thieu-Daudé (2): target: arm: Add copyright boilerplate target: arm: Remove unused headers Samuel Ortiz (11): target: arm: Move all v7m helpers into their own file target: arm: Move all interrupt and exception handlers into their own file target: arm: Move the DC ZVA helper into op_h

Re: [Qemu-devel] [PATCH 02/13] target: arm: Remove unused headers

2018-11-13 Thread Samuel Ortiz
Hi Philippe, On Tue, Nov 13, 2018 at 07:02:57PM +0100, Philippe Mathieu-Daudé wrote: > On 13/11/18 18:01, Peter Maydell wrote: > > On 13 November 2018 at 16:52, Samuel Ortiz wrote: > > > From: Philippe Mathieu-Daudé > > > > > > Signed-off-by: Philippe Math

Re: [Qemu-devel] [PATCH 01/13] target: arm: Add copyright boilerplate

2018-11-13 Thread Samuel Ortiz
On Tue, Nov 13, 2018 at 04:58:40PM +, Peter Maydell wrote: > On 13 November 2018 at 16:52, Samuel Ortiz wrote: > > From: Philippe Mathieu-Daudé > > > > Signed-off-by: Philippe Mathieu-Daudé > > Reviewed-by: Robert Bradford > > Reviewed-by: Samuel Ortiz >

Re: [Qemu-devel] SeaBIOS booting time optimization

2018-11-18 Thread Samuel Ortiz
Hi Stefan, On Fri, Nov 16, 2018 at 04:39:20PM +, Stefan Hajnoczi wrote: > On Fri, Nov 16, 2018 at 4:21 PM Stefano Garzarella > wrote: > > I'm investigating the SeaBIOS booting time, to understand if we can reduce > > the boot time in some cases (e.g. legacy hardware is not needed). I think >

Re: [Qemu-devel] SeaBIOS booting time optimization

2018-11-18 Thread Samuel Ortiz
Hi Stefano, On Fri, Nov 16, 2018 at 05:13:59PM +0100, Stefano Garzarella wrote: > Hi, > I'm investigating the SeaBIOS booting time, to understand if we can reduce > the boot time in some cases (e.g. legacy hardware is not needed). I think > this > can be interesting also for NEMU developers. Defin

[Qemu-devel] [PATCH 04/26] hw: arm: Switch to the AML build RSDP building routine

2018-10-22 Thread Samuel Ortiz
c: Shannon Zhao Cc:Peter Maydell Signed-off-by: Samuel Ortiz --- hw/arm/virt-acpi-build.c | 31 +-- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index f28a2faa53..0a6a88380a 100644 --- a/hw/arm

[Qemu-devel] [PATCH 02/26] hw: acpi: Export ACPI build alignment API

2018-10-22 Thread Samuel Ortiz
This is going to be needed by the Hardware-reduced ACPI routines. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Marcel Apfelbaum Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Samuel Ortiz --- hw/acpi/aml-build.c | 8 hw/i386/ac

[Qemu-devel] [PATCH 00/27] ACPI hardware-reduced support

2018-10-22 Thread Samuel Ortiz
hw: acpi: reduced: Add reboot support Samuel Ortiz (10): hw: i386: Decouple the ACPI build from the PC machine type hw: acpi: Export ACPI build alignment API hw: acpi: Export the RSDP build API hw: arm: Switch to the AML build RSDP building routine hw: acpi

[Qemu-devel] [PATCH 01/26] hw: i386: Decouple the ACPI build from the PC machine type

2018-10-22 Thread Samuel Ortiz
apic_xrupt_override unsigned apic_id_limit uint64_t numa_nodes uint64_t numa_mem Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Shannon Zhao Cc: Peter Maydell Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Marcel Apfelbaum Signed-off-by: Samuel Ortiz --- hw/acpi/cpu

[Qemu-devel] [PATCH 03/26] hw: acpi: Export the RSDP build API

2018-10-22 Thread Samuel Ortiz
The hardware-reduced API will need to build RSDP as well, so we should export this routine. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Marcel Apfelbaum Signed-off-by: Samuel Ortiz --- hw/acpi/aml-build.c

[Qemu-devel] [PATCH 07/26] hw: i386: Refactor PCI host getter

2018-10-22 Thread Samuel Ortiz
From: Yang Zhong Make it more flexible by having it parsing a PCI host paths array instead of open coding those paths deep down into the code logic itself. This will be needed for PCI machine types that are neither emulatiing the ich9 nor the i440fx chipsets. Cc: "Michael S. Tsirkin" Cc: Igor M

[Qemu-devel] [PATCH 06/26] hw: acpi: Factorize _OSC AML across architectures

2018-10-22 Thread Samuel Ortiz
From: Yang Zhong The _OSC AML table is almost identical between the i386 Q35 and arm virt machine types. We can make it slightly more generic and share it across all PCIe architectures. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Shannon Zhao Cc: Peter Maydell Cc: Marcel Apfelbaum Cc: Pa

[Qemu-devel] [PATCH 05/26] hw: acpi: Generalize AML build routines

2018-10-22 Thread Samuel Ortiz
From: Yang Zhong Most of the AML build routines under acpi-build are not even architecture specific. They can be moved to the more generic hw/acpi folder where they could be shared across machine types and architectures. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Paolo Bonzini Cc: Richard

[Qemu-devel] [PATCH 11/26] hw: i386: Make the hotpluggable memory size property more generic

2018-10-22 Thread Samuel Ortiz
dov Cc: Marcel Apfelbaum Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Samuel Ortiz --- hw/i386/acpi-build.c | 2 +- hw/i386/pc.c | 3 ++- include/hw/i386/pc.h | 1 - include/hw/mem/memory-device.h | 2 ++ 4 files changed, 5 i

[Qemu-devel] [PATCH 12/26] hw: acpi: Export the SRAT AML build API

2018-10-22 Thread Samuel Ortiz
From: Yang Zhong The SRAT ACPI table is not x86 specific and will be needed for the Hardware-reduced ACPI implementation. So we should export it through the architecture independent hw/acpi folder. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo

[Qemu-devel] [PATCH 10/26] hw: acpi: Do not create hotplug method when handler is not defined

2018-10-22 Thread Samuel Ortiz
name is not NULL. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Samuel Ortiz --- hw/acpi/cpu.c| 8 +--- hw/acpi/memory_hotplug.c | 11 +++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index

[Qemu-devel] [PATCH 08/26] hw: acpi: Export and generalize the PCI host AML API

2018-10-22 Thread Samuel Ortiz
From: Yang Zhong The AML build routines for the PCI host bridge and the corresponding DSDT addition are neither x86 nor PC machine type specific. We can move them to the architecture agnostic hw/acpi folder, and by carrying all the needed information through a new AcpiPciBus structure, we can mak

[Qemu-devel] [PATCH 13/26] hw: acpi: Fix memory hotplug AML generation error

2018-10-22 Thread Samuel Ortiz
From: Yang Zhong When using the generated memory hotplug AML, the iasl compiler would give the following error: dsdt.dsl 266: Return (MOST (_UID, Arg0, Arg1, Arg2)) Error 6080 - Called method returns no value ^ Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Yang Zhong --- hw/acpi

[Qemu-devel] [PATCH 14/26] hw: acpi: Export the PCI hotplug API

2018-10-22 Thread Samuel Ortiz
From: Sebastien Boeuf The ACPI hotplug support for PCI devices APIs are not x86 or even machine type specific. In order for future machine types to be able to re-use that code, we export it through the architecture agnostic hw/acpi folder. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Paolo B

[Qemu-devel] [PATCH 17/26] hw: i386: Convert PC machine type to firmware build methods

2018-10-22 Thread Samuel Ortiz
mmedov Cc: Marcel Apfelbaum Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Samuel Ortiz --- hw/i386/acpi-build.c | 22 ++ hw/i386/pc.c | 9 + include/hw/i386/acpi.h | 27 +++ 3 files changed, 50 insert

[Qemu-devel] [PATCH 19/26] hw: acpi: reduced: Add MCFG support

2018-10-22 Thread Samuel Ortiz
From: Yang Zhong For PCIe based platform, we need to add an MCFG table to the hardware-reduced DSDT. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Yang Zhong Signed-off-by: Samuel Ortiz --- hw/acpi/reduced.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[Qemu-devel] [PATCH 09/26] hw: acpi: Export the MCFG getter

2018-10-22 Thread Samuel Ortiz
From: Yang Zhong The ACPI MCFG getter is not x86 specific and could be called from anywhere within generic ACPI API, so let's export it. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Marcel Apfelbaum Signed-off-by: Yang Zhong --

[Qemu-devel] [PATCH 16/26] hw: fw-build: Add firmware build methods and state

2018-10-22 Thread Samuel Ortiz
existing implementation only to add small variations to it. Cc: Eduardo Habkost Cc: Marcel Apfelbaum Signed-off-by: Samuel Ortiz --- include/hw/boards.h | 5 include/hw/fw-build.h | 57 +++ 2 files changed, 62 insertions(+) create mode 100644 include

[Qemu-devel] [PATCH 18/26] hw: acpi: Initial hardware-reduced support

2018-10-22 Thread Samuel Ortiz
r Mammedov Signed-off-by: Samuel Ortiz --- default-configs/i386-softmmu.mak | 1 + hw/acpi/Makefile.objs| 1 + hw/acpi/reduced.c| 248 +++ include/hw/acpi/reduced.h| 24 +++ 4 files changed, 274 insertions(+) create mode 1006

[Qemu-devel] [PATCH 21/26] hw: acpi: reduced: Add memory hotplug support

2018-10-22 Thread Samuel Ortiz
From: Yang Zhong We add the memory hotplug AML code to the hardware-reduced DSDT. The memory hotplug event is handled through the GED device. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Yang Zhong --- hw/acpi/reduced.c | 17 ++--- 1 file changed, 14 insertions(+), 3

[Qemu-devel] [PATCH 15/26] hw: acpi: Retrieve the PCI bus from AcpiPciHpState

2018-10-22 Thread Samuel Ortiz
From: Sebastien Boeuf Instead of using the machine type specific method find_i440fx() to retrieve the PCI bus, this commit aims to rely on the fact that the PCI bus is known by the structure AcpiPciHpState. When the structure is initialized through acpi_pcihp_init() call, it saves the PCI bus, w

[Qemu-devel] [PATCH 25/26] hw: acpi: reduced: Add NFIT support

2018-10-22 Thread Samuel Ortiz
From: Sebastien Boeuf If the platform is NVDIMM enabled, we add the NFIT table to the ACPI build. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Sebastien Boeuf --- hw/acpi/reduced.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/acpi/reduced.c b/hw

[Qemu-devel] [PATCH 22/26] hw: acpi: reduced: Add shutdown support

2018-10-22 Thread Samuel Ortiz
From: Jing Liu Hardware-reduced ACPI uses SLEEP_CONTROL_REG to enter S5 sleep state. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Jing Liu --- hw/acpi/aml-build.c | 2 +- hw/acpi/reduced.c | 15 +++ include/hw/acpi/acpi-defs.h | 1 + include/hw/ac

[Qemu-devel] [PATCH 24/26] hw: acpi: reduced: Add SRAT table

2018-10-22 Thread Samuel Ortiz
From: Yang Zhong If the platform is a NUMA enabled, we add the SRAT table to the ACPI build. It is up to the calling platform to define its own SRAT build method or use the aml-build.c one. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Yang Zhong --- hw/acpi/reduced.c | 10 ++

[Qemu-devel] [PATCH 20/26] hw: acpi: reduced: Generic Event Device support

2018-10-22 Thread Samuel Ortiz
through GED. The build_ged_aml routine takes a GedEvent array that maps a specific GED event to an IRQ number. Then we use that array to build both the _CRS and the _EVT section of the GED device. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Samuel Ortiz --- hw/acpi

[Qemu-devel] [PATCH 26/26] hw: acpi: reduced: Add PCI hotplug support

2018-10-22 Thread Samuel Ortiz
From: Sebastien Boeuf In order to support PCI hotplug through a hardware-reduced GED, we need to modify the GED device definition in the DSDT table, so that a PCI hotplug related interrupt will trigger a new PCI scan. We also need to modify the DSDT PCI bus definition in order to make sure a PCI

[Qemu-devel] [PATCH 23/26] hw: acpi: reduced: Add reboot support

2018-10-22 Thread Samuel Ortiz
From: Jing Liu We only need to expose it through FADT. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Jing Liu --- hw/acpi/reduced.c | 7 ++- include/hw/acpi/reduced.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/acpi/reduced.c b/hw/acpi/red

Re: [Qemu-devel] [PATCH 00/27] ACPI hardware-reduced support

2018-10-23 Thread Samuel Ortiz
On Mon, Oct 22, 2018 at 05:28:54PM -0400, Michael S. Tsirkin wrote: > On Mon, Oct 22, 2018 at 08:36:30PM +0200, Samuel Ortiz wrote: > > This patch set implements support for the ACPI hardware-reduced > > specification. > > > > The changes are coming from the NEMU [1] p

Re: [Qemu-devel] [PATCH 00/27] ACPI hardware-reduced support

2018-10-23 Thread Samuel Ortiz
Hi Peter, On Tue, Oct 23, 2018 at 08:01:26PM +0100, Peter Maydell wrote: > On 22 October 2018 at 19:36, Samuel Ortiz wrote: > > This patch set implements support for the ACPI hardware-reduced > > specification. > > > > The changes are coming from the NEMU [1] project

[Qemu-devel] [PATCH v2 05/19] hw: arm: Switch to the AML build RSDP building routine

2018-10-29 Thread Samuel Ortiz
We make the ARM virt ACPI code use the now shared build_rsdp() API from aml-build.c. By doing so we fix a bug where the ARM implementation was missing adding both the legacy and extended checksums, which was building an invalid RSDP table. Signed-off-by: Samuel Ortiz --- hw/arm/virt-acpi

[Qemu-devel] [PATCH v2 02/19] hw: acpi: Export ACPI build alignment API

2018-10-29 Thread Samuel Ortiz
This is going to be needed by the Hardware-reduced ACPI routines. Signed-off-by: Samuel Ortiz --- hw/acpi/aml-build.c | 8 hw/i386/acpi-build.c| 8 include/hw/acpi/aml-build.h | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/acpi/aml

[Qemu-devel] [PATCH v2 08/19] hw: i386: Refactor PCI host getter

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong Make it more flexible by having it parsing a PCI host paths array instead of open coding those paths deep down into the code logic itself. This will be needed for PCI machine types that are neither emulatiing the ich9 nor the i440fx chipsets. Signed-off-by: Yang Zhong --- hw/i

[Qemu-devel] [PATCH v2 07/19] hw: acpi: Factorize _OSC AML across architectures

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong The _OSC AML table is almost identical between the i386 Q35 and arm virt machine types. We can make it slightly more generic and share it across all PCIe architectures. Signed-off-by: Yang Zhong --- hw/acpi/aml-build.c | 84 +++-- hw/arm

[Qemu-devel] [PATCH v2 06/19] hw: acpi: Generalize AML build routines

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong Most of the AML build routines under acpi-build are not even architecture specific. They can be moved to the more generic hw/acpi folder where they could be shared across machine types and architectures. Signed-off-by: Yang Zhong --- hw/acpi/aml-build.c | 498 +

[Qemu-devel] [PATCH v2 03/19] hw: acpi: Export the RSDP build API

2018-10-29 Thread Samuel Ortiz
. Signed-off-by: Samuel Ortiz --- hw/acpi/aml-build.c | 24 hw/i386/acpi-build.c| 26 -- include/hw/acpi/aml-build.h | 3 +++ 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c

[Qemu-devel] [PATCH v2 13/19] hw: acpi: Export the SRAT AML build API

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong The SRAT ACPI table is not x86 specific and will be needed for the Hardware-reduced ACPI implementation. So we should export it through the architecture independent hw/acpi folder. Also, now that the generic build_srat() API is exported, we have to rename the ARM static one in o

[Qemu-devel] [PATCH v2 10/19] hw: acpi: Export the MCFG getter

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong The ACPI MCFG getter is not x86 specific and could be called from anywhere within generic ACPI API, so let's export it. Signed-off-by: Yang Zhong --- hw/acpi/aml-build.c | 24 hw/i386/acpi-build.c| 22 -- include/hw/

[Qemu-devel] [PATCH v2 15/19] hw: acpi: Export the PCI hotplug API

2018-10-29 Thread Samuel Ortiz
From: Sebastien Boeuf The ACPI hotplug support for PCI devices APIs are not x86 or even machine type specific. In order for future machine types to be able to re-use that code, we export it through the architecture agnostic hw/acpi folder. Signed-off-by: Sebastien Boeuf Signed-off-by: Jing Liu

[Qemu-devel] [PATCH v2 16/19] hw: acpi: Retrieve the PCI bus from AcpiPciHpState

2018-10-29 Thread Samuel Ortiz
From: Sebastien Boeuf Instead of using the machine type specific method find_i440fx() to retrieve the PCI bus, this commit aims to rely on the fact that the PCI bus is known by the structure AcpiPciHpState. When the structure is initialized through acpi_pcihp_init() call, it saves the PCI bus, w

[Qemu-devel] [PATCH v2 12/19] hw: i386: Make the hotpluggable memory size property more generic

2018-10-29 Thread Samuel Ortiz
This property is currently defined under i386/pc while it only describes a region size that's eventually fetched from the AML ACPI code. We can make it more generic and shareable across machine types by moving it to memory-device.h instead. Signed-off-by: Samuel Ortiz --- hw/i386/acpi-bu

[Qemu-devel] [PATCH v2 00/19] ACPI reorganization for hardware-reduced support

2018-10-29 Thread Samuel Ortiz
/acpi v1 -> v2: * Drop the hardware-reduced implementation for now. Our next patch set will add hardware-reduced and convert arm/virt to it. * Implement the ACPI build methods as a QOM Interface Class and convert the PC machine type to it. Samuel Ortiz (10): hw: i386: Deco

[Qemu-devel] [PATCH v2 19/19] hw: i386: Implement the ACPI builder interface for PC

2018-10-29 Thread Samuel Ortiz
mmedov Cc: Marcel Apfelbaum Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Samuel Ortiz --- hw/i386/acpi-build.c | 15 ++- hw/i386/pc.c | 19 +++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/hw/i386/acpi-build.c

[Qemu-devel] [PATCH v2 18/19] hw: i386: Export the MADT build method

2018-10-29 Thread Samuel Ortiz
It is going to be used by the PC machine type as the MADT table builder method and thus needs to be exported outside of acpi-build.c Also, now that the generic build_madt() API is exported, we have to rename the ARM static one in order to avoid build time conflicts. Signed-off-by: Samuel Ortiz

[Qemu-devel] [PATCH v2 11/19] hw: acpi: Do not create hotplug method when handler is not defined

2018-10-29 Thread Samuel Ortiz
name is not NULL. Signed-off-by: Samuel Ortiz --- hw/acpi/cpu.c| 8 +--- hw/acpi/memory_hotplug.c | 11 +++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index f10b190019..cd41377b5a 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi

[Qemu-devel] [PATCH v2 04/19] hw: acpi: Implement XSDT support for RSDP

2018-10-29 Thread Samuel Ortiz
version 2.0, RSDPs should add an extended checksum, a complete table length and a version field to the table. Here we provide a legacy API (RSDP points at RSDTs) for backward compatibility purpose and a default, XSDT pointing API. Signed-off-by: Samuel Ortiz --- hw/acpi/aml-build.c | 41

[Qemu-devel] [PATCH v2 14/19] hw: acpi: Fix memory hotplug AML generation error

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong When using the generated memory hotplug AML, the iasl compiler would give the following error: dsdt.dsl 266: Return (MOST (_UID, Arg0, Arg1, Arg2)) Error 6080 - Called method returns no value ^ Signed-off-by: Yang Zhong --- hw/acpi/memory_hotplug.c | 10 +- 1 file cha

[Qemu-devel] [PATCH v2 01/19] hw: i386: Decouple the ACPI build from the PC machine type

2018-10-29 Thread Samuel Ortiz
apic_xrupt_override unsigned apic_id_limit uint64_t numa_nodes uint64_t numa_mem Signed-off-by: Samuel Ortiz --- hw/acpi/cpu_hotplug.c| 9 +- hw/arm/virt-acpi-build.c | 10 --- hw/i386/acpi-build.c | 135 ++ hw/i386/acpi-build.h | 4 +- hw/i386/pc.c

[Qemu-devel] [PATCH v2 09/19] hw: acpi: Export and generalize the PCI host AML API

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong The AML build routines for the PCI host bridge and the corresponding DSDT addition are neither x86 nor PC machine type specific. We can move them to the architecture agnostic hw/acpi folder, and by carrying all the needed information through a new AcpiPciBus structure, we can mak

[Qemu-devel] [PATCH v2 17/19] hw: acpi: Define ACPI tables builder interface

2018-10-29 Thread Samuel Ortiz
the existing implementation only to add small variations to it. Cc: Eduardo Habkost Cc: Marcel Apfelbaum Signed-off-by: Samuel Ortiz --- hw/acpi/Makefile.objs | 1 + hw/acpi/builder.c | 97 +++ include/hw/acpi/builder.h | 97

Re: [Qemu-devel] [PATCH v2 00/19] ACPI reorganization for hardware-reduced support

2018-10-29 Thread Samuel Ortiz
Please discard that serie as I forgot to Cc the proper maintainers in many of those patches. Apologies for that, I'm going to send a v3 in a few minutes. Cheers, Samuel. On Mon, Oct 29, 2018 at 05:24:22PM +0100, Samuel Ortiz wrote: > This patch set provides an ACPI code reorganiz

[Qemu-devel] [PATCH v3 02/19] hw: acpi: Export ACPI build alignment API

2018-10-29 Thread Samuel Ortiz
This is going to be needed by the Hardware-reduced ACPI routines. Signed-off-by: Samuel Ortiz --- hw/acpi/aml-build.c | 8 hw/i386/acpi-build.c| 8 include/hw/acpi/aml-build.h | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/acpi/aml

[Qemu-devel] [PATCH v3 00/19] ACPI reorganization for hardware-reduced support

2018-10-29 Thread Samuel Ortiz
ineState pointer and not a MachineState one as its argument. v2 -> v3: * Cc all relevant maintainers, no functional changes. Samuel Ortiz (10): hw: i386: Decouple the ACPI build from the PC machine type hw: acpi: Export ACPI build alignment API hw: acpi: Export the RSDP build API

[Qemu-devel] [PATCH v3 08/19] hw: i386: Refactor PCI host getter

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong Make it more flexible by having it parsing a PCI host paths array instead of open coding those paths deep down into the code logic itself. This will be needed for PCI machine types that are neither emulatiing the ich9 nor the i440fx chipsets. Signed-off-by: Yang Zhong --- hw/i

[Qemu-devel] [PATCH v3 03/19] hw: acpi: Export the RSDP build API

2018-10-29 Thread Samuel Ortiz
. Signed-off-by: Samuel Ortiz --- hw/acpi/aml-build.c | 24 hw/i386/acpi-build.c| 26 -- include/hw/acpi/aml-build.h | 3 +++ 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c

[Qemu-devel] [PATCH v3 01/19] hw: i386: Decouple the ACPI build from the PC machine type

2018-10-29 Thread Samuel Ortiz
apic_xrupt_override unsigned apic_id_limit uint64_t numa_nodes uint64_t numa_mem Signed-off-by: Samuel Ortiz --- hw/acpi/cpu_hotplug.c| 9 +- hw/arm/virt-acpi-build.c | 10 --- hw/i386/acpi-build.c | 135 ++ hw/i386/acpi-build.h | 4 +- hw/i386/pc.c

[Qemu-devel] [PATCH v3 05/19] hw: arm: Switch to the AML build RSDP building routine

2018-10-29 Thread Samuel Ortiz
We make the ARM virt ACPI code use the now shared build_rsdp() API from aml-build.c. By doing so we fix a bug where the ARM implementation was missing adding both the legacy and extended checksums, which was building an invalid RSDP table. Signed-off-by: Samuel Ortiz --- hw/arm/virt-acpi

[Qemu-devel] [PATCH v3 14/19] hw: acpi: Fix memory hotplug AML generation error

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong When using the generated memory hotplug AML, the iasl compiler would give the following error: dsdt.dsl 266: Return (MOST (_UID, Arg0, Arg1, Arg2)) Error 6080 - Called method returns no value ^ Signed-off-by: Yang Zhong --- hw/acpi/memory_hotplug.c | 10 +- 1 file cha

[Qemu-devel] [PATCH v3 12/19] hw: i386: Make the hotpluggable memory size property more generic

2018-10-29 Thread Samuel Ortiz
This property is currently defined under i386/pc while it only describes a region size that's eventually fetched from the AML ACPI code. We can make it more generic and shareable across machine types by moving it to memory-device.h instead. Signed-off-by: Samuel Ortiz --- hw/i386/acpi-bu

[Qemu-devel] [PATCH v3 06/19] hw: acpi: Generalize AML build routines

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong Most of the AML build routines under acpi-build are not even architecture specific. They can be moved to the more generic hw/acpi folder where they could be shared across machine types and architectures. Signed-off-by: Yang Zhong --- hw/acpi/aml-build.c | 498 +

[Qemu-devel] [PATCH v3 04/19] hw: acpi: Implement XSDT support for RSDP

2018-10-29 Thread Samuel Ortiz
version 2.0, RSDPs should add an extended checksum, a complete table length and a version field to the table. Here we provide a legacy API (RSDP points at RSDTs) for backward compatibility purpose and a default, XSDT pointing API. Signed-off-by: Samuel Ortiz --- hw/acpi/aml-build.c | 41

[Qemu-devel] [PATCH v3 18/19] hw: i386: Export the MADT build method

2018-10-29 Thread Samuel Ortiz
It is going to be used by the PC machine type as the MADT table builder method and thus needs to be exported outside of acpi-build.c Also, now that the generic build_madt() API is exported, we have to rename the ARM static one in order to avoid build time conflicts. Signed-off-by: Samuel Ortiz

[Qemu-devel] [PATCH v3 19/19] hw: i386: Implement the ACPI builder interface for PC

2018-10-29 Thread Samuel Ortiz
All PC machine type derivatives will use the same ACPI table build methods. But with that change in place, any new x86 machine type will be able to re-use the acpi-build API and customize part of it by defining its own ACPI table build methods. Signed-off-by: Samuel Ortiz --- hw/i386/acpi

[Qemu-devel] [PATCH v3 11/19] hw: acpi: Do not create hotplug method when handler is not defined

2018-10-29 Thread Samuel Ortiz
name is not NULL. Signed-off-by: Samuel Ortiz --- hw/acpi/cpu.c| 8 +--- hw/acpi/memory_hotplug.c | 11 +++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index f10b190019..cd41377b5a 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi

[Qemu-devel] [PATCH v3 07/19] hw: acpi: Factorize _OSC AML across architectures

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong The _OSC AML table is almost identical between the i386 Q35 and arm virt machine types. We can make it slightly more generic and share it across all PCIe architectures. Signed-off-by: Yang Zhong --- hw/acpi/aml-build.c | 84 +++-- hw/arm

[Qemu-devel] [PATCH v3 10/19] hw: acpi: Export the MCFG getter

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong The ACPI MCFG getter is not x86 specific and could be called from anywhere within generic ACPI API, so let's export it. Signed-off-by: Yang Zhong --- hw/acpi/aml-build.c | 24 hw/i386/acpi-build.c| 22 -- include/hw/

[Qemu-devel] [PATCH v3 09/19] hw: acpi: Export and generalize the PCI host AML API

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong The AML build routines for the PCI host bridge and the corresponding DSDT addition are neither x86 nor PC machine type specific. We can move them to the architecture agnostic hw/acpi folder, and by carrying all the needed information through a new AcpiPciBus structure, we can mak

[Qemu-devel] [PATCH v3 15/19] hw: acpi: Export the PCI hotplug API

2018-10-29 Thread Samuel Ortiz
From: Sebastien Boeuf The ACPI hotplug support for PCI devices APIs are not x86 or even machine type specific. In order for future machine types to be able to re-use that code, we export it through the architecture agnostic hw/acpi folder. Signed-off-by: Sebastien Boeuf Signed-off-by: Jing Liu

[Qemu-devel] [PATCH v3 16/19] hw: acpi: Retrieve the PCI bus from AcpiPciHpState

2018-10-29 Thread Samuel Ortiz
From: Sebastien Boeuf Instead of using the machine type specific method find_i440fx() to retrieve the PCI bus, this commit aims to rely on the fact that the PCI bus is known by the structure AcpiPciHpState. When the structure is initialized through acpi_pcihp_init() call, it saves the PCI bus, w

[Qemu-devel] [PATCH v3 17/19] hw: acpi: Define ACPI tables builder interface

2018-10-29 Thread Samuel Ortiz
the existing implementation only to add small variations to it. Cc: Eduardo Habkost Cc: Marcel Apfelbaum Signed-off-by: Samuel Ortiz --- hw/acpi/Makefile.objs | 1 + hw/acpi/builder.c | 97 +++ include/hw/acpi/builder.h | 97

[Qemu-devel] [PATCH v3 13/19] hw: acpi: Export the SRAT AML build API

2018-10-29 Thread Samuel Ortiz
From: Yang Zhong The SRAT ACPI table is not x86 specific and will be needed for the Hardware-reduced ACPI implementation. So we should export it through the architecture independent hw/acpi folder. Also, now that the generic build_srat() API is exported, we have to rename the ARM static one in o

Re: [Qemu-devel] [PATCH v3 19/19] hw: i386: Implement the ACPI builder interface for PC

2018-10-30 Thread Samuel Ortiz
Hi Paolo, On Mon, Oct 29, 2018 at 06:28:39PM +0100, Paolo Bonzini wrote: > On 29/10/2018 18:01, Samuel Ortiz wrote: > > @@ -1556,6 +1557,7 @@ void acpi_build(AcpiBuildTables *tables, > > GArray *tables_blob = tables->table_data; > > AcpiSlicOem slic_oem = { .id

Re: [Qemu-devel] [PATCH v3 09/19] hw: acpi: Export and generalize the PCI host AML API

2018-10-30 Thread Samuel Ortiz
Hi Philippe, On Mon, Oct 29, 2018 at 08:29:38PM +0100, Philippe Mathieu-Daudé wrote: > On 29/10/18 20:23, Philippe Mathieu-Daudé wrote: > > On 29/10/18 18:01, Samuel Ortiz wrote: > > > From: Yang Zhong > > > > > > The AML build routines for the PCI host bri

Re: [Qemu-devel] [PATCH v2 00/19] ACPI reorganization for hardware-reduced support

2018-10-30 Thread Samuel Ortiz
Hi Markus, On Mon, Oct 29, 2018 at 06:28:48PM +0100, Markus Armbruster wrote: > You neglected to cc: maintainers. I'm doing that for you now. > scripts/get_maintainer.pl can help you finding maintainers. Sorry about that. I sent a v3 with all maintainers cc'ed. Cheers, Samuel.

Re: [Qemu-devel] [PATCH v3 19/19] hw: i386: Implement the ACPI builder interface for PC

2018-10-30 Thread Samuel Ortiz
On Tue, Oct 30, 2018 at 05:03:28PM +0100, Paolo Bonzini wrote: > On 30/10/2018 15:13, Samuel Ortiz wrote: > >> Just a quick question before I go and actually apply the patches to look > >> at the resulting code: is there any reason why you didn't add the > >>

Re: [Qemu-devel] [PATCH v3 09/19] hw: acpi: Export and generalize the PCI host AML API

2018-10-31 Thread Samuel Ortiz
Hi Philippe, On Tue, Oct 30, 2018 at 07:04:15PM +0100, Philippe Mathieu-Daudé wrote: > > > > > +void acpi_get_pci_holes(Range *hole, Range *hole64) > > > > > > ... and this function neither, it should stay in hw/i386/acpi-build.c, > > > thus > > > you don't need to modify the prototype and can c

[Qemu-devel] [PATCH v4 01/23] hw: i386: Decouple the ACPI build from the PC machine type

2018-11-01 Thread Samuel Ortiz
apic_xrupt_override unsigned apic_id_limit uint64_t numa_nodes uint64_t numa_mem Signed-off-by: Samuel Ortiz --- hw/acpi/cpu_hotplug.c| 9 +- hw/arm/virt-acpi-build.c | 10 --- hw/i386/acpi-build.c | 136 ++ hw/i386/acpi-build.h | 4 +- hw/i386/pc.c

[Qemu-devel] [PATCH v4 03/23] hw: acpi: Export the RSDP build API

2018-11-01 Thread Samuel Ortiz
. Signed-off-by: Samuel Ortiz --- hw/acpi/aml-build.c | 24 hw/arm/virt-acpi-build.c| 2 +- hw/i386/acpi-build.c| 26 -- include/hw/acpi/aml-build.h | 3 +++ 4 files changed, 28 insertions(+), 27 deletions(-) diff --git a/hw/acpi

[Qemu-devel] [PATCH v4 02/23] hw: acpi: Export ACPI build alignment API

2018-11-01 Thread Samuel Ortiz
This is going to be needed by the Hardware-reduced ACPI routines. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Samuel Ortiz --- hw/acpi/aml-build.c | 8 hw/i386/acpi-build.c| 8 include/hw/acpi/aml-build.h | 2 ++ 3

  1   2   3   >