[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v7 15/20] hw/arm/sysbus-fdt: Pass the VirtMachineState
From: |
Eric Auger |
Subject: |
[Qemu-arm] [PATCH v7 15/20] hw/arm/sysbus-fdt: Pass the VirtMachineState to the node creation functions |
Date: |
Fri, 1 Sep 2017 19:21:18 +0200 |
The VirtMachineState contains some dt phandles that will be used
in some node creation functions. For instance we plan to use the
PCI host controller phandle in the smmu node creation function. So
let's pass the VirtMachineState handle down to the node creation
functions by enhancing the involved datatypes.
Signed-off-by: Eric Auger <address@hidden>
---
hw/arm/sysbus-fdt.c | 3 +++
hw/arm/virt.c | 1 +
include/hw/arm/sysbus-fdt.h | 2 ++
3 files changed, 6 insertions(+)
diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c
index d68e3dc..d92a983 100644
--- a/hw/arm/sysbus-fdt.c
+++ b/hw/arm/sysbus-fdt.c
@@ -36,6 +36,7 @@
#include "hw/vfio/vfio-platform.h"
#include "hw/vfio/vfio-calxeda-xgmac.h"
#include "hw/vfio/vfio-amd-xgbe.h"
+#include "hw/arm/virt.h"
#include "hw/arm/fdt.h"
/*
@@ -47,6 +48,7 @@ typedef struct PlatformBusFDTData {
int irq_start; /* index of the first IRQ usable by platform bus devices */
const char *pbus_node_name; /* name of the platform bus node */
PlatformBusDevice *pbus;
+ VirtMachineState *vms;
} PlatformBusFDTData;
/*
@@ -514,6 +516,7 @@ static void
add_all_platform_bus_fdt_nodes(ARMPlatformBusFDTParams *fdt_params)
.irq_start = irq_start,
.pbus_node_name = node,
.pbus = pbus,
+ .vms = fdt_params->vms,
};
/* Loop through all dynamic sysbus devices and create their node */
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 39886c1..d7c28b0 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1125,6 +1125,7 @@ static void create_platform_bus(VirtMachineState *vms,
qemu_irq *pic)
fdt_params->system_params = &platform_bus_params;
fdt_params->binfo = &vms->bootinfo;
fdt_params->intc = "/intc";
+ fdt_params->vms = vms;
/*
* register a machine init done notifier that creates the device tree
* nodes of the platform bus and its children dynamic sysbus devices
diff --git a/include/hw/arm/sysbus-fdt.h b/include/hw/arm/sysbus-fdt.h
index e15bb81..f5feabc 100644
--- a/include/hw/arm/sysbus-fdt.h
+++ b/include/hw/arm/sysbus-fdt.h
@@ -25,6 +25,7 @@
#define HW_ARM_SYSBUS_FDT_H
#include "hw/arm/arm.h"
+#include "hw/arm/virt.h"
#include "qemu-common.h"
#include "hw/sysbus.h"
@@ -48,6 +49,7 @@ typedef struct {
const ARMPlatformBusSystemParams *system_params;
struct arm_boot_info *binfo;
const char *intc; /* parent interrupt controller name */
+ VirtMachineState *vms;
} ARMPlatformBusFDTParams;
/**
--
2.5.5
- Re: [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback, (continued)
- Re: [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback, Tomasz Nowicki, 2017/09/14
- Re: [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback, Tomasz Nowicki, 2017/09/14
- Re: [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback, Auger Eric, 2017/09/15
- Re: [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback, Auger Eric, 2017/09/15
- Re: [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback, tn, 2017/09/15
- Re: [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback, Auger Eric, 2017/09/15
- Re: [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback, Auger Eric, 2017/09/15
- Re: [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback, Tomasz Nowicki, 2017/09/18
- Re: [Qemu-arm] [Qemu-devel] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback, Auger Eric, 2017/09/15
[Qemu-arm] [PATCH v7 14/20] hw/arm/virt: Store the PCI host controller dt phandle, Eric Auger, 2017/09/01
[Qemu-arm] [PATCH v7 15/20] hw/arm/sysbus-fdt: Pass the VirtMachineState to the node creation functions,
Eric Auger <=
[Qemu-arm] [PATCH v7 16/20] hw/arm/sysbus-fdt: Pass the platform bus base address in PlatformBusFDTData, Eric Auger, 2017/09/01
[Qemu-arm] [PATCH v7 17/20] hw/arm/sysbus-fdt: Allow smmuv3 dynamic instantiation, Eric Auger, 2017/09/01
[Qemu-arm] [PATCH v7 18/20] hw/arm/virt-acpi-build: Add smmuv3 node in IORT table, Eric Auger, 2017/09/01
[Qemu-arm] [PATCH v7 19/20] hw/arm/smmuv3: [not for upstream] add SMMU_CMD_TLBI_NH_VA_AM handling, Eric Auger, 2017/09/01
[Qemu-arm] [PATCH v7 20/20] hw/arm/smmuv3: [not for upstream] Add caching-mode option, Eric Auger, 2017/09/01
Re: [Qemu-arm] [PATCH v7 00/20] ARM SMMUv3 Emulation Support, Peter Maydell, 2017/09/07
Re: [Qemu-arm] [PATCH v7 00/20] ARM SMMUv3 Emulation Support, Michael S. Tsirkin, 2017/09/08
Re: [Qemu-arm] [PATCH v7 00/20] ARM SMMUv3 Emulation Support, Linu Cherian, 2017/09/12