]> git.proxmox.com Git - qemu.git/log
qemu.git
11 years agouhci: fix bandwidth management
Gerd Hoffmann [Fri, 11 May 2012 07:18:05 +0000 (09:18 +0200)]
uhci: fix bandwidth management

uhci_process_frame() can be invoked multiple times per frame, so
accounting usb bandwith in a local variable doesn't fly, use a variable
in UHCIState instead.  Also check the limit more frequently.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoMerge remote-tracking branch 'qmp/queue/qmp' into staging
Anthony Liguori [Wed, 6 Jun 2012 12:57:56 +0000 (20:57 +0800)]
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
  ...

11 years agoMerge remote-tracking branch 'afaerber-or/qom-cpu-3' into staging
Anthony Liguori [Wed, 6 Jun 2012 09:55:07 +0000 (17:55 +0800)]
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()
  ...

11 years agoMerge remote-tracking branch 'qemu-kvm/uq/master' into staging
Anthony Liguori [Wed, 6 Jun 2012 09:23:59 +0000 (17:23 +0800)]
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging

* qemu-kvm/uq/master:
  kvm: Fix build for non-CAP_IRQ_ROUTING targets

11 years agokvm: Fix build for non-CAP_IRQ_ROUTING targets
Jan Kiszka [Tue, 5 Jun 2012 19:03:57 +0000 (21:03 +0200)]
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>
11 years agoRevert "Revert "rtl8139: do the network/host communication only in normal operating...
Anthony Liguori [Tue, 5 Jun 2012 01:05:51 +0000 (09:05 +0800)]
Revert "Revert "rtl8139: do the network/host communication only in normal operating mode""

This reverts commit 9c92bf7f6c3f675e60b8ba8a5287bb88ea1eac36.

Per Jason's request.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoKill off cpu_state_reset()
Andreas Färber [Sat, 5 May 2012 13:43:31 +0000 (15:43 +0200)]
Kill off cpu_state_reset()

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>
11 years agolinux-user: Use cpu_reset() after cpu_init() / cpu_copy()
Andreas Färber [Sat, 5 May 2012 12:47:34 +0000 (14:47 +0200)]
linux-user: Use cpu_reset() after cpu_init() / cpu_copy()

Eliminates cpu_state_reset() usage.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agobsd-user: Use cpu_reset() in after cpu_init()
Andreas Färber [Sat, 5 May 2012 12:28:09 +0000 (14:28 +0200)]
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>
11 years agoleon3: Store SPARCCPU in ResetData
Andreas Färber [Fri, 4 May 2012 00:36:04 +0000 (02:36 +0200)]
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>
11 years agoleon3: Use cpu_sparc_init() to obtain SPARCCPU
Andreas Färber [Fri, 4 May 2012 00:33:34 +0000 (02:33 +0200)]
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>
11 years agosun4u: Store SPARCCPU in ResetData
Andreas Färber [Thu, 3 May 2012 01:41:16 +0000 (03:41 +0200)]
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>
11 years agosun4u: Let cpu_devinit() return SPARCCPU
Andreas Färber [Thu, 3 May 2012 01:33:52 +0000 (03:33 +0200)]
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>
11 years agosun4u: Use cpu_sparc_init() to obtain SPARCCPU
Andreas Färber [Thu, 3 May 2012 01:29:49 +0000 (03:29 +0200)]
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>
11 years agosun4m: Pass SPARCCPU to {main,secondary}_cpu_reset()
Andreas Färber [Thu, 3 May 2012 01:21:31 +0000 (03:21 +0200)]
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>
11 years agosun4m: Use cpu_sparc_init() to obtain SPARCCPU
Andreas Färber [Thu, 3 May 2012 01:14:37 +0000 (03:14 +0200)]
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>
11 years agotarget-sparc: Let cpu_sparc_init() return SPARCCPU
Andreas Färber [Thu, 3 May 2012 01:12:35 +0000 (03:12 +0200)]
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>
11 years agocpu-exec: Use cpu_reset() in cpu_exec() for TARGET_PPC
Andreas Färber [Fri, 4 May 2012 17:39:23 +0000 (19:39 +0200)]
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>
11 years agovirtex_ml507: Pass PowerPCCPU to main_cpu_reset()
Andreas Färber [Fri, 4 May 2012 16:20:07 +0000 (18:20 +0200)]
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>
11 years agovirtex_ml507: Let ppc440_init_xilinx() return PowerPCCPU
Andreas Färber [Fri, 4 May 2012 15:59:06 +0000 (17:59 +0200)]
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>
11 years agovirtex_ml507: Use cpu_ppc_init() to obtain PowerPCCPU
Andreas Färber [Fri, 4 May 2012 15:57:13 +0000 (17:57 +0200)]
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>
11 years agoppc_prep: Pass PowerPCCPU to ppc_prep_reset()
Andreas Färber [Fri, 4 May 2012 15:46:13 +0000 (17:46 +0200)]
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>
11 years agoppc_prep: Use cpu_ppc_init() to obtain PowerPCCPU
Andreas Färber [Fri, 4 May 2012 15:45:09 +0000 (17:45 +0200)]
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>
11 years agoppc_oldworld: Pass PowerPCCPU to ppc_heathrow_reset()
Andreas Färber [Fri, 4 May 2012 15:42:23 +0000 (17:42 +0200)]
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>
11 years agoppc_oldworld: Use cpu_ppc_init() to obtain PowerPCCPU
Andreas Färber [Fri, 4 May 2012 15:38:41 +0000 (17:38 +0200)]
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>
11 years agoppc_newworld: Pass PowerPCCPU to ppc_core99_reset()
Andreas Färber [Fri, 4 May 2012 15:30:25 +0000 (17:30 +0200)]
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>
11 years agoppc_newworld: Use cpu_ppc_init() to obtain PowerPCCPU
Andreas Färber [Fri, 4 May 2012 15:29:07 +0000 (17:29 +0200)]
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>
11 years agoppc4xx_devs: Pass PowerPCCPU to ppc4xx_reset()
Andreas Färber [Fri, 4 May 2012 15:22:20 +0000 (17:22 +0200)]
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>
11 years agoppc4xx_devs: Use cpu_ppc_init() to obtain PowerPCCPU
Andreas Färber [Fri, 4 May 2012 15:20:11 +0000 (17:20 +0200)]
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>
11 years agoppc440_bamboo: Pass PowerPCCPU to main_cpu_reset()
Andreas Färber [Fri, 4 May 2012 14:39:39 +0000 (16:39 +0200)]
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>
11 years agoppc440_bamboo: Use cpu_ppc_init() to obtain PowerPCCPU
Andreas Färber [Fri, 4 May 2012 14:35:51 +0000 (16:35 +0200)]
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>
11 years agospapr: Pass PowerPCCPU to spapr_cpu_reset()
Andreas Färber [Fri, 4 May 2012 15:49:38 +0000 (17:49 +0200)]
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>
11 years agospapr: Use cpu_ppc_init() to obtain PowerPCCPU
Andreas Färber [Thu, 3 May 2012 03:45:10 +0000 (05:45 +0200)]
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>
11 years agoppce500_mpc8544ds: Pass PowerPCCPU to mpc8544ds_cpu_reset[_sec]
Andreas Färber [Fri, 4 May 2012 00:09:06 +0000 (02:09 +0200)]
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>
11 years agotarget-ppc: Let cpu_ppc_init() return PowerPCCPU
Andreas Färber [Thu, 3 May 2012 03:43:05 +0000 (05:43 +0200)]
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>
11 years agomips_r4k: Store MIPSCPU in ResetData
Andreas Färber [Sat, 5 May 2012 12:23:25 +0000 (14:23 +0200)]
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>
11 years agomips_r4k: Use cpu_mips_init() to obtain MIPSCPU
Andreas Färber [Sat, 5 May 2012 12:21:43 +0000 (14:21 +0200)]
mips_r4k: Use cpu_mips_init() to obtain MIPSCPU

Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agomips_mipssim: Store MIPSCPU in ResetData
Andreas Färber [Sat, 5 May 2012 12:19:45 +0000 (14:19 +0200)]
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>
11 years agomips_mipssim: Use cpu_mips_init() to obtain MIPSCPU
Andreas Färber [Sat, 5 May 2012 12:17:49 +0000 (14:17 +0200)]
mips_mipssim: Use cpu_mips_init() to obtain MIPSCPU

Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agomips_malta: Pass MIPSCPU to main_cpu_reset()
Andreas Färber [Sat, 5 May 2012 12:14:00 +0000 (14:14 +0200)]
mips_malta: Pass MIPSCPU 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>
11 years agomips_malta: Use cpu_mips_init() to obtain MIPSCPU
Andreas Färber [Sat, 5 May 2012 12:11:48 +0000 (14:11 +0200)]
mips_malta: Use cpu_mips_init() to obtain MIPSCPU

Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agomips_jazz: Pass MIPSCPU to main_cpu_reset()
Andreas Färber [Sat, 5 May 2012 12:06:50 +0000 (14:06 +0200)]
mips_jazz: Pass MIPSCPU 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: Hervé Poussineau <hpoussin@reactos.org>
11 years agomips_jazz: Use cpu_mips_init() to obtain MIPSCPU
Andreas Färber [Sat, 5 May 2012 12:05:42 +0000 (14:05 +0200)]
mips_jazz: Use cpu_mips_init() to obtain MIPSCPU

Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Hervé Poussineau <hpoussin@reactos.org>
11 years agomips_fulong2e: Pass MIPSCPU to main_cpu_reset()
Andreas Färber [Sat, 5 May 2012 11:56:22 +0000 (13:56 +0200)]
mips_fulong2e: Pass MIPSCPU 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>
11 years agomips_fulong2e: Use cpu_mips_cpu() to obtain MIPSCPU
Andreas Färber [Sat, 5 May 2012 11:54:41 +0000 (13:54 +0200)]
mips_fulong2e: Use cpu_mips_cpu() to obtain MIPSCPU

Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-mips: Let cpu_mips_init() return MIPSCPU
Andreas Färber [Sat, 5 May 2012 11:33:04 +0000 (13:33 +0200)]
target-mips: Let cpu_mips_init() return MIPSCPU

Turn cpu_init macro into a static inline function returning CPUMIPSState
for backwards compatibility.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-mips: Use cpu_reset() in do_interrupt()
Andreas Färber [Sat, 5 May 2012 10:53:17 +0000 (12:53 +0200)]
target-mips: Use cpu_reset() in do_interrupt()

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-mips: Use cpu_reset() in cpu_mips_init()
Andreas Färber [Sat, 5 May 2012 11:06:10 +0000 (13:06 +0200)]
target-mips: Use cpu_reset() in cpu_mips_init()

Commit 0f71a7095db6bc055bc5bb520d85ea650cca8a33 (target-mips: QOM'ify
CPU) hooked up cpu_state_reset() to CPUClass::reset(). Dropping the
introduction of subclasses for 1.1, due to mips_def_t the reset code
could not be QOM'ified yet, i.e. cpu_state_reset() will not forward to
CPUClass::reset().

Update cpu_mips_init() with cpu_reset() nontheless, indirectly calling
cpu_state_reset(), so that generic code can be converted to call
cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agor2d: Store SuperHCPU in ResetData
Andreas Färber [Fri, 4 May 2012 16:40:14 +0000 (18:40 +0200)]
r2d: Store SuperHCPU 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>
11 years agor2d: Use cpu_sh4_init() to obtain SuperHCPU
Andreas Färber [Fri, 4 May 2012 16:38:01 +0000 (18:38 +0200)]
r2d: Use cpu_sh4_init() to obtain SuperHCPU

Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agotarget-sh4: Let cpu_sh4_init() return SuperHCPU
Andreas Färber [Fri, 4 May 2012 16:35:09 +0000 (18:35 +0200)]
target-sh4: Let cpu_sh4_init() return SuperHCPU

Turn cpu_init macro into a static inline function returning
CPUSH4State for backwards compatibility.

Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agopc: Pass X86CPU to pc_cpu_reset()
Andreas Färber [Wed, 2 May 2012 17:37:34 +0000 (19:37 +0200)]
pc: Pass X86CPU to pc_cpu_reset()

Allows us to use cpu_reset() in place of cpu_state_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
11 years agopc: Use cpu_x86_init() to obtain X86CPU
Andreas Färber [Wed, 2 May 2012 16:49:27 +0000 (18:49 +0200)]
pc: Use cpu_x86_init() to obtain X86CPU

Needed for pc_cpu_reset().

Also change return type to X86CPU.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
11 years agotarget-i386: Let cpu_x86_init() return X86CPU
Andreas Färber [Wed, 2 May 2012 16:42:46 +0000 (18:42 +0200)]
target-i386: Let cpu_x86_init() return X86CPU

Turn cpu_init macro into a static inline function returning CPUX86State
for backwards compatibility.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
11 years agotarget-i386: Pass X86CPU to do_cpu_{init,sipi}()
Andreas Färber [Fri, 4 May 2012 23:14:41 +0000 (01:14 +0200)]
target-i386: Pass X86CPU to do_cpu_{init,sipi}()

Allows to use cpu_reset() in place of cpu_state_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
11 years agomicroblaze_boot: Pass MicroBlazeCPU to microblaze_load_kernel()
Andreas Färber [Sat, 5 May 2012 10:30:53 +0000 (12:30 +0200)]
microblaze_boot: Pass MicroBlazeCPU to microblaze_load_kernel()

Allows us to use cpu_reset() in place of cpu_state_reset() in
main_cpu_reset().

Also pass it through to its reset callbacks, while at it.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agopetalogix_s3adsp1800_mmu: Use cpu_mb_init() to obtain MicroBlazeCPU
Andreas Färber [Sat, 5 May 2012 10:20:29 +0000 (12:20 +0200)]
petalogix_s3adsp1800_mmu: Use cpu_mb_init() to obtain MicroBlazeCPU

Needed for microblaze_load_kernel().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agopetalogix_ml605: Use cpu_mb_init() to obtain MicroBlazeCPU
Andreas Färber [Sat, 5 May 2012 10:19:03 +0000 (12:19 +0200)]
petalogix_ml605: Use cpu_mb_init() to obtain MicroBlazeCPU

Needed for microblaze_load_kernel().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agotarget-microblaze: Let cpu_mb_init() return MicroBlazeCPU
Andreas Färber [Sat, 5 May 2012 10:14:03 +0000 (12:14 +0200)]
target-microblaze: Let cpu_mb_init() return MicroBlazeCPU

Since qemu_init_vcpu() is no-op for CONFIG_USER_ONLY drop the env
variable that is now unused there.

Turn cpu_init macro into a static inline function returning CPUMBState
for backwards compatibility.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agocris-boot: Pass CRISCPU to main_cpu_reset().
Andreas Färber [Sat, 5 May 2012 09:58:29 +0000 (11:58 +0200)]
cris-boot: Pass CRISCPU 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: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agocris-boot: Pass CRISCPU to cris_load_image()
Andreas Färber [Sat, 5 May 2012 09:57:07 +0000 (11:57 +0200)]
cris-boot: Pass CRISCPU to cris_load_image()

Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoaxis_dev88: Use cpu_cris_init() to obtain CRISCPU
Andreas Färber [Sat, 5 May 2012 09:50:35 +0000 (11:50 +0200)]
axis_dev88: Use cpu_cris_init() to obtain CRISCPU

Needed for cris_load_image().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agotarget-cris: Let cpu_cris_init() return CRISCPU
Andreas Färber [Sat, 5 May 2012 09:37:07 +0000 (11:37 +0200)]
target-cris: Let cpu_cris_init() return CRISCPU

Turn cpu_init macro into a static inline function returning CPUCRISState
for backwards compatibility.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agotarget-cris: Reindent cpu_cris_init()
Andreas Färber [Sat, 5 May 2012 09:45:32 +0000 (11:45 +0200)]
target-cris: Reindent cpu_cris_init()

Judging by TCG variable initialization it used 8-char tabs; use 4 spaces
instead. Also remove trailing whitespace.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxtensa_lx60: Pass XtensaCPU to lx60_reset()
Andreas Färber [Fri, 4 May 2012 17:33:05 +0000 (19:33 +0200)]
xtensa_lx60: Pass XtensaCPU to lx60_reset()

Allows us to use cpu_reset() in place of cpu_state_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
11 years agoxtensa_lx60: Use cpu_xtensa_init() to obtain XtensaCPU
Andreas Färber [Fri, 4 May 2012 17:31:25 +0000 (19:31 +0200)]
xtensa_lx60: Use cpu_xtensa_init() to obtain XtensaCPU

Allows us to use cpu_reset() in place of cpu_state_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
11 years agoxtensa_sim: Pass XtensaCPU to sim_reset()
Andreas Färber [Fri, 4 May 2012 17:28:19 +0000 (19:28 +0200)]
xtensa_sim: Pass XtensaCPU to sim_reset()

Allows us to use cpu_reset() in place of cpu_state_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
11 years agoxtensa_sim: Use cpu_xtensa_init() to obtain XtensaCPU
Andreas Färber [Fri, 4 May 2012 17:26:57 +0000 (19:26 +0200)]
xtensa_sim: Use cpu_xtensa_init() to obtain XtensaCPU

Needed for sim_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
11 years agotarget-xtensa: Let cpu_xtensa_init() return XtensaCPU
Andreas Färber [Sun, 6 May 2012 10:41:53 +0000 (12:41 +0200)]
target-xtensa: Let cpu_xtensa_init() return XtensaCPU

Make the include paths for cpu-qom.h consistent to allow using XtensaCPU
in cpu.h.

Turn cpu_init macro into a static inline function returning
CPUXtensaState for backwards compatibility.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
11 years agomilkymist: Store LM32 in ResetInfo
Andreas Färber [Fri, 4 May 2012 17:05:02 +0000 (19:05 +0200)]
milkymist: Store LM32 in ResetInfo

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: Michael Walle <michael@walle.cc>
11 years agomilkymist: Use cpu_lm32_init() to obtain LM32CPU
Andreas Färber [Fri, 4 May 2012 17:03:24 +0000 (19:03 +0200)]
milkymist: Use cpu_lm32_init() to obtain LM32CPU

Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael Walle <michael@walle.cc>
11 years agolm32_boards: Store LM32CPU in ResetInfo
Andreas Färber [Fri, 4 May 2012 17:00:34 +0000 (19:00 +0200)]
lm32_boards: Store LM32CPU in ResetInfo

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: Michael Walle <michael@walle.cc>
11 years agolm32_boards: Use cpu_lm32_init() to obtain LM32CPU
Andreas Färber [Fri, 4 May 2012 16:55:25 +0000 (18:55 +0200)]
lm32_boards: Use cpu_lm32_init() to obtain LM32CPU

Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael Walle <michael@walle.cc>
11 years agotarget-lm32: Let cpu_lm32_init() return LM32CPU
Andreas Färber [Sun, 6 May 2012 10:40:55 +0000 (12:40 +0200)]
target-lm32: Let cpu_lm32_init() return LM32CPU

Make the include paths for cpu-qom.h consistent to allow using LM32CPU
in cpu.h.

Turn cpu_init macro into a static inline function returning CPULM32State
for backwards compatibility.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael Walle <michael@walle.cc>
11 years agoarm_boot: Pass ARMCPU to do_cpu_reset()
Andreas Färber [Sat, 5 May 2012 10:40:39 +0000 (12:40 +0200)]
arm_boot: Pass ARMCPU to do_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: Peter Maydell <peter.maydell@linaro.org>
11 years agoarmv7m: Pass ARMCPU to armv7m_reset()
Andreas Färber [Fri, 4 May 2012 14:11:34 +0000 (16:11 +0200)]
armv7m: Pass ARMCPU to armv7m_reset()

Allows us to use cpu_reset() in place of cpu_state_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoarmv7m: Use cpu_arm_init() to obtain ARMCPU
Andreas Färber [Fri, 4 May 2012 14:09:50 +0000 (16:09 +0200)]
armv7m: Use cpu_arm_init() to obtain ARMCPU

Needed for armv7m_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoomap: Use cpu_arm_init() to store ARMCPU in omap_mpu_state_s
Andreas Färber [Thu, 3 May 2012 22:42:39 +0000 (00:42 +0200)]
omap: Use cpu_arm_init() to store ARMCPU in omap_mpu_state_s

Fix tab indentations of comments, add braces, use cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agopxa2xx: Use cpu_arm_init() and store ARMCPU
Andreas Färber [Thu, 3 May 2012 21:47:04 +0000 (23:47 +0200)]
pxa2xx: Use cpu_arm_init() and store ARMCPU

Also use cpu_reset() in place of cpu_state_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agotarget-arm: Use cpu_reset() in cpu_arm_init()
Andreas Färber [Fri, 4 May 2012 17:14:38 +0000 (19:14 +0200)]
target-arm: Use cpu_reset() in cpu_arm_init()

Commit 3c30dd5a68e9fee6af67cfd0d14ed7520820f36a (target-arm: Move reset
handling to arm_cpu_reset) QOM'ified CPU reset. Complete it by replacing
cpu_state_reset() with cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoAdd 'query-events' command to QMP to query async events
Daniel P. Berrange [Mon, 21 May 2012 16:59:51 +0000 (17:59 +0100)]
Add 'query-events' command to QMP to query async events

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>
11 years agoqapi: convert netdev_del
Luiz Capitulino [Mon, 16 Apr 2012 17:36:32 +0000 (14:36 -0300)]
qapi: convert netdev_del

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-By: Laszlo Ersek <lersek@redhat.com>
11 years agoqapi: convert netdev_add
Luiz Capitulino [Wed, 18 Apr 2012 20:34:15 +0000 (17:34 -0300)]
qapi: convert netdev_add

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>
11 years agonet: net_client_init(): use error_set()
Luiz Capitulino [Fri, 20 Apr 2012 19:50:25 +0000 (16:50 -0300)]
net: net_client_init(): use error_set()

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>
11 years agonet: purge the monitor object from all init functions
Luiz Capitulino [Thu, 12 Apr 2012 16:20:40 +0000 (13:20 -0300)]
net: purge the monitor object from all init functions

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>
11 years agoqemu-config: introduce qemu_find_opts_err()
Luiz Capitulino [Wed, 28 Mar 2012 17:16:37 +0000 (14:16 -0300)]
qemu-config: introduce qemu_find_opts_err()

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>
11 years agoqemu-config: find_list(): use error_set()
Luiz Capitulino [Wed, 28 Mar 2012 17:14:17 +0000 (14:14 -0300)]
qemu-config: find_list(): use error_set()

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>
11 years agoqerror: introduce QERR_INVALID_OPTION_GROUP
Luiz Capitulino [Wed, 28 Mar 2012 17:01:15 +0000 (14:01 -0300)]
qerror: introduce QERR_INVALID_OPTION_GROUP

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-By: Laszlo Ersek <lersek@redhat.com>
11 years agoqemu-option: qemu_opts_from_qdict(): use error_set()
Luiz Capitulino [Wed, 18 Apr 2012 20:24:01 +0000 (17:24 -0300)]
qemu-option: qemu_opts_from_qdict(): use error_set()

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>
11 years agoqemu-option: introduce qemu_opt_set_err()
Luiz Capitulino [Wed, 21 Mar 2012 19:17:21 +0000 (16:17 -0300)]
qemu-option: introduce qemu_opt_set_err()

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>
11 years agoqemu-option: opt_set(): use error_set()
Luiz Capitulino [Wed, 21 Mar 2012 19:13:24 +0000 (16:13 -0300)]
qemu-option: opt_set(): use error_set()

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>
11 years agoqemu-option: qemu_opts_validate(): use error_set()
Luiz Capitulino [Thu, 12 Apr 2012 14:58:57 +0000 (11:58 -0300)]
qemu-option: qemu_opts_validate(): use error_set()

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>
11 years agoqemu-option: qemu_opt_parse(): use error_set()
Luiz Capitulino [Wed, 21 Mar 2012 18:21:26 +0000 (15:21 -0300)]
qemu-option: qemu_opt_parse(): use error_set()

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>
11 years agoqemu-option: parse_option_size(): use error_set()
Luiz Capitulino [Wed, 21 Mar 2012 18:03:45 +0000 (15:03 -0300)]
qemu-option: parse_option_size(): use error_set()

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-By: Laszlo Ersek <lersek@redhat.com>
11 years agoqemu-option: parse_option_bool(): use error_set()
Luiz Capitulino [Wed, 21 Mar 2012 17:54:42 +0000 (14:54 -0300)]
qemu-option: parse_option_bool(): use error_set()

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>
11 years agoqemu-option: parse_option_number(): use error_set()
Luiz Capitulino [Wed, 21 Mar 2012 17:37:44 +0000 (14:37 -0300)]
qemu-option: parse_option_number(): use error_set()

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>
11 years agoqemu-option: qemu_opts_create(): use error_set()
Luiz Capitulino [Tue, 20 Mar 2012 18:51:57 +0000 (15:51 -0300)]
qemu-option: qemu_opts_create(): use error_set()

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>
11 years agointroduce a new monitor command 'dump-guest-memory' to dump guest's memory
Wen Congyang [Mon, 7 May 2012 04:10:47 +0000 (12:10 +0800)]
introduce a new monitor command 'dump-guest-memory' to dump guest's memory

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>
11 years agomake gdb_id() generally avialable and rename it to cpu_index()
Wen Congyang [Mon, 7 May 2012 04:10:05 +0000 (12:10 +0800)]
make gdb_id() generally avialable and rename it to cpu_index()

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>
11 years agotarget-i386: Add API to get note's size
Wen Congyang [Mon, 7 May 2012 04:09:36 +0000 (12:09 +0800)]
target-i386: Add API to get note's size

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>