diff options
author | Avi Kivity <avi@qumranet.com> | 2008-09-07 19:38:33 +0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-09-07 19:38:33 +0300 |
commit | 3c3275b0c27e2180bc885f481bedbc17ebe7bc23 (patch) | |
tree | 4d7ec458993447b7b8e8ed77b5ed311401f7080b | |
parent | 7895bb6c6c8e327b14295377c51b4d87ac71d551 (diff) |
instead, use byte 4 of the vtpr region.
Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r-- | kvm-tpr-opt.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kvm-tpr-opt.c b/kvm-tpr-opt.c index 6677741d8..f2a3a1e6e 100644 --- a/kvm-tpr-opt.c +++ b/kvm-tpr-opt.c @@ -225,15 +225,11 @@ static int bios_is_mapped(CPUState *env, uint64_t rip) static int enable_vapic(CPUState *env) { struct kvm_sregs sregs; - - if (smp_cpus > 1) {/* uniprocessor doesn't need cpu id */ - kvm_get_sregs(kvm_context, env->cpu_index, &sregs); - sregs.tr.selector = 0xdb + (env->cpu_index << 8); - kvm_set_sregs(kvm_context, env->cpu_index, &sregs); - } + static uint8_t one = 1; kvm_enable_vapic(kvm_context, env->cpu_index, vapic_phys + (env->cpu_index << 7)); + cpu_physical_memory_rw(vapic_phys + (env->cpu_index << 7) + 4, &one, 1, 1); bios_enabled = 1; return 1; |