[Qemu-devel] [PATCH v4 for-2.3 13/25] hw/acpi: remove from root bus 0 the crs resources used by other busses.

2015-03-08 Thread Marcel Apfelbaum
If multiple root busses are used, root bus 0 cannot use all the pci holes ranges. Remove the IO/mem ranges used by the other primary busses. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 84 1 file changed, 72

[Qemu-devel] [PATCH v4 for-2.3 12/25] hw/acpi: add _CRS method for extra root busses

2015-03-08 Thread Marcel Apfelbaum
Save the IO/mem/bus numbers ranges assigned to the extra root busses to be removed from the root bus 0 range. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 149 +++ 1 file changed, 149 insertions(+) diff --git a/hw

[Qemu-devel] [PATCH v4 for-2.3 17/25] hw/pci: introduce TYPE_PCI_MAIN_HOST_BRIDGE interface

2015-03-08 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com This is a marker interface used to differentiate the default host bridge on a system with multiple host bridges. This differentiation is required only for pc machines for now by the ACPI subsystem. Signed-off-by: Marcel Apfelbaum mar...@redhat.com

Re: [Qemu-devel] [PATCH v3 for-2.3 10/24] hw/apci: add _PRT method for extra PCI root busses

2015-03-08 Thread Marcel Apfelbaum
On 03/08/2015 12:46 PM, Michael S. Tsirkin wrote: On Thu, Mar 05, 2015 at 04:55:08PM +0200, Marcel Apfelbaum wrote: Signed-off-by: Marcel Apfelbaum mar...@redhat.com some ideas for cleaning this up. there's more here btw. --- hw/i386/acpi-build.c | 78

[Qemu-devel] [PATCH v4 for-2.3 01/25] acpi: fix aml_equal term implementation

2015-03-08 Thread Marcel Apfelbaum
The DefLEqual op does not have a target operand. Remove it. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/acpi/aml-build.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 876cada..0d14561 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi

[Qemu-devel] [PATCH v4 for-2.3 03/25] acpi: add aml_add() term

2015-03-08 Thread Marcel Apfelbaum
Add encoding for ACPI DefAdd 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 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi

[Qemu-devel] [PATCH v4 for-2.3 19/25] hw/pci: implement iteration over multiple host bridges

2015-03-08 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/pci/pci.c | 8 include/hw/pci/pci_host.h | 4 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 53598bd..f0cf752 100644

[Qemu-devel] [PATCH v4 for-2.3 05/25] acpi: add aml_index() term

2015-03-08 Thread Marcel Apfelbaum
Add encoding for ACPI DefIndex Opcode. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/acpi/aml-build.c | 13 + include/hw/acpi/aml-build.h | 1 + 2 files changed, 14 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 49ba8c1..b3372df 100644

[Qemu-devel] [PATCH v4 for-2.3 16/25] hw/pci: made pci_bus_num a PCIBusClass method

2015-03-08 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com Refactoring it as a method of PCIBusClass will allow different implementations for subclasses. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/kvm/pci-assign.c | 1 + hw/pci/pci.c | 7 --- hw/pci/pci_bus.c | 10

[Qemu-devel] [PATCH v4 for-2.3 20/25] hw/pci: introduce PCI Expander Bridge (PXB)

2015-03-08 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com PXB is a light-weight host bridge whose purpose is to enable the main host bridge to support multiple PCI root buses. As oposed to PCI-2-PCI bridge's secondary bus, PXB's bus is a primary bus and can be associated with a NUMA node (different from

[Qemu-devel] [PATCH v4 for-2.3 21/25] hw/pci: inform bios if the system has more than one pci bridge

2015-03-08 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com The bios looks for 'etc/extra-pci-roots' to decide if is going to scan further buses after bus 0 tree. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/pc.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/i386/pc.c b

[Qemu-devel] [PATCH v4 for-2.3 00/25] hw/pc: implement multiple primary busses for pc machines

2015-03-08 Thread Marcel Apfelbaum
exist patch 20 handles the actual implementation of the PXB devices patch 21-22 enables the device patch 23 implements PXB map_irq function, (can be squashed into the actual PXB) patch 24-25 adds NUMA support Marcel Apfelbaum (25): acpi: fix aml_equal term implementation acpi: add aml_or() term

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

2015-03-08 Thread Marcel Apfelbaum
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 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi

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

2015-03-08 Thread Marcel Apfelbaum
Add encoding for ACPI DefLLess Opcode. Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/acpi/aml-build.c | 9 + include/hw/acpi/aml-build.h | 1 + 2 files changed, 10 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi

[Qemu-devel] [PATCH v4 for-2.3 07/25] acpi: add aml_shiftright() term

2015-03-08 Thread Marcel Apfelbaum
Add encoding for ACPI DefShiftRight 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 insertions(+) diff --git a/hw/acpi/aml-build.c b

[Qemu-devel] [PATCH v4 for-2.3 10/25] hw/acpi: add support for multiple root busses

2015-03-08 Thread Marcel Apfelbaum
If the machine has several root busses, we need to add them to acpi in order to be properly detected by guests. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/i386/acpi-build.c b

[Qemu-devel] [PATCH v4 for-2.3 11/25] hw/apci: add _PRT method for extra PCI root busses

2015-03-08 Thread Marcel Apfelbaum
Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 65 1 file changed, 65 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index e5709e8..e7a1a36 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386

[Qemu-devel] [PATCH v4 for-2.3 22/25] hw/pci: piix - suport multiple host bridges

2015-03-08 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com Instead of assuming it has only one bus, it enumerates all the host bridges until it finds the one with bus number corresponding with the config register. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/pci-host/piix.c | 57

[Qemu-devel] [PATCH v4 for-2.3 25/25] hw/pxb: add numa_node parameter

2015-03-08 Thread Marcel Apfelbaum
The pxb can be attach to and existing numa node by specifying numa_node option that equals the desired numa nodeid. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c| 12 hw/pci-bridge/pci_expander_bridge.c | 17 + 2 files

[Qemu-devel] [PATCH v4 for-2.3 24/25] hw/pci_bus: add support for NUMA nodes

2015-03-08 Thread Marcel Apfelbaum
PCI root buses can be attached to a specific NUMA node. PCI buses are not attached be default to a NUMA node. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/pci/pci_bus.c | 7 +++ include/hw/pci/pci_bus.h | 6 ++ include/sysemu/sysemu.h | 1 + 3 files changed, 14

[Qemu-devel] [PATCH v4 for-2.3 06/25] acpi: add aml_shiftleft() term

2015-03-08 Thread Marcel Apfelbaum
Add encoding for ACPI DefShiftLeft 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 insertions(+) diff --git a/hw/acpi/aml-build.c b

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

2015-03-08 Thread Marcel Apfelbaum
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 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw

[Qemu-devel] [PATCH v4 for-2.3 14/25] hw/pci: move pci bus related code to separate files

2015-03-08 Thread Marcel Apfelbaum
This refactoring moves all the code needed (recursively) to register TYPE_PCI_BUS type to a new file hw/pci/pci_bus.c . This allows to properly add new functionality to the pci bus class. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- arch_init.c | 1 + hw/alpha/typhoon.c

[Qemu-devel] [PATCH v4 for-2.3 18/25] hw/pci: removed 'rootbus nr is 0' assumption from qmp_pci_query

2015-03-08 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com Use the newer pci_bus_num to correctly get the root bus number. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/pci/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e386f2c..53598bd

[Qemu-devel] [PATCH v4 for-2.3 23/25] hw/pxb: add map_irq func

2015-03-08 Thread Marcel Apfelbaum
The bios does not index the pxb slot number when it computes the IRQ because it resides on bus 0 and not on the current bus. However Qemu routes the irq through bus 0 and adds the pxb slot to the IRQ computation. Synchronize between bios and Qemu by canceling pxb's effect. Signed-off-by: Marcel

Re: [Qemu-devel] [PATCH V2] machine: query kernel-irqchip machine property rather than qemu opts

2015-03-10 Thread Marcel Apfelbaum
On 03/10/2015 06:59 PM, Marcel Apfelbaum wrote: Fixes a QEMU crash when passing kernel_irqchip parameter in command line. Rebased on Michael S. Tsirkin branch on his request. Thanks, Marcel Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/ppc/e500.c | 15 +-- hw/ppc

[Qemu-devel] [PATCH v5 for-2.3 15/28] hw/pci: made pci_bus_is_root a PCIBusClass method

2015-03-10 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com Refactoring it as a method of PCIBusClass will allow different implementations for subclasses. Removed the assumption that the root bus does not have a parent device because is specific only to the default class implementation. Signed-off-by: Marcel

[Qemu-devel] [PATCH v5 for-2.3 24/28] hw/pci_bus: add support for NUMA nodes

2015-03-10 Thread Marcel Apfelbaum
PCI root buses can be attached to a specific NUMA node. PCI buses are not attached be default to a NUMA node. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/pci/pci_bus.c | 7 +++ include/hw/pci/pci_bus.h | 6 ++ include/sysemu/sysemu.h | 1 + 3 files changed, 14

Re: [Qemu-devel] [PATCH v5 for-2.3 26/28] acpi: restrict the aml emission to PXB host bridges

2015-03-10 Thread Marcel Apfelbaum
On 03/10/2015 05:41 PM, Michael S. Tsirkin wrote: On Tue, Mar 10, 2015 at 05:32:12PM +0200, Marcel Apfelbaum wrote: Initial implementation assumed that the aml used for any extra root buses would be generic, however this is not always true. Restrict aml emission only to i440fx and PXB because

[Qemu-devel] [PATCH v5 for-2.3 02/28] acpi: add aml_or() term

2015-03-10 Thread Marcel Apfelbaum
Add encoding for ACPI DefOr Opcode. Reviewed-by: Shannon Zhao zhaoshengl...@huawei.com 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

[Qemu-devel] [PATCH V2] machine: query kernel-irqchip machine property rather than qemu opts

2015-03-10 Thread Marcel Apfelbaum
Fixes a QEMU crash when passing kernel_irqchip parameter in command line. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/ppc/e500.c | 15 +-- hw/ppc/spapr.c | 15 ++- kvm-all.c | 6 +++--- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git

[Qemu-devel] [PATCH v5 for-2.3 06/28] acpi: add aml_shiftleft() term

2015-03-10 Thread Marcel Apfelbaum
Add encoding for ACPI DefShiftLeft 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 insertions(+) diff --git a/hw/acpi/aml-build.c b

Re: [Qemu-devel] [PATCH v4 for-2.3 11/25] hw/apci: add _PRT method for extra PCI root busses

2015-03-10 Thread Marcel Apfelbaum
On 03/10/2015 07:07 PM, Michael S. Tsirkin wrote: On Sun, Mar 08, 2015 at 01:16:13PM +0200, Marcel Apfelbaum wrote: Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 65 1 file changed, 65 insertions(+) diff

[Qemu-devel] [PATCH v5 for-2.3 18/28] hw/pci: removed 'rootbus nr is 0' assumption from qmp_pci_query

2015-03-10 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com Use the newer pci_bus_num to correctly get the root bus number. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/pci/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e386f2c..53598bd

[Qemu-devel] [PATCH v5 for-2.3 16/28] hw/pci: made pci_bus_num a PCIBusClass method

2015-03-10 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com Refactoring it as a method of PCIBusClass will allow different implementations for subclasses. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/kvm/pci-assign.c | 1 + hw/pci/pci.c | 7 --- hw/pci/pci_bus.c | 10

[Qemu-devel] [PATCH v5 for-2.3 11/28] hw/apci: add _PRT method for extra PCI root busses

2015-03-10 Thread Marcel Apfelbaum
Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 65 1 file changed, 65 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 3e2701b..513fd6b 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386

[Qemu-devel] [PATCH v5 for-2.3 12/28] hw/acpi: add _CRS method for extra root busses

2015-03-10 Thread Marcel Apfelbaum
Save the IO/mem/bus numbers ranges assigned to the extra root busses to be removed from the root bus 0 range. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 152 +++ 1 file changed, 152 insertions(+) diff --git a/hw

Re: [Qemu-devel] [PATCH v5 for-2.3 28/28] docs: Add PXB documentation

2015-03-10 Thread Marcel Apfelbaum
On 03/10/2015 05:47 PM, Michael S. Tsirkin wrote: On Tue, Mar 10, 2015 at 05:32:14PM +0200, Marcel Apfelbaum wrote: Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- docs/pci_expander_bridge.txt | 52 1 file changed, 52 insertions(+) create

[Qemu-devel] [PATCH v5 for-2.3 03/28] acpi: add aml_add() term

2015-03-10 Thread Marcel Apfelbaum
Add encoding for ACPI DefAdd 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 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi

[Qemu-devel] [PATCH v5 for-2.3 10/28] hw/acpi: add support for multiple root busses

2015-03-10 Thread Marcel Apfelbaum
If the machine has several root busses, we need to add them to acpi in order to be properly detected by guests. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/i386/acpi-build.c b

[Qemu-devel] [PATCH v5 for-2.3 01/28] acpi: fix aml_equal term implementation

2015-03-10 Thread Marcel Apfelbaum
The DefLEqual op does not have a target operand. Remove it. Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/acpi/aml-build.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index e01b8c2..ace180b

[Qemu-devel] [PATCH v5 for-2.3 21/28] hw/pci: inform bios if the system has more than one pci bridge

2015-03-10 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com The bios looks for 'etc/extra-pci-roots' to decide if is going to scan further buses after bus 0 tree. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/pc.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/i386/pc.c b

[Qemu-devel] [PATCH v5 for-2.3 17/28] hw/pci: introduce TYPE_PCI_MAIN_HOST_BRIDGE interface

2015-03-10 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com This is a marker interface used to differentiate the default host bridge on a system with multiple host bridges. This differentiation is required only for pc machines for now by the ACPI subsystem. Signed-off-by: Marcel Apfelbaum mar...@redhat.com

[Qemu-devel] [PATCH v5 for-2.3 20/28] hw/pci: introduce PCI Expander Bridge (PXB)

2015-03-10 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com PXB is a light-weight host bridge whose purpose is to enable the main host bridge to support multiple PCI root buses. As oposed to PCI-2-PCI bridge's secondary bus, PXB's bus is a primary bus and can be associated with a NUMA node (different from

[Qemu-devel] [PATCH v5 for-2.3 14/28] hw/pci: move pci bus related code to separate files

2015-03-10 Thread Marcel Apfelbaum
This refactoring moves all the code needed (recursively) to register TYPE_PCI_BUS type to a new file hw/pci/pci_bus.c . This allows to properly add new functionality to the pci bus class. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- arch_init.c | 1 + hw/alpha/typhoon.c

[Qemu-devel] [PATCH v5 for-2.3 08/28] acpi: add aml_increment() term

2015-03-10 Thread Marcel Apfelbaum
Add encoding for ACPI DefIncrement Opcode. Reviewed-by: Shannon Zhao zhaoshengl...@huawei.com 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

[Qemu-devel] [PATCH v5 for-2.3 09/28] acpi: add aml_while() term

2015-03-10 Thread Marcel Apfelbaum
Add encoding for ACPI DefWhile Opcode. Reviewed-by: Shannon Zhao zhaoshengl...@huawei.com 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

[Qemu-devel] [PATCH v5 for-2.3 07/28] acpi: add aml_shiftright() term

2015-03-10 Thread Marcel Apfelbaum
Add encoding for ACPI DefShiftRight 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 insertions(+) diff --git a/hw/acpi/aml-build.c b

[Qemu-devel] [PATCH v5 for-2.3 27/28] apci: fix PXB behaviour if used with unsupported BIOS

2015-03-10 Thread Marcel Apfelbaum
PXB does not work with an unsupported BIOS, but should not interfere with normal OS operation. Fix this by not adding PXB mem/IO chunks to _CRS if they weren't configured by BIOS. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 71

[Qemu-devel] [PATCH v5 for-2.3 05/28] acpi: add aml_index() term

2015-03-10 Thread Marcel Apfelbaum
Add encoding for ACPI DefIndex Opcode. 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 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index be73d30..aeaa8f6 100644

[Qemu-devel] [PATCH v5 for-2.3 13/28] hw/acpi: remove from root bus 0 the crs resources used by other busses.

2015-03-10 Thread Marcel Apfelbaum
If multiple root busses are used, root bus 0 cannot use all the pci holes ranges. Remove the IO/mem ranges used by the other primary busses. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 84 1 file changed, 72

Re: [Qemu-devel] [PATCH 8/8] machine: query mem-merge machine property rather than qemu opts

2015-03-10 Thread Marcel Apfelbaum
On 03/10/2015 05:11 PM, Michael S. Tsirkin wrote: On Wed, Feb 04, 2015 at 05:43:55PM +0200, Marcel Apfelbaum wrote: Fixes a QEMU crash when passing mem_merge parameter in command line. Signed-off-by: Marcel Apfelbaum mar...@redhat.com Can you rebase this one on top of my pci branch pls

Re: [Qemu-devel] [PATCH 7/8] machine: query dump-guest-core machine property rather than qemu opts

2015-03-11 Thread Marcel Apfelbaum
On 03/10/2015 11:36 PM, Andreas Färber wrote: Am 10.03.2015 um 22:24 schrieb Michael S. Tsirkin: On Tue, Mar 10, 2015 at 06:50:24PM +0100, Andreas Färber wrote: Hi, Am 04.02.2015 um 16:43 schrieb Marcel Apfelbaum: Fixes a QEMU crash when passing dump_guest_core parameter in command line

Re: [Qemu-devel] [PATCH 7/8] machine: query dump-guest-core machine property rather than qemu opts

2015-03-11 Thread Marcel Apfelbaum
um 16:43 schrieb Marcel Apfelbaum: Fixes a QEMU crash when passing dump_guest_core parameter in command line. Explain that, please? Pls note the submission date. It's 1 month late to ask for basic clarifications. I've merged the patches, I'll fix up issues such as prettifying includes

[Qemu-devel] [PATCH v5 for-2.3 25/28] hw/pxb: add numa_node parameter

2015-03-10 Thread Marcel Apfelbaum
The pxb can be attach to and existing numa node by specifying numa_node option that equals the desired numa nodeid. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c| 12 hw/pci-bridge/pci_expander_bridge.c | 17 + 2 files

[Qemu-devel] [PATCH v5 for-2.3 28/28] docs: Add PXB documentation

2015-03-10 Thread Marcel Apfelbaum
Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- docs/pci_expander_bridge.txt | 52 1 file changed, 52 insertions(+) create mode 100644 docs/pci_expander_bridge.txt diff --git a/docs/pci_expander_bridge.txt b/docs/pci_expander_bridge.txt new

[Qemu-devel] [PATCH v5 for-2.3 23/28] hw/pxb: add map_irq func

2015-03-10 Thread Marcel Apfelbaum
The bios does not index the pxb slot number when it computes the IRQ because it resides on bus 0 and not on the current bus. However Qemu routes the irq through bus 0 and adds the pxb slot to the IRQ computation. Synchronize between bios and Qemu by canceling pxb's effect. Signed-off-by: Marcel

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

2015-03-11 Thread Marcel Apfelbaum
On 03/11/2015 03:17 AM, Shannon Zhao wrote: On 2015/3/10 23:31, Marcel Apfelbaum wrote: Add encoding for ACPI DefOr Opcode. Reviewed-by: Shannon Zhao zhaoshengl...@huawei.com Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/acpi/aml

Re: [Qemu-devel] [PATCH v4 for-2.3 00/25] hw/pc: implement multiple primary busses for pc machines

2015-03-09 Thread Marcel Apfelbaum
On 03/09/2015 12:18 PM, Gerd Hoffmann wrote: On Mo, 2015-03-09 at 11:20 +0200, Marcel Apfelbaum wrote: On 03/09/2015 09:43 AM, Gerd Hoffmann wrote: On So, 2015-03-08 at 13:16 +0200, Marcel Apfelbaum wrote: Notes: - Sorry for the late submission, I was waiting for dynamic ACPI series

Re: [Qemu-devel] [PATCH 6/8] machine: query phandle-start machine property rather than qemu opts

2015-03-11 Thread Marcel Apfelbaum
On 02/04/2015 05:43 PM, Marcel Apfelbaum wrote: Fixes a QEMU crash when passing phandle_start parameter in command line. Signed-off-by: Marcel Apfelbaum mar...@redhat.com Please amend commit message: Commit e79d5a6 (machine: remove qemu_machine_opts global list) removed the global option

Re: [Qemu-devel] [PATCH 6/8] machine: query phandle-start machine property rather than qemu opts

2015-03-11 Thread Marcel Apfelbaum
On 03/11/2015 04:32 PM, Marcel Apfelbaum wrote: On 02/04/2015 05:43 PM, Marcel Apfelbaum wrote: Fixes a QEMU crash when passing phandle_start parameter in command line. Signed-off-by: Marcel Apfelbaum mar...@redhat.com Please amend commit message: Commit e79d5a6 (machine: remove

Re: [Qemu-devel] [PATCH 5/8] machine: query kvm-shadow-mem machine property rather than qemu opts

2015-03-11 Thread Marcel Apfelbaum
On 02/04/2015 05:43 PM, Marcel Apfelbaum wrote: Fixes a QEMU crash when passing kvm_shadow_mem parameter in command line. Signed-off-by: Marcel Apfelbaum mar...@redhat.com Please amend commit message: Commit e79d5a6 (machine: remove qemu_machine_opts global list) removed the global option

Re: [Qemu-devel] [PATCH 3/8] machine: query kernel-irqchip machine property rather than qemu opts

2015-03-11 Thread Marcel Apfelbaum
On 02/04/2015 05:43 PM, Marcel Apfelbaum wrote: Fixes a QEMU crash when passing kernel_irqchip parameter in command line. Please amend commit message: Running x86_64-softmmu/qemu-system-x86_64 -machine pc,kernel_irqchip=on -enable-kvm leads to crash: qemu-system-x86_64: qemu/util/qemu

Re: [Qemu-devel] [PATCH 1/8] machine: query iommu machine property rather than qemu opts

2015-03-11 Thread Marcel Apfelbaum
On 02/04/2015 05:43 PM, Marcel Apfelbaum wrote: Fixes a QEMU crash when passing iommu parameter in command line. Signed-off-by: Marcel Apfelbaum mar...@redhat.com Please amend commit message: Running x86_64-softmmu/qemu-system-x86_64 -machine pc,iommu=on -enable-kvm leads to crash

Re: [Qemu-devel] [PATCH 6/8] machine: query phandle-start machine property rather than qemu opts

2015-03-11 Thread Marcel Apfelbaum
On 03/11/2015 04:39 PM, Michael S. Tsirkin wrote: On Wed, Mar 11, 2015 at 04:32:39PM +0200, Marcel Apfelbaum wrote: On 02/04/2015 05:43 PM, Marcel Apfelbaum wrote: Fixes a QEMU crash when passing phandle_start parameter in command line. Signed-off-by: Marcel Apfelbaum mar...@redhat.com

Re: [Qemu-devel] [PATCH v5 for-2.3 00/28] hw/pc: implement multiple primary busses for pc machines

2015-03-11 Thread Marcel Apfelbaum
On 03/11/2015 03:51 PM, Gerd Hoffmann wrote: On Mi, 2015-03-11 at 15:44 +0200, Marcel Apfelbaum wrote: On 03/11/2015 03:32 PM, Gerd Hoffmann wrote: Hi, v4-v5: - Rebased on pci branch, tree: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git Have again trouble applying this. Which

Re: [Qemu-devel] [PATCH v5 for-2.3 00/28] hw/pc: implement multiple primary busses for pc machines

2015-03-11 Thread Marcel Apfelbaum
On 03/11/2015 03:32 PM, Gerd Hoffmann wrote: Hi, v4-v5: - Rebased on pci branch, tree: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git Have again trouble applying this. Which commit hash? Or do you have a git tree somewhere with this? Yes, it is changing too fast :( This version

Re: [Qemu-devel] [PATCH 7/8] machine: query dump-guest-core machine property rather than qemu opts

2015-03-11 Thread Marcel Apfelbaum
On 02/04/2015 05:43 PM, Marcel Apfelbaum wrote: Fixes a QEMU crash when passing dump_guest_core parameter in command line. Signed-off-by: Marcel Apfelbaum mar...@redhat.com Please amend commit message: Running qemu-bin ... -machine pc,dump-guest-core=on leads to crash: x86_64-softmmu

[Qemu-devel] [PATCH v5 for-2.3 26/28] acpi: restrict the aml emission to PXB host bridges

2015-03-12 Thread Marcel Apfelbaum
Initial implementation assumed that the aml used for any extra root buses would be generic, however this is not always true. Restrict aml emission only to i440fx and PXB because is the only supported combination for now. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c

[Qemu-devel] [PATCH v5 for-2.3 22/28] hw/pci: piix - suport multiple host bridges

2015-03-12 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com Instead of assuming it has only one bus, it enumerates all the host bridges until it finds the one with bus number corresponding with the config register. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/pci-host/piix.c | 57

[Qemu-devel] [PATCH v5 for-2.3 19/28] hw/pci: implement iteration over multiple host bridges

2015-03-12 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/pci/pci.c | 8 include/hw/pci/pci_host.h | 4 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 53598bd..f0cf752 100644

Re: [Qemu-devel] [PATCH v5 for-2.3 12/28] hw/acpi: add _CRS method for extra root busses

2015-03-12 Thread Marcel Apfelbaum
On 03/10/2015 05:38 PM, Michael S. Tsirkin wrote: Comment from 20150308162743.gc31...@redhat.com not addressed yet I think. I'll try to use g_array, let's see how it will look. Thanks, Marcel On Tue, Mar 10, 2015 at 05:31:58PM +0200, Marcel Apfelbaum wrote: Save the IO/mem/bus numbers

Re: [Qemu-devel] [PATCH v5 for-2.3 27/28] apci: fix PXB behaviour if used with unsupported BIOS

2015-03-12 Thread Marcel Apfelbaum
On 03/10/2015 05:44 PM, Michael S. Tsirkin wrote: On Tue, Mar 10, 2015 at 05:32:13PM +0200, Marcel Apfelbaum wrote: PXB does not work with an unsupported BIOS, but should not interfere with normal OS operation. Fix this by not adding PXB mem/IO chunks to _CRS if they weren't configured by BIOS

[Qemu-devel] [PATCH v5 for-2.3 04/28] acpi: add aml_lless() term

2015-03-12 Thread Marcel Apfelbaum
Add encoding for ACPI DefLLess Opcode. Reviewed-by: Shannon Zhao zhaoshengl...@huawei.com Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/acpi/aml-build.c | 9 + include/hw/acpi/aml-build.h | 1 + 2 files changed, 10

Re: [Qemu-devel] [PATCH v5 for-2.3 00/28] hw/pc: implement multiple primary busses for pc machines

2015-03-12 Thread Marcel Apfelbaum
On 03/11/2015 04:12 PM, Gerd Hoffmann wrote: On Di, 2015-03-10 at 17:31 +0200, Marcel Apfelbaum wrote: v4-v5: - Rebased on pci branch, tree: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git - Added PXB documentation (patch 28/28) - Addressed Gerd Hoffmann's review: - fix PXB

[Qemu-devel] [PATCH v5 for-2.3 00/28] hw/pc: implement multiple primary busses for pc machines

2015-03-12 Thread Marcel Apfelbaum
and i440fx patch 27 Backward compatibility with SeaBIOS patch 28 PXB Documentation Marcel Apfelbaum (28): acpi: fix aml_equal term implementation acpi: add aml_or() term acpi: add aml_add() term acpi: add aml_lless() term acpi: add aml_index() term acpi: add aml_shiftleft() term acpi

Re: [Qemu-devel] [qemu devel] disable shared memory is not available with this QEMU binary

2015-04-01 Thread Marcel Apfelbaum
On 04/01/2015 11:01 AM, Paolo Bonzini wrote: On 01/04/2015 08:54, Marcel Apfelbaum wrote: This is the first object for which QemuOps are defined per sub-type and are not global (if you don't take object under consideration). We can return the same QemuOpts that were included before. Per

Re: [Qemu-devel] [qemu devel] disable shared memory is not available with this QEMU binary

2015-04-01 Thread Marcel Apfelbaum
On 03/31/2015 05:21 PM, Tony Krowiak wrote: Commit 49d2e648e8087d154d8bf8b91f27c8e05e79d5a6 removed the QemuOptDesc elements from the *desc* field of the *qemu_machine_opts *array defined in vl.c. Since applying that patch to qemu on my system, I can not start a guest from libvirt when

Re: [Qemu-devel] [qemu devel] disable shared memory is not available with this QEMU binary

2015-04-01 Thread Marcel Apfelbaum
On 04/01/2015 12:07 PM, Paolo Bonzini wrote: On 01/04/2015 10:42, Markus Armbruster wrote: The obvious way to return them is to put them right back in qemu_machine_opts.desc[]. But then -machine rejects machine-specific parameters. Hack: monkey-patch them in after we're done parsing.

Re: [Qemu-devel] [qemu devel] disable shared memory is not available with this QEMU binary

2015-04-01 Thread Marcel Apfelbaum
On 04/01/2015 12:23 PM, Paolo Bonzini wrote: On 01/04/2015 11:14, Marcel Apfelbaum wrote: This + 'monkey-patch' may be a feasible solution for 2.4 Why monkey-patch and not just revert? There are already several machine sub-types that have their own options, some of the code I think

[Qemu-devel] [PATCH for-2.3] util/qemu-config fix regression of qmp_query_command_line_options

2015-04-01 Thread Marcel Apfelbaum
the machine_qemu_opts are restored only for the scope of qemu-config, bringing together all machines properties. We need to find a better fix for 2.4. Reported-by: Tony Krowiak akrow...@linux.vnet.ibm.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- I don't like this approach, but I wouldn't want to loose

Re: [Qemu-devel] [PATCH for-2.3] util/qemu-config fix regression of qmp_query_command_line_options

2015-04-01 Thread Marcel Apfelbaum
I noticed the typo in subject :) maybe the maintainer that will take it can fix this if no further work is necessary, of course. On 04/01/2015 05:08 PM, Marcel Apfelbaum wrote: Commit 49d2e64 (machine: remove qemu_machine_opts global list) made machine machine options specific to machine sub

Re: [Qemu-devel] [RFC] acpi: add reset register to fadt

2015-03-29 Thread Marcel Apfelbaum
On 03/28/2015 05:46 PM, Reza Jelveh wrote: Some operating systems such as FreeBSD and Mac OSX need the reset_register section of the FADT filled to know which port to write to for a system reset. What is the right way to set the reset_val and the reset addr in this case? ---

Re: [Qemu-devel] [qemu devel] disable shared memory is not available with this QEMU binary

2015-04-01 Thread Marcel Apfelbaum
On 04/01/2015 11:28 AM, Markus Armbruster wrote: Marcel Apfelbaum marcel.apfelb...@gmail.com writes: On 03/31/2015 05:21 PM, Tony Krowiak wrote: Commit 49d2e648e8087d154d8bf8b91f27c8e05e79d5a6 removed the QemuOptDesc elements from the *desc* field of the *qemu_machine_opts *array defined

Re: [Qemu-devel] [qemu devel] disable shared memory is not available with this QEMU binary

2015-04-01 Thread Marcel Apfelbaum
On 04/01/2015 06:53 PM, Markus Armbruster wrote: Marcel Apfelbaum mar...@redhat.com writes: [...] I noticed something weird. I cannot actually create an instance of machine or get a reference to current_machine in order to query its properties! It seems that util/qemu-config is used by qemu

Re: [Qemu-devel] [qemu devel] disable shared memory is not available with this QEMU binary

2015-04-01 Thread Marcel Apfelbaum
On 04/01/2015 07:20 PM, Eric Blake wrote: On 04/01/2015 10:11 AM, Marcel Apfelbaum wrote: On 04/01/2015 06:53 PM, Markus Armbruster wrote: Marcel Apfelbaum mar...@redhat.com writes: [...] I noticed something weird. I cannot actually create an instance of machine or get a reference

Re: [Qemu-devel] Delaying -rc0?

2015-03-03 Thread Marcel Apfelbaum
On 03/03/2015 03:57 PM, Paolo Bonzini wrote: On 03/03/2015 14:12, Marcel Apfelbaum wrote: On 03/02/2015 03:11 PM, Paolo Bonzini wrote: On 02/03/2015 13:44, Peter Maydell wrote: On 2 March 2015 at 21:33, Paolo Bonzini pbonz...@redhat.com wrote: Looks like there are still a few pull

Re: [Qemu-devel] Delaying -rc0?

2015-03-03 Thread Marcel Apfelbaum
On 03/02/2015 03:11 PM, Paolo Bonzini wrote: On 02/03/2015 13:44, Peter Maydell wrote: On 2 March 2015 at 21:33, Paolo Bonzini pbonz...@redhat.com wrote: Looks like there are still a few pull requests pending, and Peter is on vacation. Should we really enter hard feature freeze tomorrow?

Re: [Qemu-devel] [PATCH 0/8] machine: query machine properties rather than qemu opts

2015-03-04 Thread Marcel Apfelbaum
On 02/25/2015 01:55 PM, Marcel Apfelbaum wrote: On 02/04/2015 05:43 PM, Marcel Apfelbaum wrote: Commit e79d5a6 (machine: remove qemu_machine_opts global list) removed option descriptions from the -machine QemuOptsList to avoid repeating MachineState's QOM properties. This results in a Qemu

[Qemu-devel] [PATCH v3 for-2.3 18/24] hw/pci: implement iteration over multiple host bridges

2015-03-05 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/pci/pci.c | 8 include/hw/pci/pci_host.h | 4 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 53598bd..f0cf752 100644

[Qemu-devel] [PATCH v3 for-2.3 19/24] hw/pci: introduce PCI Expander Bridge (PXB)

2015-03-05 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com PXB is a light-weight host bridge whose purpose is to enable the main host bridge to support multiple PCI root buses. As oposed to PCI-2-PCI bridge's secondary bus, PXB's bus is a primary bus and can be associated with a NUMA node (different from

[Qemu-devel] [PATCH v3 for-2.3 11/24] hw/acpi: add _CRS method for extra root busses

2015-03-05 Thread Marcel Apfelbaum
Save the IO/mem/bus numbers ranges assigned to the extra root busses to be removed from the root bus 0 range. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 149 +++ 1 file changed, 149 insertions(+) diff --git a/hw

[Qemu-devel] [PATCH v3 for-2.3 12/24] hw/acpi: remove from root bus 0 the crs resources used by other busses.

2015-03-05 Thread Marcel Apfelbaum
If multiple root busses are used, root bus 0 cannot use all the pci holes ranges. Remove the IO/mem ranges used by the other primary busses. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 84 1 file changed, 72

[Qemu-devel] [PATCH v3 for-2.3 09/24] hw/acpi: add support for multiple root busses

2015-03-05 Thread Marcel Apfelbaum
If the machine has several root busses, we need to add them to acpi in order to be properly detected by guests. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/i386/acpi-build.c b

[Qemu-devel] [PATCH v3 for-2.3 20/24] hw/pci: inform bios if the system has more than one pci bridge

2015-03-05 Thread Marcel Apfelbaum
From: Marcel Apfelbaum marce...@redhat.com The bios looks for 'etc/extra-pci-roots' to decide if is going to scan further buses after bus 0 tree. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/pc.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/i386/pc.c b

[Qemu-devel] [PATCH v3 for-2.3 24/24] hw/pxb: add numa_node parameter

2015-03-05 Thread Marcel Apfelbaum
The pxb can be attach to and existing numa node by specifying numa_node option that equals the desired numa nodeid. Signed-off-by: Marcel Apfelbaum mar...@redhat.com --- hw/i386/acpi-build.c| 12 hw/pci-bridge/pci_expander_bridge.c | 17 + 2 files

Re: [Qemu-devel] [PATCH v4 1/2] machine: add default_ram_size to machine class

2015-03-05 Thread Marcel Apfelbaum
, maxram_size, machine_class); You could directly pass default_ram_size instead of machine_class to set_memory_options, but this is not enough to justify a new version by itself. (You may consider it if you prepare another version) Anyway: Reviewed-by: Marcel Apfelbaum mar...@redhat.com Thanks, Marcel

Re: [Qemu-devel] [PATCH v2] Introduce machine specific default memory size

2015-03-04 Thread Marcel Apfelbaum
On 03/04/2015 01:18 PM, Nikunj A Dadhania wrote: QEMU default memory of 128MB is not enough to boot sPAPR guest. Introduce a member in the machine class to override the default memory size enforced by QEMU. Signed-off-by: Nikunj A Dadhania nik...@linux.vnet.ibm.com Hi, Thank you for

Re: [Qemu-devel] [PATCH v2] Introduce machine specific default memory size

2015-03-04 Thread Marcel Apfelbaum
On 03/04/2015 02:21 PM, Igor Mammedov wrote: On Wed, 4 Mar 2015 16:48:05 +0530 Nikunj A Dadhania nik...@linux.vnet.ibm.com wrote: QEMU default memory of 128MB is not enough to boot sPAPR guest. Introduce a member in the machine class to override the default memory size enforced by QEMU. now

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] Introduce machine specific default memory size

2015-03-04 Thread Marcel Apfelbaum
On 03/04/2015 02:21 PM, Alexander Graf wrote: On 04.03.15 12:18, Nikunj A Dadhania wrote: QEMU default memory of 128MB is not enough to boot sPAPR guest. Introduce a member in the machine class to override the default memory size enforced by QEMU. Signed-off-by: Nikunj A Dadhania

<    4   5   6   7   8   9   10   11   12   13   >