diff options
author | Laszlo Ersek | 2018-09-27 23:24:37 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2018-11-05 19:24:02 +0100 |
commit | ccef5b1fcf1ca33976583c88489a55d6acd13b78 (patch) | |
tree | d57f5230c6e3dc0207df6296ff33fb7331c4e011 /hw/pci-host/q35.c | |
parent | pci-testdev: add optional memory bar (diff) | |
download | qemu-ccef5b1fcf1ca33976583c88489a55d6acd13b78.tar.gz qemu-ccef5b1fcf1ca33976583c88489a55d6acd13b78.tar.xz qemu-ccef5b1fcf1ca33976583c88489a55d6acd13b78.zip |
hw/pci-host/x86: extract get_pci_hole64_start_value() helpers
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" <mst@redhat.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci-host/q35.c')
-rw-r--r-- | hw/pci-host/q35.c | 15 |
1 files changed, 11 insertions, 4 deletions
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); } /* |