summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* build: add rules for nestingPaolo Bonzini2012-06-071-0/+39
| | | | | | | | | | | | | | This adds the 'magic' rules that take care of subdirectories. The subdirectory makefiles in the source tree are not complete; they only define some variables (listed in nested-vars) according to the configuration. The magic rules descend into subdirectory makefiles and gather the evaluated values of those variables. The values from all subdirectories are joined together, each prefixed with the subdirectory name, and used by the "real" makefiles. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: do not sprinkle around GENERATED_HEADERS dependenciesPaolo Bonzini2012-06-073-20/+13
| | | | | | | | Keeping GENERATED_HEADERS dependencies up-to-date everywhere is complex. We can simply make the Makefile depend on them, and they will be built before all other targets. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: remove trace-nested-yPaolo Bonzini2012-06-071-9/+4
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2012-06-0649-247/+2685
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qmp/queue/qmp: (29 commits) Add 'query-events' command to QMP to query async events qapi: convert netdev_del qapi: convert netdev_add net: net_client_init(): use error_set() net: purge the monitor object from all init functions qemu-config: introduce qemu_find_opts_err() qemu-config: find_list(): use error_set() qerror: introduce QERR_INVALID_OPTION_GROUP qemu-option: qemu_opts_from_qdict(): use error_set() qemu-option: introduce qemu_opt_set_err() qemu-option: opt_set(): use error_set() qemu-option: qemu_opts_validate(): use error_set() qemu-option: qemu_opt_parse(): use error_set() qemu-option: parse_option_size(): use error_set() qemu-option: parse_option_bool(): use error_set() qemu-option: parse_option_number(): use error_set() qemu-option: qemu_opts_create(): use error_set() introduce a new monitor command 'dump-guest-memory' to dump guest's memory make gdb_id() generally avialable and rename it to cpu_index() target-i386: Add API to get note's size ...
| * Add 'query-events' command to QMP to query async eventsDaniel P. Berrange2012-06-044-62/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes it is neccessary for an application to determine whether a particular QMP event is available, so they can decide whether to use compatibility code instead. This introduces a new 'query-events' command to QMP to do just that { "execute": "query-events" } {"return": [{"name": "WAKEUP"}, {"name": "SUSPEND"}, {"name": "DEVICE_TRAY_MOVED"}, {"name": "BLOCK_JOB_CANCELLED"}, {"name": "BLOCK_JOB_COMPLETED"}, ...snip... {"name": "SHUTDOWN"}]} * monitor.c: Turn MonitorEvent -> string conversion into a lookup from a static table of constant strings. Add impl of qmp_query_events monitor command handler * qapi-schema.json, qmp-commands.hx: Define contract of query-events command Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: convert netdev_delLuiz Capitulino2012-06-047-13/+31
| | | | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qapi: convert netdev_addLuiz Capitulino2012-06-047-19/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not a full QAPI conversion, but an intermediate step. In essence, do_netdev_add() is split into three functions: 1. netdev_add(): performs the actual work. This function is fully converted to Error (thus, it's "qapi-friendly") 2. qmp_netdev_add(): the QMP front-end for netdev_add(). This is coded by hand and not auto-generated (gen=no in the schema). The reason for this it's a lot easier and simpler to with QemuOpts this way 3. hmp_netdev_add(): HMP front-end. This design was suggested by Paolo Bonzini. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * net: net_client_init(): use error_set()Luiz Capitulino2012-06-044-21/+50
| | | | | | | | | | | | | | | | Callers are changed to use qerror_report_err() to keep their QError semantics. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * net: purge the monitor object from all init functionsLuiz Capitulino2012-06-0415-43/+27
| | | | | | | | | | | | | | | | The only backend that really uses it is the socket one, which calls monitor_get_fd(). But it can use 'cur_mon' instead. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qemu-config: introduce qemu_find_opts_err()Luiz Capitulino2012-06-042-0/+8
| | | | | | | | | | | | | | | | | | | | This is like qemu_find_opts(), except that it takes an Error argument. This new function allows for a incremental conversion of code using qemu_find_opts(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qemu-config: find_list(): use error_set()Luiz Capitulino2012-06-041-7/+25
| | | | | | | | | | | | | | | | Note that qemu_find_opts() and qemu_config_parse() need to call error_report() to maintain their semantics on error. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qerror: introduce QERR_INVALID_OPTION_GROUPLuiz Capitulino2012-06-042-0/+7
| | | | | | | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qemu-option: qemu_opts_from_qdict(): use error_set()Luiz Capitulino2012-06-044-11/+35
| | | | | | | | | | | | | | | | do_device_add() and do_netdev_add() call qerror_report_err() to maintain their QError semantics. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qemu-option: introduce qemu_opt_set_err()Luiz Capitulino2012-06-042-0/+8
| | | | | | | | | | | | | | | | | | | | This is like qemu_opt_set(), except that it takes an Error argument. This new function allows for a incremental conversion of code using qemu_opt_set(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qemu-option: opt_set(): use error_set()Luiz Capitulino2012-06-041-11/+20
| | | | | | | | | | | | | | | | | | The functions qemu_opt_set() and opts_do_parse() both call opt_set(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qemu-option: qemu_opts_validate(): use error_set()Luiz Capitulino2012-06-043-10/+11
| | | | | | | | | | | | | | | | net_client_init() propagates the error up by calling qerror_report_err(), because its users expect QError semantics. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qemu-option: qemu_opt_parse(): use error_set()Luiz Capitulino2012-06-041-19/+17
| | | | | | | | | | | | | | | | | | The functions opt_set() and qemu_opts_validate() both call qemu_opt_parse(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qemu-option: parse_option_size(): use error_set()Luiz Capitulino2012-06-041-9/+8
| | | | | | | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qemu-option: parse_option_bool(): use error_set()Luiz Capitulino2012-06-041-8/+16
| | | | | | | | | | | | | | | | | | Note that set_option_parameter() callers still expect automatic error reporting with QError, so set_option_parameter() calls qerror_report_err() to keep the same semantics. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qemu-option: parse_option_number(): use error_set()Luiz Capitulino2012-06-041-7/+19
| | | | | | | | | | | | | | | | | | Note that qemu_opt_parse() callers still expect automatic error reporting with QError, so qemu_opts_parse() calls qerror_report_err() to keep the same semantics. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * qemu-option: qemu_opts_create(): use error_set()Luiz Capitulino2012-06-049-32/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit converts qemu_opts_create() from qerror_report() to error_set(). Currently, most calls to qemu_opts_create() can't fail, so most callers don't need any changes. The two cases where code checks for qemu_opts_create() erros are: 1. Initialization code in vl.c. All of them print their own error messages directly to stderr, no need to pass the Error object 2. The functions opts_parse(), qemu_opts_from_qdict() and qemu_chr_parse_compat() make use of the error information and they can be called from HMP or QMP. In this case, to allow for incremental conversion, we propagate the error up using qerror_report_err(), which keeps the QError semantics Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
| * introduce a new monitor command 'dump-guest-memory' to dump guest's memoryWen Congyang2012-06-0410-0/+1050
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command's usage: dump-guest-memory [-p] protocol [begin] [length] The supported protocol can be file or fd: 1. file: the protocol starts with "file:", and the following string is the file's path. 2. fd: the protocol starts with "fd:", and the following string is the fd's name. Note: 1. If you want to use gdb to process the core, please specify -p option. The reason why the -p option is not default is: a. guest machine in a catastrophic state can have corrupted memory, which we cannot trust. b. The guest machine can be in read-mode even if paging is enabled. For example: the guest machine uses ACPI to sleep, and ACPI sleep state goes in real-mode. 2. If you don't want to dump all guest's memory, please specify the start physical address and the length. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * make gdb_id() generally avialable and rename it to cpu_index()Wen Congyang2012-06-042-14/+14
| | | | | | | | | | | | | | | | | | The following patch also needs this API, so make it generally avialable. The function gdb_id() will not be used in gdbstub.c now, so its name is not suitable, and rename it to cpu_index() Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * target-i386: Add API to get note's sizeWen Congyang2012-06-042-0/+39
| | | | | | | | | | | | | | | | | | We should know where the note and memory is stored before writing them to vmcore. If we know this, we can avoid using lseek() when creating vmcore. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * target-i386: add API to get dump infoWen Congyang2012-06-043-0/+64
| | | | | | | | | | | | | | | | | | Dump info contains: endian, class and architecture. The next patch will use these information to create vmcore. Note: on x86 box, the class is ELFCLASS64 if the memory is larger than 4G. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * target-i386: Add API to write cpu status to core fileWen Congyang2012-06-042-0/+167
| | | | | | | | | | | | | | | | | | The core file has register's value. But it does not include all registers value. Store the cpu status into QEMU note, and the user can get more information from vmcore. If you change QEMUCPUState, please count up QEMUCPUSTATE_VERSION. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * target-i386: Add API to write elf notes to core fileWen Congyang2012-06-044-0/+260
| | | | | | | | | | | | | | | | The core file contains register's value. These APIs write registers to core file, and them will be called in the following patch. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * Add API to get memory mapping without do pagingWen Congyang2012-06-042-0/+12
| | | | | | | | | | | | | | | | | | | | | | crash does not need the virtual address and physical address mapping, and the mapping does not include the memory that is not referenced by the page table. crash does not use the virtual address, so we can create the mapping for all physical memory(virtual address is always 0). This patch provides a API to do this thing, and it will be used in the following patch. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * Add API to get memory mappingWen Congyang2012-06-042-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | Add API to get all virtual address and physical address mapping. If the guest doesn't use paging, the virtual address is equal to the phyical address. The virtual address and physical address mapping is for gdb's user, and it does not include the memory that is not referenced by the page table. So if you want to use crash to anaylze the vmcore, please do not specify -p option. the reason why the -p option is not default explicitly: guest machine in a catastrophic state can have corrupted memory, which we cannot trust. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * Add API to check whether paging mode is enabledWen Congyang2012-06-042-1/+12
| | | | | | | | | | | | | | This API will be used in the following patch. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * implement cpu_get_memory_mapping()Wen Congyang2012-06-045-0/+288
| | | | | | | | | | | | | | | | | | Walk cpu's page table and collect all virtual address and physical address mapping. Then, add these mapping into memory mapping list. If the guest does not use paging, it will do nothing. Note: the I/O memory will be skipped. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * Add API to check whether a physical address is I/O addressWen Congyang2012-06-042-0/+16
| | | | | | | | | | | | | | This API will be used in the following patch. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * Add API to create memory mapping listWen Congyang2012-06-043-0/+214
| | | | | | | | | | | | | | | | | | The memory mapping list stores virtual address and physical address mapping. The virtual address and physical address are contiguous in the mapping. The folloing patch will use this information to create PT_LOAD in the vmcore. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | Merge remote-tracking branch 'afaerber-or/qom-cpu-3' into stagingAnthony Liguori2012-06-0673-390/+517
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * afaerber-or/qom-cpu-3: (74 commits) Kill off cpu_state_reset() linux-user: Use cpu_reset() after cpu_init() / cpu_copy() bsd-user: Use cpu_reset() in after cpu_init() leon3: Store SPARCCPU in ResetData leon3: Use cpu_sparc_init() to obtain SPARCCPU sun4u: Store SPARCCPU in ResetData sun4u: Let cpu_devinit() return SPARCCPU sun4u: Use cpu_sparc_init() to obtain SPARCCPU sun4m: Pass SPARCCPU to {main,secondary}_cpu_reset() sun4m: Use cpu_sparc_init() to obtain SPARCCPU target-sparc: Let cpu_sparc_init() return SPARCCPU cpu-exec: Use cpu_reset() in cpu_exec() for TARGET_PPC virtex_ml507: Pass PowerPCCPU to main_cpu_reset() virtex_ml507: Let ppc440_init_xilinx() return PowerPCCPU virtex_ml507: Use cpu_ppc_init() to obtain PowerPCCPU ppc_prep: Pass PowerPCCPU to ppc_prep_reset() ppc_prep: Use cpu_ppc_init() to obtain PowerPCCPU ppc_oldworld: Pass PowerPCCPU to ppc_heathrow_reset() ppc_oldworld: Use cpu_ppc_init() to obtain PowerPCCPU ppc_newworld: Pass PowerPCCPU to ppc_core99_reset() ...
| * | Kill off cpu_state_reset()Andreas Färber2012-06-0413-61/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 1bba0dc932e8826a7d030df3767daf0bc339f9a2 cpu_reset() was renamed to cpu_state_reset(), to allow introducing a new cpu_reset() that would operate on QOM objects. All callers have been updated except for one in target-mips, so drop all implementations except for the one in target-mips and move the declaration there until MIPSCPU reset can be fully QOM'ified. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc> (for lm32) Acked-by: Max Filippov <jcmvbkbc@gmail.com> (for xtensa) Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> (for mb + cris) Acked-by: Alexander Graf <agraf@suse.de> (for ppc) Acked-by: Blue Swirl <blauwirbel@gmail.com>
| * | linux-user: Use cpu_reset() after cpu_init() / cpu_copy()Andreas Färber2012-06-042-2/+2
| | | | | | | | | | | | | | | | | | Eliminates cpu_state_reset() usage. Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | bsd-user: Use cpu_reset() in after cpu_init()Andreas Färber2012-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | Eliminates cpu_state_reset() usage. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
| * | leon3: Store SPARCCPU in ResetDataAndreas Färber2012-06-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset() in main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
| * | leon3: Use cpu_sparc_init() to obtain SPARCCPUAndreas Färber2012-06-041-2/+4
| | | | | | | | | | | | | | | | | | | | | Needed for main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
| * | sun4u: Store SPARCCPU in ResetDataAndreas Färber2012-06-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | We can now use cpu_reset() in place of cpu_state_reset() in main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
| * | sun4u: Let cpu_devinit() return SPARCCPUAndreas Färber2012-06-041-3/+5
| | | | | | | | | | | | | | | | | | | | | Needed for main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
| * | sun4u: Use cpu_sparc_init() to obtain SPARCCPUAndreas Färber2012-06-041-3/+6
| | | | | | | | | | | | | | | | | | | | | This prepares using it in sun4uv_init(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
| * | sun4m: Pass SPARCCPU to {main,secondary}_cpu_reset()Andreas Färber2012-06-041-6/+8
| | | | | | | | | | | | | | | | | | | | | We can now use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
| * | sun4m: Use cpu_sparc_init() to obtain SPARCCPUAndreas Färber2012-06-041-2/+4
| | | | | | | | | | | | | | | | | | | | | Needed for {main,secondary}_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
| * | target-sparc: Let cpu_sparc_init() return SPARCCPUAndreas Färber2012-06-042-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make include paths for cpu-qom.h consistent, so that SPARCCPU can be used in cpu.h. Turn cpu_init macro into a static inline function returning CPUSPARCState for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
| * | cpu-exec: Use cpu_reset() in cpu_exec() for TARGET_PPCAndreas Färber2012-06-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | CPUState will be needed for all targets in the future, so place it into the main variable declaration block. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Alexander Graf <agraf@suse.de>
| * | virtex_ml507: Pass PowerPCCPU to main_cpu_reset()Andreas Färber2012-06-041-3/+4
| | | | | | | | | | | | | | | | | | | | | Allows us to call cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Alexander Graf <agraf@suse.de>
| * | virtex_ml507: Let ppc440_init_xilinx() return PowerPCCPUAndreas Färber2012-06-041-6/+8
| | | | | | | | | | | | | | | | | | | | | Needed for main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Alexander Graf <agraf@suse.de>
| * | virtex_ml507: Use cpu_ppc_init() to obtain PowerPCCPUAndreas Färber2012-06-041-2/+4
| | | | | | | | | | | | | | | | | | | | | Needed to change ppc440_init_xilinx() return type. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Alexander Graf <agraf@suse.de>
| * | ppc_prep: Pass PowerPCCPU to ppc_prep_reset()Andreas Färber2012-06-041-3/+3
| | | | | | | | | | | | | | | | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Alexander Graf <agraf@suse.de>
OpenPOWER on IntegriCloud