aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-09-13 07:56:22 +0300
committerAvi Kivity <avi@qumranet.com>2007-09-13 07:56:22 +0300
commit07813979b2b6265b4660c0417139f00fd3df71eb (patch)
tree92711b5852533408f9389809b3d60c0d52abb4bb
parent45e141aa5520cb2ce4c6d620729733e926f63a01 (diff)
kvm: external module: adapt to __vcpu_run() main loop
-rw-r--r--kvm/kernel/hack-module.awk15
1 files changed, 6 insertions, 9 deletions
diff --git a/kvm/kernel/hack-module.awk b/kvm/kernel/hack-module.awk
index 24df5b9c4..33b4c7b26 100644
--- a/kvm/kernel/hack-module.awk
+++ b/kvm/kernel/hack-module.awk
@@ -56,13 +56,6 @@
in_vmcs_write = 0
}
-/ASM_VMX_VMLAUNCH|SVM_VMRUN/ { after_guest_entry = 1 }
-
-/preempt_enable|stgi/ && after_guest_entry {
- print "\tspecial_reload_dr7();";
- after_guest_entry = 0
-}
-
/^static void vmx_load_host_state/ {
vmx_load_host_state = 1
}
@@ -74,11 +67,15 @@
{ print }
-/static void vcpu_put|static int vmx_vcpu_run|static struct kvm_vcpu \*vmx_create_vcpu|static int svm_vcpu_run/ {
+/kvm_x86_ops->run/ {
+ print "\tspecial_reload_dr7();"
+}
+
+/static void vcpu_put|static int __vcpu_run|static struct kvm_vcpu \*vmx_create_vcpu/ {
in_tricky_func = 1
}
-/preempt_disable|get_cpu|clgi\(\)/ && in_tricky_func {
+/preempt_disable|get_cpu/ && in_tricky_func {
printf("\tin_special_section();\n");
in_tricky_func = 0
}