History | View | Annotate | Download (17.1 kB)
Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging
QOM infrastructure fixes and device conversions
i2c: Rename i2c_bus to I2CBus
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler API
Split piix4_device_hotplug() into hotplug/unplug callbacksand register them as "hotplug-handler" interface implementation ofPIIX4_PM device.
Replace pci_bus_hotplug() wiring with setting link on...
qdev:pci: refactor PCIDevice to use generic "hotpluggable" property
Get rid of PCIDevice specific PCIDeviceClass.no_hotplug and usegeneric DeviceClass.hotpluggable field instead.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Michael S. Tsirkin <mst@redhat.com>...
hw/acpi: move typeinfo to the file end
do so to avoid not necessary forward declarations andplace typeinfo registration at the file end where it'susually expected.
hw:piix4:acpi: reuse pcihp code for legacy PCI hotplug
reduces acpi PCI hotplug code duplication by ~200LOC
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pcihp: make pci_read() mmio calback compatible with legacy ACPI hotplug
due to recent change introduced by:"pcihp: reduce number of device check events"
'up' field is cleared right after it's read.This is incompatible with legacy BIOS ACPI codewhere PCNF ACPI method reads this field 32 times....
piix4: add acpi pci hotplug support
Add support for acpi pci hotplug using thenew infrastructure.PIIX4 legacy interface is maintained as is formachine types 1.7 and older.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
acpi: factor out common cpu hotplug code for PIIX4/Q35
.. so it could be used for adding CPU hotplug to Q35 machine
Add an additional header with that will be shared betweenC and ASL code: include/hw/acpi/cpu_hotplug_defs.h
Signed-off-by: Igor Mammedov <imammedo@redhat.com>...
pc: ACPI: unify source of CPU hotplug IO base/len
use C headers defines as source of IO base/len for respectivevalues in ASL code.
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
acpi,pci,pc,fedora,virtio fixes and enhancements
This includes some Preparatory patches for cpu hotplug for q25 and memoryhotplug by Igor, tests and memory mapping changeby Laszlo and pci reset cleanup by Paolo....
acpi: piix4: remove not needed GPE0 mask
Hardcoded GPE0 mask isn't really needed. Since GPE0_STS initializedwith all bits cleared and only QEMU itself can set bits there (i.e.guest can only clear bits in it). So guest can't triger SCIby setting _STS & _EN bits and there is not reason to mask out not...
acpi: factor out common pm_update_sci() into acpi core
... and rename it into acpi_update_sci() since it changesSCI on only on PM registers status.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
piix3 piix4: Clean up use of cannot_instantiate_with_device_add_yet
A PIIX3/PIIX4 southbridge has multiple functions. We model eachfunction as a separate qdev. Two of them need some special wiring setup in pc_init1() or mips_malta_init() to work: the ISA bridge at 01.0,...
qdev: Replace no_user by cannot_instantiate_with_device_add_yet
In an ideal world, machines can be built by wiring devices togetherwith configuration, not code. Unfortunately, that's not the world welive in right now. We still have quite a few devices that need to be...
qdev: Drop misleading qdev_free() function
The qdev_free() function name is misleading since all the function doesis unlink the device from its parent. The device is not necessarilyfreed.
The device will be freed when its QObject refcount reaches zero. It is...
acpi/piix: add macros for acpi property names
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>Tested-by: Gerd Hoffmann <kraxel@redhat.com>Reviewed-by: Igor Mammedov <imammedo@redhat.com>Tested-by: Igor Mammedov <imammedo@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
piix: APIs for pc guest info
This adds APIs that will be used to fill in guest acpi tables.Some required information is still lacking in QOM, so wefall back on lookups by type and returning explicit types.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>...
piix4: disable io on reset
io base register at 0x40 is cleared on reset,but io is not disabled until some other eventhappens to call pm_io_space_update.
Invoke pm_io_space_update directly to make thisconsistent.
Cc: qemu-stable@nongnu.orgSigned-off-by: Michael S. Tsirkin <mst@redhat.com>
cpu: Replace qemu_for_each_cpu()
It was introduced to loop over CPUs from target-independent code, butsince commit 182735efaf956ccab50b6d74a4fed163e0f35660 target-independentCPUState is used.
A loop can be considered more efficient than function calls in a loop,...
aio / timers: Rearrange timer.h & make legacy functions call non-legacy
Rearrange timer.h so it is in order by function type.
Make legacy functions call non-legacy functions rather than vice-versa.
Convert cpus.c to use new API.
Signed-off-by: Alex Bligh <alex@alex.org.uk>...
acpi/piix4: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()and direct -> style upcasting.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
acpi/piix4: QOM parent field cleanup
Replace direct uses of PIIX4PMState::dev with QOM casts and rename it toparent_obj.
Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
hw/a*: pass owner to memory_region_init* functions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory: introduce memory_region_present
This new API will avoid having too many memory_region_ref/unrefin paths that currently use memory_region_find.
memory: add owner argument to initialization functions
isa: implement isa_is_ioport_assigned via memory_region_find
Open-code isa_is_ioport_assigned via a memory region lookup. As all IOports are now directly or indirectly registered via the memory API, thisbecomes possible and will finally allow us to drop the ioport tables....
piix: fix some printf errors when debug is enabled
And use PRIxxx macros if possible.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
refer to FWCfgState explicitly
Currently some places use pointer-to-void even though they meanpointer-to-FWCfgState. Clean them up.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
acpi_piix4: Add infrastructure to send CPU hot-plug GPE to guest
hw: move target-independent files to subdirectories
This patch tackles all files that are compiled once, movingthem to subdirectories of hw/.