+ kvm-two-way-apic-tpr-synchronization.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     kvm: Two-way apic tpr synchronization
has been added to the -mm tree.  Its filename is
     kvm-two-way-apic-tpr-synchronization.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: kvm: Two-way apic tpr synchronization
From: Dor Laor <dor.laor@xxxxxxxxxxxx>

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 <dor.laor@xxxxxxxxxxxx>
Signed-off-by: Avi Kivity <avi@xxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/kvm/kvm_main.c |    3 +++
 include/linux/kvm.h    |    2 ++
 2 files changed, 5 insertions(+)

diff -puN drivers/kvm/kvm_main.c~kvm-two-way-apic-tpr-synchronization drivers/kvm/kvm_main.c
--- a/drivers/kvm/kvm_main.c~kvm-two-way-apic-tpr-synchronization
+++ a/drivers/kvm/kvm_main.c
@@ -1360,6 +1360,9 @@ static int kvm_dev_ioctl_run(struct kvm 
 	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;
diff -puN include/linux/kvm.h~kvm-two-way-apic-tpr-synchronization include/linux/kvm.h
--- a/include/linux/kvm.h~kvm-two-way-apic-tpr-synchronization
+++ a/include/linux/kvm.h
@@ -65,6 +65,8 @@ struct kvm_run {
 	__u8 ready_for_interrupt_injection;
 	__u8 if_flag;
 	__u16 padding2;
+
+	/* in (pre_kvm_run), out (post_kvm_run) */
 	__u64 cr8;
 	__u64 apic_base;
 
_

Patches currently in -mm which might be from dor.laor@xxxxxxxxxxxx are

kvm-two-way-apic-tpr-synchronization.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux