pci_expander_brdige:acpi:Support pxb-pcie for ARM
v3 cover pci_expander_brdige:acpi:Support pxb-pcie for ARM
From: miaoyubo <[email protected]>
Currently pxb-pcie is not supported by arm, the reason for it is pxb-pcie is not described in DSDT table and only one main host bridge is described in acpi tables, which means it is not impossible to present different io numas for different devices, especially host-passthrough devices.
This series of patches make arm to support PXB-PCIE.
Users can configure pxb-pcie with certain numa, Example command is:
-device pxb-pcie,id=pci.7,bus_nr=128,numa_node=0,bus=pcie.0,addr=0x9
Since the bus of pxb-pcie is root bus, devices could not be plugged into pxb-pcie directly,pcie-root-port or pci-bridge should be defined and plugged on pxb-pcie, then the device could be plugged onto the pcie-root-port or pci-bridge.
With the patches,io numa could be presented to the guest by define a pxb-pcie with the numa and plug the device on it.
miaoyubo (3):
acpi:Extract two APIs from acpi_dsdt_add_pci acpi:pci-expender-bus: Add pxb support for arm ACPI/unit-test: Add a new test for pxb-pcie for arm
hw/arm/virt-acpi-build.c | 240 ++++++++++++++++++++++++--------- hw/pci-host/gpex.c | 4 + include/hw/arm/virt.h | 7 + tests/data/acpi/virt/DSDT.pxb | Bin 0 -> 34209 bytes tests/qtest/bios-tables-test.c | 54 +++++++- 5 files changed, 238 insertions(+), 67 deletions(-) create mode 100644 tests/data/acpi/virt/DSDT.pxb
Signature · 1 line
2.19.1
RFC v3 1/3 acpi:Extract two APIs from acpi_dsdt_add_pci
From: miaoyubo <[email protected]>
Extract two APIs acpi_dsdt_add_pci_route_table and acpi_dsdt_add_pci_osc form acpi_dsdt_add_pci. The first API is used to specify the pci route table and the second API is used to declare the operation system capabilities. These two APIs would be used to specify the pxb-pcie in DSDT.
--- hw/arm/virt-acpi-build.c | 135 ++++++++++++++++++++++----------------- 1 file changed, 75 insertions(+), 60 deletions(-)
hw/arm/virt-acpi-build.c +75 -60
@@ -151,30 +151,12 @@ static void acpi_dsdt_add_virtio(Aml *scope, } } -static void acpi_dsdt_add_pci (Aml *scope,const MemMapEntry *memmap, -uint32_t irq,bool use_highmem,bool highmem_ecam) +static void acpi_dsdt_add_pci_route_table (Aml *dev,Aml *scope, +int nr_pcie_buses, +uint32_t irq) { -int ecam_id =VIRT_ECAM_ID (highmem_ecam); -Aml *method, *crs, *ifctx, *UUID , *ifctx1, *elsectx, *buf;int i, bus_no; -hwaddr base_mmio = memmap[VIRT_PCIE_MMIO ].base; -hwaddr size_mmio = memmap[VIRT_PCIE_MMIO ].size; -hwaddr base_pio = memmap[VIRT_PCIE_PIO ].base; -hwaddr size_pio = memmap[VIRT_PCIE_PIO ].size; -hwaddr base_ecam = memmap[ecam_id].base; -hwaddr size_ecam = memmap[ecam_id].size; -int nr_pcie_buses = size_ecam /PCIE_MMCFG_SIZE_MIN ; - -Aml *dev =aml_device ("%s" ,"PCI0" ); -aml_append (dev,aml_name_decl ("_HID" ,aml_string ("PNP0A08" ))); -aml_append (dev,aml_name_decl ("_CID" ,aml_string ("PNP0A03" ))); -aml_append (dev,aml_name_decl ("_SEG" ,aml_int (0 ))); -aml_append (dev,aml_name_decl ("_BBN" ,aml_int (0 ))); -aml_append (dev,aml_name_decl ("_ADR" ,aml_int (0 ))); -aml_append (dev,aml_name_decl ("_UID" ,aml_string ("PCI0" ))); -aml_append (dev,aml_name_decl ("_STR" ,aml_unicode ("PCIe 0 Device" ))); -aml_append (dev,aml_name_decl ("_CCA" ,aml_int (1 ))); - +Aml *method, *crs;/* Declare the PCI Routing Table. */ Aml *rt_pkg =aml_varpackage (nr_pcie_buses *PCI_NUM_PINS );for (bus_no =0 ; bus_no < nr_pcie_buses; bus_no++) {
@@ -190,7 +172,6 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap, }aml_append (dev,aml_name_decl ("_PRT" , rt_pkg)); -/* Create GSI link device */ for (i =0 ; i <PCI_NUM_PINS ; i++) {uint32_t irqs = irq + i;Aml *dev_gsi =aml_device ("GSI%d" , i);
@@ -210,42 +191,11 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,aml_append (dev_gsi, method);aml_append (dev, dev_gsi); } +} - method =aml_method ("_CBA" ,0 ,AML_NOTSERIALIZED ); -aml_append (method,aml_return (aml_int (base_ecam))); -aml_append (dev, method); - - method =aml_method ("_CRS" ,0 ,AML_NOTSERIALIZED ); -Aml *rbuf =aml_resource_template (); -aml_append (rbuf, -aml_word_bus_number (AML_MIN_FIXED ,AML_MAX_FIXED ,AML_POS_DECODE , -0x0000 ,0x0000 , nr_pcie_buses -1 ,0x0000 , - nr_pcie_buses)); -aml_append (rbuf, -aml_dword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED , -AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , base_mmio, - base_mmio + size_mmio -1 ,0x0000 , size_mmio)); -aml_append (rbuf, -aml_dword_io (AML_MIN_FIXED ,AML_MAX_FIXED ,AML_POS_DECODE , -AML_ENTIRE_RANGE ,0x0000 ,0x0000 , size_pio -1 , base_pio, - size_pio)); - -if (use_highmem) { -hwaddr base_mmio_high = memmap[VIRT_HIGH_PCIE_MMIO ].base; -hwaddr size_mmio_high = memmap[VIRT_HIGH_PCIE_MMIO ].size; - -aml_append (rbuf, -aml_qword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED , -AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , - base_mmio_high, - base_mmio_high + size_mmio_high -1 ,0x0000 , - size_mmio_high)); - } - -aml_append (method,aml_name_decl ("RBUF" , rbuf)); -aml_append (method,aml_return (rbuf)); -aml_append (dev, method); - +static void acpi_dsdt_add_pci_osc (Aml *dev,Aml *scope) +{ +Aml *method, *UUID , *ifctx, *ifctx1, *elsectx, *buf;/* Declare an _OSC (OS Control Handoff) method */ aml_append (dev,aml_name_decl ("SUPP" ,aml_int (0 )));aml_append (dev,aml_name_decl ("CTRL" ,aml_int (0 )));
@@ -253,7 +203,8 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,aml_append (method,aml_create_dword_field (aml_arg (3 ),aml_int (0 ),"CDW1" )); -/* PCI Firmware Specification 3.0 +/* +* PCI Firmware Specification 3.0 * 4.5.1. _OSC Interface for PCI Host Bridge Devices * The _OSC interface for a PCI/PCI-X/PCI Express hierarchy is * identified by the Universal Unique IDentifier (UUID)
@@ -298,7 +249,8 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap, method =aml_method ("_DSM" ,4 ,AML_NOTSERIALIZED ); -/* PCI Firmware Specification 3.0 +/* +* PCI Firmware Specification 3.0 * 4.6.1. _DSM for PCI Express Slot Information * The UUID in _DSM in this context is * {E5C937D0-3553-4D7A-9117-EA4D19C3434D}
@@ -316,6 +268,69 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap, buf =aml_buffer (1 , byte_list);aml_append (method,aml_return (buf));aml_append (dev, method); +} + +static void acpi_dsdt_add_pci (Aml *scope,const MemMapEntry *memmap, +uint32_t irq,bool use_highmem,bool highmem_ecam) +{ +int ecam_id =VIRT_ECAM_ID (highmem_ecam); +Aml *method, *crs; +hwaddr base_mmio = memmap[VIRT_PCIE_MMIO ].base; +hwaddr size_mmio = memmap[VIRT_PCIE_MMIO ].size; +hwaddr base_pio = memmap[VIRT_PCIE_PIO ].base; +hwaddr size_pio = memmap[VIRT_PCIE_PIO ].size; +hwaddr base_ecam = memmap[ecam_id].base; +hwaddr size_ecam = memmap[ecam_id].size; +int nr_pcie_buses = size_ecam /PCIE_MMCFG_SIZE_MIN ; + +Aml *dev =aml_device ("%s" ,"PCI0" ); +aml_append (dev,aml_name_decl ("_HID" ,aml_string ("PNP0A08" ))); +aml_append (dev,aml_name_decl ("_CID" ,aml_string ("PNP0A03" ))); +aml_append (dev,aml_name_decl ("_SEG" ,aml_int (0 ))); +aml_append (dev,aml_name_decl ("_BBN" ,aml_int (0 ))); +aml_append (dev,aml_name_decl ("_ADR" ,aml_int (0 ))); +aml_append (dev,aml_name_decl ("_UID" ,aml_string ("PCI0" ))); +aml_append (dev,aml_name_decl ("_STR" ,aml_unicode ("PCIe 0 Device" ))); +aml_append (dev,aml_name_decl ("_CCA" ,aml_int (1 ))); + +acpi_dsdt_add_pci_route_table (dev, scope, nr_pcie_buses, irq); + + method =aml_method ("_CBA" ,0 ,AML_NOTSERIALIZED ); +aml_append (method,aml_return (aml_int (base_ecam))); +aml_append (dev, method); + + method =aml_method ("_CRS" ,0 ,AML_NOTSERIALIZED ); +Aml *rbuf =aml_resource_template (); +aml_append (rbuf, +aml_word_bus_number (AML_MIN_FIXED ,AML_MAX_FIXED ,AML_POS_DECODE , +0x0000 ,0x0000 , nr_pcie_buses -1 ,0x0000 , + nr_pcie_buses)); +aml_append (rbuf, +aml_dword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED , +AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , base_mmio, + base_mmio + size_mmio -1 ,0x0000 , size_mmio)); +aml_append (rbuf, +aml_dword_io (AML_MIN_FIXED ,AML_MAX_FIXED ,AML_POS_DECODE , +AML_ENTIRE_RANGE ,0x0000 ,0x0000 , size_pio -1 , base_pio, + size_pio)); + +if (use_highmem) { +hwaddr base_mmio_high = memmap[VIRT_HIGH_PCIE_MMIO ].base; +hwaddr size_mmio_high = memmap[VIRT_HIGH_PCIE_MMIO ].size; + +aml_append (rbuf, +aml_qword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED , +AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , + base_mmio_high, + base_mmio_high + size_mmio_high -1 ,0x0000 , + size_mmio_high)); + } + +aml_append (method,aml_name_decl ("RBUF" , rbuf)); +aml_append (method,aml_return (rbuf)); +aml_append (dev, method); + +acpi_dsdt_add_pci_osc (dev, scope);Aml *dev_rp0 =aml_device ("%s" ,"RP0" );aml_append (dev_rp0,aml_name_decl ("_ADR" ,aml_int (0 )));
Signature · 1 line
2.19.1
RFC v3 2/3 acpi:pci-expender-bus: Add pxb support for arm
In reply to Yubo MiaoFrom: miaoyubo <[email protected]>
Currently virt machine is not supported by pxb-pcie, and only one main host bridge described in ACPI tables. In this patch,PXB-PCIE is supproted by arm and certain resource is allocated for each pxb-pcie in acpi table. The resource for the main host bridge is also reallocated.
--- hw/arm/virt-acpi-build.c | 125 +++++++++++++++++++++++++++++++++++---- hw/pci-host/gpex.c | 4 ++ include/hw/arm/virt.h | 7 +++ 3 files changed, 125 insertions(+), 11 deletions(-)
hw/arm/virt-acpi-build.c +114 -11
@@ -49,6 +49,8 @@#include "kvm_arm.h" #include "migration/vmstate.h" +#include "hw/arm/virt.h" +#include "hw/pci/pci_bus.h" #define ARM_SPI_BASE 32static void acpi_dsdt_add_cpus (Aml *scope,int smp_cpus)
@@ -271,19 +273,117 @@ static void acpi_dsdt_add_pci_osc(Aml *dev, Aml *scope) }static void acpi_dsdt_add_pci (Aml *scope,const MemMapEntry *memmap, -uint32_t irq,bool use_highmem,bool highmem_ecam) +uint32_t irq,bool use_highmem,bool highmem_ecam, +VirtMachineState *vms) {int ecam_id =VIRT_ECAM_ID (highmem_ecam); -Aml *method, *crs; +Aml *method, *dev, *crs; +int count =0 ;hwaddr base_mmio = memmap[VIRT_PCIE_MMIO ].base;hwaddr size_mmio = memmap[VIRT_PCIE_MMIO ].size;hwaddr base_pio = memmap[VIRT_PCIE_PIO ].base;hwaddr size_pio = memmap[VIRT_PCIE_PIO ].size;hwaddr base_ecam = memmap[ecam_id].base;hwaddr size_ecam = memmap[ecam_id].size; +/* +* 0x600000 would be enough for pxb device +* if it is too small, there is no enough space +* for a pcie device plugged in a pcie-root port +*/ +hwaddr size_addr =0x600000 ; +hwaddr size_io =0x4000 ;int nr_pcie_buses = size_ecam /PCIE_MMCFG_SIZE_MIN ; +int root_bus_limit =0xFF ; +PCIBus *bus =NULL ; + bus =VIRT_MACHINE (vms)->bus; + +if (bus) { + QLIST_FOREACH(bus, &bus->child, sibling) { +uint8_t bus_num =pci_bus_num (bus); +uint8_t numa_node =pci_bus_numa_node (bus); + +if (!pci_bus_is_root (bus)) { +continue ; + } +if (bus_num < root_bus_limit) { + root_bus_limit = bus_num -1 ; + } + count++; + dev =aml_device ("PC%.02X" , bus_num); +aml_append (dev,aml_name_decl ("_HID" ,aml_string ("PNP0A08" ))); +aml_append (dev,aml_name_decl ("_CID" ,aml_string ("PNP0A03" ))); +aml_append (dev,aml_name_decl ("_ADR" ,aml_int (0 ))); +aml_append (dev,aml_name_decl ("_CCA" ,aml_int (1 ))); +aml_append (dev,aml_name_decl ("_SEG" ,aml_int (0 ))); +aml_append (dev,aml_name_decl ("_BBN" ,aml_int (bus_num))); +aml_append (dev,aml_name_decl ("_UID" ,aml_int (bus_num))); +aml_append (dev,aml_name_decl ("_STR" ,aml_unicode ("pxb Device" ))); +if (numa_node !=NUMA_NODE_UNASSIGNED ) { + method =aml_method ("_PXM" ,0 ,AML_NOTSERIALIZED ); +aml_append (method,aml_return (aml_int (numa_node))); +aml_append (dev, method); + } + +acpi_dsdt_add_pci_route_table (dev, scope, nr_pcie_buses, irq); + + method =aml_method ("_CBA" ,0 ,AML_NOTSERIALIZED ); +aml_append (method,aml_return (aml_int (base_ecam))); +aml_append (dev, method); + + method =aml_method ("_CRS" ,0 ,AML_NOTSERIALIZED ); +Aml *rbuf =aml_resource_template (); +aml_append (rbuf, +aml_word_bus_number (AML_MIN_FIXED ,AML_MAX_FIXED , +AML_POS_DECODE ,0x0000 , + bus_num, bus_num +1 ,0x0000 , +2 )); +aml_append (rbuf, +aml_dword_memory (AML_POS_DECODE ,AML_MIN_FIXED , +AML_MAX_FIXED ,AML_NON_CACHEABLE , +AML_READ_WRITE ,0x0000 , + base_mmio + size_mmio - + size_addr * count, + base_mmio + size_mmio -1 - + size_addr * (count -1 ), +0x0000 , size_addr)); +aml_append (rbuf, +aml_dword_io (AML_MIN_FIXED ,AML_MAX_FIXED , +AML_POS_DECODE ,AML_ENTIRE_RANGE , +0x0000 , size_pio - size_io * count, + size_pio -1 - size_io * (count -1 ), + base_pio, size_io)); + +if (use_highmem) { +hwaddr base_mmio_high = memmap[VIRT_HIGH_PCIE_MMIO ].base; +hwaddr size_mmio_high = memmap[VIRT_HIGH_PCIE_MMIO ].size; + +aml_append (rbuf, +aml_qword_memory (AML_POS_DECODE ,AML_MIN_FIXED , +AML_MAX_FIXED ,AML_NON_CACHEABLE , +AML_READ_WRITE ,0x0000 , + base_mmio_high + size_mmio_high - + size_addr * count, + base_mmio_high + size_mmio_high - +1 - size_addr * (count -1 ), +0x0000 , size_addr)); + } + +aml_append (method,aml_name_decl ("RBUF" , rbuf)); +aml_append (method,aml_return (rbuf)); +aml_append (dev, method); + +acpi_dsdt_add_pci_osc (dev, scope); + +Aml *dev_rp0 =aml_device ("%s" ,"RP0" ); +aml_append (dev_rp0,aml_name_decl ("_ADR" ,aml_int (0 ))); +aml_append (dev, dev_rp0); + +aml_append (scope, dev); + + } + } -Aml *dev =aml_device ("%s" ,"PCI0" ); + dev =aml_device ("%s" ,"PCI0" );aml_append (dev,aml_name_decl ("_HID" ,aml_string ("PNP0A08" )));aml_append (dev,aml_name_decl ("_CID" ,aml_string ("PNP0A03" )));aml_append (dev,aml_name_decl ("_SEG" ,aml_int (0 )));
@@ -303,16 +403,18 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,Aml *rbuf =aml_resource_template ();aml_append (rbuf,aml_word_bus_number (AML_MIN_FIXED ,AML_MAX_FIXED ,AML_POS_DECODE , -0x0000 ,0x0000 , nr_pcie_buses -1 ,0x0000 , - nr_pcie_buses)); +0x0000 ,0x0000 , root_bus_limit,0x0000 , + root_bus_limit +1 ));aml_append (rbuf,aml_dword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED ,AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , base_mmio, - base_mmio + size_mmio -1 ,0x0000 , size_mmio)); + base_mmio + size_mmio -1 - size_addr * count, +0x0000 , size_mmio - size_addr * count));aml_append (rbuf,aml_dword_io (AML_MIN_FIXED ,AML_MAX_FIXED ,AML_POS_DECODE , -AML_ENTIRE_RANGE ,0x0000 ,0x0000 , size_pio -1 , base_pio, - size_pio)); +AML_ENTIRE_RANGE ,0x0000 ,0x0000 , + size_pio -1 - size_io * count, base_pio, + size_pio - size_io * count));if (use_highmem) {hwaddr base_mmio_high = memmap[VIRT_HIGH_PCIE_MMIO ].base;
@@ -322,8 +424,9 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,aml_qword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED ,AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , base_mmio_high, - base_mmio_high + size_mmio_high -1 ,0x0000 , - size_mmio_high)); + base_mmio_high + size_mmio_high -1 - + size_addr * count, + 0x0000, size_mmio_high - size_addr * count)); }aml_append (method,aml_name_decl ("RBUF" , rbuf));
@@ -759,7 +862,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)acpi_dsdt_add_virtio (scope, &memmap[VIRT_MMIO ], (irqmap[VIRT_MMIO ] +ARM_SPI_BASE ),NUM_VIRTIO_TRANSPORTS );acpi_dsdt_add_pci (scope, memmap, (irqmap[VIRT_PCIE ] +ARM_SPI_BASE ), - vms->highmem, vms->highmem_ecam); + vms->highmem, vms->highmem_ecam, vms);if (vms->acpi_dev) { build_ged_aml(scope, "\\_SB."GED_DEVICE, HOTPLUG_HANDLER(vms->acpi_dev),
hw/pci-host/gpex.c +4 -0
@@ -36,6 +36,7 @@#include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "qemu/module.h" +#include "hw/arm/virt.h" /**************************************************************************** * GPEX host
@@ -98,6 +99,9 @@ static void gpex_host_realize(DeviceState *dev, Error **errp) pci_swizzle_map_irq_fn, s, &s->io_mmio, &s->io_ioport, 0, 4, TYPE_PCIE_BUS); +#ifdef __aarch64__ +VIRT_MACHINE (qdev_get_machine ())->bus = pci->bus; +#endif qdev_set_parent_bus (DEVICE (&s->gpex_root),BUS (pci->bus));pci_bus_set_route_irq_fn (pci->bus, gpex_route_intx_pin_to_irq);qdev_init_nofail (DEVICE (&s->gpex_root));
include/hw/arm/virt.h +7 -0
@@ -140,6 +140,13 @@ typedef struct {DeviceState *gic;DeviceState *acpi_dev;Notifier powerdown_notifier; +/* +* pointer to devices and objects +* Via going through the bus, all +* pci devices and related objectes +* could be gained. +* */ +PCIBus *bus; } VirtMachineState;#define VIRT_ECAM_ID (high) (high ? VIRT_HIGH_PCIE_ECAM : VIRT_PCIE_ECAM)
Signature · 1 line
2.19.1
Re: [RFC v3 2/3] acpi:pci-expender-bus: Add pxb support for arm
Quoted 45 lines · Yubo Miao
From: miaoyubo <[email protected]>
Currently virt machine is not supported by pxb-pcie, and only one main host bridge described in ACPI tables. In this patch,PXB-PCIE is supproted by arm and certain resource is allocated for each pxb-pcie in acpi table. The resource for the main host bridge is also reallocated.
Signed-off-by miaoyubo <[email protected]>--- hw/arm/virt-acpi-build.c | 125 +++++++++++++++++++++++++++++++++++---- hw/pci-host/gpex.c | 4 ++ include/hw/arm/virt.h | 7 +++ 3 files changed, 125 insertions(+), 11 deletions(-)hw/arm/virt-acpi-build.c +6
-2@@ -49,6 +49,8 @@#include "kvm_arm.h" #include "migration/vmstate.h" +#include "hw/arm/virt.h" +#include "hw/pci/pci_bus.h" #define ARM_SPI_BASE 32static void acpi_dsdt_add_cpus (Aml *scope,int smp_cpus)@@ -271,19 +273,117 @@ static void acpi_dsdt_add_pci_osc(Aml *dev, Aml *scope) }static void acpi_dsdt_add_pci (Aml *scope,const MemMapEntry *memmap, -uint32_t irq,bool use_highmem,bool highmem_ecam) +uint32_t irq,bool use_highmem,bool highmem_ecam, +VirtMachineState *vms) {int ecam_id =VIRT_ECAM_ID (highmem_ecam); -Aml *method, *crs; +Aml *method, *dev, *crs; +int count =0 ;hwaddr base_mmio = memmap[VIRT_PCIE_MMIO ].base;hwaddr size_mmio = memmap[VIRT_PCIE_MMIO ].size;hwaddr base_pio = memmap[VIRT_PCIE_PIO ].base;hwaddr size_pio = memmap[VIRT_PCIE_PIO ].size;hwaddr base_ecam = memmap[ecam_id].base;
hw/arm/virt-acpi-build.c static void acpi_dsdt_add_pci_osc(Aml *dev, Aml *scope) · line 296
Quoted 10 lines
hw/arm/virt-acpi-build.c +8
-0hwaddr size_ecam = memmap[ecam_id].size; +/* +* 0x600000 would be enough for pxb device +* if it is too small, there is no enough space +* for a pcie device plugged in a pcie-root port +*/ +hwaddr size_addr =0x600000 ; +hwaddr size_io =0x4000 ;int nr_pcie_buses = size_ecam /PCIE_MMCFG_SIZE_MIN ; +int root_bus_limit =0xFF ;
what's this?
hw/arm/virt-acpi-build.c static void acpi_dsdt_add_pci_osc(Aml *dev, Aml *scope) · line 298
Quoted 2 lines
hw/arm/virt-acpi-build.c +2
-0+PCIBus *bus =NULL ; + bus =VIRT_MACHINE (vms)->bus;
So just move assignment as part of declaration.
hw/arm/virt-acpi-build.c static void acpi_dsdt_add_pci_osc(Aml *dev, Aml *scope) · line 309
Quoted 11 lines
hw/arm/virt-acpi-build.c +11
-0+ +if (bus) { + QLIST_FOREACH(bus, &bus->child, sibling) { +uint8_t bus_num =pci_bus_num (bus); +uint8_t numa_node =pci_bus_numa_node (bus); + +if (!pci_bus_is_root (bus)) { +continue ; + } +if (bus_num < root_bus_limit) { + root_bus_limit = bus_num -1 ;
what is this doing? manually coded up MIN?
Quoted 139 lines
hw/arm/virt-acpi-build.c +87
-9+ } + count++; + dev =aml_device ("PC%.02X" , bus_num); +aml_append (dev,aml_name_decl ("_HID" ,aml_string ("PNP0A08" ))); +aml_append (dev,aml_name_decl ("_CID" ,aml_string ("PNP0A03" ))); +aml_append (dev,aml_name_decl ("_ADR" ,aml_int (0 ))); +aml_append (dev,aml_name_decl ("_CCA" ,aml_int (1 ))); +aml_append (dev,aml_name_decl ("_SEG" ,aml_int (0 ))); +aml_append (dev,aml_name_decl ("_BBN" ,aml_int (bus_num))); +aml_append (dev,aml_name_decl ("_UID" ,aml_int (bus_num))); +aml_append (dev,aml_name_decl ("_STR" ,aml_unicode ("pxb Device" ))); +if (numa_node !=NUMA_NODE_UNASSIGNED ) { + method =aml_method ("_PXM" ,0 ,AML_NOTSERIALIZED ); +aml_append (method,aml_return (aml_int (numa_node))); +aml_append (dev, method); + } + +acpi_dsdt_add_pci_route_table (dev, scope, nr_pcie_buses, irq); + + method =aml_method ("_CBA" ,0 ,AML_NOTSERIALIZED ); +aml_append (method,aml_return (aml_int (base_ecam))); +aml_append (dev, method); + + method =aml_method ("_CRS" ,0 ,AML_NOTSERIALIZED ); +Aml *rbuf =aml_resource_template (); +aml_append (rbuf, +aml_word_bus_number (AML_MIN_FIXED ,AML_MAX_FIXED , +AML_POS_DECODE ,0x0000 , + bus_num, bus_num +1 ,0x0000 , +2 )); +aml_append (rbuf, +aml_dword_memory (AML_POS_DECODE ,AML_MIN_FIXED , +AML_MAX_FIXED ,AML_NON_CACHEABLE , +AML_READ_WRITE ,0x0000 , + base_mmio + size_mmio - + size_addr * count, + base_mmio + size_mmio -1 - + size_addr * (count -1 ), +0x0000 , size_addr)); +aml_append (rbuf, +aml_dword_io (AML_MIN_FIXED ,AML_MAX_FIXED , +AML_POS_DECODE ,AML_ENTIRE_RANGE , +0x0000 , size_pio - size_io * count, + size_pio -1 - size_io * (count -1 ), + base_pio, size_io)); + +if (use_highmem) { +hwaddr base_mmio_high = memmap[VIRT_HIGH_PCIE_MMIO ].base; +hwaddr size_mmio_high = memmap[VIRT_HIGH_PCIE_MMIO ].size; + +aml_append (rbuf, +aml_qword_memory (AML_POS_DECODE ,AML_MIN_FIXED , +AML_MAX_FIXED ,AML_NON_CACHEABLE , +AML_READ_WRITE ,0x0000 , + base_mmio_high + size_mmio_high - + size_addr * count, + base_mmio_high + size_mmio_high - +1 - size_addr * (count -1 ), +0x0000 , size_addr)); + } + +aml_append (method,aml_name_decl ("RBUF" , rbuf)); +aml_append (method,aml_return (rbuf)); +aml_append (dev, method); + +acpi_dsdt_add_pci_osc (dev, scope); + +Aml *dev_rp0 =aml_device ("%s" ,"RP0" ); +aml_append (dev_rp0,aml_name_decl ("_ADR" ,aml_int (0 ))); +aml_append (dev, dev_rp0); + +aml_append (scope, dev); + + } + } -Aml *dev =aml_device ("%s" ,"PCI0" ); + dev =aml_device ("%s" ,"PCI0" );aml_append (dev,aml_name_decl ("_HID" ,aml_string ("PNP0A08" )));aml_append (dev,aml_name_decl ("_CID" ,aml_string ("PNP0A03" )));aml_append (dev,aml_name_decl ("_SEG" ,aml_int (0 )));@@ -303,16 +403,18 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,Aml *rbuf =aml_resource_template ();aml_append (rbuf,aml_word_bus_number (AML_MIN_FIXED ,AML_MAX_FIXED ,AML_POS_DECODE , -0x0000 ,0x0000 , nr_pcie_buses -1 ,0x0000 , - nr_pcie_buses)); +0x0000 ,0x0000 , root_bus_limit,0x0000 , + root_bus_limit +1 ));aml_append (rbuf,aml_dword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED ,AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , base_mmio, - base_mmio + size_mmio -1 ,0x0000 , size_mmio)); + base_mmio + size_mmio -1 - size_addr * count, +0x0000 , size_mmio - size_addr * count));aml_append (rbuf,aml_dword_io (AML_MIN_FIXED ,AML_MAX_FIXED ,AML_POS_DECODE , -AML_ENTIRE_RANGE ,0x0000 ,0x0000 , size_pio -1 , base_pio, - size_pio)); +AML_ENTIRE_RANGE ,0x0000 ,0x0000 , + size_pio -1 - size_io * count, base_pio, + size_pio - size_io * count));if (use_highmem) {hwaddr base_mmio_high = memmap[VIRT_HIGH_PCIE_MMIO ].base;@@ -322,8 +424,9 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,aml_qword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED ,AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , base_mmio_high, - base_mmio_high + size_mmio_high -1 ,0x0000 , - size_mmio_high)); + base_mmio_high + size_mmio_high -1 - + size_addr * count, + 0x0000, size_mmio_high - size_addr * count)); }aml_append (method,aml_name_decl ("RBUF" , rbuf));@@ -759,7 +862,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)acpi_dsdt_add_virtio (scope, &memmap[VIRT_MMIO ], (irqmap[VIRT_MMIO ] +ARM_SPI_BASE ),NUM_VIRTIO_TRANSPORTS );acpi_dsdt_add_pci (scope, memmap, (irqmap[VIRT_PCIE ] +ARM_SPI_BASE ), - vms->highmem, vms->highmem_ecam); + vms->highmem, vms->highmem_ecam, vms);if (vms->acpi_dev) { build_ged_aml(scope, "\\_SB."GED_DEVICE, HOTPLUG_HANDLER(vms->acpi_dev),hw/pci-host/gpex.c +1
-0@@ -36,6 +36,7 @@#include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "qemu/module.h" +#include "hw/arm/virt.h" /**************************************************************************** * GPEX host
hw/pci-host/gpex.c static void gpex_host_realize(DeviceState *dev, Error **errp) · line 104
Quoted 6 lines
hw/pci-host/gpex.c +3
-0@@ -98,6 +99,9 @@ static void gpex_host_realize(DeviceState *dev, Error **errp) pci_swizzle_map_irq_fn, s, &s->io_mmio, &s->io_ioport, 0, 4, TYPE_PCIE_BUS); +#ifdef __aarch64__ +VIRT_MACHINE (qdev_get_machine ())->bus = pci->bus; +#endif
I'm repeating myself but - what does this have to do with building on __aarch64__?
Quoted 8 lines
hw/pci-host/gpex.c +0
-0qdev_set_parent_bus (DEVICE (&s->gpex_root),BUS (pci->bus));pci_bus_set_route_irq_fn (pci->bus, gpex_route_intx_pin_to_irq);qdev_init_nofail (DEVICE (&s->gpex_root));include/hw/arm/virt.h +0
-0
include/hw/arm/virt.h typedef struct { · line 149
Quoted 10 lines
include/hw/arm/virt.h +7
-0@@ -140,6 +140,13 @@ typedef struct {DeviceState *gic;DeviceState *acpi_dev;Notifier powerdown_notifier; +/* +* pointer to devices and objects +* Via going through the bus, all +* pci devices and related objectes +* could be gained. +* */ +PCIBus *bus;
That comment doesn't really tell me what this is.
Is this the root bus?
With an extender, don't we have lots of roots?
Quoted 6 lines
include/hw/arm/virt.h +0
-0} VirtMachineState;#define VIRT_ECAM_ID (high) (high ? VIRT_HIGH_PCIE_ECAM : VIRT_PCIE_ECAM)Signature · 1 line
2.19.1
RE: [RFC v3 2/3] acpi:pci-expender-bus: Add pxb support for arm
Quoted 70 lines
-----Original Message-----
From: Michael S. Tsirkin [mailto:[email protected]]
Sent: Friday, February 21, 2020 7:18 PM
To: miaoyubo <[email protected]>
Cc: [email protected]; [email protected]; Xiexiangyou <[email protected]>; [email protected]; [email protected]
Subject: Re: [RFC v3 2/3] acpi:pci-expender-bus: Add pxb support for armQuoted 11 lines · Yubo Miao
From: miaoyubo <[email protected]>
Currently virt machine is not supported by pxb-pcie, and only one main host bridge described in ACPI tables.
In this patch,PXB-PCIE is supproted by arm and certain resource is allocated for each pxb-pcie in acpi table.
The resource for the main host bridge is also reallocated.Signed-off-by miaoyubo <[email protected]>--- hw/arm/virt-acpi-build.c | 125+++++++++++++++++++++++++++++++++++----
Quoted 10 lines
hw/pci-host/gpex.c | 4 ++ include/hw/arm/virt.h | 7 +++ 3 files changed, 125 insertions(+), 11 deletions(-)hw/arm/virt-acpi-build.c index renamed from hw/arm/virt-acpi-build.c +0
-0
0540234b8a..2c1e0d2aaa100644hw/arm/virt-acpi-build.c +0
-0@@ -49,6 +49,8 @@#include "kvm_arm.h" hw/arm/virt-acpi-build.c
Quoted 10 lines
hw/arm/virt-acpi-build.c +3
-0#include "migration/vmstate.h" +#include "hw/arm/virt.h" +#include "hw/pci/pci_bus.h" #define ARM_SPI_BASE 32 static void acpi_dsdt_add_cpus(Aml *scope, int smp_cpus) @@ -271,19 +273,117 @@ static void acpi_dsdt_add_pci_osc(Aml *dev, Aml *scope) } static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry*memmap,
Quoted 1 line
-
uint32_tirq, booluse_highmem, bool
highmem_ecam)Quoted 1 line
+
uint32_tirq, booluse_highmem, bool
highmem_ecam,Quoted 11 lines
hw/arm/virt-acpi-build.c +3
-1+ VirtMachineState *vms) {int ecam_id =VIRT_ECAM_ID (highmem_ecam); -Aml *method, *crs; +Aml *method, *dev, *crs; +int count =0 ;hwaddr base_mmio = memmap[VIRT_PCIE_MMIO ].base;hwaddr size_mmio = memmap[VIRT_PCIE_MMIO ].size;hwaddr base_pio = memmap[VIRT_PCIE_PIO ].base;hwaddr size_pio = memmap[VIRT_PCIE_PIO ].size;hwaddr base_ecam = memmap[ecam_id].base;hw/arm/virt-acpi-build.c static void acpi_dsdt_add_pci_osc(Aml *dev, Aml *scope) · line 296
Quoted 10 lines
hw/arm/virt-acpi-build.c +8
-0hwaddr size_ecam = memmap[ecam_id].size; +/* +* 0x600000 would be enough for pxb device +* if it is too small, there is no enough space +* for a pcie device plugged in a pcie-root port +*/ +hwaddr size_addr =0x600000 ; +hwaddr size_io =0x4000 ;int nr_pcie_buses = size_ecam /PCIE_MMCFG_SIZE_MIN ; +int root_bus_limit =0xFF ;
Quoted 2 lines
what's this?
Thanks for replying.
This is used to define the bus numbers for the main host bridge, If no pxb-pcie is defined, the bus number for the main host bridge would range form 0 to 255.
Quoted 5 lines
hw/arm/virt-acpi-build.c static void acpi_dsdt_add_pci_osc(Aml *dev, Aml *scope) · line 298
Quoted 2 lines
hw/arm/virt-acpi-build.c +2
-0+PCIBus *bus =NULL ; + bus =VIRT_MACHINE (vms)->bus;So just move assignment as part of declaration.
Thanks for the suggestion!
Quoted 5 lines
Quoted 5 lines
hw/arm/virt-acpi-build.c +5
-0+ +if (bus) { + QLIST_FOREACH(bus, &bus->child, sibling) { +uint8_t bus_num =pci_bus_num (bus); +uint8_t numa_node =pci_bus_numa_node (bus);
Quoted 9 lines
hw/arm/virt-acpi-build.c static void acpi_dsdt_add_pci_osc(Aml *dev, Aml *scope) · line 309
Quoted 6 lines
hw/arm/virt-acpi-build.c +6
-0+ +if (!pci_bus_is_root (bus)) { +continue ; + } +if (bus_num < root_bus_limit) { + root_bus_limit = bus_num -1 ;what is this doing? manually coded up MIN?
This coded up the MIN of busNr defined in pxb-pcie devices, and the Min busNr-1 would be the MAX bus Number for the main host bridge. For example, if one pxb-pcie with busNr 128(which is 80) defined, The bus for the main host bridge would be 0-7F, and the bus for pxb-pcie would be 80-81(just allocate two buses,keep the same with X86). If pxb-pcie is not defined, the bus for main host bridge would be 0-FF.
Quoted 29 lines
hw/arm/virt-acpi-build.c static void acpi_dsdt_add_pci_osc(Aml *dev, Aml *scope)
Quoted 4 lines
hw/arm/virt-acpi-build.c +4
-0+ } + count++; + dev =aml_device ("PC%.02X" , bus_num); + aml_append(dev, aml_name_decl("_HID",
aml_string("PNP0A08")));Quoted 1 line
+ aml_append(dev, aml_name_decl("_CID",
aml_string("PNP0A03")));hw/arm/virt-acpi-build.c static void acpi_dsdt_add_pci_osc(Aml *dev, Aml *scope)
Quoted 4 lines
hw/arm/virt-acpi-build.c +4
-0+aml_append (dev,aml_name_decl ("_ADR" ,aml_int (0 ))); +aml_append (dev,aml_name_decl ("_CCA" ,aml_int (1 ))); +aml_append (dev,aml_name_decl ("_SEG" ,aml_int (0 ))); + aml_append(dev, aml_name_decl("_BBN",
aml_int(bus_num)));Quoted 1 line
+ aml_append(dev, aml_name_decl("_UID",
aml_int(bus_num)));Quoted 1 line
+ aml_append(dev, aml_name_decl("_STR", aml_unicode("pxb
Device")));
hw/arm/virt-acpi-build.c
Quoted 2 lines
hw/arm/virt-acpi-build.c +2
-0+if (numa_node !=NUMA_NODE_UNASSIGNED ) { + method = aml_method("_PXM", 0,
AML_NOTSERIALIZED);Quoted 1 line
+ aml_append(method,
aml_return(aml_int(numa_node)));
hw/arm/virt-acpi-build.c static void gpex_host_realize(DeviceState *dev, Error
Quoted 5 lines
hw/arm/virt-acpi-build.c +3
-0+aml_append (dev, method); + } + * GPEX host@@ -98,6 +99,9 @@ static void gpex_host_realize(DeviceState *dev, Error**errp)
hw/arm/virt-acpi-build.c static void gpex_host_realize(DeviceState *dev, Error · line 99
Quoted 1 line
hw/arm/virt-acpi-build.c +0
-0pci_swizzle_map_irq_fn, s,
&s->io_mmio,
Quoted 9 lines
hw/arm/virt-acpi-build.c static void gpex_host_realize(DeviceState *dev, Error · line 104
Quoted 5 lines
hw/arm/virt-acpi-build.c +2
-0&s->io_ioport,0 ,4 , TYPE_PCIE_BUS); +#ifdef __aarch64__ +VIRT_MACHINE (qdev_get_machine ())->bus = pci->bus;#endif I'm repeating myself but - what does this have to do with building on
__aarch64__?
I would move this into machvirt_init, therefore, the __aarch64__ is not needed.
Quoted 14 lines
Quoted 14 lines
hw/arm/virt-acpi-build.c +0
-0qdev_set_parent_bus (DEVICE (&s->gpex_root),BUS (pci->bus));pci_bus_set_route_irq_fn (pci->bus, gpex_route_intx_pin_to_irq);qdev_init_nofail (DEVICE (&s->gpex_root));include/hw/arm/virt.h index renamed from include/hw/arm/virt.h +0
-0
71508bf40c..9accaf2b1b100644include/hw/arm/virt.h +3
-0@@ -140,6 +140,13 @@ typedef struct {DeviceState *gic;DeviceState *acpi_dev;Notifier powerdown_notifier; +/* +* pointer to devices and objects +* Via going through the bus, all
Quoted 10 lines
include/hw/arm/virt.h typedef struct { · line 149
Quoted 4 lines
include/hw/arm/virt.h +4
-0+* pci devices and related objectes +* could be gained. +* */ +PCIBus *bus;That comment doesn't really tell me what this is. Is this the root bus?
With an extender, don't we have lots of roots?
Yes, this is the root bus.(The pci.0 or pcie.0)
The main root is pci.0 or pcie.0, the extender plays the role of root for devices plugged on it. For the extender, there is only one root,pci.0 or pcie.0. But for devices like pcie-root-port, they could also regard pxb-pcie as root. Hope this solve your question.
Quoted 7 lines
Quoted 7 lines
include/hw/arm/virt.h +0
-0} VirtMachineState;#define VIRT_ECAM_ID (high) (high ? VIRT_HIGH_PCIE_ECAM :
VIRT_PCIE_ECAM)
--
2.19.1
Regards,
Miao
RFC v3 3/3 ACPI/unit-test: Add a new test for pxb-pcie for arm
In reply to Yubo MiaoFrom: miaoyubo <[email protected]>
Currently, pxb-pcie could be defined by the cmdline like
--device pxb-pcie,id=pci.9,bus_nr=128
However pxb-pcie is not described in acpi tables for arm.
The formal two patches support pxb-pcie for arm, escpcially the specification for pxb-pcie in DSDT table.
Add a testcase to make sure the ACPI table is correct for guest.
--- tests/data/acpi/virt/DSDT.pxb | Bin 0 -> 34209 bytes tests/qtest/bios-tables-test.c | 54 +++++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 tests/data/acpi/virt/DSDT.pxb
tests/data/acpi/virt/DSDT.pxb new file binary +0 -0
tests/qtest/bios-tables-test.c +48 -6
72 lines not on this page · raw message
Signature · 1 line
2.19.1
Re: [RFC v3 3/3] ACPI/unit-test: Add a new test for pxb-pcie for arm
Quoted 4 lines · Yubo Miao
From: miaoyubo <[email protected]>
Currently, pxb-pcie could be defined by the cmdline like
--device pxb-pcie,id=pci.9,bus_nr=128
Quoted 8 lines
However pxb-pcie is not described in acpi tables for arm.
The formal two patches support pxb-pcie for arm, escpcially the specification for pxb-pcie in DSDT table.
Add a testcase to make sure the ACPI table is correct for guest.
Signed-off-by miaoyubo <[email protected]>
Please look at the top of tests/qtest/bios-tables-test.c for how to add or update tests.
tests/data/acpi/virt/DSDT.pxb
Quoted 10 lines
--- tests/data/acpi/virt/DSDT.pxb | Bin 0 -> 34209 bytes tests/qtest/bios-tables-test.c | 54 +++++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 tests/data/acpi/virt/DSDT.pxbtests/data/acpi/virt/DSDT.pxb new file binary +0
-0
I can't read this.
Quoted 9 lines
literal 34209 zcmeI*cXU+szJ~D)1PGxe5PG+us9-{<Do8R35G4>YGz}UAMT!L#ks?x*Dx!d5hoIPd z?}}o>iWL;GW5HgrlKbvVM&HM??^)~qbMIProvd|8p2_U*%qO!m?AgcPkRQ(<wr)WX zR3DKyBsMVKK5tZUEMJ#Z3xXj0I{cizY-H-_vUpxu>HL<ltgNimvVn#9^>bszg^Hd* zYT59@{GfDxK}u{$QSzH5MFX?4va_qcnOYVriD$G-YqqdX5KgQUqzA#0T0ymH9aJ-P zt=#;Qdf_)p=V$jH6t9{xXmH68P3ev)8EFlwrs(=X$_(9dxJh>6UU8FZi5vcVla%Bp zz50)g^-pXvw4i9XAYFAU@nN}Xb+t___n%u<uhU$chBua*GNL5;Gf3Q8mfgX>w)
8L z7F4goX88!*;pB+$X8&bG_2BOj*;OO*!h6xx&B+mI)uU#l*o>||BPVi3ji?#5Y(|dH z=oUF6C2B^h&FJPcx<}5a88su#W_0%%JtAk+ikeZ+X7unGJtJq-j+)WHX7uzKy&9%
...
RE: [RFC v3 3/3] ACPI/unit-test: Add a new test for pxb-pcie for arm
Quoted 20 lines
-----Original Message-----
From: Michael S. Tsirkin [mailto:[email protected]]
Sent: Friday, February 21, 2020 7:19 PM
To: miaoyubo <[email protected]>
Cc: [email protected]; [email protected]; Xiexiangyou <[email protected]>; [email protected]; [email protected]
Subject: Re: [RFC v3 3/3] ACPI/unit-test: Add a new test for pxb-pcie for armQuoted 9 lines · Yubo Miao
From: miaoyubo <[email protected]>
Currently, pxb-pcie could be defined by the cmdline like
--device pxb-pcie,id=pci.9,bus_nr=128 However pxb-pcie is not
described in acpi tables for arm.The formal two patches support pxb-pcie for arm, escpcially the specification for pxb-pcie in DSDT table.
Quoted 8 lines
Quoted 3 lines
Add a testcase to make sure the ACPI table is correct for guest.
Signed-off-by miaoyubo <[email protected]>Please look at the top of
tests/qtest/bios-tables-test.cfor how to add or update tests.
Thanks for replying, I didn't notice that, I would follow the steps to rebuild this patch.
Quoted 11 lines
Quoted 9 lines
--- tests/data/acpi/virt/DSDT.pxb | Bin 0 -> 34209 bytes tests/qtest/bios-tables-test.c | 54 +++++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 6 deletions(-) create mode 100644tests/data/acpi/virt/DSDT.pxb
(quoted diff) +0
-0b/tests/data/acpi/virt/DSDT.pxb new file mode 100644 index
0000000000000000000000000000000000000000..4eea3192c75ff28f7054d626 a936
Quoted 5 lines
Quoted 2 lines
3ca025b6c0ad
GIT binary patchI can't read this.
I just have a question that is:
I just rebuild this aml with tests/data/acpi/rebuild-expected-aml.sh and git send it or send the aml with attachment?
Quoted 17 lines
Quoted 2 lines
literal 34209
zcmeI*cXU+szJ~D)1PGxe5PG+us9-{<Do8R35G4>YGz}UAMT!L#ks?x*Dx!d5hoIP d
Quoted 1 line
z?}}o>iWL;GW5HgrlKbvVM&HM??^)~qbMIProvd|8p2_U*%qO!m?AgcPkRQ(<w r)WX
Quoted 1 line
zR3DKyBsMVKK5tZUEMJ#Z3xXj0I{cizY-H-_vUpxu>HL<ltgNimvVn#9^>bszg^Hd*
Quoted 1 line
zYT59@{GfDxK}u{$QSzH5MFX?4va_qcnOYVriD$G-YqqdX5KgQUqzA#0T0ymH9a J-P
Quoted 2 lines
zt=#;Qdf_)p=V$jH6t9{xXmH68P3ev)8EFlwrs(=X$_(9dxJh>6UU8FZi5vcVla%Bp
zz50)g^-pXvw4i9XAYFAU@nN}Xb+t___n%u<uhU$chBua*GNL5;Gf3Q8mfgX>w)` 8L
Quoted 1 line
Quoted 6 lines
z7F4goX88!*;pB+$X8&bG_2BOj*;OO*!h6xx&B+mI)uU#l*o>||BPVi3ji?#5Y(|dH
Quoted 1 line
z=oUF6C2B^h&FJPcx<}5a88su#W_0%%JtAk+ikeZ+X7unGJtJq-j+)WHX7uzKy&`9 %
...
Regards,
Miao
Re: [RFC v3 3/3] ACPI/unit-test: Add a new test for pxb-pcie for arm
Quoted 45 lines · miaoyubo
Quoted 20 lines
-----Original Message-----
From: Michael S. Tsirkin [mailto:[email protected]]
Sent: Friday, February 21, 2020 7:19 PM
To: miaoyubo <[email protected]>
Cc: [email protected]; [email protected]; Xiexiangyou <[email protected]>; [email protected]; [email protected]
Subject: Re: [RFC v3 3/3] ACPI/unit-test: Add a new test for pxb-pcie for armQuoted 9 lines · Yubo Miao
From: miaoyubo <[email protected]>
Currently, pxb-pcie could be defined by the cmdline like
--device pxb-pcie,id=pci.9,bus_nr=128 However pxb-pcie is not
described in acpi tables for arm.The formal two patches support pxb-pcie for arm, escpcially the specification for pxb-pcie in DSDT table.
Quoted 8 lines
Quoted 3 lines
Add a testcase to make sure the ACPI table is correct for guest.
Signed-off-by miaoyubo <[email protected]>Please look at the top of
tests/qtest/bios-tables-test.cfor how to add or update tests.Thanks for replying, I didn't notice that, I would follow the steps to rebuild this patch.
Quoted 14 lines
Quoted 9 lines
--- tests/data/acpi/virt/DSDT.pxb | Bin 0 -> 34209 bytes tests/qtest/bios-tables-test.c | 54 +++++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 6 deletions(-) create mode 100644tests/data/acpi/virt/DSDT.pxb
(quoted diff) +0
-0b/tests/data/acpi/virt/DSDT.pxb new file mode 100644 index
0000000000000000000000000000000000000000..4eea3192c75ff28f7054d626 a936
Quoted 2 lines
3ca025b6c0ad
GIT binary patch
Quoted 6 lines
Quoted 2 lines
I can't read this.
I just have a question that is:
I just rebuild this aml withtests/data/acpi/rebuild-expected-aml.shand git send it or send the aml with attachment?
git send it pls
Quoted 26 lines
Quoted 17 lines
Quoted 2 lines
literal 34209
zcmeI*cXU+szJ~D)1PGxe5PG+us9-{<Do8R35G4>YGz}UAMT!L#ks?x*Dx!d5hoIP d
Quoted 1 line
z?}}o>iWL;GW5HgrlKbvVM&HM??^)~qbMIProvd|8p2_U*%qO!m?AgcPkRQ(<w r)WX
Quoted 1 line
zR3DKyBsMVKK5tZUEMJ#Z3xXj0I{cizY-H-_vUpxu>HL<ltgNimvVn#9^>bszg^Hd*
Quoted 1 line
zYT59@{GfDxK}u{$QSzH5MFX?4va_qcnOYVriD$G-YqqdX5KgQUqzA#0T0ymH9a J-P
Quoted 2 lines
zt=#;Qdf_)p=V$jH6t9{xXmH68P3ev)8EFlwrs(=X$_(9dxJh>6UU8FZi5vcVla%Bp
zz50)g^-pXvw4i9XAYFAU@nN}Xb+t___n%u<uhU$chBua*GNL5;Gf3Q8mfgX>w)` 8L
Quoted 1 line
Quoted 6 lines
z7F4goX88!*;pB+$X8&bG_2BOj*;OO*!h6xx&B+mI)uU#l*o>||BPVi3ji?#5Y(|dH
Quoted 1 line
z=oUF6C2B^h&FJPcx<}5a88su#W_0%%JtAk+ikeZ+X7unGJtJq-j+)WHX7uzKy&`9 %
...
Regards,
Miao