Stefan Weil [Fri, 5 Jul 2013 20:55:42 +0000 (22:55 +0200)]
po/Makefile: Fix *.mo generation for out-of-tree builds (regression)
Commit f84756554e32d97db3aa949db1dd58c7eea62375 added a wildcard search
for *.po files. This search found no files for out of tree builds, so
those builds no longer created and installed *.mo files.
Anthony Liguori [Tue, 23 Jul 2013 15:57:23 +0000 (10:57 -0500)]
Merge remote-tracking branch 'quintela/migration.next' into staging
# By Michael R. Hines (8) and others
# Via Juan Quintela
* quintela/migration.next:
migration: add autoconvergence documentation
Fix real mode guest segments dpl value in savevm
Fix real mode guest migration
rdma: account for the time spent in MIG_STATE_SETUP through QMP
rdma: introduce MIG_STATE_NONE and change MIG_STATE_SETUP state transition
rdma: allow state transitions between other states besides ACTIVE
rdma: send pc.ram
rdma: core logic
rdma: introduce ram_handle_compressed()
rdma: bugfix: ram_control_save_page()
rdma: update documentation to reflect new unpin support
Anthony Liguori [Tue, 23 Jul 2013 15:57:04 +0000 (10:57 -0500)]
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings
* Fix NULL pointer dereference in gdbstub
* Introduce vaddr type
* Introduce CPUClass::set_pc()
* Introduce CPUClass::synchronize_from_tb()
* Introduce CPUClass::get_phys_page_debug()
* Introduce CPUClass::memory_rw_debug()
* Move singlestep_enabled and gdb_regs fields out of CPU_COMMON
* Adopt CPUState in more APIs
* Propagate CPUState in gdbstub
# gpg: Signature made Mon 22 Jul 2013 07:50:17 PM CDT using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found
# By Andreas Färber (21) and others
# Via Andreas Färber
* afaerber/tags/qom-cpu-for-anthony: (24 commits)
linux-user: Use X86CPU property to retrieve CPUID family
gdbstub: Change gdb_register_coprocessor() argument to CPUState
cpu: Move gdb_regs field from CPU_COMMON to CPUState
gdbstub: Change GDBState::{c,g}_cpu and find_cpu() to CPUState
cpu: Introduce CPUClass::memory_rw_debug() for target_memory_rw_debug()
exec: Change cpu_memory_rw_debug() argument to CPUState
cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook
gdbstub: Change gdb_{read,write}_register() argument to CPUState
gdbstub: Change gdb_handlesig() argument to CPUState
gdbstub: Change syscall callback argument to CPUState
kvm: Change kvm_{insert,remove}_breakpoint() argument to CPUState
cpu: Change cpu_single_step() argument to CPUState
gdbstub: Update gdb_handlesig() and gdb_signalled() Coding Style
cpu: Move singlestep_enabled field from CPU_COMMON to CPUState
target-alpha: Copy implver to DisasContext
target-alpha: Copy singlestep_enabled to DisasContext
cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()
target-unicore32: Implement CPUClass::set_pc()
target-moxie: Implement CPUClass::set_pc()
target-m68k: Implement CPUClass::set_pc()
...
Anthony Liguori [Tue, 23 Jul 2013 15:56:55 +0000 (10:56 -0500)]
Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into staging
QOM device refactorings
* Avoid TYPE_* in VMStateDescription name
* Replace some DO_UPCAST()s and FROM_SYSBUS()s with QOM casts
* Limit legacy SCSI command line handling to non-hotplugged devices
* Replace some SysBusDeviceClass::init with DeviceClass::realize
# gpg: Signature made Mon 22 Jul 2013 06:31:42 PM CDT using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found
# By Hu Tao (26) and others
# Via Andreas Färber
* afaerber/tags/qom-devices-for-anthony: (55 commits)
isa-bus: Drop isabus_bridge_init() since it does nothing
ioapic: Use QOM realize for ioapic
kvmvapic: Use QOM realize
kvm/clock: Use QOM realize for kvmclock
hpet: Use QOM realize for hpet
scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline()
megasas: Legacy command line handling fix
scsi/esp: Use QOM realize for scsi esp
fw_cfg: Use QOM realize for fw_cfg
ahci: Use QOM realize for ahci
pflash_cfi02: Use QOM realize for pflash_cfi02
pflash_cfi01: Use QOM realize for pflash_cfi01
fdc: Improve error propagation for QOM realize
fdc: Use QOM realize for fdc
kvm/clock: QOM'ify some more
hpet: QOM'ify some more
scsi/esp: QOM'ify some more
fwcfg: QOM'ify some more
ahci: QOM'ify some more
pflash-cfi02: QOM'ify some more
...
Older KVM version put invalid value in the segments registers dpl field for
real mode guests (0x3).
This breaks migration from those hosts to hosts with unrestricted guest support.
We detect it by checking CS dpl value for real mode guest and fix the dpl values
of all the segment registers.
Older KVM versions save CS dpl value to an invalid value for real mode guests
(0x3). This patch detect this situation when loading CPU state and set all the
segments dpl to zero.
This will allow migration from older KVM on host without unrestricted guest
to hosts with restricted guest support.
For example migration from a Penryn host (with kernel 2.6.32) to
a Westmere host (for real mode guest) will fail with "kvm: unhandled exit 80000021".
Michael R. Hines [Mon, 22 Jul 2013 14:01:57 +0000 (10:01 -0400)]
rdma: introduce MIG_STATE_NONE and change MIG_STATE_SETUP state transition
As described in the previous patch, until now, the MIG_STATE_SETUP
state was not really a 'formal' state. It has been used as a 'zero' state
(what we're calling 'NONE' here) and QEMU has been unconditionally transitioning
into this state when the QMP migration command was called. Instead we want to
introduce MIG_STATE_NONE, which is our starting state in the state machine, and
then immediately transition into the MIG_STATE_SETUP state when the QMP migrate
command is issued.
In order to do this, we must delay the transition into MIG_STATE_ACTIVE until
later in the migration_thread(). This is done to be able to timestamp the amount of
time spent in the SETUP state for proper accounting to the user during
an RDMA migration.
Furthermore, the management software, until now, has never been aware of the
existence of the SETUP state whatsoever. This must change, because, timing of this
state implies that the state actually exists.
These two patches cannot be separated because the 'query_migrate' QMP
switch statement needs to know how to handle this new state transition.
Michael R. Hines [Mon, 22 Jul 2013 14:01:56 +0000 (10:01 -0400)]
rdma: allow state transitions between other states besides ACTIVE
This patch is in preparation for the next ones: Until now the MIG_STATE_SETUP
state was not really a 'formal' state. It has been used as a 'zero' state
and QEMU has been unconditionally transitioning into this state when
the QMP migrate command was called. In preparation for timing this state,
we have to make this state a a 'real' state which actually gets transitioned
from later in the migration_thread() from SETUP => ACTIVE, rather than just
automatically dropping into this state at the beginninig of the migration.
This means that the state transition function (migration_finish_set_state())
needs to be capable of transitioning from valid states _other_ than just
MIG_STATE_ACTIVE.
The function is in fact already capable of doing that, but was not allowing the
old state to be a parameter specified as an input.
This patch fixes that and only makes the transition if the current state
matches the old state that the caller intended to transition from.
Michael R. Hines [Mon, 22 Jul 2013 14:01:51 +0000 (10:01 -0400)]
rdma: update documentation to reflect new unpin support
As requested, the protocol now includes memory unpinning support.
This has been implemented in a non-optimized manner, in such a way
that one could devise an LRU or other workload-specific information
on top of the basic mechanism to influence the way unpinning happens
during runtime.
The feature is not yet user-facing, and is thus can only be enabled
at compile-time.
Andreas Färber [Thu, 27 Jun 2013 17:09:09 +0000 (19:09 +0200)]
cpu: Introduce CPUClass::memory_rw_debug() for target_memory_rw_debug()
Make inline target_memory_rw_debug() always available and change its
argument to CPUState. Let it check if CPUClass::memory_rw_debug provides
a specialized callback and fall back to cpu_memory_rw_debug() otherwise.
The only overriding implementation is for 32-bit sparc.
This prepares for changing GDBState::g_cpu to CPUState.
Andreas Färber [Thu, 27 Jun 2013 11:44:40 +0000 (13:44 +0200)]
gdbstub: Change GDBState::query_cpu to CPUState
Since first_cpu/next_cpu are CPUState, CPUArchState is no longer needed.
This resolves a NULL pointer dereference of query_cpu, introduced
with commit 182735efaf956ccab50b6d74a4fed163e0f35660 and reported by
TeLeMan and Max Filippov.
Hu Tao [Mon, 1 Jul 2013 10:18:33 +0000 (18:18 +0800)]
fw_cfg: Use QOM realize for fw_cfg
Signed-off-by: Hu Tao <[email protected]>
[AF: Moved sysbus_init_mmio() to instance_init, renamed variable] Signed-off-by: Andreas Färber <[email protected]>
Hu Tao [Mon, 1 Jul 2013 10:18:24 +0000 (18:18 +0800)]
fdc: QOM'ify some more
Introduce type constant and avoid DO_UPCAST(), container_of(),
and use DEVICE() to avoid accessing parent qdev directly.
Signed-off-by: Hu Tao <[email protected]>
[AF: Renamed parent field and avoided repeated SYS_BUS_DEVICE() casts] Signed-off-by: Andreas Färber <[email protected]>
Hu Tao [Mon, 1 Jul 2013 10:18:21 +0000 (18:18 +0800)]
i440fx: Use type-safe cast instead of direct access of parent dev
Signed-off-by: Hu Tao <[email protected]>
[AF: Converted remaining accesses and renamed to parent_obj] Signed-off-by: Andreas Färber <[email protected]>
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.
Signed-off-by: Peter Crosthwaite <[email protected]>
[AF: Simplified casts and converted two more DO_UPCAST()s] Signed-off-by: Andreas Färber <[email protected]>
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and
direct -> style casting.
Signed-off-by: Peter Crosthwaite <[email protected]>
[AF: Renamed to TYPE_VMWARE_VGA and VMWARE_VGA()] Signed-off-by: Andreas Färber <[email protected]>
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.
Signed-off-by: Peter Crosthwaite <[email protected]>
[AF: Renamed to TYPE_ICH9_AHCI and used typedef in pci_ich9_reset()] Signed-off-by: Andreas Färber <[email protected]>