Lluís [Wed, 31 Aug 2011 18:30:37 +0000 (20:30 +0200)]
build: [simple] Include qemu-timer-common.o in trace-obj-y
Helper programs like qemu-ga use tracing primitives, but qemu-timer-common.o
(also used by simpletrace.o) is not necessarily included in the linkage line.
Peter Maydell [Tue, 30 Aug 2011 17:36:56 +0000 (18:36 +0100)]
tusb6010: Convert to qdev
Convert the tusb6010 to qdev.
Signed-off-by: Juha Riihimäki <[email protected]>
[Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <[email protected]>
[Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <[email protected]> Signed-off-by: Edgar E. Iglesias <[email protected]>
Kevin Wolf [Fri, 26 Aug 2011 13:27:13 +0000 (15:27 +0200)]
qemu-img: Require larger zero areas for sparse handling
By default, require 4k of consecutive zero bytes for qemu-img to make the
output file sparse by not issuing a write request for the zeroed parts. Add an
-S option to allow users to tune this setting.
This helps to avoid situations where a lot of zero sectors and data sectors are
mixed and qemu-img tended to issue many tiny 512 byte writes.
Avi Kivity [Mon, 29 Aug 2011 06:12:49 +0000 (09:12 +0300)]
memory: fix rom_device I/O mode
When adding a rom_device in I/O mode, we incorrectly masked off the low
bits, resulting in a pure RAM map. Fix my masking off the high bits and
IO_MEM_ROMD, yielding a pure I/O map.
Peter Maydell [Sun, 28 Aug 2011 16:22:20 +0000 (16:22 +0000)]
omap_gpmc: Implement prefetch engine
This commit implements the prefetch engine feature of the GPMC
which can be used for NAND devices. This includes both interrupt
driven and DMA-filling modes.
Juha Riihimäki [Sun, 28 Aug 2011 16:22:20 +0000 (16:22 +0000)]
omap_gpmc: Accept a zero mask field on omap3630
OMAP3630 adds an extra bit of address masking, so a mask of
0xb1111 is valid. Unfortunately the GPMC_REVISION is the same as
on the OMAP3430 which only has three bits of address masking, so
we have to derive this feature directly from the OMAP revision
rather than from the GPMC revision.
Signed-off-by: Juha Riihimäki <[email protected]>
[Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <[email protected]>
[Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <[email protected]>
Peter Maydell [Sun, 28 Aug 2011 16:22:19 +0000 (16:22 +0000)]
omap_gpmc: Support NAND devices
Support accesses to NAND devices, both by mapping them into
the GPMC address space, and via the NAND_COMMAND, NAND_ADDRESS
and NAND_DATA GPMC registers.
Juha Riihimäki [Sun, 28 Aug 2011 16:22:19 +0000 (16:22 +0000)]
omap_gpmc: Calculate revision from OMAP model
Signed-off-by: Juha Riihimäki <[email protected]>
[Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <[email protected]>
[Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <[email protected]>
Juha Riihimäki [Sun, 28 Aug 2011 16:22:19 +0000 (16:22 +0000)]
omap_gpmc: Take omap_mpu_state* in omap_gpmc_init
Take a pointer to the omap mpu state struct in omap_gpmc_init.
Some details of GPMC behaviour depend on the OMAP version we
are a part of.
Signed-off-by: Juha Riihimäki <[email protected]>
[Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <[email protected]>
[Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <[email protected]>
Peter Maydell [Sun, 28 Aug 2011 16:22:19 +0000 (16:22 +0000)]
omap_gpmc: Fix handling of FIFOTHRESHOLDSTATUS bit
The OMAP3 TRM is inconsistent about whether the GPMC FIFOTHRESHOLDSTATUS
bit should be set when FIFOPOINTER > FIFOTHRESHOLD or when it is >=
FIFOTHRESHOLD. Apparently the underlying functional spec from which
the TRM was created states that the behaviour is ">=", and this also
makes more conceptual sense.
Peter Maydell [Sun, 28 Aug 2011 16:22:18 +0000 (16:22 +0000)]
omap_gpmc: Refactor omap_gpmc_cs_map and omap_gpmc_cs_unmap
Refactor the omap_gpmc_cs_map/unmap functions:
* take the omap_gpmc_s* and a chipselect id rather than the
omap_gpmc_cs_file_s*, so they have access to the general gpmc
member fields
* extract the base and mask from the config registers in the functions
rather than at every callsite
* check for CSVALID in the functions rather than at every callsite
Peter Maydell [Sun, 28 Aug 2011 16:22:18 +0000 (16:22 +0000)]
omap_gpmc: Clean up omap_gpmc_attach MemoryRegion conversion
Now that all callers of omap_gpmc_attach pass in a MemoryRegion*,
we can remove the base_update and unmap function pointer arguments,
and the opaque pointer that was passed into these callbacks.
We can also remove the base and size fields from omap_gpmc_cs_file_s
as these are no longer necessary (you don't need the base/size
to unmap a MemoryRegion the way you did to undo a mapping made
with cpu_register_physical_memory()).
Juha Riihimäki [Sun, 28 Aug 2011 16:22:17 +0000 (16:22 +0000)]
hw/onenand: Minor spacing fixes
Minor whitespace-only cleanup (separated out from the qdevifying
patch for clarity).
Signed-off-by: Juha Riihimäki <[email protected]>
[Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <[email protected]>
[Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <[email protected]>
Juha Riihimäki [Sun, 28 Aug 2011 16:22:17 +0000 (16:22 +0000)]
hw/onenand: Qdevify
Qdevify the ONENAND device.
Signed-off-by: Juha Riihimäki <[email protected]>
[Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <[email protected]>
[Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <[email protected]>
Juha Riihimäki [Sun, 28 Aug 2011 16:33:02 +0000 (16:33 +0000)]
hw/onenand: Remove unnecessary argument from onenand_command()
Refactor onenand_command() -- since it is essentially a method of
the device object, it doesn't make sense to pass in something as
an argument which is one of the object's own member fields.
Signed-off-by: Juha Riihimäki <[email protected]>
[Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <[email protected]>
[Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <[email protected]>
Peter Maydell [Sun, 28 Aug 2011 16:22:17 +0000 (16:22 +0000)]
hw/sysbus: Add sysbus_mmio_get_region()
Add a sysbus_mmio_get_region() which allows users of sysbus
devices to turn a (SysBusDevice*, mmioidx) tuple into a
MemoryRegion*. This enables some useful simplifications of
devices which pass through another device's mmio region
(either directly or by implementing some kind of memory
controller device).
Blue Swirl [Sat, 30 Jul 2011 19:18:32 +0000 (19:18 +0000)]
TCG: improve optimizer debugging
Use enum TCGOpcode instead of plain old int so that the name of
current op can be seen in GDB. Add a default case to switch
so that GCC does not complain about unhandled enum cases.
Gerd Hoffmann [Fri, 26 Aug 2011 09:16:10 +0000 (11:16 +0200)]
Fix linker scripts
Remove PROVIDE_HIDDEN and ONLY_IF_{RO,RW} from linker scripts to make
them work with older binutils versions. Fixes *-bsd-user build on
OpenBSD 4.9 which ships binutils 2.15.
Brad [Mon, 22 Aug 2011 20:39:59 +0000 (16:39 -0400)]
Fix build on OpenBSD with BSD userland emu and smartcard NSS enabled
The first issue is the hard coded POSIX Real Time extensions library in the
libcacard/Makefile. From looking at the code it doesn't seem this is necessary
anyway. Robert Relyea seems to think it most likely isn't necessary.
The second issue was the missing exclusion of the BSD userland binary
builds from the addition of this Makefile target for the smartcard NSS
code which breaks the builds if smartcard NSS support is enabled.
Account the total latency for read/write/flush requests. This allows
management tools to average it based on a snapshot of the nr ops
counters and allow checking for SLAs or provide statistics.
When the vhost notifier is disabled, the userspace handler runs
immediately: virtio_pci_set_host_notifier_internal might
call virtio_queue_notify_vq.
Since the VQ state and the tap backend state aren't
recovered yet, this causes
"Guest moved used index from XXX to YYY" assertions.
The solution is to split out host notifier handling
from vhost VQ setup and disable notifiers as our last step
when we stop vhost-net. For symmetry enable them first thing
on start.
Jan Kiszka [Thu, 25 Aug 2011 09:10:13 +0000 (11:10 +0200)]
vga: Silence bogus gcc warning about uninitialized variables
Some gcc versions do not properly detect that all possible cases are
covered and base and size are always initialized. Please gcc by defining
a pseudo default case.
Decouple the I/O accounting from bdrv_aio_readv/writev/flush and
make the hardware models call directly into the accounting helpers.
This means:
- we do not count internal requests from image formats in addition
to guest originating I/O
- we do not double count I/O ops if the device model handles it
chunk wise
- we only account I/O once it actuall is done
- can extent I/O accounting to synchronous or coroutine I/O easily
- implement I/O latency tracking easily (see the next patch)
I've conveted the existing device model callers to the new model,
device models that are using synchronous I/O and weren't accounted
before haven't been updated yet. Also scsi hasn't been converted
to the end-to-end accounting as I want to defer that after the pending
scsi layer overhaul.
Jamie Iles [Wed, 10 Aug 2011 14:18:42 +0000 (15:18 +0100)]
monitor: fix build breakage for !CONFIG_VNC
Commit c62f6d1 (monitor: fix build breakage with --disable-vnc)
conditionalised some VNC setup code but left an unused variable. Move
the variable into the conditional code to fix the build breakage.
Avi Kivity [Mon, 1 Aug 2011 08:04:39 +0000 (11:04 +0300)]
piix_pci: wrap memory update in a transaction
The code will remap all PAMs, even if just one is updated, resulting
in reduced performance. Wrap in a transaction to detect that those
other PAMs have not changed.
Avi Kivity [Wed, 24 Aug 2011 18:37:05 +0000 (21:37 +0300)]
ppc_oldworld, ppc_newworld: fix escc BAR related crash
ppc maps the escc mmio region both at a fixed offset (as a sysbus area) and as part of a PCI BAR.
This crashes, since a MemoryRegion may have only one parent. Use an alias so we have a separate
MemoryRegion for the BAR.
MORITA Kazutaka [Fri, 12 Aug 2011 12:33:15 +0000 (21:33 +0900)]
sheepdog: use coroutines
This makes the sheepdog block driver support bdrv_co_readv/writev
instead of bdrv_aio_readv/writev.
With this patch, Sheepdog network I/O becomes fully asynchronous. The
block driver yields back when send/recv returns EAGAIN, and is resumed
when the sheepdog network connection is ready for the operation.
Jan Kiszka [Wed, 24 Aug 2011 12:29:30 +0000 (14:29 +0200)]
pci: Error on PCI capability collisions
Nothing good can happen when we overlap capabilities. This may happen
when plugging in assigned devices or when devices models contain bugs.
Detect the overlap and report it.
Isaku Yamahata [Fri, 5 Aug 2011 09:22:03 +0000 (18:22 +0900)]
pcie/slot: fix hotplug event
When slot status register is cleared, PCIDevice::exp.hpev_notify
needs to be cleared.
Otherwise, PCIDevice::exp.hpev_notify is never set to false resulting
in no more hot plug event once it's raised.
Alexander Graf [Tue, 23 Aug 2011 04:55:43 +0000 (06:55 +0200)]
PPC: E500: Inject SPE exception on invalid SPE access
When accessing an SPE instruction despite it being not available,
throw an SPE exception instead of an APU exception. That way the
guest knows what's going on and actually uses SPE.
Peter Maydell [Tue, 23 Aug 2011 18:24:32 +0000 (19:24 +0100)]
hw/omap_gpmc: Don't try to map CS0 twice on reset
Remove a spurious second map of the OMAP GPMC CS0 region on reset.
This fixes an assertion failure when we try to add the region to
its container when it was already added. (The old code did not
complain about mismatched map/unmap calls, but the new MemoryRegion
implementation does.)