summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlauber Costa <glommer@redhat.com>2009-10-09 15:03:16 -0300
committerMarcelo Tosatti <mtosatti@redhat.com>2009-10-13 14:01:16 -0300
commitf0c0b9df4c5ec97ffa9b8e51b723c8a370611054 (patch)
tree31e2429c1fd4e6e1ce99d43eb143f3568d7919b5 /qemu-kvm-x86.c
parentuse env as parameter for functions that access kvm_run (diff)
downloadqemu-kvm-f0c0b9df4c5ec97ffa9b8e51b723c8a370611054.tar.gz
qemu-kvm-f0c0b9df4c5ec97ffa9b8e51b723c8a370611054.tar.bz2
qemu-kvm-f0c0b9df4c5ec97ffa9b8e51b723c8a370611054.zip
use env in kvm_arch_run
kvm_arch_run() takes a vcpu context parameter, but CPUState should do. Convert it, as well as the functions that it end up calling Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'qemu-kvm-x86.c')
-rw-r--r--qemu-kvm-x86.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index c5455d7d2..fffcfd81a 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -162,10 +162,10 @@ int kvm_arch_create(kvm_context_t kvm, unsigned long phys_mem_bytes,
#ifdef KVM_EXIT_TPR_ACCESS
-static int kvm_handle_tpr_access(kvm_vcpu_context_t vcpu)
+static int kvm_handle_tpr_access(CPUState *env)
{
- struct kvm_run *run = vcpu->run;
- kvm_tpr_access_report(cpu_single_env,
+ struct kvm_run *run = env->kvm_run;
+ kvm_tpr_access_report(env,
run->tpr_access.rip,
run->tpr_access.is_write);
return 0;
@@ -190,10 +190,10 @@ int kvm_enable_vapic(kvm_vcpu_context_t vcpu, uint64_t vapic)
#endif
-int kvm_arch_run(kvm_vcpu_context_t vcpu)
+int kvm_arch_run(CPUState *env)
{
int r = 0;
- struct kvm_run *run = vcpu->run;
+ struct kvm_run *run = env->kvm_run;
switch (run->exit_reason) {
@@ -203,7 +203,7 @@ int kvm_arch_run(kvm_vcpu_context_t vcpu)
#endif
#ifdef KVM_EXIT_TPR_ACCESS
case KVM_EXIT_TPR_ACCESS:
- r = kvm_handle_tpr_access(vcpu);
+ r = kvm_handle_tpr_access(env);
break;
#endif
default: