summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-05-03 16:54:48 +0300
committerAvi Kivity <avi@redhat.com>2010-08-01 10:35:37 +0300
commitd94e1dc9af60e3431a586c3edfbe42d8a0d3932b (patch)
treec9ae8e5e69241d51898ab657d0ff48004b5bd4dc /include/linux/kvm_host.h
parent54b8486f469475d6c8e8aec917b91239a54eb8c8 (diff)
downloadblackbird-op-linux-d94e1dc9af60e3431a586c3edfbe42d8a0d3932b.tar.gz
blackbird-op-linux-d94e1dc9af60e3431a586c3edfbe42d8a0d3932b.zip
KVM: Get rid of KVM_REQ_KICK
KVM_REQ_KICK poisons vcpu->requests by having a bit set during normal operation. This causes the fast path check for a clear vcpu->requests to fail all the time, triggering tons of atomic operations. Fix by replacing KVM_REQ_KICK with a vcpu->guest_mode atomic. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index a0e019769f5d..2c62319727ef 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -81,6 +81,7 @@ struct kvm_vcpu {
int vcpu_id;
struct mutex mutex;
int cpu;
+ atomic_t guest_mode;
struct kvm_run *run;
unsigned long requests;
unsigned long guest_debug;
OpenPOWER on IntegriCloud