microblaze/s3adsp_1800: Define macros for irq map
Define macros for the interrupt map for the sake of self documentation.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
ppc/virtex_ml507: Define macros for irq/memory maps
Define macros for the interrupt and memory maps for the sake of selfdocumentation.
Merge remote-tracking branch 'remotes/spice/tags/pull-spice-3' into staging
qxl: add sanity check
Merge remote-tracking branch 'remotes/xtensa/tags/20140224-xtensa' into staging
Xtensa fixes and improvements queue 2014-02-24:- add support for ML605 and KC705 FPGA boards;- flush opencores_eth queue when new RX descriptor is available;- add basic checks to cache opcodes;...
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block patches
Merge remote-tracking branch 'remotes/sstabellini/xen-140220' into staging
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>
hw/xtensa: add support for ML605 and KC705 FPGA board
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>Reviewed-by: Andreas Färber <afaerber@suse.de>
opencores_eth: flush queue whenever can_receive can go from false to true
The following registers control whether MAC can receive frames:- MODER.RXEN bit that enables/disables receiver;- TX_BD_NUM register that specifies number of RX descriptors.Notify QEMU networking core when the MAC is ready to receive frames....
block: Add reference parameter to bdrv_open()
Allow bdrv_open() to handle references to existing block devices just asbdrv_file_open() is already capable of.
Signed-off-by: Max Reitz <mreitz@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: Change BDS parameter of bdrv_open() to **
Make bdrv_open() take a pointer to a BDS pointer, similarly tobdrv_file_open(). If a pointer to a NULL pointer is given, bdrv_open()will create a new BDS with an empty name; if the BDS pointer is notNULL, that existing BDS will be reused (in the same way as bdrv_open()...
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140220' into staging
target-arm queue: * Fix a bug causing an assertion in the NVIC on ARMv7M models * More A64 Neon instructions * Refactor cpreg API to separate out access check functions, as...
xen_disk: fix io accounting
bdrv_acct_done was called unconditional. But in case the ioreq has nosegments there is no matching bdrv_acct_start call. This could lead tobogus accounting values.
Found by code inspection.
Signed-off-by: Olaf Hering <olaf@aepfle.de>...
Call pci_piix3_xen_ide_unplug from unplug_disks
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-3' into staging
- xhci improvements and fixes.- uhci bugfix.- cleanups.
Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging
QOM infrastructure fixes and device conversions
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
target-arm: Drop success/fail return from cpreg read and write functions
All cpreg read and write functions now return 0, so we can clean uptheir prototypes: * write functions return void * read functions return the value rather than taking a pointer to write the value to...
hw/intc/arm_gic: Fix NVIC assertion failure
Commit 40d225009ef accidentally changed the behaviour ofgic_acknowledge_irq() for the NVIC. The NVIC doesn't have SGIs,so this meant we hit an assertion: gic_acknowledge_irq: Assertion `s->sgi_pending[irq][cpu] != 0' failed....
uhci: invalidate queue on device address changes
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xhci iso: fix time calculation
Frameid specifies frames not microframes, so weneed to shift it to get the microframe index.
xhci iso: allow for some latency
Allow the scheduled transfer time be a bit behind, tocompensate for latencies. Without this xhci will waitway to often for the mfindex wraparound, assuming thescheduled time is in the future just because qemu isa bit behind in processing the iso transfer requests....
xhci: switch debug printf to tracepoint
xhci: use DPRINTF instead of fprintf(stderr, ...)
So we don't spam stderr with (guest-triggerable) messages by default.
usb: Remove magic constants from device bmAttributes
Replace magic constants in device bmAttributes with symbolic onesfrom Linux kernel ch9.h
Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xhci: fix overflow in usb_xhci_post_load
Found by Coverity.
Reported-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Use error_is_set() only when necessary
error_is_set(&var) is the same as var != NULL, but it takeswhole-program analysis to figure that out. Unnecessarily hard foroptimizers, static checkers, and human readers. Dumb it down toobvious.
Gets rid of several dozen Coverity false positives....
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-02-15' into staging
trivial patches for 2014-02-15
sparc/leon3: Initialize stack pointer
A lot of real world LEON3 systems are shipped with the GRMON bootloader. This boot loader initializes the stack pointer with the end ofRAM address. The application can use this to detect the RAM size of aparticular board variant....
char/serial: Fix emptyness check
This was guarding against a full fifo rather than an empty fifo whenpopping. Fix.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Martin Kletzander <mkletzan@redhat.com>Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>...
qdev: Add enum property types to QAPI schema
Reviewed-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qdev: Use QAPI type names for properties
Use "drive", "chr", etc. only for legacy_name (which shows upin -device foo,? output).
Reviewed-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qdev: Remove hex8/32/64 property types
Replace them with uint8/32/64.
block: Handle "rechs" and "large" translation options
Sure, CHS translation is an obscure topic, and legacy options forhard-disk geometries are obscure as well. But since QEMU does nothingwith it except telling the BIOS, and since there "large" and "rechs"...
qdev: Remove most legacy printers
Their functionality is either aesthetic only (e.g. on/off vs. true/false)or obtained by the "human mode" of StringOutputVisitor.
Reviewed-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
qdev: Sizes are now parsed by StringInputVisitor
qdev: Remove legacy parsers for hex8/32/64
The hexNN property types have not been accepting values not prefixedby "0x" since QEMU 1.2. Parse those values as decimals now.
qdev: Legacy properties are now read-only
qdev: Legacy properties are just strings
prop->info->legacy_name is still used by "-device foo,?".
qdev: Inline qdev_prop_parse()
ipack: Move IndustryPack out of hw/char/
Move the header defining an IPackBus and IPackDevice base class intoa new include/ directory and move their implementation and aPCI-IndustryPack bridge out of hw/char/ directory into a new hw/ipack/.
Acked-by: Alberto Garcia <agarcia@igalia.com>...
ipack: Convert to QOM realize
Acked-by: Alberto Garcia <agarcia@igalia.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
ipack: QOM parent field cleanup for IPackBus
Clean up the only user of IPackBus::qbus field and rename it.
ipack: QOM parent field cleanup for IPackDevice
Rename the IPackDevice::qdev field to avoid accidental use.
ipoctal232: QOM parent field cleanup
Clean up accesses to IPOctalState::dev field and rename it.
tosa: QOM'ify DAC
Replace usages of FROM_I2C_SLAVE() with QOM cast macro.Rename parent field. Use type constant in tosa_tg_init().
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
z2: QOM'ify AER915
Replace usages of FROM_I2C_SLAVE() with QOM cast macro.Rename the parent field. Reuse the type constant in z2_init().
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>[AF: Use TYPE_AER915 in z2_init() too]Signed-off-by: Andreas Färber <afaerber@suse.de>
wm8750: QOM'ify
Replace usages of FROM_I2C_SLAVE() and direct parent field accesses withQOM cast macro. Rename parent field.
ssd0303: QOM'ify
Replace usages of FROM_I2C_SLAVE() with QOM cast macro.Rename parent field.
max7310: QOM'ify
Replace FROM_I2C_SLAVE() usages with QOM cast macro.Rename parent field.
lm832x: QOM'ify
ds1338: QOM'ify
twl92230: QOM'ify
Add missing braces while at it.
nand: Don't use qdev_create() in nand_init()
Commit 7426aa72c36c908a7d0eae3e38568bb0a70de479 (nand: Don't inheritfrom Sysbus) changed the parent type of TYPE_NAND but continued to useqdev_create(), which handled a NULL BusState as SysBus.
Use object_new() instead, and reuse the TYPE_NAND define while at it....
i2c: Rename i2c_bus to I2CBus
pxa2xx: QOM'ify I2C slave
Replace usages of FROM_I2C_SLAVE() and direct parent field accesses withQOM cast macro. Rename parent field to assure we caught all. Reuse typeconstant in pxa2xx_i2c_init().
Add some missing braces while at it.
Signed-off-by: Andreas Färber <afaerber@suse.de>
sdhci: Drop unnecessary #include
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Fam Zheng <famz@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
ppcemb-softmmu: Drop Mac and e500 emulation
They are still available in ppc-softmmu and ppc64-softmmu.
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
acpi,pc,pci fixes and enhancements
Most changes here are hotplug related:
This merges hotplug infrastructure changes by Igor,some acpi related fixes, and PC fixes.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
Merge remote-tracking branch 'remotes/afaerber/tags/prep-for-upstream' into staging
PReP machine and devices
petalogix-ml605: Create the CPU with object_new()
This is to allow future patches to set properties before cpu::realize().
Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
exec: Make cpu_physical_memory_write_rom input an AS
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
exec: Make stb_phys input an AddressSpace
exec: Make stw_*_phys input an AddressSpace
exec: Make stl_phys_notdirty input an AddressSpace
exec: Make stl_*_phys input an AddressSpace
exec: Make stq_*_phys input an AddressSpace
exec: Make lduw_*_phys input an AddressSpace
exec: Make ldq/ldub_*_phys input an AddressSpace
exec: Make ldl_*_phys input an AddressSpace
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140208' into staging
target-arm queue: * more A64 Neon instructions * AArch32 VCVTB and VCVTT ARMv8 instructions * fixes to inaccuracies in GIC emulation * libvixl disassembler for A64...
Merge remote-tracking branch 'remotes/kvaneesh/for-upstream' into staging
prep: Drop from ppcemb-softmmu
ppcemb covers only embedded processors, which does not include PReP.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
ACPI: Remove commented-out code from HPET._CRS
IRQNoFlags on HPET._CRS crashes WinXP because it causes the HPETto conflict with the system timer and/or the RTC. It only occurson Apple hardware, and even there it is exposed fully only whenOS X is detected (via _OSI). Recent OS X versions work on QEMU...
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...
pci/shpc: convert SHPC hotplug to use hotplug-handler API
Split shpc_device_hotplug() into hotplug/unplug callbacksand register them as "hotplug-handler" interface implementation ofPCI_BRIDGE_DEV device.
Replace pci_bus_hotplug() wiring with setting link on PCI BUS...
pci/pcie: convert PCIE hotplug to use hotplug-handler API
Split pcie_cap_slot_hotplug() into hotplug/unplug callbacksand register them as "hotplug-handler" interface implementation ofPCIE_SLOT device.
hw/pci: switch to a generic hotplug handling for PCIDevice
make qdev_unplug()/device_set_realized() to call hotplug handler'splug/unplug methods if available and remove not needed anymorehot(un)plug handling from PCIDevice.
In case if hotplug handler is not available, revert to the legacy...
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.
define hotplug interface
Provide a generic hotplug interface for hotplug handlers.Intended for replacing hotplug mechanism used byPCI/PCIE/SHPC code and will be used for memory hotplug.
qdev: add to BusState "hotplug-handler" link
It will allow to reuse field with different BUSes,reducing code duplication. Field is intended forreplacing 'hotplug_qdev' field in PCIBus and alsowill allow to avoid adding equivalent field toDimmBus with possiblitity to refactor other BUSes...
qdev: add "hotpluggable" property to Device
Currently it's possible to make PCIDevice not hotpluggableby using no_hotplug field of PCIDeviceClass. However itlimits this only to PCI devices and prevents fromgeneralizing hotplug code.
So add similar field to DeviceClass so it could be reused...
raven: Use constant PCI_NUM_PINS instead of 4
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Andreas Färber <andreas.faerber@web.de>
prep: Kill get_system_io() usage
While ISA address space in prep machine is currently the one returnedby get_system_io(), this depends of the implementation of i82378/ravendevices, and this may not be the case forever.
Use the right ISA address space when adding some more ports to it....
Merge remote-tracking branch 'remotes/mwalle/tags/lm32-fixes/20140204' into staging
target-lm32: fixes
arm_gic: Support setting/getting binary point reg
Add a binary_point field to the gic emulation structure and supportsetting/getting this register now when we have it. We don't actuallysupport interrupt grouping yet, oh well.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
arm_gic: Add GICC_APRn state to the GICState
The GICC_APRn registers are not currently supported by the ARM GIC v2.0emulation. This patch adds the missing state.
Note that we also change the number of APRs to use a define GIC_NR_APRSbased on the maximum number of preemption levels. This patch also adds...
hw/net: add support for Allwinner EMAC Fast Ethernet controller
This patch adds support for the Fast Ethernet MAC found on AllwinnerSoCs, together with a basic emulation of Realtek RTL8201CP PHY.
Since there is no public documentation of the Allwinner controller, the...
hw/arm/allwinner-a10: initialize EMAC
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>
arm/zynq: Add software system reset via SCLR
Support software-driven system reset via the register in the SCLR.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
arm_gic: Fix GIC pending behavior
The existing implementation of the pending behavior in gic_set_irq,gic_complete_irq, and the distributor pending set/clear registers doesnot follow the semantics of the GICv2.0 specs, but may implement the11MPCore support. Therefore, maintain the existing semantics for...
arm_gic: Keep track of SGI sources
Right now the arm gic emulation doesn't keep track of the source of anSGI (which apparently Linux guests don't use, or they're fine withassuming CPU 0 always).
Add the necessary matrix on the GICState structure and maintain the data...
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20140204-1' into staging
migration/next for 20140204
Merge remote-tracking branch 'remotes/spice/tags/pull-spice-2' into staging
misc spice patches
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-02-02' into staging
trivial patches for 2014-02-02
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Block pull request
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>
pc_piix: enable legacy hotplug for Xen
xenfv has no fwcfg and so does not load acpi from QEMU.as such new acpi features don't work.
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pc.c: better error message on initrd sizing failure
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>