aboutsummaryrefslogtreecommitdiff
path: root/target-i386/machine.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-01-02 08:01:54 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2013-01-02 08:01:54 -0600
commit34daffa04886444dafd4a6951167225e824003d0 (patch)
tree82d512568e98edd86c7433be61f567bdf6a693f8 /target-i386/machine.c
parent079944e695589364d19de31f27761c6bdea1c207 (diff)
parent0a2a59d35cbabf63c91340a1c62038e3e60538c1 (diff)
downloadqemu-34daffa04886444dafd4a6951167225e824003d0.zip
qemu-34daffa04886444dafd4a6951167225e824003d0.tar.gz
qemu-34daffa04886444dafd4a6951167225e824003d0.tar.bz2
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
* qemu-kvm/uq/master: qemu-kvm/pci-assign: 64 bits bar emulation target-i386: Enabling IA32_TSC_ADJUST for QEMU KVM guest VMs Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'target-i386/machine.c')
-rw-r--r--target-i386/machine.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 8c1fed1..8354572 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -328,6 +328,24 @@ static const VMStateDescription vmstate_fpop_ip_dp = {
}
};
+static bool tsc_adjust_needed(void *opaque)
+{
+ CPUX86State *env = opaque;
+
+ return env->tsc_adjust != 0;
+}
+
+static const VMStateDescription vmstate_msr_tsc_adjust = {
+ .name = "cpu/msr_tsc_adjust",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .minimum_version_id_old = 1,
+ .fields = (VMStateField[]) {
+ VMSTATE_UINT64(tsc_adjust, CPUX86State),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static bool tscdeadline_needed(void *opaque)
{
CPUX86State *env = opaque;
@@ -478,6 +496,9 @@ static const VMStateDescription vmstate_cpu = {
.vmsd = &vmstate_fpop_ip_dp,
.needed = fpop_ip_dp_needed,
}, {
+ .vmsd = &vmstate_msr_tsc_adjust,
+ .needed = tsc_adjust_needed,
+ }, {
.vmsd = &vmstate_msr_tscdeadline,
.needed = tscdeadline_needed,
}, {