Commit Graph

20540 Commits

Author SHA1 Message Date
Paolo Bonzini 7456e4ce8d build: move block/ objects to nested Makefile.objs
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07 09:21:13 +02:00
Paolo Bonzini 7f07b9cbc5 build: adapt qom/Makefile and move it to Makefile.objs
qom/ already used a separate makefile.  Convert it to use relative
paths, and make it declare both common-obj-y and user-obj-y.  This
way, the upper makefiles do not need to know that some QOM files
are compiled twice.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07 09:21:12 +02:00
Paolo Bonzini 99100dc3b5 build: move rules for nesting to Makefile.objs
At this point we will start adding nesting behavior to other files
than Makefile.target.  Because Makefile.objs is included by
Makefile.target, it is simpler to move the processing of
subdirectories there.

To enable this, only add per-target files to obj-y.  Use a separate
variable for the linker dependencies, all-obj-y.  This variable includes
obj-y and also all objects that are taken from other directories.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07 09:21:12 +02:00
Paolo Bonzini fbe37ef3e1 build: move other target-*/ objects to nested Makefile.objs
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07 09:21:11 +02:00
Paolo Bonzini 5f86146fb3 dump: remove dumping stuff from cpu-all.h
This simplifies things, because they will only be included for softmmu
targets and because the stubs are taken out-of-line in separate files,
which in the future could even be compiled only once.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07 09:20:17 +02:00
Paolo Bonzini 4720bd0506 dump: change cpu_get_note_size to return ssize_t
So that it can use the same prototype in both cases.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07 09:19:31 +02:00
Paolo Bonzini db2077692f dump: do not compile dump.o for user-mode emulation
It is not needed, because the monitor is not included.

Cc: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07 09:19:02 +02:00
Paolo Bonzini 9cdc8df314 build: move libobj-y variable to nested Makefile.objs
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07 07:19:23 +02:00
Paolo Bonzini 5e8861a036 build: move obj-TARGET-y variables to nested Makefile.objs
Also drop duplicate occurrence of device-hotplug.o.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07 07:17:36 +02:00
Paolo Bonzini 7fc5152c6d build: move *-user/ objects to nested Makefile.objs
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07 07:17:33 +02:00
Paolo Bonzini e05804eebc build: add rules for nesting
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>
2012-06-07 07:17:31 +02:00
Paolo Bonzini 4115852bb0 build: do not sprinkle around GENERATED_HEADERS dependencies
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>
2012-06-07 07:17:26 +02:00
Paolo Bonzini 046e7c5f93 build: remove trace-nested-y
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07 07:17:24 +02:00
Anthony Liguori 349417004a Merge remote-tracking branch 'qmp/queue/qmp' into staging
* 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
  ...
2012-06-06 20:57:56 +08:00
Anthony Liguori e1ae9a7a78 Merge remote-tracking branch 'afaerber-or/qom-cpu-3' into staging
* 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()
  ...
2012-06-06 17:55:07 +08:00
Anthony Liguori 6e72ae4690 Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
* qemu-kvm/uq/master:
  kvm: Fix build for non-CAP_IRQ_ROUTING targets
2012-06-06 17:23:59 +08:00
Jan Kiszka d3d3bef0a0 kvm: Fix build for non-CAP_IRQ_ROUTING targets
A type definition and a KVMState field initialization escaped the
required wrapping with KVM_CAP_IRQ_ROUTING. Also, we need to provide a
dummy kvm_irqchip_release_virq as virtio-pci references (but does not
use) it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Ben Collins <bcollins@ubuntu.com>
Tested-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
2012-06-06 11:41:33 +03:00
Anthony Liguori 721589dd74 Revert "Revert "rtl8139: do the network/host communication only in normal operating mode""
This reverts commit 9c92bf7f6c.

Per Jason's request.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-06-05 09:05:51 +08:00
Andreas Färber b7e516ce04 Kill off cpu_state_reset()
In commit 1bba0dc932 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>
2012-06-04 23:00:45 +02:00
Andreas Färber ff18b7625f linux-user: Use cpu_reset() after cpu_init() / cpu_copy()
Eliminates cpu_state_reset() usage.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-04 23:00:45 +02:00
Andreas Färber fdcb4fb685 bsd-user: Use cpu_reset() in after cpu_init()
Eliminates cpu_state_reset() usage.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-04 23:00:45 +02:00
Andreas Färber c537d79cc5 leon3: Store SPARCCPU in ResetData
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>
2012-06-04 23:00:45 +02:00
Andreas Färber 60ad073356 leon3: Use cpu_sparc_init() to obtain SPARCCPU
Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-04 23:00:45 +02:00
Andreas Färber 403d7a2d73 sun4u: Store SPARCCPU in ResetData
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>
2012-06-04 23:00:45 +02:00
Andreas Färber f9d1465f5b sun4u: Let cpu_devinit() return SPARCCPU
Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-04 23:00:45 +02:00
Andreas Färber 8ebdf9dcc6 sun4u: Use cpu_sparc_init() to obtain SPARCCPU
This prepares using it in sun4uv_init().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-04 23:00:45 +02:00
Andreas Färber 5414dec635 sun4m: Pass SPARCCPU to {main,secondary}_cpu_reset()
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>
2012-06-04 23:00:45 +02:00
Andreas Färber 8968f588e3 sun4m: Use cpu_sparc_init() to obtain SPARCCPU
Needed for {main,secondary}_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-04 23:00:45 +02:00
Andreas Färber e59be77a5b target-sparc: Let cpu_sparc_init() return SPARCCPU
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>
2012-06-04 23:00:45 +02:00
Andreas Färber c356a1bcc0 cpu-exec: Use cpu_reset() in cpu_exec() for TARGET_PPC
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>
2012-06-04 23:00:45 +02:00
Andreas Färber f8031482d7 virtex_ml507: Pass PowerPCCPU to main_cpu_reset()
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>
2012-06-04 23:00:44 +02:00
Andreas Färber 68281699ac virtex_ml507: Let ppc440_init_xilinx() return PowerPCCPU
Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
2012-06-04 23:00:44 +02:00
Andreas Färber d1d4938ba8 virtex_ml507: Use cpu_ppc_init() to obtain PowerPCCPU
Needed to change ppc440_init_xilinx() return type.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
2012-06-04 23:00:44 +02:00
Andreas Färber 5c3e735f9b ppc_prep: Pass PowerPCCPU to ppc_prep_reset()
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>
2012-06-04 23:00:44 +02:00
Andreas Färber a9bf3df021 ppc_prep: Use cpu_ppc_init() to obtain PowerPCCPU
Needed for ppc_prep_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
2012-06-04 23:00:44 +02:00
Andreas Färber cd79664f76 ppc_oldworld: Pass PowerPCCPU to ppc_heathrow_reset()
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>
2012-06-04 23:00:44 +02:00
Andreas Färber 72c33dd714 ppc_oldworld: Use cpu_ppc_init() to obtain PowerPCCPU
Needed for ppc_heathrow_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
2012-06-04 23:00:44 +02:00
Andreas Färber 6680988c30 ppc_newworld: Pass PowerPCCPU to ppc_core99_reset()
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>
2012-06-04 23:00:44 +02:00
Andreas Färber 8f8204ecb7 ppc_newworld: Use cpu_ppc_init() to obtain PowerPCCPU
Needed for ppc_core99_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
2012-06-04 23:00:44 +02:00
Andreas Färber 90cb09d9d3 ppc4xx_devs: Pass PowerPCCPU to ppc4xx_reset()
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>
2012-06-04 23:00:44 +02:00
Andreas Färber 572747136d ppc4xx_devs: Use cpu_ppc_init() to obtain PowerPCCPU
Needed for ppc4xx_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
2012-06-04 23:00:44 +02:00
Andreas Färber 182fbbf218 ppc440_bamboo: Pass PowerPCCPU to main_cpu_reset()
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>
2012-06-04 23:00:44 +02:00
Andreas Färber 322164e0db ppc440_bamboo: Use cpu_ppc_init() to obtain PowerPCCPU
Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
2012-06-04 23:00:44 +02:00
Andreas Färber 5b2038e049 spapr: Pass PowerPCCPU to spapr_cpu_reset()
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>
2012-06-04 23:00:44 +02:00
Andreas Färber 05769733e0 spapr: Use cpu_ppc_init() to obtain PowerPCCPU
Needed for spapr_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
2012-06-04 23:00:44 +02:00
Andreas Färber 38f92da6e7 ppce500_mpc8544ds: Pass PowerPCCPU to mpc8544ds_cpu_reset[_sec]
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>
2012-06-04 23:00:43 +02:00
Andreas Färber 397b457d86 target-ppc: Let cpu_ppc_init() return PowerPCCPU
Adapt e500 mpc8544ds machine accordingly.

Turn cpu_init() into a static inline function returning CPUPPCState for
backwards compatibility.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
2012-06-04 23:00:43 +02:00
Andreas Färber fa156e5127 mips_r4k: Store MIPSCPU in ResetData
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>
2012-06-04 23:00:43 +02:00
Andreas Färber 9ac67e2168 mips_r4k: Use cpu_mips_init() to obtain MIPSCPU
Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-04 23:00:43 +02:00
Andreas Färber 2d44fc8e2e mips_mipssim: Store MIPSCPU in ResetData
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>
2012-06-04 23:00:43 +02:00