mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -07:00
kvm: support TSC deadline MSR with subsection
KVM add emulation of lapic tsc deadline timer for guest. This patch is co-operation work at qemu side. Use subsections to save/restore the field (mtosatti). Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
38d2c27ea6
commit
aa82ba549a
3 changed files with 37 additions and 0 deletions
|
|
@ -310,6 +310,24 @@ static const VMStateDescription vmstate_fpop_ip_dp = {
|
|||
}
|
||||
};
|
||||
|
||||
static bool tscdeadline_needed(void *opaque)
|
||||
{
|
||||
CPUState *env = opaque;
|
||||
|
||||
return env->tsc_deadline != 0;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_msr_tscdeadline = {
|
||||
.name = "cpu/msr_tscdeadline",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.minimum_version_id_old = 1,
|
||||
.fields = (VMStateField []) {
|
||||
VMSTATE_UINT64(tsc_deadline, CPUState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_cpu = {
|
||||
.name = "cpu",
|
||||
.version_id = CPU_SAVE_VERSION,
|
||||
|
|
@ -420,6 +438,9 @@ static const VMStateDescription vmstate_cpu = {
|
|||
} , {
|
||||
.vmsd = &vmstate_fpop_ip_dp,
|
||||
.needed = fpop_ip_dp_needed,
|
||||
}, {
|
||||
.vmsd = &vmstate_msr_tscdeadline,
|
||||
.needed = tscdeadline_needed,
|
||||
} , {
|
||||
/* empty */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue