[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 22/33] hw/pci-host/x86: extract get_pci_hole64_start_
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 22/33] hw/pci-host/x86: extract get_pci_hole64_start_value() helpers |
Date: |
Mon, 5 Nov 2018 13:16:46 -0500 |
From: Laszlo Ersek <address@hidden>
Expose the calculated "hole64 start" GPAs as plain uint64_t values,
extracting the internals of the current property getters.
This patch doesn't change behavior.
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Alex Williamson <address@hidden>
Cc: Gerd Hoffmann <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/pci-host/piix.c | 15 +++++++++++----
hw/pci-host/q35.c | 15 +++++++++++----
2 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 47293a3915..ce271da9b0 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -249,9 +249,7 @@ static void i440fx_pcihost_get_pci_hole_end(Object *obj,
Visitor *v,
* the 64bit PCI hole will start after "over 4G RAM" and the
* reserved space for memory hotplug if any.
*/
-static void i440fx_pcihost_get_pci_hole64_start(Object *obj, Visitor *v,
- const char *name,
- void *opaque, Error **errp)
+static uint64_t i440fx_pcihost_get_pci_hole64_start_value(Object *obj)
{
PCIHostState *h = PCI_HOST_BRIDGE(obj);
I440FXState *s = I440FX_PCI_HOST_BRIDGE(obj);
@@ -263,7 +261,16 @@ static void i440fx_pcihost_get_pci_hole64_start(Object
*obj, Visitor *v,
if (!value && s->pci_hole64_fix) {
value = pc_pci_hole64_start();
}
- visit_type_uint64(v, name, &value, errp);
+ return value;
+}
+
+static void i440fx_pcihost_get_pci_hole64_start(Object *obj, Visitor *v,
+ const char *name,
+ void *opaque, Error **errp)
+{
+ uint64_t hole64_start = i440fx_pcihost_get_pci_hole64_start_value(obj);
+
+ visit_type_uint64(v, name, &hole64_start, errp);
}
/*
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 966a7cf92d..ceb00f7706 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -113,9 +113,7 @@ static void q35_host_get_pci_hole_end(Object *obj, Visitor
*v,
* the 64bit PCI hole will start after "over 4G RAM" and the
* reserved space for memory hotplug if any.
*/
-static void q35_host_get_pci_hole64_start(Object *obj, Visitor *v,
- const char *name, void *opaque,
- Error **errp)
+static uint64_t q35_host_get_pci_hole64_start_value(Object *obj)
{
PCIHostState *h = PCI_HOST_BRIDGE(obj);
Q35PCIHost *s = Q35_HOST_DEVICE(obj);
@@ -127,7 +125,16 @@ static void q35_host_get_pci_hole64_start(Object *obj,
Visitor *v,
if (!value && s->pci_hole64_fix) {
value = pc_pci_hole64_start();
}
- visit_type_uint64(v, name, &value, errp);
+ return value;
+}
+
+static void q35_host_get_pci_hole64_start(Object *obj, Visitor *v,
+ const char *name, void *opaque,
+ Error **errp)
+{
+ uint64_t hole64_start = q35_host_get_pci_hole64_start_value(obj);
+
+ visit_type_uint64(v, name, &hole64_start, errp);
}
/*
--
MST
- [Qemu-devel] [PULL 23/33] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base, (continued)
- [Qemu-devel] [PULL 23/33] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 20/33] MAINTAINERS: list "tests/acpi-test-data" files in ACPI/SMBIOS section, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 19/33] x86_iommu/amd: Enable Guest virtual APIC support, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 17/33] i386: acpi: add IVHD device entry for IOAPIC, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 12/33] x86_iommu: move vtd_generate_msi_message in common file, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 15/33] x86_iommu/amd: Prepare for interrupt remap support, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 24/33] bios-tables-test: prepare expected files for mmio64, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 26/33] hw/pci-bridge/xio3130: Remove unused functions, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 25/33] tests/bios-tables-test: add 64-bit PCI MMIO aperture round-up test on Q35, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 28/33] hw/pci: Add missing include, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 22/33] hw/pci-host/x86: extract get_pci_hole64_start_value() helpers,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 27/33] hw/pci-bridge/ioh3420: Remove unuseful header, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 29/33] pci_bridge: fix typo in comment, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 30/33] i440fx: use ARRAY_SIZE for pam_regions, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 31/33] piix: use TYPE_FOO constants than string constats, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 32/33] piix_pci: fix i440fx data sheet link, Michael S. Tsirkin, 2018/11/05
- [Qemu-devel] [PULL 33/33] vhost-scsi: prevent using uninitialized vqs, Michael S. Tsirkin, 2018/11/05
- Re: [Qemu-devel] [PULL 00/33] pci, pc, virtio: fixes, features, Thomas Huth, 2018/11/06
- Re: [Qemu-devel] [PULL 00/33] pci, pc, virtio: fixes, features, Michael S. Tsirkin, 2018/11/06
- Re: [Qemu-devel] [PULL 00/33] pci, pc, virtio: fixes, features, Peter Maydell, 2018/11/06
- Re: [Qemu-devel] [PULL 00/33] pci, pc, virtio: fixes, features, Peter Maydell, 2018/11/06