diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-06-19 10:42:31 +0300 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-06-19 10:42:31 +0300 |
commit | 4a942ceac7e38c259116960e45ba9619611d1df9 (patch) | |
tree | ec382b627110dc208da9e179cebe323f529e3d1c /target-i386/kvm.c | |
parent | cf6d64bfd9ae93d14502f057d8a0917162004dc7 (diff) |
apic: avoid passing CPUState from CPU code
Pass only APICState when accessing APIC from CPU code.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-i386/kvm.c')
-rw-r--r-- | target-i386/kvm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index d6b12edab7..545323961a 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -540,8 +540,8 @@ static int kvm_put_sregs(CPUState *env) sregs.cr3 = env->cr[3]; sregs.cr4 = env->cr[4]; - sregs.cr8 = cpu_get_apic_tpr(env); - sregs.apic_base = cpu_get_apic_base(env); + sregs.cr8 = cpu_get_apic_tpr(env->apic_state); + sregs.apic_base = cpu_get_apic_base(env->apic_state); sregs.efer = env->efer; @@ -652,10 +652,10 @@ static int kvm_get_sregs(CPUState *env) env->cr[3] = sregs.cr3; env->cr[4] = sregs.cr4; - cpu_set_apic_base(env, sregs.apic_base); + cpu_set_apic_base(env->apic_state, sregs.apic_base); env->efer = sregs.efer; - //cpu_set_apic_tpr(env, sregs.cr8); + //cpu_set_apic_tpr(env->apic_state, sregs.cr8); #define HFLAG_COPY_MASK ~( \ HF_CPL_MASK | HF_PE_MASK | HF_MP_MASK | HF_EM_MASK | \ @@ -1055,7 +1055,7 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) run->request_interrupt_window = 0; DPRINTF("setting tpr\n"); - run->cr8 = cpu_get_apic_tpr(env); + run->cr8 = cpu_get_apic_tpr(env->apic_state); return 0; } @@ -1067,8 +1067,8 @@ int kvm_arch_post_run(CPUState *env, struct kvm_run *run) else env->eflags &= ~IF_MASK; - cpu_set_apic_tpr(env, run->cr8); - cpu_set_apic_base(env, run->apic_base); + cpu_set_apic_tpr(env->apic_state, run->cr8); + cpu_set_apic_base(env->apic_state, run->apic_base); return 0; } |