Anthony Liguori [Thu, 8 Sep 2011 14:03:57 +0000 (09:03 -0500)]
Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging
Anthony Liguori [Thu, 8 Sep 2011 13:59:32 +0000 (08:59 -0500)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Thu, 8 Sep 2011 13:57:33 +0000 (08:57 -0500)]
Merge remote-tracking branch 'kraxel/usb.26' into staging
Anthony Liguori [Thu, 8 Sep 2011 13:52:59 +0000 (08:52 -0500)]
Merge remote-tracking branch 'aneesh/for-upstream-3' into staging
Anthony Liguori [Wed, 7 Sep 2011 18:44:45 +0000 (13:44 -0500)]
iohandlers: fix issue with qemu_set_fd_handler()
As spotted by Aneesh, some users pass a NULL opaque so we need to be more
aggressive in checking whether a user means to unregister.
Also fix a double free caused by tag not being reset to zero after delete.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juha Riihimäki [Wed, 31 Aug 2011 20:49:41 +0000 (21:49 +0100)]
usb-musb: Add reset function
Add a separate reset function musb_reset() to the usb-musb interface,
so that users who implement a reset function can also reset usb-musb.
Use this in tusb6010.
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Peter Maydell [Wed, 31 Aug 2011 20:49:40 +0000 (21:49 +0100)]
usb-musb: Take a DeviceState* in init function
Initialise usb-musb by passing it a DeviceState* and the offset of the
IRQs in its gpio array, rather than a plain pointer to an irq array.
This is simpler for callers and also allows us to pass in a valid parent
to usb_bus_new(), so the USB bus actually appears in the qdev tree.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Peter Maydell [Wed, 31 Aug 2011 20:49:39 +0000 (21:49 +0100)]
usb: Remove leading underscores from __musb_irq_max
Identifiers with double leading underscore are reserved, so rename
__musb_irq_max so we don't encroach on reserved namespace.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 31 Aug 2011 09:44:24 +0000 (11:44 +0200)]
usb-host: tag as unmigratable
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 1 Sep 2011 11:56:37 +0000 (13:56 +0200)]
usb: claim port at device initialization time.
This patch makes qemu assign a port when creating the device, not when
attaching it. For most usb devices this isn't a noticable difference
because they are in attached state all the time.
The change affects usb-host devices which live in detached state while
the real device is unplugged from the host. They have a fixed port
assigned all the time now instead of getting grabbing one on attach and
releasing it at detach, i.e. they stop floating around at the usb bus.
The change also allows to simplify usb-hub. It doesn't need the
handle_attach() callback any more to configure the downstream ports.
This can be done at device initialitation time now. The changed
initialization order (first grab upstream port, then register downstream
ports) also fixes some icky corner cases. For example it is not possible
any more to plug the hub into one of its own downstream ports.
The usb host adapters must care too. USBPort->dev being non-NULL
doesn't imply any more the device is in attached state. The host
adapters must additionally check the USBPort->dev->attached flag.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Tue, 30 Aug 2011 10:15:53 +0000 (12:15 +0200)]
usb-ccid: remote wakeup support
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Tue, 30 Aug 2011 09:49:05 +0000 (11:49 +0200)]
usb-ccid: switch to USBDesc*
Switch the smard card emulation to use the USBDesc*
structs for the usb descriptors.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 25 Aug 2011 14:43:15 +0000 (16:43 +0200)]
usb: fix use after free
The ->complete() callback might have released the USBPacket (uhci
actually does), so we must not touch it after the callback returns.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 17 Aug 2011 21:36:46 +0000 (23:36 +0200)]
usb-host: parse port in /proc/bus/usb/devices scan
Unfortunaly this is limited to root ports.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 17 Aug 2011 21:35:45 +0000 (23:35 +0200)]
usb-host: constify port
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Fri, 26 Aug 2011 12:13:48 +0000 (14:13 +0200)]
usb-ehci: handle siTDs
This patch adds code to do minimal siTD handling, which is basically
just following the next pointer. This is good enougth to handle the
inactive siTDs used by FreeBSD. Active siTDs are skipped too as we
don't have split transfer support in qemu, additionally a warning is
printed.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Fri, 26 Aug 2011 14:27:41 +0000 (16:27 +0200)]
usb-host: endpoint table fixup
USB Devices can have up to 15 IN and 15 OUT endpoints, not 15 endpoints
total. Move from one array to two arrays (one IN, one OUT) to maintain
the endpoint state.
Gerd Hoffmann [Wed, 24 Aug 2011 11:34:17 +0000 (13:34 +0200)]
usb-host: claim port
When configured to pass through a specific host port (using hostbus and
hostport properties), try to claim the port if supported by the kernel.
That will avoid any kernel drivers binding to devices plugged into that
port. It will not stop any userspace apps (such as usb_modeswitch)
access the device via usbfs though.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 24 Aug 2011 12:45:07 +0000 (14:45 +0200)]
usb-host: fix configuration tracking.
It is perfectly fine to leave the usb device in unconfigured state
(USBHostDevice->configuration == 0). Just do that and wait for the
guest to explicitly set a configuration. This is closer to what real
hardware does and it also simplifies the device initialization. There
is no need to figure how the device is configured on the host.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 24 Aug 2011 11:45:06 +0000 (13:45 +0200)]
usb-host: limit open retries
Limit the number of times qemu tries to open host devices to three.
Reset error counter when the device goes away, after un-plugging and
re-plugging the device qemu will try again three times.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 24 Aug 2011 08:55:40 +0000 (10:55 +0200)]
usb-host: fix halted endpoints
Two fixes for the price of one ;)
First, reinitialize the endpoint table after device reset.
This is needed anyway as the reset might have switched interfaces.
It also clears the endpoint halted state.
Second the CLEAR_HALT ioctl wants a unsigned int passed in as
argument, not uint8_t.
This gets my usb sd card reader (sandisk micromate) going.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Mon, 22 Aug 2011 12:18:21 +0000 (14:18 +0200)]
usb-host: reapurb error report fix
Don't report errors on devices which are in disconnected
and closing state.
Gerd Hoffmann [Mon, 22 Aug 2011 12:13:20 +0000 (14:13 +0200)]
usb-host: start tracing support
Add a bunch of trace points to usb-linux.c Drop a bunch of DPRINTK's in
favor of the trace points. Also cleanup error reporting a bit while being
at it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 22:44:28 +0000 (00:44 +0200)]
mips: Support the MT TCStatus IXMT irq disable flag
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 21:07:41 +0000 (23:07 +0200)]
mips: Add SMP support to the Malta board
No change to the CPU kinds, so SMP will only work if
manually changing the cpu to 34Kf:
-cpu 34Kf -smp 2
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 21:07:40 +0000 (23:07 +0200)]
mips: Add MT halting and waking of VPEs
+ some partial support for TC's.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 21:07:39 +0000 (23:07 +0200)]
mips: Initialize MT state at reset
Only TC0 on VPE0 is active after reset. All other VPEs and
TCs start in sleep.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 21:07:38 +0000 (23:07 +0200)]
mips: Default to using one VPE and one TC.
Boards can override the setup if needed.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 21:07:37 +0000 (23:07 +0200)]
mips: Enable VInt interrupt mode for the 34Kf
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 21:07:36 +0000 (23:07 +0200)]
mips: Correct VInt vector generation
1. The pending need to pass the Status IM gating.
2. The priority is from seven (highest prio) down to zero.
QEMU was doing the opposite.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 21:07:35 +0000 (23:07 +0200)]
mips: Correct IntCtl write mask for VInt
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 21:07:34 +0000 (23:07 +0200)]
mips: Hook in more reg accesses via mttr/mftr
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 21:07:33 +0000 (23:07 +0200)]
mips: Synchronize CP0 TCSTatus, Status and EntryHi
These registers share some of their fields. Writes to these fields
should be visible through the corresponding mirror fields.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 21:07:32 +0000 (23:07 +0200)]
mips: Handle TC indexing of other VPEs
Introduce mips_cpu_map_tc() to map a global TC index into a VPE nr
and local tc index.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Avi Kivity [Mon, 8 Aug 2011 18:42:57 +0000 (21:42 +0300)]
milkymist: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 8 Aug 2011 18:40:35 +0000 (21:40 +0300)]
milkymist-softusb: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 8 Aug 2011 18:32:25 +0000 (21:32 +0300)]
milkymist-minimac2: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 8 Aug 2011 18:21:47 +0000 (21:21 +0300)]
mcf5208: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 8 Aug 2011 18:08:45 +0000 (21:08 +0300)]
mainstone: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 8 Aug 2011 18:05:07 +0000 (21:05 +0300)]
lm32_boards: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 8 Aug 2011 17:44:23 +0000 (20:44 +0300)]
dummy_m68k: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Thu, 4 Aug 2011 12:55:30 +0000 (15:55 +0300)]
pflash_cfi01/pflash_cfi02: convert to memory API
cfi02 is annoying in that is ignores some address bits; we probably
want explicit support in the memory API for that.
In order to get the correct opaque into the MemoryRegion object, the
allocation scheme is changed so that the flash emulation code allocates
memory, instead of the caller. This clears a FIXME in the flash code.
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Wed, 3 Aug 2011 15:55:00 +0000 (18:55 +0300)]
Makefile.hw: allow hw/ files to include glib headers
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
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.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 1 Aug 2011 08:03:42 +0000 (11:03 +0300)]
cirrus: wrap memory update in a transaction
This prevents spurious unmapping and remapping of the vga windows,
which reduces performance.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 25 Jul 2011 12:07:22 +0000 (15:07 +0300)]
leon3: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 25 Jul 2011 12:03:19 +0000 (15:03 +0300)]
integratorcp: convert to memory API (RAM/flash only)
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 25 Jul 2011 12:02:17 +0000 (15:02 +0300)]
sysbus: add sysbus_add_memory_overlap()
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 25 Jul 2011 11:32:34 +0000 (14:32 +0300)]
axis_dev88: convert to memory API (RAM only)
Reviewed-by: Richard Henderson <rth@twiddle.net>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 25 Jul 2011 11:27:01 +0000 (14:27 +0300)]
armv7m: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 25 Jul 2011 11:14:31 +0000 (14:14 +0300)]
an5206: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Sun, 24 Jul 2011 16:27:24 +0000 (19:27 +0300)]
ReadWriteHandler: remove
No longer used.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Sun, 24 Jul 2011 14:47:18 +0000 (17:47 +0300)]
pci_host: convert conf index and data ports to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Sun, 24 Jul 2011 14:12:11 +0000 (17:12 +0300)]
sysbus: add helpers to add and delete memory regions to the system bus
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 18 Jul 2011 08:58:50 +0000 (11:58 +0300)]
stellaris_enet: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Mon, 8 Aug 2011 18:46:13 +0000 (21:46 +0300)]
mips_fulong2e: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
Blue Swirl [Sat, 3 Sep 2011 16:38:02 +0000 (16:38 +0000)]
apb_pci: convert PCI space to memory API
Add a new memory space for PCI instead of using system memory.
This also fixes a bug where VGA region vga.chain4 is
accidentally mapped to 0xa0000 instead of 0x1ff000a0000.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Fri, 26 Aug 2011 18:43:18 +0000 (18:43 +0000)]
fw_cfg: fix crash if FW_CFG_WRITE_CHANNEL is used incorrectly
Avoid a crash if the guest combines FW_CFG_WRITE_CHANNEL with
a wrong value.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Andreas Färber [Sun, 28 Aug 2011 18:24:34 +0000 (20:24 +0200)]
softfloat: Use uint32 consistently
Prepares for uint32 replacement.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Andreas Färber [Sun, 28 Aug 2011 18:24:33 +0000 (20:24 +0200)]
softfloat: Use uint16 consistently
Prepares for uint16 replacement.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Brad [Fri, 2 Sep 2011 20:53:28 +0000 (16:53 -0400)]
Allow overriding the location of Samba's smbd.
Allow overriding the location of Samba's smbd.
Pretty much every OS I look at has some means of
changing this path (patching) so lets just make
it easier for OS developers creating packages
and/or end users to override the location.
Signed-off-by: Brad Smith <brad@comstyle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Stefan Weil [Wed, 31 Aug 2011 10:38:01 +0000 (12:38 +0200)]
Use new macro QEMU_PACKED for packed structures
Most changes were made using these commands:
git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/'
git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/'
git grep -la '__attribute__((__packed__))'|xargs perl -pi -e 's/__attribute__\(\(__packed__\)\)/QEMU_PACKED/'
git grep -la '__attribute__ ((__packed__))'|xargs perl -pi -e 's/__attribute__ \(\(__packed__\)\)/QEMU_PACKED/'
git grep -la '__attribute((packed))'|xargs perl -pi -e 's/__attribute\(\(packed\)\)/QEMU_PACKED/'
Whitespace in linux-user/syscall_defs.h was fixed manually
to avoid warnings from scripts/checkpatch.pl.
Manual changes were also applied to hw/pc.c.
I did not fix indentation with tabs in block/vvfat.c.
The patch will show 4 errors with scripts/checkpatch.pl.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Stefan Weil [Wed, 31 Aug 2011 10:38:00 +0000 (12:38 +0200)]
Add new macro QEMU_PACKED for packed C structures
A packed struct needs different gcc attributes for compilations
with MinGW compilers because glib-2.0 adds compiler flag
-mms-bitfields which modifies the packing algorithm.
Attribute gcc_struct reverses the negative effects of -mms-bitfields.
QEMU_PACKED sets this attribute and must be used for any packed
struct which is affected by -mms-bitfields.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Frediano Ziglio [Wed, 31 Aug 2011 07:25:35 +0000 (09:25 +0200)]
rename qemu_malloc and related to glib names for coherence
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Brad [Sun, 28 Aug 2011 08:01:33 +0000 (04:01 -0400)]
Fix install(1) usage to be compatible with OpenBSD's install(1).
Fix install(1) usage to be compatible with OpenBSD's install(1).
When creating a directory via the -d flag the -p flag cannot be
used at the same time. Also in the context of installing QEMU it
doesn't make sense to use the -p flag anyway so use the [default]
-c flag instead.
Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 29 Aug 2011 14:55:36 +0000 (09:55 -0500)]
Rename qemu -> qemu-system-i386
This has been discussed before in the past. The special casing really makes no
sense anymore. This seems like a good change to make for 1.0.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 22 Aug 2011 13:24:58 +0000 (08:24 -0500)]
main: force enabling of I/O thread
Enabling the I/O thread by default seems like an important part of declaring
1.0. Besides allowing true SMP support with KVM, the I/O thread means that the
TCG VCPU doesn't have to multiplex itself with the I/O dispatch routines which
currently requires a (racey) signal based alarm system.
I know there have been concerns about performance. I think so far the ones that
have come up (virtio-net) are most likely due to secondary reasons like
decreased batching.
I think we ought to force enabling I/O thread early in 1.0 development and
commit to resolving any lingering issues.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Fri, 2 Sep 2011 15:28:35 +0000 (10:28 -0500)]
trace: fix out-of-tree builds
Reported-by: Lluis Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Fri, 2 Sep 2011 15:08:48 +0000 (10:08 -0500)]
Merge remote-tracking branch 'stefanha/tracing' into staging
Brad Smith [Fri, 2 Sep 2011 09:53:26 +0000 (10:53 +0100)]
libcacard: use INSTALL_DATA for data
Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Boris Figovsky [Tue, 30 Aug 2011 07:00:55 +0000 (10:00 +0300)]
x86: fix daa opcode for al register values higher than 0xf9
The second if statement should consider the original al register value,
and not the new one.
Signed-off-by: Boris Figovsky <boris.figovksy@ravellosystems.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Stefan Weil [Wed, 20 Jul 2011 18:56:35 +0000 (20:56 +0200)]
sh4: Fix potential crash in debug code
cppcheck reports this error:
qemu/hw/sh_intc.c:390: error: Possible null pointer dereference:
s - otherwise it is redundant to check if s is null at line 385
If s were NULL, the printf() statement would crash.
Setting braces fixes this bug.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Reviewed-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Anthony Liguori [Thu, 1 Sep 2011 18:57:19 +0000 (13:57 -0500)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Thu, 1 Sep 2011 18:55:58 +0000 (13:55 -0500)]
Merge remote-tracking branch 'qemu-kvm-tmp/memory/core' into staging
Stefan Hajnoczi [Thu, 25 Aug 2011 08:18:52 +0000 (09:18 +0100)]
build: sort objects to remove duplicates for link
Avoid duplicate object files during the link. There are legitimate
cases where a link command-line would include duplicate object files
because two independent subsystems both depend on common infrastructure.
Use GNU make's $(sort) function to remove duplicate object files from
the link command-line.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 22 Aug 2011 13:12:53 +0000 (08:12 -0500)]
main: switch qemu_set_fd_handler to g_io_add_watch
This patch changes qemu_set_fd_handler to be implemented in terms of
g_io_add_watch(). The semantics are a bit different so some glue is required.
qemu_set_fd_handler2 is much harder to convert because of its use of polling.
The glib main loop has the major of advantage of having a proven thread safe
architecture. By using the glib main loop instead of our own, it will allow us
to eventually introduce multiple I/O threads.
I'm pretty sure that this will work on Win32, but I would appreciate some help
testing. I think the semantics of g_io_channel_unix_new() are really just tied
to the notion of a "unix fd" and not necessarily unix itself.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 22 Aug 2011 13:12:52 +0000 (08:12 -0500)]
Add glib support to main loop
This allows GSources to be used to register callback events in QEMU. This is
useful as it allows us to take greater advantage of glib and also because it
allows us to write code that is more easily testable outside of QEMU since we
can make use of glib's main loop in unit tests.
All new code should use glib's callback mechanisms for registering fd events
which are very well documented at:
http://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html
And:
http://developer.gnome.org/gio/stable/
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Peter Maydell [Thu, 1 Sep 2011 15:45:01 +0000 (16:45 +0100)]
tcg/ppc/tcg-target.c: Avoid 'set but not used' gcc warnings
Move the declaration and initialisation of some variables in
tcg_out_qemu_ld and tcg_out_qemu_st inside CONFIG_SOFTMMU, to
avoid the "variable set but not used" warning of gcc 4.6.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: malc <av1474@comtv.ru>
Stefan Hajnoczi [Thu, 25 Aug 2011 17:03:49 +0000 (18:03 +0100)]
simpletrace: fix process() argument count
The simpletrace.process() function invokes analyzer methods with the
wrong number of arguments if a timestamp should be included. This patch
fixes the issue so that trace analysis scripts can make use of
timestamps.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Lluís [Wed, 31 Aug 2011 18:31:58 +0000 (20:31 +0200)]
trace: enable all events
Given that all events with programmatically-controlled state are disabled by
default, we can delete the "disable" property from all events.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:31:51 +0000 (20:31 +0200)]
trace: [stderr] add support for dynamically enabling/disabling events
Uses the generic interface provided in "trace/control.h" in order to provide
a programmatic interface as well as command line and monitor controls.
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:31:45 +0000 (20:31 +0200)]
trace: [simple] disable all trace points by default
Note that this refers to the backend-specific state (whether the output must be
generated), not the event "disabled" property (which always uses the "nop"
backend).
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:31:38 +0000 (20:31 +0200)]
trace: always use the "nop" backend on events with the "disable" keyword
Any event with the keyword/property "disable" generates an empty trace event
using the "nop" backend, regardless of the current backend.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:31:31 +0000 (20:31 +0200)]
trace: add "-trace events" argument to control initial state
The "-trace events" argument can be used to provide a file with a list of trace
event names that will be enabled prior to starting execution, thus providing
early tracing.
This saves the user from manually toggling event states through the monitor
interface or whichever backend-specific interface.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:31:24 +0000 (20:31 +0200)]
trace: always compile support for controlling and querying trace event states
The current interface is generic for this small set of operations, and thus
other backends can easily modify the "trace/control.c" file to add their own
implementation.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:31:18 +0000 (20:31 +0200)]
trace: separate trace event control and query routines from the simple backend
Generalize the 'st_print_trace_events' and 'st_change_trace_event_state' into
backend-specific 'trace_print_events' and 'trace_event_set_state' (respectively)
in the "trace/control.h" file.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:31:10 +0000 (20:31 +0200)]
trace: generalize the "property" concept in the trace-events file
This adds/modifies the following functions:
* get_name: Get _only_ the event name
* has_property: Return whether an event has a property (keyword before the event
name)
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:31:03 +0000 (20:31 +0200)]
trace: avoid conditional code compilation during option parsing
A default implementation for backend-specific routines is provided in
"trace/default.c", which backends can override by setting "trace_default=no" in
"configure".
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:30:57 +0000 (20:30 +0200)]
trace: move backend-specific code into the trace/ directory
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:30:50 +0000 (20:30 +0200)]
trace: [make] replace 'ifeq' with values in CONFIG_TRACE_*
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:30:43 +0000 (20:30 +0200)]
trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_*
Provides a more hierarchical view of the variable domain.
Also adds the CONFIG_TRACE_* variables for all backends.
[Stefan added missing 'test' in stap if statement]
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Lluís [Wed, 31 Aug 2011 18:30:30 +0000 (20:30 +0200)]
build: Fix linkage of QEMU_PROG
Using '$^' to establish the files to link with will remove any repeated entries
in the list of dependencies.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
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 <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Jan Kiszka [Mon, 29 Aug 2011 22:38:24 +0000 (00:38 +0200)]
memory: Fix memory_region_get_ram_ptr for ROM devices
Mask out the sub-page bits that are used by ROM device for storing the
io-index and the IO_MEM_ROMD flag.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Edgar E. Iglesias [Mon, 29 Aug 2011 21:59:06 +0000 (23:59 +0200)]
Merge branch 'omap-for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm into pm
Anthony Liguori [Mon, 29 Aug 2011 14:57:06 +0000 (09:57 -0500)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Anthony Liguori [Mon, 29 Aug 2011 13:48:43 +0000 (08:48 -0500)]
Merge remote-tracking branch 'qemu-kvm/memory/core' into staging
Anthony Liguori [Mon, 29 Aug 2011 13:48:28 +0000 (08:48 -0500)]
Merge remote-tracking branch 'qemu-kvm/memory/urgent' into staging
Anthony Liguori [Mon, 29 Aug 2011 13:48:15 +0000 (08:48 -0500)]
Merge remote-tracking branch 'mst/for_anthony' into staging