sdk/emulator/qemu.git
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 years agotarget-microblaze: lwx/swx: first implementation
Peter A. G. Crosthwaite [Fri, 1 Jun 2012 03:23:28 +0000 (13:23 +1000)]
target-microblaze: lwx/swx: first implementation

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agoRevert "rtl8139: do the network/host communication only in normal operating mode"
Jason Wang [Thu, 10 May 2012 08:37:22 +0000 (16:37 +0800)]
Revert "rtl8139: do the network/host communication only in normal operating mode"

This reverts commit ff71f2e8cacefae99179993204172bc65e4303df. This is because
the linux 8139cp driver would leave the card in "Config Register Write Enable"
mode after the eeprom were read or write ( which is unexpected in the spec
). Also a physical 8139 card can still DMA into host memory in modes other than
Normal mode, so we need revert this commit to align with the behavior of
physical card.

The issue of 8139cp driver should be fixed in linux seperately.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMerge remote-tracking branch 'qemu-kvm/uq/master' into staging
Anthony Liguori [Sat, 2 Jun 2012 23:56:23 +0000 (07:56 +0800)]
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging

* qemu-kvm/uq/master:
  virtio/vhost: Add support for KVM in-kernel MSI injection
  msix: Add msix_nr_vectors_allocated
  kvm: Enable use of kvm_irqchip_in_kernel in hwlib code
  kvm: Introduce kvm_irqchip_add/remove_irqfd
  kvm: Make kvm_irqchip_commit_routes an internal service
  kvm: Publicize kvm_irqchip_release_virq
  kvm: Introduce kvm_irqchip_add_msi_route
  kvm: Rename kvm_irqchip_add_route to kvm_irqchip_add_irq_route
  msix: Introduce vector notifiers
  msix: Invoke msix_handle_mask_update on msix_mask_all
  msix: Factor out msix_get_message
  kvm: update vmxcap for EPT A/D, INVPCID, RDRAND, VMFUNC
  kvm: Enable in-kernel irqchip support by default
  kvm: Add support for direct MSI injections
  kvm: Update kernel headers
  kvm: x86: Wire up MSI support for in-kernel irqchip
  pc: Enable MSI support at APIC level
  kvm: Introduce basic MSI support for in-kernel irqchips
  Introduce MSIMessage structure
  kvm: Refactor KVMState::max_gsi to gsi_count

12 years agoMerge remote-tracking branch 'kwolf/for-anthony' into staging
Anthony Liguori [Sat, 2 Jun 2012 23:54:05 +0000 (07:54 +0800)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging

* kwolf/for-anthony:
  ahci: SATA FIS is 20 bytes, not 0x20
  virtio-blk: Fix geometry sector calculation
  block: prevent snapshot mode $TMPDIR symlink attack
  sheepdog: fix return value of do_load_save_vm_state
  virtio: Fix compiler warning for non Linux hosts

12 years agoUpdate version to open the 1.2 development branch
Anthony Liguori [Fri, 1 Jun 2012 08:56:16 +0000 (16:56 +0800)]
Update version to open the 1.2 development branch

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoUpdate version for 1.1.0 release
Anthony Liguori [Fri, 1 Jun 2012 08:55:34 +0000 (16:55 +0800)]
Update version for 1.1.0 release

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoUpdate version for 1.1.0-rc4 release
Anthony Liguori [Thu, 31 May 2012 00:53:39 +0000 (08:53 +0800)]
Update version for 1.1.0-rc4 release

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMerge remote-tracking branch 'origin/master' into staging
Anthony Liguori [Thu, 31 May 2012 00:49:46 +0000 (08:49 +0800)]
Merge remote-tracking branch 'origin/master' into staging

* origin/master:
  pc-bios: Update OpenBIOS images

12 years agopc-bios: Update OpenBIOS images
Blue Swirl [Wed, 30 May 2012 17:04:41 +0000 (17:04 +0000)]
pc-bios: Update OpenBIOS images

Update OpenBIOS images to r1060 built from submodule.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoahci: SATA FIS is 20 bytes, not 0x20
Daniel Verkamp [Tue, 22 May 2012 23:26:42 +0000 (16:26 -0700)]
ahci: SATA FIS is 20 bytes, not 0x20

As in the SATA and AHCI specifications, a FIS is 5 Dwords of 4 bytes
each, which comes to 20 bytes (decimal), not 0x20.

Signed-off-by: Daniel Verkamp <daniel@drv.nu>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agovirtio-blk: Fix geometry sector calculation
Christian Borntraeger [Thu, 24 May 2012 11:22:55 +0000 (13:22 +0200)]
virtio-blk: Fix geometry sector calculation

Currently the sector value for the geometry is masked, even if the
user usesa command line parameter that explicitely gives a number.
This breaks dasd devices on s390. A dasd device can have
a physical block size of 4096 (== same for logical block size)
and a typcial geometry of 15 heads and 12 sectors per cyl.
The ibm partition detection relies on a correct geometry
reported by the device. Unfortunately the current code changes
12 to 8. This would be necessary if the total size is
not a multiple of logical sector size,  but for dasd this
is not the case.

This patch checks the device size and only applies sector
mask if necessary.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
CC: Christoph Hellwig <hch@lst.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: prevent snapshot mode $TMPDIR symlink attack
Jim Meyering [Mon, 28 May 2012 07:27:54 +0000 (09:27 +0200)]
block: prevent snapshot mode $TMPDIR symlink attack

In snapshot mode, bdrv_open creates an empty temporary file without
checking for mkstemp or close failure, and ignoring the possibility
of a buffer overrun given a surprisingly long $TMPDIR.
Change the get_tmp_filename function to return int (not void),
so that it can inform its two callers of those failures.
Also avoid the risk of buffer overrun and do not ignore mkstemp
or close failure.
Update both callers (in block.c and vvfat.c) to propagate
temp-file-creation failure to their callers.

get_tmp_filename creates and closes an empty file, while its
callers later open that presumed-existing file with O_CREAT.
The problem was that a malicious user could provoke mkstemp failure
and race to create a symlink with the selected temporary file name,
thus causing the qemu process (usually root owned) to open through
the symlink, overwriting an attacker-chosen file.

This addresses CVE-2012-2652.
http://bugzilla.redhat.com/CVE-2012-2652

Signed-off-by: Jim Meyering <meyering@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agosheepdog: fix return value of do_load_save_vm_state
MORITA Kazutaka [Tue, 29 May 2012 16:05:15 +0000 (01:05 +0900)]
sheepdog: fix return value of do_load_save_vm_state

bdrv_save_vmstate and bdrv_load_vmstate should return the vmstate size
on success, and -errno on error.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agovirtio: Fix compiler warning for non Linux hosts
Stefan Weil [Tue, 22 May 2012 21:23:32 +0000 (23:23 +0200)]
virtio: Fix compiler warning for non Linux hosts

The local variables ret, i are only used if __linux__ is defined.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoMerge remote-tracking branch 'mdroth/qga-pull-5-29-12-v2' into staging
Anthony Liguori [Wed, 30 May 2012 07:02:03 +0000 (15:02 +0800)]
Merge remote-tracking branch 'mdroth/qga-pull-5-29-12-v2' into staging

* mdroth/qga-pull-5-29-12-v2:
  qemu-ga: avoid blocking on atime update when reading /etc/mtab
  qemu-ga: Fix use of environ on Darwin

12 years agoblock: prevent snapshot mode $TMPDIR symlink attack
Jim Meyering [Mon, 28 May 2012 07:27:54 +0000 (09:27 +0200)]
block: prevent snapshot mode $TMPDIR symlink attack

In snapshot mode, bdrv_open creates an empty temporary file without
checking for mkstemp or close failure, and ignoring the possibility
of a buffer overrun given a surprisingly long $TMPDIR.
Change the get_tmp_filename function to return int (not void),
so that it can inform its two callers of those failures.
Also avoid the risk of buffer overrun and do not ignore mkstemp
or close failure.
Update both callers (in block.c and vvfat.c) to propagate
temp-file-creation failure to their callers.

get_tmp_filename creates and closes an empty file, while its
callers later open that presumed-existing file with O_CREAT.
The problem was that a malicious user could provoke mkstemp failure
and race to create a symlink with the selected temporary file name,
thus causing the qemu process (usually root owned) to open through
the symlink, overwriting an attacker-chosen file.

This addresses CVE-2012-2652.
http://bugzilla.redhat.com/CVE-2012-2652

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoxhci: add usage info to docs
Gerd Hoffmann [Tue, 29 May 2012 09:20:31 +0000 (11:20 +0200)]
xhci: add usage info to docs

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agovnc: fix segfault in vnc_display_pw_expire()
Gerd Hoffmann [Thu, 24 May 2012 08:55:01 +0000 (10:55 +0200)]
vnc: fix segfault in vnc_display_pw_expire()

NULL pointer dereference in case no vnc server is configured.
Catch this and return -EINVAL like vnc_display_password() does.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoExpose CPUID leaf 7 only for -cpu host
Eduardo Habkost [Mon, 21 May 2012 14:27:02 +0000 (11:27 -0300)]
Expose CPUID leaf 7 only for -cpu host

Changes v2 -> v3;
  - Check for kvm_enabled() before setting cpuid_7_0_ebx_features

Changes v1 -> v2:
  - Use kvm_arch_get_supported_cpuid() instead of host_cpuid() on
    cpu_x86_fill_host().

  We should use GET_SUPPORTED_CPUID for all bits on "-cpu host"
  eventually, but I am not changing all the other CPUID leaves because
  we may not be able to test such an intrusive change in time for 1.1.

Description of the bug:

Since QEMU 0.15, the CPUID information on CPUID[EAX=7,ECX=0] is being
returned unfiltered to the guest, directly from the GET_SUPPORTED_CPUID
return value.

The problem is that this makes the resulting CPU feature flags
unpredictable and dependent on the host CPU and kernel version. This
breaks live-migration badly if migrating from a host CPU that supports
some features on that CPUID leaf (running a recent kernel) to a kernel
or host CPU that doesn't support it.

Migration also is incorrect (the virtual CPU changes under the guest's
feet) if you migrate in the opposite direction (from an old CPU/kernel
to a new CPU/kernel), but with less serious consequences (guests
normally query CPUID information only once on boot).

Fortunately, the bug affects only users using cpudefs with level >= 7.

The right behavior should be to explicitly enable those features on
[cpudef] config sections or on the "-cpu" command-line arguments. Right
now there is no predefined CPU model on QEMU that has those features:
the latest Intel model we have is Sandy Bridge.

I would like to get this fixed on 1.1, so I am submitting this patch,
that enables those features only if "-cpu host" is being used (as we
don't have any pre-defined CPU model that actually have those features).
After 1.1 is released, we can make those features properly configurable
on [cpudef] and -cpu configuration.

One problem is: with this patch, users with the following setup:
- Running QEMU 1.0;
- Using a cpudef having level >= 7;
- Running a kernel that supports the features on CPUID leaf 7; and
- Running on a CPU that supports some features on CPUID leaf 7
won't be able to live-migrate to QEMU 1.1. But for these users
live-migration is already broken (they can't live-migrate to hosts with
older CPUs or older kernels, already), I don't see how to avoid this
problem.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqemu-ga: avoid blocking on atime update when reading /etc/mtab
Michael Roth [Tue, 29 May 2012 15:08:50 +0000 (10:08 -0500)]
qemu-ga: avoid blocking on atime update when reading /etc/mtab

Currently we re-read/re-process /etc/mtab to get an updated list of
mounts when guest-fsfreeze-thaw is called. This can cause an atime
update on /etc/mtab, which will block if we're in a frozen state.

Instead, use /proc's version of mtab, which may not be up-to-date with
options passed via -o remount, but is compatible for our use cases since
we only care about the filesystem type.

Reported-by: Matsuda, Daiki <matsudadik@intellilink.co.jp>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
12 years agoqemu-ga: Fix use of environ on Darwin
Andreas Färber [Sun, 27 May 2012 15:02:20 +0000 (17:02 +0200)]
qemu-ga: Fix use of environ on Darwin

Use _NSGetEnviron() helper to access the environment.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Charlie Somerville <charlie@charliesomerville.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
12 years agopci: call object_unparent() before free_qdev()
Amos Kong [Sun, 20 May 2012 09:57:45 +0000 (17:57 +0800)]
pci: call object_unparent() before free_qdev()

Start VM with 8 multiple-function block devs, hot-removing
those block devs by 'device_del ...' would cause qemu abort.

| (qemu) device_del virti0-0-0
| (qemu) **
|ERROR:qom/object.c:389:object_delete: assertion failed: (obj->ref == 0)

It's a regression introduced by commit 57c9fafe

The whole PCI slot should be removed once. Currently only one func
is cleaned in pci_unplug_device(), if you try to remove a single
func by monitor cmd.

free_qdev() are called for all functions in slot,
but unparent_delete() is only called for one
function.

Signed-off-by: XXXX
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agofix multiboot loading if load_end_addr == 0
Scott Moser [Mon, 26 Mar 2012 19:27:00 +0000 (15:27 -0400)]
fix multiboot loading if load_end_addr == 0

The previous multiboot load code did not treat the case where
load_end_addr was 0 specially.  The multiboot specification says the
following:
 * load_end_addr
   Contains the physical address of the end of the data segment.
   (load_end_addr - load_addr) specifies how much data to load. This
   implies that the text and data segments must be consecutive in the
   OS image; this is true for existing a.out executable formats. If
   this field is zero, the boot loader assumes that the text and data
   segments occupy the whole OS image file.

Signed-off-by: Scott Moser <smoser@ubuntu.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agovga: fix vram double-mapping with -vga std and -M pc-0.12
Avi Kivity [Wed, 9 May 2012 15:23:06 +0000 (18:23 +0300)]
vga: fix vram double-mapping with -vga std and -M pc-0.12

With pc-0.12, we map the video RAM both through the PCI BAR (the guest does
this) and through a fixed mapping at 0xe0000000.  The memory API doesn't allow
this double map, and aborts.

Fix by using an alias.

Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMerge remote-tracking branch 'afaerber-or/cocoa-for-upstream' into staging
Anthony Liguori [Tue, 29 May 2012 11:54:16 +0000 (06:54 -0500)]
Merge remote-tracking branch 'afaerber-or/cocoa-for-upstream' into staging

* afaerber-or/cocoa-for-upstream:
  cocoa: Suppress Cocoa frontend for -qtest
  arch_init: Fix AltiVec build on Darwin/ppc

12 years agococoa: Suppress Cocoa frontend for -qtest
Andreas Färber [Mon, 28 May 2012 01:18:31 +0000 (03:18 +0200)]
cocoa: Suppress Cocoa frontend for -qtest

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
12 years agoarch_init: Fix AltiVec build on Darwin/ppc
Andreas Färber [Sun, 27 May 2012 14:21:02 +0000 (16:21 +0200)]
arch_init: Fix AltiVec build on Darwin/ppc

Commit f29a56147b66845914d0a645bf9b4c5bb9a6af57 (implement
-no-user-config command-line option (v3)) introduced uses of bool
in arch_init.c. Shortly before that usage is support code for
AltiVec (conditional to __ALTIVEC__).

GCC's altivec.h may in a !__APPLE_ALTIVEC__ code path redefine bool,
leading to type mismatches. altivec.h recommends to #undef for C++
compatibility, but doing so in C leads to bool remaining undefined.

Fix by redefining bool to _Bool as mandated for stdbool.h by POSIX.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
12 years agoMerge remote-tracking branch 'sstabellini/for_1.1_rc3' into staging
Anthony Liguori [Tue, 29 May 2012 09:32:13 +0000 (04:32 -0500)]
Merge remote-tracking branch 'sstabellini/for_1.1_rc3' into staging

* sstabellini/for_1.1_rc3:
  Call xc_domain_shutdown with the reboot flag when the guest requests a reboot.
  xen: Fix PV-on-HVM
  xen_disk: properly update stats in ioreq_release()
  xen_disk: use bdrv_aio_flush instead of bdrv_flush
  xen_disk: remove syncwrite option
  xen: disable rtc_clock
  xen: do not initialize the interval timer and PCSPK emulator

12 years agoMerge remote-tracking branch 'mdroth/qga-pull-5-24-12' into staging
Anthony Liguori [Tue, 29 May 2012 09:31:29 +0000 (04:31 -0500)]
Merge remote-tracking branch 'mdroth/qga-pull-5-24-12' into staging

* mdroth/qga-pull-5-24-12:
  qemu-ga: Fix missing environ declaration
  configure: check if environ is declared

12 years agoMerge remote-tracking branch 'kwolf/for-anthony' into staging
Anthony Liguori [Tue, 29 May 2012 09:30:49 +0000 (04:30 -0500)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging

* kwolf/for-anthony:
  fdc-test: introduced qtest no_media_on_start and cmos qtest for floppy
  fdc: fix media detection
  fdc: floppy drive should be visible after start without media
  qemu-iotests: mark 035 qcow2-only
  qcow2: Check qcow2_alloc_clusters_at() return value
  sheepdog: use heap instead of stack for BDRVSheepdogState
  sheepdog: return -errno on error
  sheepdog: mark image as snapshot when tag is specified
  qemu-img: Explain how rebase operation can be used to perform a 'diff' operation.
  qcow2: don't leak buffer for unexpected qcow_version in header

12 years agoMerge remote-tracking branch 'kiszka/queues/slirp' into staging
Anthony Liguori [Tue, 29 May 2012 09:30:00 +0000 (04:30 -0500)]
Merge remote-tracking branch 'kiszka/queues/slirp' into staging

* kiszka/queues/slirp:
  slirp: Avoid redefining MAX_TCPOPTLEN
  slirp: Avoid statements without effect on Big Endian host
  slirp: Untangle TCPOLEN_* from TCPOPT_*

12 years agoMerge remote-tracking branch 'bonzini/scsi-next' into staging
Anthony Liguori [Tue, 29 May 2012 09:28:59 +0000 (04:28 -0500)]
Merge remote-tracking branch 'bonzini/scsi-next' into staging

* bonzini/scsi-next:
  ISCSI: Switch to using READ16/WRITE16 for I/O to the LUN
  ISCSI: Only call READCAPACITY16 for SBC devices, use READCAPACITY10 for MMC
  ISCSI: get device type at connection time
  ISCSI: change num_blocks to 64-bit
  ISCSI: redo how we set up the events
  scsi: declare vmstate_info_scsi_requests to be static

12 years agoslirp: Avoid redefining MAX_TCPOPTLEN
Andreas Färber [Mon, 28 May 2012 17:52:35 +0000 (19:52 +0200)]
slirp: Avoid redefining MAX_TCPOPTLEN

MAX_TCPOPTLEN is being defined as 32. Darwin already has it as 40,
causing a warning. The value is only used to declare an array,
into which currently 4 bytes are written at most.

Therefore always override MAX_TCPOPTLEN for now.

Suggested-by: Jan Kiszka <jan.kiszka@web.de>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
12 years agoslirp: Avoid statements without effect on Big Endian host
Andreas Färber [Mon, 28 May 2012 17:34:20 +0000 (19:34 +0200)]
slirp: Avoid statements without effect on Big Endian host

Darwin has HTON*/NTOH* macros that on BE simply return the argument.
This is incompatible with SLIRP's use of these macros as a statement.

Undefine the macros in the HOST_WORDS_BIGENDIAN code path to redefine
these macros as no-op, as already done when they were undefined.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
12 years agoISCSI: Switch to using READ16/WRITE16 for I/O to the LUN
Ronnie Sahlberg [Tue, 22 May 2012 10:10:05 +0000 (20:10 +1000)]
ISCSI: Switch to using READ16/WRITE16 for I/O to the LUN

This allows using LUNs bigger than 2TB.  Keep using READ10 for other
device types such as MMC.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
12 years agoISCSI: Only call READCAPACITY16 for SBC devices, use READCAPACITY10 for MMC
Ronnie Sahlberg [Sat, 26 May 2012 04:56:38 +0000 (14:56 +1000)]
ISCSI: Only call READCAPACITY16 for SBC devices, use READCAPACITY10 for MMC

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
12 years agoISCSI: get device type at connection time
Ronnie Sahlberg [Fri, 25 May 2012 11:59:01 +0000 (21:59 +1000)]
ISCSI: get device type at connection time

This is needed to avoid READ CAPACITY(16) for MMC devices.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
12 years agoISCSI: change num_blocks to 64-bit
Paolo Bonzini [Sat, 26 May 2012 07:41:13 +0000 (09:41 +0200)]
ISCSI: change num_blocks to 64-bit

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
12 years agoISCSI: redo how we set up the events
Ronnie Sahlberg [Tue, 22 May 2012 09:56:36 +0000 (19:56 +1000)]
ISCSI: redo how we set up the events

Call qemu_notify_event() after updating events.  Otherwise, If we add
an event for -is-writeable but the socket is already writeable there
may be a delay before the event callback is actually triggered.

Those delays would in particular hurt performance during BIOS boot and
when the GRUB bootloader reads the kernel and initrd.

But first call out to the socket write functions directly, and only set up
the write event if the socket is full.  This will happen very rarely and
this improves performance.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
12 years agoslirp: Untangle TCPOLEN_* from TCPOPT_*
Andreas Färber [Fri, 27 Apr 2012 22:29:05 +0000 (00:29 +0200)]
slirp: Untangle TCPOLEN_* from TCPOPT_*

Commit b72210568ef0c0fb141a01cffb71a09c4efa0364 (slirp: clean up
conflicts with system headers) enclosed TCPOLEN_MAXSEG with an #ifdef
TCPOPT_EOL. This broke the build on illumos, which has TCPOPT_*
but not TCPOLEN_*.

Move them to their own #ifdef TCPOLEN_MAXSEG section to remedy this.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
12 years agotcg/ppc: Handle _CALL_DARWIN being undefined on Darwin
Andreas Färber [Sun, 27 May 2012 17:50:47 +0000 (19:50 +0200)]
tcg/ppc: Handle _CALL_DARWIN being undefined on Darwin

powerpc-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)
does not define _CALL_DARWIN, leading to unexpected behavior w.r.t.
register clobbering and stack frame layout.

Since _CALL_DARWIN is a reserved identifier, define a custom
TCG_TARGET_CALL_DARWIN based on either _CALL_DARWIN or __APPLE__.

Signed-off-by: Andreas F?rber <andreas.faerber@web.de>
Signed-off-by: malc <av1474@comtv.ru>
12 years agofdc-test: introduced qtest no_media_on_start and cmos qtest for floppy
Pavel Hrdina [Thu, 24 May 2012 09:02:30 +0000 (11:02 +0200)]
fdc-test: introduced qtest no_media_on_start and cmos qtest for floppy

As default a guest has always one floppy drive so 0x10 byte in CMOS
has to have 0x40 value. Higher 4 bits means that the first floppy drive
is 1.44 Mb 3"5 drive and lower 4 bits means the second drive is not present.

After the guest starts DSKCHG bit in DIR register should be set. If there
is no media in drive, this bit should be set all the time.

Because we start the guest without media in drive, we have to swap
'eject' and 'change' in 'test_media_change'.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agofdc: fix media detection
Pavel Hrdina [Thu, 24 May 2012 09:02:29 +0000 (11:02 +0200)]
fdc: fix media detection

We have to set up 'media_changed' after guest start so floppy driver
could detect that there is no media in drive. For this purpose we call
'fdctrl_change_cb' instead of 'fd_revalidate' in 'fdctrl_connect_drives'.
'fd_revalidate' is called inside 'fdctrl_change_cb'.

We still have to set default drive geometry in 'fd_revalidate' even
if there is no media in drive. When you try to open (windows) or mount (linux)
floppy the driver tries to seek on track 1. Linux guest stuck in loop then
kernel crashes and windows guest prints error message.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agofdc: floppy drive should be visible after start without media
Pavel Hrdina [Thu, 24 May 2012 09:02:28 +0000 (11:02 +0200)]
fdc: floppy drive should be visible after start without media

If you start guest with floppy drive but without media inserted, guest
still should see floppy drive pressent.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqemu-iotests: mark 035 qcow2-only
Stefan Hajnoczi [Thu, 24 May 2012 15:26:51 +0000 (16:26 +0100)]
qemu-iotests: mark 035 qcow2-only

The 035 parallel aio write test relies on knowledge of qcow2 metadata
layout to stress parallel L2 table accesses.  This only works for qcow2
unless we add additional calculations for qed or other formats.

Mark this test as qcow2-only.

Note that the test is strictly speaking non-deterministic although the
output produced is reliable with qcow2.  This is because the aio_write
command returns before the aio write request has completed.  Completions
can occur at any time afterwards and cause a message to be printed.
Therefore the exact output of this test is not deterministic but we seem
to get away with it for qcow2 (maybe due to coroutine and main loop
scheduling).

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqcow2: Check qcow2_alloc_clusters_at() return value
Kevin Wolf [Thu, 24 May 2012 10:56:32 +0000 (12:56 +0200)]
qcow2: Check qcow2_alloc_clusters_at() return value

When using qcow2_alloc_clusters_at(), the cluster allocation code
checked the wrong variable for an error code.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agosheepdog: use heap instead of stack for BDRVSheepdogState
MORITA Kazutaka [Wed, 16 May 2012 18:15:34 +0000 (03:15 +0900)]
sheepdog: use heap instead of stack for BDRVSheepdogState

bdrv_create() is called in coroutine context now, so we cannot use
more stack than 1 MB in the function if we use ucontext coroutine.
This patch allocates BDRVSheepdogState, whose size is 4 MB, on the
heap in sd_create().

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agosheepdog: return -errno on error
MORITA Kazutaka [Wed, 16 May 2012 18:15:33 +0000 (03:15 +0900)]
sheepdog: return -errno on error

On error, BlockDriver APIs should return -errno instead of -1.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agosheepdog: mark image as snapshot when tag is specified
MORITA Kazutaka [Wed, 16 May 2012 18:15:31 +0000 (03:15 +0900)]
sheepdog: mark image as snapshot when tag is specified

When a snapshot tag is specified in the filename, the opened image is
a snapshot.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqemu-img: Explain how rebase operation can be used to perform a 'diff' operation.
Richard W.M. Jones [Mon, 21 May 2012 13:58:05 +0000 (14:58 +0100)]
qemu-img: Explain how rebase operation can be used to perform a 'diff' operation.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqcow2: don't leak buffer for unexpected qcow_version in header
Jim Meyering [Mon, 21 May 2012 11:06:54 +0000 (13:06 +0200)]
qcow2: don't leak buffer for unexpected qcow_version in header

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoscsi: declare vmstate_info_scsi_requests to be static
Jim Meyering [Mon, 21 May 2012 10:03:10 +0000 (12:03 +0200)]
scsi: declare vmstate_info_scsi_requests to be static

Signed-off-by: Jim Meyering <meyering@redhat.com>