diff options
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 8e9d4a5dacda..d934819733ce 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -471,10 +471,10 @@ static void init_sys_seg(struct vmcb_seg *seg, uint32_t type) | |||
471 | seg->base = 0; | 471 | seg->base = 0; |
472 | } | 472 | } |
473 | 473 | ||
474 | static void init_vmcb(struct vmcb *vmcb) | 474 | static void init_vmcb(struct vcpu_svm *svm) |
475 | { | 475 | { |
476 | struct vmcb_control_area *control = &vmcb->control; | 476 | struct vmcb_control_area *control = &svm->vmcb->control; |
477 | struct vmcb_save_area *save = &vmcb->save; | 477 | struct vmcb_save_area *save = &svm->vmcb->save; |
478 | 478 | ||
479 | control->intercept_cr_read = INTERCEPT_CR0_MASK | | 479 | control->intercept_cr_read = INTERCEPT_CR0_MASK | |
480 | INTERCEPT_CR3_MASK | | 480 | INTERCEPT_CR3_MASK | |
@@ -600,7 +600,7 @@ static int svm_vcpu_reset(struct kvm_vcpu *vcpu) | |||
600 | { | 600 | { |
601 | struct vcpu_svm *svm = to_svm(vcpu); | 601 | struct vcpu_svm *svm = to_svm(vcpu); |
602 | 602 | ||
603 | init_vmcb(svm->vmcb); | 603 | init_vmcb(svm); |
604 | 604 | ||
605 | if (vcpu->vcpu_id != 0) { | 605 | if (vcpu->vcpu_id != 0) { |
606 | svm->vmcb->save.rip = 0; | 606 | svm->vmcb->save.rip = 0; |
@@ -638,7 +638,7 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) | |||
638 | svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT; | 638 | svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT; |
639 | svm->asid_generation = 0; | 639 | svm->asid_generation = 0; |
640 | memset(svm->db_regs, 0, sizeof(svm->db_regs)); | 640 | memset(svm->db_regs, 0, sizeof(svm->db_regs)); |
641 | init_vmcb(svm->vmcb); | 641 | init_vmcb(svm); |
642 | 642 | ||
643 | fx_init(&svm->vcpu); | 643 | fx_init(&svm->vcpu); |
644 | svm->vcpu.fpu_active = 1; | 644 | svm->vcpu.fpu_active = 1; |
@@ -1024,7 +1024,7 @@ static int shutdown_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) | |||
1024 | * so reinitialize it. | 1024 | * so reinitialize it. |
1025 | */ | 1025 | */ |
1026 | clear_page(svm->vmcb); | 1026 | clear_page(svm->vmcb); |
1027 | init_vmcb(svm->vmcb); | 1027 | init_vmcb(svm); |
1028 | 1028 | ||
1029 | kvm_run->exit_reason = KVM_EXIT_SHUTDOWN; | 1029 | kvm_run->exit_reason = KVM_EXIT_SHUTDOWN; |
1030 | return 0; | 1030 | return 0; |