qemu-e2k/hw
David Gibson 4445b1d27e spapr: Remove sPAPRConfigureConnectorState sub-structure
Most of the time, the state of a DRC object is contained in the single
'state' variable.  However, during the transition from UNISOLATE to
CONFIGURED state requires multiple calls to the ibm,configure-connector
RTAS call to retrieve the device tree for the attached device.  We need
some extra state to keep track of where we're up to in delivering the
device tree information to the guest.

Currently that extra state is in a sPAPRConfigureConnectorState
substructure which is only allocated when we're in the middle of the
configure connector process.  That sounds like a good idea, but the extra
state is only two integers - on many platforms that will take up the same
room as the (maybe NULL) ccs pointer even before malloc() overhead.  Plus
it's another object whose lifetime we need to manage.  In short, it's not
worth it.

So, fold the sPAPRConfigureConnectorState substructure directly into the
DRC object.

Previously the structure was allocated lazily when the configure-connector
call discovers it's not there.  Now, we need to initialize the subfields
pre-emptively, as soon as we enter UNISOLATE state.

Although it's not strictly necessary (the field values should only ever
be consulted when in UNISOLATE state), we try to keep them at -1 when in
other states, as a debugging aid.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
Tested-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
2017-07-17 15:07:05 +10:00
..
9pfs Convert error_report() to warn_report() 2017-07-13 13:49:58 +02:00
acpi
adc
alpha memory/iommu: introduce IOMMUMemoryRegionClass 2017-07-14 12:04:41 +02:00
arm * gdbstub fixes (Alex) 2017-07-14 12:16:09 +01:00
audio
block virtio-blk: Convert to DEFINE_PROP_LINK 2017-07-14 12:04:42 +02:00
bt
char chardev: fix parallel device can't be reconnect 2017-07-14 12:04:41 +02:00
core * gdbstub fixes (Alex) 2017-07-14 12:16:09 +01:00
cpu
cris
display qom: enforce readonly nature of link's check callback 2017-07-14 12:04:42 +02:00
dma * gdbstub fixes (Alex) 2017-07-14 12:16:09 +01:00
gpio
i2c
i386 * gdbstub fixes (Alex) 2017-07-14 12:16:09 +01:00
ide
input
intc s390x/flic: migrate ais states 2017-07-14 12:29:49 +02:00
ipack
ipmi qom: enforce readonly nature of link's check callback 2017-07-14 12:04:42 +02:00
isa
lm32
m68k
mem dimm: Convert to DEFINE_PROP_LINK 2017-07-14 12:04:43 +02:00
microblaze
mips memory/iommu: QOM'fy IOMMU MemoryRegion 2017-07-14 12:04:41 +02:00
misc * gdbstub fixes (Alex) 2017-07-14 12:16:09 +01:00
moxie
net xilinx: Fix latent error handling bug 2017-07-13 13:45:53 +02:00
nios2
nvram Convert error_report() to warn_report() 2017-07-13 13:49:58 +02:00
openrisc
pci hw/pci: define msi_nonbroken in pci-stub 2017-07-11 11:18:37 +03:00
pci-bridge
pci-host * gdbstub fixes (Alex) 2017-07-14 12:16:09 +01:00
pcmcia
ppc spapr: Remove sPAPRConfigureConnectorState sub-structure 2017-07-17 15:07:05 +10:00
s390x s390x/kvm/migration/cpumodel: fixes, enhancements and cleanups 2017-07-14 14:19:35 +01:00
scsi * gdbstub fixes (Alex) 2017-07-14 12:16:09 +01:00
sd
sh4
smbios
sparc
sparc64
ssi
timer
tpm
tricore
unicore32
usb * gdbstub fixes (Alex) 2017-07-14 12:16:09 +01:00
vfio memory/iommu: QOM'fy IOMMU MemoryRegion 2017-07-14 12:04:41 +02:00
virtio virtio-crypto: Convert to DEFINE_PROP_LINK 2017-07-14 12:04:43 +02:00
watchdog
xen xen/pt: Fixup addr validation in xen_pt_pci_config_access_check 2017-07-07 11:13:10 -07:00
xenpv xenfb: remove xen_init_display "temporary" hack 2017-07-07 11:10:03 -07:00
xtensa
Makefile.objs