summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2013-04-08hw: move PCI bridges to hw/pci-* or hw/ARCHPaolo Bonzini31-26/+17
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move SD/MMC devices to hw/sd/, configure with default-configs/Paolo Bonzini6-3/+6
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move timer devices to hw/timer/, configure with default-configs/Paolo Bonzini25-17/+30
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move ISA bridges and devices to hw/isa/, configure with default-configs/Paolo Bonzini5-2/+4
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move char devices to hw/char/, configure via default-configs/Paolo Bonzini23-19/+23
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move more files to hw/xen/Paolo Bonzini8-3/+4
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move SCSI controllers to hw/scsi/, configure via default-configs/Paolo Bonzini3-1/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move SSI controllers to hw/ssi/, configure via default-configs/Paolo Bonzini6-6/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move I2C controllers to hw/i2c/, configure via default-configs/Paolo Bonzini5-3/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move display devices to hw/display/, configure via default-configs/Paolo Bonzini24-23/+33
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move audio devices to hw/audio/, configure via default-configs/Paolo Bonzini7-3/+6
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move block devices to hw/block/, configure via default-configs/Paolo Bonzini7-3/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move NICs to hw/net/, configure via default-configs/Paolo Bonzini15-10/+12
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move MC146818RTC to hw/timer/, configure via default-configs/Paolo Bonzini8-9/+3
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move watchdogs to hw/watchdog, configure via default-configs/Paolo Bonzini3-2/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: make all of hw/pci/ configurable via default-configs/Paolo Bonzini3-2/+4
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: make all of hw/usb/ configurable via default-configs/Paolo Bonzini2-1/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: make all of hw/ide/ configurable via default-configs/Paolo Bonzini3-2/+3
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move virtio devices to hw/ subdirectoriesPaolo Bonzini23-6/+14
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move target-independent files to subdirectoriesPaolo Bonzini218-199/+196
This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08moxie: configure with default-configs filePaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: make subdirectories for devicesPaolo Bonzini25-3/+31
Prepare the new directory structure. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move headers to include/Paolo Bonzini482-16409/+728
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-06Merge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-armBlue Swirl12-125/+101
* 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm: hw/nand.c: Fix nand erase operation cadence_uart: Flush queued characters on reset pl330: Don't inhibit ES bits on INTEN pflash_cfi01: Implement migration support pflash_cfi01: Drop unused 'bypass' field hw/arm_gic_common: Use vmstate struct rather than save/load functions arm_gic: Fix sizes of state fields in preparation for vmstate support vmstate: Add support for two dimensional arrays hw/onenand.c: fix migration of dynamically allocated buffer "otp" hw/sd.c: fix migration of dynamically allocated buffer "buf" vmstate.h: introduce VMSTATE_BUFFER_POINTER_UNSAFE macro hw/arm_mptimer: Save the timer state pl050: Don't send always-constant is_mouse field hw/arm/nseries: don't print to stdout or stderr
2013-04-05Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2-4/+2
# By Peter Crosthwaite (2) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: xilinx_zynq: Cleanup ssi_create_slave petalogix_ml605_mmu: Cleanup ssi_create_slave() target-s390: Fix SRNMT linux-user: Don't omit comma for strace of rt_sigaction() test-visitor-serialization: Fix some memory leaks
2013-04-05Merge remote-tracking branch 'sstabellini/xen-2013-04-05' into stagingAnthony Liguori3-35/+58
# By Alex Bligh (2) and Felipe Franciosi (2) # Via Stefano Stabellini * sstabellini/xen-2013-04-05: Allow xen guests to plug disks of 1 TiB or more Introduce 64 bit integer write interface to xenstore Xen PV backend: Disable use of O_DIRECT by default as it results in crashes. Xen PV backend: Move call to bdrv_new from blk_init to blk_connect
2013-04-05usb-storage: Forward serial number to scsi-diskKevin Wolf4-5/+10
usb-storage takes care to fetch the USB serial number from -drive options, but it neglected to pass its own 'serial' property to the scsi-disk it creates. With this patch, the 'serial' qdev property and the 'serial' option in -drive behave the same and correctly apply the serial number on both USB and SCSI level. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-05hw/nand.c: Fix nand erase operationWendy Liang1-0/+1
Usually, nand erase operation has only 2 or 3 address cycles. We need to mask s->addr to zero unset stale high-order bytes in the nand address before using it as the erase address. This fixes the NAND erase operation in Linux. [PC: Generalised to work for any number of address cycles rather than just 3] Signed-off-by: Wendy Liang <jliang@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1364967188-26711-1-git-send-email-peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-04-05cadence_uart: Flush queued characters on resetPeter Crosthwaite1-0/+1
Reset can be used to empty the rx-fifo. As the fifo full condition is used to return false from can_receive, queued rx data should be flushed on reset accordingly. Cc: Wendy Liang <jliang@xilinx.com> Cc: Jason Wu <huanyu@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reported-by: Jason Wu <huanyu@xilinx.com> Message-id: 494c1e005e225c915d295ddfd75d992ad2dabc3c.1364964526.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-04-05pl330: Don't inhibit ES bits on INTENPeter Crosthwaite1-2/+1
This if-else logic inhibits setting of the event status (ES) bits when interrupts are enabled. This is incorrect. ES should be set regardless on INTEN state. INTEN only inhibits the signalling of events to PL330 threads, not setting of the ES register. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-04-05Allow xen guests to plug disks of 1 TiB or moreFelipe Franciosi1-2/+2
The current xen backend driver implementation uses int64_t variables to store the size of the corresponding backend disk/file. It also uses an int64_t variable to store the block size of that image. When writing the number of sectors (file_size/block_size) to xenstore, however, it passes these values as 32 bit signed integers. This will cause an overflow for any disk of 1 TiB or more. This patch changes the xen backend driver to use a 64 bit integer write xenstore function. Signed-off-by: Felipe Franciosi <felipe@paradoxo.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-04-05Introduce 64 bit integer write interface to xenstoreFelipe Franciosi2-1/+16
The current implementation of xen_backend only provides 32 bit integer functions to write to xenstore. This patch adds two functions that allow writing 64 bit integers (one generic function and another for the backend only). This patch also fixes the size of the char arrays used to represent these integers as strings (originally 32 bytes, however no more than 12 bytes are needed for 32 bit integers and no more than 21 bytes are needed for 64 bit integers). Signed-off-by: Felipe Franciosi <felipe@paradoxo.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-04-05Xen PV backend: Disable use of O_DIRECT by default as it results in crashes.Alex Bligh1-1/+1
Due to what is almost certainly a kernel bug, writes with O_DIRECT may continue to reference the page after the write has been marked as completed, particularly in the case of TCP retransmit. In other scenarios, this "merely" risks data corruption on the write, but with Xen pages from domU are only transiently mapped into dom0's memory, resulting in kernel panics when they are subsequently accessed. This brings PV devices in line with emulated devices. Removing O_DIRECT is safe as barrier operations are now correctly passed through. See: http://lists.xen.org/archives/html/xen-devel/2012-12/msg01154.html for more details. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-04-05Xen PV backend: Move call to bdrv_new from blk_init to blk_connectAlex Bligh1-32/+40
This commit delays the point at which bdrv_new (and hence blk_open on the underlying device) is called from blk_init to blk_connect. This ensures that in an inbound live migrate, the block device is not opened until it has been closed at the other end. This is in preparation for supporting devices with open/close consistency without using O_DIRECT. This commit does NOT itself change O_DIRECT semantics. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-04-05pflash_cfi01: Implement migration supportPeter Maydell1-3/+17
Add a vmstate to pflash_cfi01, so that it can be live migrated. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363717469-30980-3-git-send-email-peter.maydell@linaro.org
2013-04-05pflash_cfi01: Drop unused 'bypass' fieldPeter Maydell1-8/+2
For pflash_cfi01 the 'bypass' field is set to zero and never changes, so remove it (it is a leftover from pflash_cfi02, where bypass is implemented). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363717469-30980-2-git-send-email-peter.maydell@linaro.org
2013-04-05hw/arm_gic_common: Use vmstate struct rather than save/load functionsPeter Maydell1-67/+41
Update the GIC save/restore to use vmstate rather than hand-rolled save/load functions. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Igor Mitsyanko <i.mitsyanko@gmail.com> Message-id: 1363975375-3166-4-git-send-email-peter.maydell@linaro.org
2013-04-05arm_gic: Fix sizes of state fields in preparation for vmstate supportPeter Maydell3-25/+25
In preparation for switching to vmstate for migration support, fix the sizes of various GIC state fields. In particular, we replace all the bitfields (which VMState can't deal with) with straightforward uint8_t values which we do bit operations on. (The bitfields made more sense when NCPU was set differently in different situations, but we now always model at the architectural limit of 8.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Igor Mitsyanko <i.mitsyanko@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 1363975375-3166-3-git-send-email-peter.maydell@linaro.org
2013-04-05hw/onenand.c: fix migration of dynamically allocated buffer "otp"Igor Mitsyanko1-1/+2
VMSTATE_BUFFER_UNSAFE should be used for buffers inlined in device state, not for buffers allocated dynamically. Change to VMSTATE_BUFFER_POINTER_UNSAFE macro, which will do migration right. Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1362923278-4080-4-git-send-email-i.mitsyanko@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-04-05hw/sd.c: fix migration of dynamically allocated buffer "buf"Igor Mitsyanko1-1/+1
VMSTATE_BUFFER_UNSAFE should be used for buffers inlined in device state, not for buffers allocated dynamically. Change to VMSTATE_BUFFER_POINTER_UNSAFE macro, which will do migration right. Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Michael Walle <michael@walle.cc> Message-id: 1362923278-4080-3-git-send-email-i.mitsyanko@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-04-05hw/arm_mptimer: Save the timer statePeter Maydell1-2/+3
Add a missing VMSTATE_TIMER() entry to the arm_mptimer vmstate description; this omission meant that we would probably hang on reload when the timer failed to fire. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1363967348-3044-1-git-send-email-peter.maydell@linaro.org
2013-04-05pl050: Don't send always-constant is_mouse fieldPeter Maydell1-3/+2
The is_mouse field of the pl050 state structure is constant (it tracks whether this is a 'pl050_keyboard' or 'pl050_mouse'), so there's no need to include it in the VMState structure. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363628480-29306-1-git-send-email-peter.maydell@linaro.org
2013-04-05hw/arm/nseries: don't print to stdout or stderrPeter Maydell1-13/+5
Remove various bits of printing to stdout or stderr from the nseries code, replacing it with a qemu log message where there's an appropriate log category, and just dropping the output for some of the more debug-like printing. In particular, this will get rid of the 'mipid_reset' message you currently get from 'make check'. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 1363368565-24546-1-git-send-email-peter.maydell@linaro.org
2013-04-05xilinx_zynq: Cleanup ssi_create_slavePeter Crosthwaite1-2/+1
With the recent m25p80 cleanup there is no need to use ssi_create_slave_no_init() anymore. Just use ssi_create_slave(). Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-05petalogix_ml605_mmu: Cleanup ssi_create_slave()Peter Crosthwaite1-2/+1
With the recent m25p80 cleanup there is no need to use ssi_create_slave_no_init() anymore. Just use ssi_create_slave(). Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-04pc_acpi_init(): don't bail as soon as failing to find default DSDTLaszlo Ersek1-16/+17
Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1363821803-3380-11-git-send-email-lersek@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-04Introduce IO_APIC_DEFAULT_ADDRESS for 0xfec00000Laszlo Ersek1-1/+3
Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1363821803-3380-10-git-send-email-lersek@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-04extract/unify the constant 0xfee00000 as APIC_DEFAULT_ADDRESSLaszlo Ersek2-3/+1
A common dependency of the constant's current users: - hw/apic_common.c - hw/i386/kvmvapic.c - target-i386/cpu.c is "target-i386/cpu.h". Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1363821803-3380-9-git-send-email-lersek@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-04like acpi_table_install(), acpi_table_add() should propagate ErrorsLaszlo Ersek3-10/+9
Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1363821803-3380-8-git-send-email-lersek@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-04acpi_table_add(): extract and reimplement internalsLaszlo Ersek1-121/+163
The new function acpi_table_install() installs any blob the caller passes in. In the next patches this function will be promoted from helper role to extern. Reimplementing the logic should make it easier to understand. It also removes a buffer overflow when has_header && cumulative_file_size < ACPI_TABLE_HDR_SIZE - ACPI_TABLE_PFX_SIZE (In that case the g_realloc() call in the read() loop used to shrink the "acpi_tables" array, causing an out-of-bounds read access when copying the header out of "acpi_tables".) The new code isn't more daring alignment-wise than its predecessor: "acpi_table_header" is packed, and the uint32_t fields are at offsets 6, 26, and 34. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1363821803-3380-7-git-send-email-lersek@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>