int next;
struct kvm_lapic *apic = NULL;
- last = kvm->round_robin_prev_vcpu;
+ last = kvm->arch.round_robin_prev_vcpu;
next = last;
do {
break;
apic = NULL;
} while (next != last);
- kvm->round_robin_prev_vcpu = next;
+ kvm->arch.round_robin_prev_vcpu = next;
if (!apic)
printk(KERN_DEBUG "vcpu not ready for apic_round_robin\n");
static gva_t rmode_tss_base(struct kvm *kvm)
{
- if (!kvm->tss_addr) {
+ if (!kvm->arch.tss_addr) {
gfn_t base_gfn = kvm->memslots[0].base_gfn +
kvm->memslots[0].npages - 3;
return base_gfn << PAGE_SHIFT;
}
- return kvm->tss_addr;
+ return kvm->arch.tss_addr;
}
static void fix_rmode_seg(int seg, struct kvm_save_segment *save)
int r = 0;
mutex_lock(&kvm->lock);
- if (kvm->apic_access_page)
+ if (kvm->arch.apic_access_page)
goto out;
kvm_userspace_mem.slot = APIC_ACCESS_PAGE_PRIVATE_MEMSLOT;
kvm_userspace_mem.flags = 0;
r = __kvm_set_memory_region(kvm, &kvm_userspace_mem, 0);
if (r)
goto out;
- kvm->apic_access_page = gfn_to_page(kvm, 0xfee00);
+ kvm->arch.apic_access_page = gfn_to_page(kvm, 0xfee00);
out:
mutex_unlock(&kvm->lock);
return r;
if (vm_need_virtualize_apic_accesses(vmx->vcpu.kvm))
vmcs_write64(APIC_ACCESS_ADDR,
- page_to_phys(vmx->vcpu.kvm->apic_access_page));
+ page_to_phys(vmx->vcpu.kvm->arch.apic_access_page));
vmx->vcpu.arch.cr0 = 0x60000010;
vmx_set_cr0(&vmx->vcpu, vmx->vcpu.arch.cr0); /* enter rmode */
ret = kvm_set_memory_region(kvm, &tss_mem, 0);
if (ret)
return ret;
- kvm->tss_addr = addr;
+ kvm->arch.tss_addr = addr;
return 0;
}