mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[PATCH] kvm: Two-way apic tpr synchronization
We report the value of cr8 to userspace on an exit. Also let userspace change cr8 when we re-enter the guest. The lets 64-bit guest code maintain the tpr correctly. Thanks for Yaniv Kamay for the idea. Signed-off-by: Dor Laor <[email protected]> Signed-off-by: Avi Kivity <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d92899a001
commit
54810342f1
2 changed files with 5 additions and 0 deletions
|
|
@ -1360,6 +1360,9 @@ static int kvm_dev_ioctl_run(struct kvm *kvm, struct kvm_run *kvm_run)
|
|||
if (!vcpu)
|
||||
return -ENOENT;
|
||||
|
||||
/* re-sync apic's tpr */
|
||||
vcpu->cr8 = kvm_run->cr8;
|
||||
|
||||
if (kvm_run->emulated) {
|
||||
kvm_arch_ops->skip_emulated_instruction(vcpu);
|
||||
kvm_run->emulated = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue