summaryrefslogtreecommitdiff
path: root/include/hw
AgeCommit message (Collapse)AuthorFilesLines
2014-02-10pci/shpc: convert SHPC hotplug to use hotplug-handler APIIgor Mammedov1-0/+8
Split shpc_device_hotplug() into hotplug/unplug callbacks and register them as "hotplug-handler" interface implementation of PCI_BRIDGE_DEV device. Replace pci_bus_hotplug() wiring with setting link on PCI BUS "hotplug-handler" property to PCI_BRIDGE_DEV device. 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>
2014-02-10acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler APIIgor Mammedov2-4/+7
Split piix4_device_hotplug() into hotplug/unplug callbacks and register them as "hotplug-handler" interface implementation of PIIX4_PM device. Replace pci_bus_hotplug() wiring with setting link on PCI BUS "hotplug-handler" property to PIIX4_PM device. 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>
2014-02-10qdev:pci: refactor PCIDevice to use generic "hotpluggable" propertyIgor Mammedov1-3/+0
Get rid of PCIDevice specific PCIDeviceClass.no_hotplug and use generic DeviceClass.hotpluggable field instead. 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>
2014-02-10qdev: add "hotpluggable" property to DeviceIgor Mammedov1-0/+3
Currently it's possible to make PCIDevice not hotpluggable by using no_hotplug field of PCIDeviceClass. However it limits this only to PCI devices and prevents from generalizing hotplug code. So add similar field to DeviceClass so it could be reused with other Devices and would allow to replace PCI specific hotplug callbacks with generic implementation. Following patches will replace PCIDeviceClass.no_hotplug with this new property. In addition expose field as "hotpluggable" readonly property, to make it possible to read its value via QOM interface. Make DeviceClass hotpluggable by default as it was assumed before. 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>
2014-02-10qdev: add to BusState "hotplug-handler" linkIgor Mammedov1-0/+12
It will allow to reuse field with different BUSes, reducing code duplication. Field is intended for replacing 'hotplug_qdev' field in PCIBus and also will allow to avoid adding equivalent field to DimmBus with possiblitity to refactor other BUSes to use it instead of custom field. In addition once all users of allow_hotplug field are converted to new API, link could replace allow_hotplug field in qdev hotplug code. 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>
2014-02-10define hotplug interfaceIgor Mammedov1-0/+78
Provide a generic hotplug interface for hotplug handlers. Intended for replacing hotplug mechanism used by PCI/PCIE/SHPC code and will be used for memory hotplug. 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>
2014-02-10loader: document that errno is setMichael S. Tsirkin1-0/+7
Document that get_image_size sets errno on failure. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-02-08hw/arm/allwinner-a10: initialize EMACBeniamino Galvani1-0/+3
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08hw/net: add support for Allwinner EMAC Fast Ethernet controllerBeniamino Galvani1-0/+210
This patch adds support for the Fast Ethernet MAC found on Allwinner SoCs, together with a basic emulation of Realtek RTL8201CP PHY. Since there is no public documentation of the Allwinner controller, the implementation is based on Linux kernel driver. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08arm_gic: Add GICC_APRn state to the GICStateChristoffer Dall1-0/+19
The GICC_APRn registers are not currently supported by the ARM GIC v2.0 emulation. This patch adds the missing state. Note that we also change the number of APRs to use a define GIC_NR_APRS based on the maximum number of preemption levels. This patch also adds RAZ/WI accessors for the four registers on the emulated CPU interface. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08arm_gic: Support setting/getting binary point regChristoffer Dall1-0/+7
Add a binary_point field to the gic emulation structure and support setting/getting this register now when we have it. We don't actually support interrupt grouping yet, oh well. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08arm_gic: Keep track of SGI sourcesChristoffer Dall1-0/+7
Right now the arm gic emulation doesn't keep track of the source of an SGI (which apparently Linux guests don't use, or they're fine with assuming CPU 0 always). Add the necessary matrix on the GICState structure and maintain the data when setting and clearing the pending state of an IRQ and make the state visible to the guest. Note that we always choose to present the source as the lowest-numbered CPU in case multiple cores have signalled the same SGI number to a core on the system. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-08Merge remote-tracking branch ↵Peter Maydell1-8/+2
'remotes/juanquintela/tags/migration/20140204-1' into staging migration/next for 20140204 # gpg: Signature made Tue 04 Feb 2014 15:52:00 GMT using RSA key ID 5872D723 # gpg: Can't check signature: public key not found * remotes/juanquintela/tags/migration/20140204-1: Don't abort on memory allocation error Don't abort on out of memory when creating page cache XBZRLE cache size should not be larger than guest memory size migration:fix free XBZRLE decoded_buf wrong Add check for cache size smaller than page size Set xbzrle buffers to NULL after freeing them to avoid double free errors exec: fix ram_list dirty map optimization vmstate: Make VMSTATE_STRUCT_POINTER take type, not ptr-to-type Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-05hw:piix4:acpi: reuse pcihp code for legacy PCI hotplugIgor Mammedov1-0/+1
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>
2014-02-05pcihp: remove unused AcpiPciHpPciStatus.device_present fieldIgor Mammedov1-1/+0
Remove now unused 'device_present' field wich was obsoleted by patch "pcihp: reduce number of device check events" 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>
2014-02-05pcihp: make pci_read() mmio calback compatible with legacy ACPI hotplugIgor Mammedov1-1/+2
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 code where PCNF ACPI method reads this field 32 times. To make pci_read mmio callback compatible with legacy 'up' behavior, pcihp code will need to know in which mode it runs add 'legacy_piix' field to AcpiPciHpState structure and alter register behavior accordingly. 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>
2014-02-05pcihp: reduce number of device check eventsMichael S. Tsirkin1-1/+1
PIIX created a made-up value for the UP register since it was read by guest 32 times for each interrupt. There's no reason to do this for the new PCIHP: register is only read once for each interrupt, so clean up code by making read act as an interrupt acknowledgement: the new UP register clear on read. In this way we cut down the number of bus rescans by a factor of 32, and drop a bunch of code that's now unused. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-02-04Merge remote-tracking branch 'remotes/borntraeger/tags/kvm-s390-20140131' ↵Peter Maydell2-0/+80
into staging This patch set contains the sclp defines and events for cpu hotplug, the initial sclp defines (without code yet) for standby memory (some sort of memory hotplug) as well as a cleanup of the kvm register synchronization. # gpg: Signature made Fri 31 Jan 2014 08:54:29 GMT using RSA key ID B5A61C7C # gpg: Can't check signature: public key not found * remotes/borntraeger/tags/kvm-s390-20140131: s390x/kvm: cleanup partial register handling sclp-s390: Define new SCLP codes and structures s390-sclp: SCLP Event integration s390-sclp: SCLP CPU Info s390-sclp: Define New SCLP Codes Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-04vmstate: Make VMSTATE_STRUCT_POINTER take type, not ptr-to-typePeter Maydell1-8/+2
The VMSTATE_STRUCT_POINTER macros are a bit odd in that they must be passed an argument "FooType *" rather than just taking the FooType. They're only used in one place, so it's easy to tidy this up. This also lets us use the macro to replace the hand-rolled VMSTATE_PTIMER. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Juan Quintela <quintela@redhat.com>
2014-02-03cris: Remove the CRIS PIC glueEdgar E. Iglesias1-2/+0
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-01-31arm_gic: Introduce define for GIC_NR_SGISChristoffer Dall1-0/+1
Instead of hardcoding 16 various places in the code, use a define to make it more clear what is going on. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-01-28sclp-s390: Define new SCLP codes and structuresMatthew Rosato1-0/+34
Define new SCLP codes and structures that will be needed for s390 memory hotplug. Signed-off-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-01-26pc: Save size of RAM below 4GBEduardo Habkost1-1/+1
The ram_below_4g value will be useful in other places, such as the ACPI table code, and other code that currently requires passing below_4g_mem_size around in function arguments. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pc: ACPI: unify source of CPU hotplug IO base/lenIgor Mammedov1-0/+1
use C headers defines as source of IO base/len for respective values in ASL code. 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>
2014-01-26acpi: ich9: add CPU hotplug handling to Q35 machineIgor Mammedov2-0/+5
.. use IO port 0cd8-0xcf7 range for CPU present bitmap 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>
2014-01-26acpi: factor out common cpu hotplug code for PIIX4/Q35Igor Mammedov2-0/+49
.. so it could be used for adding CPU hotplug to Q35 machine Add an additional header with that will be shared between C and ASL code: include/hw/acpi/cpu_hotplug_defs.h 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>
2014-01-26piix4: add acpi pci hotplug supportMichael S. Tsirkin1-0/+5
Add support for acpi pci hotplug using the new infrastructure. PIIX4 legacy interface is maintained as is for machine types 1.7 and older. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pcihp: generalization of piix4 acpiMichael S. Tsirkin1-0/+72
Add ACPI based PCI hotplug library with bridge hotplug support. Design - each bus gets assigned "bsel" property. - ACPI code writes this number to a new BNUM register, then uses existing UP/DOWN registers to probe slot status; to eject, write number to BNUM register, then slot into existing EJ. The interface is actually backwards-compatible with existing PIIX4 ACPI (though not migration compatible). This is split out from PIIX4 codebase so we can reuse it for Q35 as well. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pci: add pci_for_each_bus_depth_firstMichael S. Tsirkin1-0/+14
Useful for ACPI hotplug. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26Add DSDT node for AppleSMCGabriel L. Somlo1-0/+7
AppleSMC (-device isa-applesmc) is required to boot OS X guests. OS X expects a SMC node to be present in the ACPI DSDT. This patch adds a SMC node to the DSDT, and dynamically patches the return value of SMC._STA to either 0x0B if the chip is present, or otherwise to 0x00, before booting the guest. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-21s390-sclp: SCLP Event integrationJason J. Herne2-0/+6
Add an sclp event for "cpu was hot plugged". This allows Qemu to deliver an SCLP interrupt to the guest stating that the requested cpu hotplug was completed. Signed-off-by: Jason J. Herne <jjherne@us.ibm.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-01-21s390-sclp: SCLP CPU InfoJason J. Herne1-0/+32
Implement the CPU data in SCLP "Read SCP Info". And implement "Read CPU Info" SCLP command. This data will be used by the guest to get information about hot plugged cpus. Signed-off-by: Jason J. Herne <jjherne@us.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-01-21s390-sclp: Define New SCLP CodesJason J. Herne1-0/+8
Define new SCLP codes to improve code readability. Signed-off-by: Jason J. Herne <jjherne@us.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-01-16usb: add support for microsoft os descriptorsGerd Hoffmann2-0/+12
This patch adds support for special usb descriptors used by microsoft windows. They allow more fine-grained control over driver binding and adding entries to the registry for configuration. As this is a guest-visible change the "msos-desc" compat property has been added to turn this off for 1.7 + older Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-01-14Merge remote branch 'luiz/queue/qmp' into qmpqEdgar E. Iglesias1-10/+4
* luiz/queue/qmp: migration: qmp_migrate(): keep working after syntax error qerror: Remove assert_no_error() qemu-option: Remove qemu_opts_create_nofail target-i386: Remove assert_no_error usage hw: Remove assert_no_error usages qdev: Delete dead code error: Add error_abort monitor: add object-add (QMP) and object_add (HMP) command monitor: add object-del (QMP) and object_del (HMP) command qom: catch errors in object_property_add_child qom: fix leak for objects created with -object rng: initialize file descriptor to -1 qemu-monitor: HMP cpu-add wrapper vl: add missing transition debug->finish_migrate Message-Id: 1389045795-18706-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-01-10Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori2-64/+4
* stefanha/block: commit: Remove unused check qemu-iotests: Update test cases for commit active commit: Support commit active layer block: Add commit_active_start() mirror: Move base to MirrorBlockJob mirror: Don't close target qemu-iotests: drop duplicate virtio-blk initialization failure vmdk: Allow vmdk_create to work with protocol vmdk: Check VMFS extent line field number docs: updated qemu-img man page and qemu-doc to reflect VHDX support. block: vhdx - improve error message, and .bdrv_check implementation block/iscsi: Fix compilation for libiscsi 1.4.0 (API change) qapi-schema: fix QEMU 1.8 references dataplane: replace hostmem with memory_region_find dataplane: change vring API to use VirtQueueElement vring: factor common code for error exits vring: create a common function to parse descriptors sheepdog: fix dynamic grow for running qcow2 format Message-id: 1387554416-5837-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2014-01-10Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori4-6/+19
acpi,pci,pc,fedora,virtio fixes and enhancements This includes some Preparatory patches for cpu hotplug for q25 and memory hotplug by Igor, tests and memory mapping change by Laszlo and pci reset cleanup by Paolo. There are also some fixes for fedora and virtio: included here since they are test blockers for me. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 23 Dec 2013 08:07:18 AM PST using RSA key ID D28D5469 # gpg: Can't check signature: public key not found * mst/tags/for_anthony: target-arm: fix build with gcc 4.8.2 virtio: add back call to virtio_bus_device_unplugged piix: fix 32bit pci hole qdev: switch reset to post-order qdev: allow both pre- and post-order vists in qdev walking functions pci: clean up resetting of IRQs pci: do not export pci_bus_reset ACPI/DSDT-CPU: cleanup bogus comment ACPI: Q35 DSDT: fix CPU hotplug GPE0.2 handler acpi: ich9: allow guest to clear SCI rised by GPE acpi: factor out common pm_update_sci() into acpi core acpi: piix4: remove not needed GPE0 mask i440fx-test: verify firmware under 4G and 1M, both -bios and -pflash i440fx-test: generate temporary firmware blob i440fx-test: give each GTest case its own qtest i440fx-test: qtest_start() should be paired with qtest_end() hw/i386/pc_sysfw: support two flash drives pc_piix: document gigabyte_align piix: gigabyte alignment for ram Message-id: 1387815007-1272-1-git-send-email-mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2014-01-09Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into ↵Anthony Liguori5-6/+33
staging QOM infrastructure fixes and device conversions * QOM interface fixes and unit test * Device no_user sanitization and documentation * Device error reporting improvement * Conversion of APIC, ICC, IOAPIC to QOM realization model # gpg: Signature made Tue 24 Dec 2013 09:04:05 AM PST using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 174F 0347 1BCC 221A 6175 6F96 FA2E D12D 3E7E 013F * afaerber/tags/qom-devices-for-anthony: (24 commits) qdev-monitor: Improve error message for -device nonexistant ioapic: QOM'ify ioapic ioapic: Cleanup for QOM'ification icc_bus: QOM'ify ICC apic: QOM'ify APIC apic: Cleanup for QOM'ification qdev: Drop misleading qbus_free() function qom: Detect bad reentrance during object_class_foreach() tests: Test QOM interface casting qom: Do not register interface "types" in the type table and fix names qom: Split out object and class caches qdev: Document that pointer properties kill device_add hw: cannot_instantiate_with_device_add_yet due to pointer props qdev-monitor: Avoid device_add crashing on non-device driver name qdev: Do not let the user try to device_add when it cannot work isa: Clean up use of cannot_instantiate_with_device_add_yet vt82c686: Clean up use of cannot_instantiate_with_device_add_yet piix3 piix4: Clean up use of cannot_instantiate_with_device_add_yet ich9: Document why cannot_instantiate_with_device_add_yet pci-host: Consistently set cannot_instantiate_with_device_add_yet ...
2014-01-09Merge remote-tracking branch 'mjt/trivial-patches' into stagingAnthony Liguori1-4/+4
* mjt/trivial-patches: acpi unit-test: Remove temporary disk after test mainstone: Fix duplicate array values for key 'space' pxa27x: Add 'const' attribute to keyboard maps pxa27x: Reduce size of keyboard matrix mapping doc: Mention chardev:id in available devices for -serial configure: Python tests must be done before help message configure: Rewrite code for help message fix -boot strict regressed in commit 6ef4716 vl: make boot_strict variable static (not used outside vl.c) x86: only allow real mode to access 32bit without LMA linux-user: Use macro TARGET_NSIG_WORDS where possible exynos4210: Use macro ARRAY_SIZE where possible ui/cocoa: Use macro ARRAY_SIZE where possible misc: Use macro ARRAY_SIZE where possible openrisc: Fix spelling in comment (transaltion -> translation) hw/arm/highbank: Simplify code (memory region in device state) Message-id: 1388182050-10270-1-git-send-email-mjt@msgid.tls.msk.ru Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2014-01-08arm_gic: Rename GIC_X_TRIGGER to GIC_X_EDGE_TRIGGERChristoffer Dall1-1/+1
TRIGGER can really mean mean anything (e.g. was it triggered, is it level-triggered, is it edge-triggered, etc.). Rename to EDGE_TRIGGER to make the code comprehensible without looking up the data structure. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Message-id: 1387606179-22709-2-git-send-email-christoffer.dall@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-01-06hw: Remove assert_no_error usagesPeter Crosthwaite1-10/+4
Replace assert_no_error() usages with the error_abort system. &error_abort is passed into API calls to signal to the Error sub-system that any errors are fatal. Removes need for caller assertions. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-01-01pxa27x: Add 'const' attribute to keyboard mapsStefan Weil1-2/+2
The mapping is a hardware feature, so it is relatively constant. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-01-01pxa27x: Reduce size of keyboard matrix mappingStefan Weil1-2/+2
The row and column values use only a very limited range (-1 ... 7), so a byte value is sufficient. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-24ioapic: QOM'ify ioapicxiaoqiang zhao1-1/+2
Convert 'init' function to QOM's 'realize' for ioapic and kvm-ioapic. Change variable 'ioapic_no' from static to global. Then we can drop the 'instance_no' function argument. Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-12-24icc_bus: QOM'ify ICCxiaoqiang zhao1-1/+1
For consistency, QOM'ify APIC's parent bus. Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-12-24apic: QOM'ify APICxiaoqiang zhao1-1/+1
Convert 'init' function to QOM's 'realize' for apic, kvm/apic and xen/xen_apic. Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-12-24qdev: Drop misleading qbus_free() functionStefan Hajnoczi1-2/+0
Same reasoning as commit 02a5c4c97422b40034f31265e0f139f7846172a8 ("qdev: Drop misleading qdev_free() function"). The qbus_free() function removes the child from the namespace and decrements the reference count. It does not, however, guarantee to free the child since the refcount may still be held. Just call object_unparent() directly. Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-12-24qdev: Document that pointer properties kill device_addMarkus Armbruster1-0/+17
Ask users of DEFINE_PROP_PTR() to set cannot_instantiate_with_device_add_yet, or explain why it's not needed. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-12-23piix: fix 32bit pci holeGerd Hoffmann1-0/+1
Make the 32bit pci hole start at end of ram, so all possible address space is covered. We used to try and make addresses aligned so they are easier to cover with MTRRs, but since they are cosmetic on KVM, this is probably not worth worrying about. Of course the firmware can use less than that. Leaving space unused is no problem, mapping pci bars outside the hole causes problems though. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-12-23qdev: switch reset to post-orderPaolo Bonzini1-1/+1
Post-order is the only sensible direction for the reset signals. For example, suppose pre-order is used and the parent has some data structures that cache children state (for example a list of active requests). When the reset method is invoked on the parent, these caches could be in any state. If post-order is used, on the other hand, these will be in a known state when the reset method is invoked on the parent. This change means that it is no longer possible to block the visit of the devices, so the callback is changed to return void. This is not a problem, because PCI was returning 1 exactly in order to achieve the same ordering that this patch implements. PCI can then rely on the qdev core having sent a "reset signal" (whatever that means) to the device, and only do the PCI-specific initialization with pci_do_device_reset. MST: fixed up virtio-ccw Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>