]> git.proxmox.com Git - qemu.git/log
qemu.git
12 years agoqapi: Convert system_reset
Luiz Capitulino [Thu, 15 Sep 2011 17:41:46 +0000 (14:41 -0300)]
qapi: Convert system_reset

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert stop
Luiz Capitulino [Thu, 15 Sep 2011 17:34:39 +0000 (14:34 -0300)]
qapi: Convert stop

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert quit
Luiz Capitulino [Thu, 15 Sep 2011 17:20:28 +0000 (14:20 -0300)]
qapi: Convert quit

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert query-commands
Luiz Capitulino [Wed, 21 Sep 2011 17:31:51 +0000 (14:31 -0300)]
qapi: Convert query-commands

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert query-chardev
Luiz Capitulino [Wed, 14 Sep 2011 19:05:49 +0000 (16:05 -0300)]
qapi: Convert query-chardev

Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert query-uuid
Luiz Capitulino [Tue, 13 Sep 2011 20:16:25 +0000 (17:16 -0300)]
qapi: Convert query-uuid

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert query-status
Luiz Capitulino [Mon, 12 Sep 2011 20:54:20 +0000 (17:54 -0300)]
qapi: Convert query-status

Please, note that the RunState type as defined in sysemu.h and its
runstate_as_string() function are being dropped in favor of the
RunState type generated by the QAPI.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoRunState: Rename enum values as generated by the QAPI
Luiz Capitulino [Fri, 30 Sep 2011 17:45:27 +0000 (14:45 -0300)]
RunState: Rename enum values as generated by the QAPI

Next commit will convert the query-status command to use the
RunState type as generated by the QAPI.

In order to "transparently" replace the current enum by the QAPI
one, we have to make some changes to some enum values.

As the changes are simple renames, I'll do them in one shot. The
changes are:

 - Rename the prefix from RSTATE_ to RUN_STATE_
 - RUN_STATE_SAVEVM to RUN_STATE_SAVE_VM
 - RUN_STATE_IN_MIGRATE to RUN_STATE_INMIGRATE
 - RUN_STATE_PANICKED to RUN_STATE_INTERNAL_ERROR
 - RUN_STATE_POST_MIGRATE to RUN_STATE_POSTMIGRATE
 - RUN_STATE_PRE_LAUNCH to RUN_STATE_PRELAUNCH
 - RUN_STATE_PRE_MIGRATE to RUN_STATE_PREMIGRATE
 - RUN_STATE_RESTORE to RUN_STATE_RESTORE_VM
 - RUN_STATE_PRE_MIGRATE to RUN_STATE_FINISH_MIGRATE

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoRunState: Drop the RSTATE_NO_STATE value
Luiz Capitulino [Fri, 30 Sep 2011 17:40:07 +0000 (14:40 -0300)]
RunState: Drop the RSTATE_NO_STATE value

The QAPI framework won't generate it, so we need to get rid of it.

In order to do that, this commit makes RSTATE_PRE_LAUNCH the initial
state and change qemu_vmstop_requested() to use RSTATE_MAX.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agovl: Change qemu_vmstop_requested() to return a bool
Luiz Capitulino [Fri, 30 Sep 2011 17:27:11 +0000 (14:27 -0300)]
vl: Change qemu_vmstop_requested() to return a bool

The stop reason is returned in the RunState argument. This is a
preparation for a future commit which will convert the query-status
command to the QAPI.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert query-kvm
Luiz Capitulino [Mon, 12 Sep 2011 18:10:53 +0000 (15:10 -0300)]
qapi: Convert query-kvm

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert query-version
Luiz Capitulino [Fri, 26 Aug 2011 20:38:13 +0000 (17:38 -0300)]
qapi: Convert query-version

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: convert query-name
Anthony Liguori [Fri, 2 Sep 2011 17:34:48 +0000 (12:34 -0500)]
qapi: convert query-name

A simple example conversion 'info name'.  This also adds the new files for
QMP and HMP.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Automatically generate a _MAX value for enums
Luiz Capitulino [Fri, 30 Sep 2011 15:43:27 +0000 (12:43 -0300)]
qapi: Automatically generate a _MAX value for enums

It's the last value in the enum and is very useful for the C
implementation.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Don't use c_var() on enum strings
Luiz Capitulino [Wed, 28 Sep 2011 19:56:56 +0000 (16:56 -0300)]
qapi: Don't use c_var() on enum strings

Otherwise if we have something like 'foo-bar' in the schema,
it will be generated as 'foo_bar' in the string lookup table.

c_var() is good for C variables, but not for enum strings.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: modify visitor code generation for list iteration
Michael Roth [Tue, 20 Sep 2011 00:03:11 +0000 (19:03 -0500)]
qapi: modify visitor code generation for list iteration

Modify logic such that we never assign values to the list head argument
to progress through the list on subsequent iterations, instead rely only
on having our return value passed back in as an argument on the next
call. Also update QMP I/O visitors and test cases accordingly, and add a
missing test case for QmpOutputVisitor.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: dealloc visitor, support freeing of nested lists
Michael Roth [Tue, 20 Sep 2011 00:03:10 +0000 (19:03 -0500)]
qapi: dealloc visitor, support freeing of nested lists

Previously our logic for keeping track of when we're visiting the head
of a list was done via a global bool. This can be overwritten if dealing
with nested lists, so use stack entries to track this instead.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: add test cases for generated free functions
Michael Roth [Thu, 15 Sep 2011 19:39:54 +0000 (14:39 -0500)]
qapi: add test cases for generated free functions

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: generate qapi_free_* functions for *List types
Michael Roth [Thu, 15 Sep 2011 19:39:53 +0000 (14:39 -0500)]
qapi: generate qapi_free_* functions for *List types

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: dealloc visitor, fix premature free and iteration logic
Michael Roth [Thu, 15 Sep 2011 19:39:52 +0000 (14:39 -0500)]
qapi: dealloc visitor, fix premature free and iteration logic

Currently we do 3 things wrong:

1) The list iterator, in practice, is used in a manner where the pointer
we pass in is the same as the pointer we assign the output to from
visit_next_list(). This causes an infinite loop where we keep freeing
the same structures.

2) We attempt to free list->value rather than list. visit_type_<type>
handles this. We should only be concerned with the containing list.

3) We free prematurely: iterator function will continue accessing values
we've already freed.

This patch should fix all of these issues. QmpOutputVisitor also suffers
from 1).

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: fixup command generation for functions that return list types
Anthony Liguori [Wed, 14 Sep 2011 19:30:00 +0000 (14:30 -0500)]
qapi: fixup command generation for functions that return list types

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: use middle mode in QMP server
Anthony Liguori [Fri, 2 Sep 2011 17:34:47 +0000 (12:34 -0500)]
qapi: use middle mode in QMP server

Use the new middle mode within the existing QMP server.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: add code generation support for middle mode
Anthony Liguori [Fri, 2 Sep 2011 17:34:46 +0000 (12:34 -0500)]
qapi: add code generation support for middle mode

To get the ball rolling merging QAPI, this patch introduces a "middle mode" to
the code generator.  In middle mode, the code generator generates marshalling
functions that are compatible with the current QMP server.  We absolutely need
to replace the current QMP server in order to support proper asynchronous
commands but using a middle mode provides a middle-ground that lets us start
converting commands in tree.

Note that all of the commands have been converted already in my glib branch.
Middle mode only exists until we finish merging them from my branch into the
main tree.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqerror: add qerror_report_err()
Anthony Liguori [Fri, 2 Sep 2011 17:34:45 +0000 (12:34 -0500)]
qerror: add qerror_report_err()

This provides a bridge between Error (new error mechanism) and QError (old error
mechanism).  Errors can be propagated whereas QError cannot.

The minor evilness avoids layering violations.  Since QError should go away RSN,
it seems like a reasonable hack.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoerror: let error_is_type take a NULL error
Anthony Liguori [Fri, 2 Sep 2011 17:34:44 +0000 (12:34 -0500)]
error: let error_is_type take a NULL error

Reported-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agokvm: support TSC deadline MSR
Liu, Jinsong [Sun, 25 Sep 2011 08:10:48 +0000 (16:10 +0800)]
kvm: support TSC deadline MSR

KVM add emulation of lapic tsc deadline timer for guest.
This patch is co-operation work at qemu side.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
12 years agomilkymist: new interrupt map
Michael Walle [Thu, 15 Sep 2011 22:48:34 +0000 (00:48 +0200)]
milkymist: new interrupt map

Due to the new uart core version the interrupt mapping has changed.

Signed-off-by: Michael Walle <michael@walle.cc>
12 years agomilkymist_uart: support new core version
Michael Walle [Wed, 10 Aug 2011 22:13:23 +0000 (00:13 +0200)]
milkymist_uart: support new core version

The new version of the uart core introduces status and control bits.

Signed-off-by: Michael Walle <michael@walle.cc>
12 years agolm32: add missing qemu_init_vcpu() call
Michael Walle [Thu, 15 Sep 2011 22:26:05 +0000 (00:26 +0200)]
lm32: add missing qemu_init_vcpu() call

Signed-off-by: Michael Walle <michael@walle.cc>
12 years agotrace: add arguments to bdrv_co_io_em() trace event
Stefan Hajnoczi [Fri, 30 Sep 2011 16:34:58 +0000 (17:34 +0100)]
trace: add arguments to bdrv_co_io_em() trace event

It is useful to know the BlockDriverState as well as the
sector_num/nb_sectors of an emulated .bdrv_co_*() request.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agotrace: trace monitor qmp dispatch/completion
Stefan Hajnoczi [Fri, 23 Sep 2011 07:23:06 +0000 (08:23 +0100)]
trace: trace monitor qmp dispatch/completion

Add trace events for handle_qmp_command(), which dispatches qmp
commands, and monitor_protocol_emitter(), which produces the reply to a
qmp command.

Also remove duplicate #include "trace/control.h".

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agotrace: trace bdrv_open_common()
Stefan Hajnoczi [Thu, 22 Sep 2011 19:14:12 +0000 (20:14 +0100)]
trace: trace bdrv_open_common()

bdrv_open_common() is a useful point to trace since it reveals the
filename and block driver for a given BlockDriverState.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agohmp: re-enable trace-file command
Michael Roth [Sun, 2 Oct 2011 13:44:37 +0000 (08:44 -0500)]
hmp: re-enable trace-file command

Commit 31965ae27bc11e90674be12584bb201b83df5aef reverted a previous
renaming of CONFIG_SIMPLE_TRACE->CONFIG_TRACE_SIMPLE in a couple spots,
leading to trace-file currently being unavailable.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoetrax-dma: Remove bogus if statement
Edgar E. Iglesias [Mon, 3 Oct 2011 08:20:13 +0000 (10:20 +0200)]
etrax-dma: Remove bogus if statement

Reported-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agomemory: Print regions in ascending order
Jan Kiszka [Tue, 27 Sep 2011 13:00:41 +0000 (15:00 +0200)]
memory: Print regions in ascending order

Makes reading the output more user friendly.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomemory: Do not print empty PIO root
Jan Kiszka [Tue, 27 Sep 2011 13:00:38 +0000 (15:00 +0200)]
memory: Do not print empty PIO root

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomemory: Print region priority
Jan Kiszka [Tue, 27 Sep 2011 13:00:31 +0000 (15:00 +0200)]
memory: Print region priority

Useful to discover eclipses.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomemory: simple memory tree printer
Blue Swirl [Sun, 11 Sep 2011 20:22:05 +0000 (20:22 +0000)]
memory: simple memory tree printer

Add a monitor command 'info mtree' to show the memory hierarchy
much like /proc/iomem in Linux.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomilkymist-{minimac2,softusb}: rename memory names
Michael Walle [Wed, 31 Aug 2011 14:48:47 +0000 (16:48 +0200)]
milkymist-{minimac2,softusb}: rename memory names

Be consistent with other milkymist models.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomilkymist-vgafb: convert to memory API
Michael Walle [Wed, 31 Aug 2011 14:48:46 +0000 (16:48 +0200)]
milkymist-vgafb: convert to memory API

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomilkymist-uart: convert to memory API
Michael Walle [Wed, 31 Aug 2011 14:48:45 +0000 (16:48 +0200)]
milkymist-uart: convert to memory API

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomilkymist-tmu2: convert to memory API
Michael Walle [Wed, 31 Aug 2011 14:48:44 +0000 (16:48 +0200)]
milkymist-tmu2: convert to memory API

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomilkymist-sysctl: convert to memory API
Michael Walle [Wed, 31 Aug 2011 14:48:43 +0000 (16:48 +0200)]
milkymist-sysctl: convert to memory API

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomilkymist-pfpu: convert to memory API
Michael Walle [Wed, 31 Aug 2011 14:48:42 +0000 (16:48 +0200)]
milkymist-pfpu: convert to memory API

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomilkymist-memcard: convert to memory API
Michael Walle [Wed, 31 Aug 2011 14:48:41 +0000 (16:48 +0200)]
milkymist-memcard: convert to memory API

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomilkymist-hpdmc: convert to memory API
Michael Walle [Wed, 31 Aug 2011 14:48:40 +0000 (16:48 +0200)]
milkymist-hpdmc: convert to memory API

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomilkymist-ac97: convert to memory API
Michael Walle [Wed, 31 Aug 2011 14:48:39 +0000 (16:48 +0200)]
milkymist-ac97: convert to memory API

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoopenpic: Memory API conversion for mpic
Fabien Chouteau [Tue, 30 Aug 2011 15:46:26 +0000 (17:46 +0200)]
openpic: Memory API conversion for mpic

This patch converts mpic to the new memory API (through old mmio).

Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agohw/smc91c111: Convert to MemoryRegion
Peter Maydell [Wed, 24 Aug 2011 17:28:21 +0000 (18:28 +0100)]
hw/smc91c111: Convert to MemoryRegion

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosun4u: Pass address_space_mem to sun4uv_init
Richard Henderson [Thu, 11 Aug 2011 23:07:21 +0000 (16:07 -0700)]
sun4u: Pass address_space_mem to sun4uv_init

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosm501: Pass address_space_mem to sm501_init
Richard Henderson [Thu, 11 Aug 2011 23:07:20 +0000 (16:07 -0700)]
sm501: Pass address_space_mem to sm501_init

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agopxa: Pass in address_space to pxa{255, 270}_init
Richard Henderson [Thu, 11 Aug 2011 23:07:19 +0000 (16:07 -0700)]
pxa: Pass in address_space to pxa{255, 270}_init

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoppc440: Pass in address_space_mem to ppc440ep_init
Richard Henderson [Thu, 11 Aug 2011 23:07:18 +0000 (16:07 -0700)]
ppc440: Pass in address_space_mem to ppc440ep_init

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoppc405: Pass in address_space_mem to ppc405{cr, ep}_init
Richard Henderson [Thu, 11 Aug 2011 23:07:17 +0000 (16:07 -0700)]
ppc405: Pass in address_space_mem to ppc405{cr, ep}_init

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoserial: Add MemoryRegion parameter to serial_mm_init
Richard Henderson [Thu, 11 Aug 2011 23:07:16 +0000 (16:07 -0700)]
serial: Add MemoryRegion parameter to serial_mm_init

Remove the get_system_memory() call from serial_mm_init, pushing
it back into the callers.  In many cases we already have the
system memory region available.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoserial: Remove ioregister parameter from serial_mm_init
Richard Henderson [Thu, 11 Aug 2011 23:07:15 +0000 (16:07 -0700)]
serial: Remove ioregister parameter from serial_mm_init

All callers passed 1.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoserial: Use enum device_endian in serial_mm_init parameter
Richard Henderson [Thu, 11 Aug 2011 23:07:14 +0000 (16:07 -0700)]
serial: Use enum device_endian in serial_mm_init parameter

The use of DEVICE_NATIVE_ENDIAN cleans up lots of ifdefs in
many of the callers.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoserial: Convert serial_mm_init to MemoryRegion
Richard Henderson [Thu, 11 Aug 2011 23:18:59 +0000 (16:18 -0700)]
serial: Convert serial_mm_init to MemoryRegion

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoetrax-eth: Convert to MemoryRegion
Edgar E. Iglesias [Thu, 11 Aug 2011 11:47:48 +0000 (13:47 +0200)]
etrax-eth: Convert to MemoryRegion

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoetrax-dma: Convert to MemoryRegion
Edgar E. Iglesias [Thu, 11 Aug 2011 11:47:47 +0000 (13:47 +0200)]
etrax-dma: Convert to MemoryRegion

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoetrax-timer: Convert to MemoryRegion
Edgar E. Iglesias [Thu, 11 Aug 2011 11:47:46 +0000 (13:47 +0200)]
etrax-timer: Convert to MemoryRegion

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoetrax-ser: Convert to MemoryRegion
Edgar E. Iglesias [Thu, 11 Aug 2011 11:47:45 +0000 (13:47 +0200)]
etrax-ser: Convert to MemoryRegion

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoetrax-pic: Convert to MemoryRegion
Edgar E. Iglesias [Thu, 11 Aug 2011 11:47:44 +0000 (13:47 +0200)]
etrax-pic: Convert to MemoryRegion

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoMove GETPC from dyngen-exec.h to exec-all.h
Blue Swirl [Wed, 21 Sep 2011 18:13:16 +0000 (18:13 +0000)]
Move GETPC from dyngen-exec.h to exec-all.h

GETPC() can be used even from outside of helper code. Move the macro to
a more accessible location. Avoid a compile warning from redefining it in exec.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agosoftmmu_header: pass CPUState to tlb_fill
Blue Swirl [Mon, 4 Jul 2011 20:57:05 +0000 (20:57 +0000)]
softmmu_header: pass CPUState to tlb_fill

Pass CPUState pointer to tlb_fill() instead of architecture local
cpu_single_env hacks.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoDocument softmmu templates
Blue Swirl [Wed, 21 Sep 2011 20:00:18 +0000 (20:00 +0000)]
Document softmmu templates

Add some comments to describe each file.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoESP: convert to trace framework
Blue Swirl [Sun, 11 Sep 2011 15:54:18 +0000 (15:54 +0000)]
ESP: convert to trace framework

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoPPC: Drop initial ESCC mapping
Alexander Graf [Fri, 30 Sep 2011 13:29:12 +0000 (15:29 +0200)]
PPC: Drop initial ESCC mapping

We are mapping ESCC to a static (incorrect) address on machine init. This
overlaps with our vram, rendering the screen barely usable.

Since openBIOS is clever enough to map ESCC to where it needs to be, we can
just drop that invalid map and everyone's happy.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agotcg-i386: Introduce limited deposit support
Jan Kiszka [Thu, 29 Sep 2011 16:52:11 +0000 (18:52 +0200)]
tcg-i386: Introduce limited deposit support

x86 cannot provide an optimized generic deposit implementation. But at
least for a few special cases, namely for writing bits 0..7, 8..15, and
0..15, versions using only a single instruction are feasible.
Introducing such limited support improves emulating 16-bit x86 code on
x86, but also rarer cases where 32-bit or 64-bit code accesses bytes or
words.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agomips_fulong2e: Reorder ISA bus and i8259 creation
Jan Kiszka [Wed, 28 Sep 2011 09:19:02 +0000 (11:19 +0200)]
mips_fulong2e: Reorder ISA bus and i8259 creation

Missed during memory region conversion: The i8259 now depends on the ISA
bus being created first. Reorder the initialization.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agotarget-i386: Remove redundant word mask in port out instructions
Jan Kiszka [Mon, 26 Sep 2011 17:20:00 +0000 (19:20 +0200)]
target-i386: Remove redundant word mask in port out instructions

T0 was already masked to 16 bits when loading it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agosoftfloat: Reinstate accidentally disabled target-specific NaN handling
Peter Maydell [Mon, 26 Sep 2011 15:56:55 +0000 (16:56 +0100)]
softfloat: Reinstate accidentally disabled target-specific NaN handling

Include config.h in softfloat.c, so that the target specific ifdefs in
softfloat-specialize.h are evaluated correctly. This was accidentally
broken in commit 789ec7ce2 when config-target.h was removed from
softfloat.h, and means that most targets will have been returning the
wrong results for calculations involving NaNs.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agotcg/arm: Remove unused tcg_out_addi()
Peter Maydell [Mon, 12 Sep 2011 10:03:45 +0000 (11:03 +0100)]
tcg/arm: Remove unused tcg_out_addi()

Remove the unused function tcg_out_addi() from the ARM TCG backend;
this fixes a compilation failure on ARM hosts with newer gcc.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoconfigure: Detect predefined compiler symbols for ARM and HPPA
Brad [Thu, 8 Sep 2011 01:24:56 +0000 (21:24 -0400)]
configure: Detect predefined compiler symbols for ARM and HPPA

To be able to detect some ARM / HPPA based architectures such as with
OpenBSD/(armish / zaurus) or OpenBSD/hppa.

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agotcg: Add some assertions
Stefan Weil [Sat, 17 Sep 2011 20:00:30 +0000 (22:00 +0200)]
tcg: Add some assertions

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agotcg: Add forward declarations for local functions
Stefan Weil [Sat, 17 Sep 2011 20:00:29 +0000 (22:00 +0200)]
tcg: Add forward declarations for local functions

These functions are defined in the tcg target specific file
tcg-target.c.

The forward declarations assert that every tcg target uses
the same function prototype.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agotcg: Don't declare TCG_TARGET_REG_BITS in tcg-target.h
Stefan Weil [Sat, 17 Sep 2011 20:00:28 +0000 (22:00 +0200)]
tcg: Don't declare TCG_TARGET_REG_BITS in tcg-target.h

It is now declared for all tcg targets in tcg.h,
so the tcg target specific declarations are redundant.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agotcg: Declare TCG_TARGET_REG_BITS in tcg.h
Stefan Weil [Sat, 17 Sep 2011 20:00:27 +0000 (22:00 +0200)]
tcg: Declare TCG_TARGET_REG_BITS in tcg.h

TCG_TARGET_REG_BITS can be determined by the compiler,
so there is no need to declare it for each individual tcg target.

This is especially important for new tcg targets
which will be supported by the tcg interpreter.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoMerge remote-tracking branch 'kiszka/queues/slirp' into staging
Anthony Liguori [Thu, 29 Sep 2011 18:33:47 +0000 (13:33 -0500)]
Merge remote-tracking branch 'kiszka/queues/slirp' into staging

13 years agoMerge remote-tracking branch 'aneesh/for-upstream-5' into staging
Anthony Liguori [Thu, 29 Sep 2011 18:32:05 +0000 (13:32 -0500)]
Merge remote-tracking branch 'aneesh/for-upstream-5' into staging

13 years agoAdd OpenBIOS as a submodule
Blue Swirl [Mon, 29 Aug 2011 21:13:29 +0000 (21:13 +0000)]
Add OpenBIOS as a submodule

Update OpenBIOS images to r1047 built from submodule.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoslirp: Fix packet expiration
Thomas Huth [Tue, 27 Sep 2011 09:20:38 +0000 (11:20 +0200)]
slirp: Fix packet expiration

The two new variables "arp_requested" and "expiration_date" in the mbuf
structure have been added after the variable-sized "m_dat_" array. The
variables have to be added before the m_dat_ array instead.
Without this patch, the expiration_date gets clobbered by code that
accesses the m_dat_ array.
I experienced this problem with the code in slirp/tftp.c: The
tftp_send_data() function created a new packet with the m_get()
function (which fills-in a default expiration_date value). Then the
TFTP code cleared the data section of the packet, which accidentially
also cleared the expiration_date. This zeroed expiration_date then
finally causes the packet to be discarded during if_start(), so that
TFTP packets were not transmitted anymore.

[Jan: added comment as suggested by Fabien ]

CC: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
13 years agoslirp: Fix use after release on tcp_input
Jan Kiszka [Mon, 26 Sep 2011 19:29:56 +0000 (21:29 +0200)]
slirp: Fix use after release on tcp_input

ti points into the m buffer. But the latter may already be released
right after the dodata: label. Move the test before the potential
release.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
13 years agoPPC: use memory API to construct the PCI hole
Blue Swirl [Sat, 17 Sep 2011 20:30:50 +0000 (20:30 +0000)]
PPC: use memory API to construct the PCI hole

Avoid vga.chain4 mapping by constructing a PCI hole for upper
2G of the PCI space.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoMerge remote-tracking branch 'qemu-kvm-tmp/memory/urgent' into staging
Anthony Liguori [Mon, 26 Sep 2011 13:00:47 +0000 (08:00 -0500)]
Merge remote-tracking branch 'qemu-kvm-tmp/memory/urgent' into staging

13 years agoMerge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging
Anthony Liguori [Mon, 26 Sep 2011 13:00:40 +0000 (08:00 -0500)]
Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging

13 years agoMerge remote-tracking branch 'qemu-kvm-tmp/memory/core' into staging
Anthony Liguori [Mon, 26 Sep 2011 13:00:29 +0000 (08:00 -0500)]
Merge remote-tracking branch 'qemu-kvm-tmp/memory/core' into staging

13 years agoMerge remote-tracking branch 'pmaydell/omap-for-upstream' into staging
Anthony Liguori [Mon, 26 Sep 2011 13:00:00 +0000 (08:00 -0500)]
Merge remote-tracking branch 'pmaydell/omap-for-upstream' into staging

13 years agoMerge remote-tracking branch 'riku/linux-user-for-upstream' into staging
Anthony Liguori [Mon, 26 Sep 2011 12:59:13 +0000 (07:59 -0500)]
Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging

13 years agoppc_prep: fix pci config space initialization
Avi Kivity [Sun, 25 Sep 2011 14:15:43 +0000 (17:15 +0300)]
ppc_prep: fix pci config space initialization

Use data_mem for the data mmio region, not conf_mem.

Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agofdc: Convert isabus_fdc_init1 to MemoryRegion
Richard Henderson [Wed, 10 Aug 2011 22:28:20 +0000 (15:28 -0700)]
fdc: Convert isabus_fdc_init1 to MemoryRegion

This requires some amount of hoop-jumping, so that we don't
inadvertently claim port 0x3f6, which is used by ISA IDE.

The sysbus initialization path is as yet unconverted.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoserial: Convert serial_isa_initfn to MemoryRegion
Richard Henderson [Wed, 10 Aug 2011 22:28:18 +0000 (15:28 -0700)]
serial: Convert serial_isa_initfn to MemoryRegion

The serial_mm_init path is as yet unconverted.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agopckbd: Convert to MemoryRegion
Richard Henderson [Wed, 10 Aug 2011 22:28:17 +0000 (15:28 -0700)]
pckbd: Convert to MemoryRegion

Slightly non-obvious with mips_jazz passing in the region
structure to populate.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoi8259: Convert to MemoryRegion
Richard Henderson [Wed, 10 Aug 2011 22:28:16 +0000 (15:28 -0700)]
i8259: Convert to MemoryRegion

The only non-obvious part is pic_poll_read which used
"addr1 >> 7" to detect whether one referred to either
the master or slave PIC.  Instead, test this directly.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoppc_prep: initialize i8259 after the ISA bus
Avi Kivity [Sun, 18 Sep 2011 13:13:38 +0000 (16:13 +0300)]
ppc_prep: initialize i8259 after the ISA bus

Succeeding i8259 conversion to ISA requires this.

Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agomips_r4k: initialize i8259 after the ISA bus
Avi Kivity [Sun, 18 Sep 2011 13:13:38 +0000 (16:13 +0300)]
mips_r4k: initialize i8259 after the ISA bus

Succeeding i8259 conversion to ISA requires this.

Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agomips_jazz: initialize i8259 after the ISA bus
Avi Kivity [Sun, 18 Sep 2011 13:13:38 +0000 (16:13 +0300)]
mips_jazz: initialize i8259 after the ISA bus

Succeeding i8259 conversion to ISA requires this.

Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agomips_malta: move i8259 initialization after piix4 initialization
Avi Kivity [Mon, 12 Sep 2011 10:00:05 +0000 (13:00 +0300)]
mips_malta: move i8259 initialization after piix4 initialization

i8259 is an ISA device (or at least, depends on the ISA infrastructure to
register its ioport); and the ISA bus is supplied by piix4.  Later patches
make this dependency explicit.

Use qemu_irq_proxy() to stop the cycle by adding an extra layer of
indirection.

Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoi8254: Convert to MemoryRegion
Richard Henderson [Wed, 10 Aug 2011 22:28:15 +0000 (15:28 -0700)]
i8254: Convert to MemoryRegion

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agocs4231a: Convert to MemoryRegion
Richard Henderson [Wed, 10 Aug 2011 22:28:14 +0000 (15:28 -0700)]
cs4231a: Convert to MemoryRegion

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>