diff options
-rw-r--r-- | drivers/kvm/kvm_main.c | 3 | ||||
-rw-r--r-- | include/linux/kvm.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 099f0afd394d..eb3931ca680a 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -1360,6 +1360,9 @@ static int kvm_dev_ioctl_run(struct kvm *kvm, struct kvm_run *kvm_run) | |||
1360 | if (!vcpu) | 1360 | if (!vcpu) |
1361 | return -ENOENT; | 1361 | return -ENOENT; |
1362 | 1362 | ||
1363 | /* re-sync apic's tpr */ | ||
1364 | vcpu->cr8 = kvm_run->cr8; | ||
1365 | |||
1363 | if (kvm_run->emulated) { | 1366 | if (kvm_run->emulated) { |
1364 | kvm_arch_ops->skip_emulated_instruction(vcpu); | 1367 | kvm_arch_ops->skip_emulated_instruction(vcpu); |
1365 | kvm_run->emulated = 0; | 1368 | kvm_run->emulated = 0; |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 1be148f0fce4..6a5f6f49e037 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -65,6 +65,8 @@ struct kvm_run { | |||
65 | __u8 ready_for_interrupt_injection; | 65 | __u8 ready_for_interrupt_injection; |
66 | __u8 if_flag; | 66 | __u8 if_flag; |
67 | __u16 padding2; | 67 | __u16 padding2; |
68 | |||
69 | /* in (pre_kvm_run), out (post_kvm_run) */ | ||
68 | __u64 cr8; | 70 | __u64 cr8; |
69 | __u64 apic_base; | 71 | __u64 apic_base; |
70 | 72 | ||