diff options
author | Longpeng(Mike) <longpeng2@huawei.com> | 2017-08-08 12:05:33 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-08-08 10:57:43 +0200 |
commit | de63ad4cf4973462953c29c363f3cfa7117c2b2d (patch) | |
tree | b269d3a1c04045d9f4f7005f8004f7da082bf0be /arch/x86/include/asm/kvm_host.h | |
parent | 199b5763d329b43c88f6ad539db8a6c6b42f8edb (diff) | |
download | linux-de63ad4cf4973462953c29c363f3cfa7117c2b2d.tar.gz linux-de63ad4cf4973462953c29c363f3cfa7117c2b2d.tar.bz2 linux-de63ad4cf4973462953c29c363f3cfa7117c2b2d.zip |
KVM: X86: implement the logic for spinlock optimization
get_cpl requires vcpu_load, so we must cache the result (whether the
vcpu was preempted when its cpl=0) in kvm_vcpu_arch.
Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 87ac4fba6d8e..1679aabcabe5 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -688,6 +688,9 @@ struct kvm_vcpu_arch { /* GPA available (AMD only) */ bool gpa_available; + + /* be preempted when it's in kernel-mode(cpl=0) */ + bool preempted_in_kernel; }; struct kvm_lpage_info { |