diff options
author | Avi Kivity <avi@qumranet.com> | 2007-10-21 11:00:39 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 17:52:55 +0200 |
commit | e00c8cf29b9798eb9918469b0cce1766e0ae40d7 (patch) | |
tree | 2824cf4bfffc96faeda6981a790295c2e4f49690 /drivers/kvm/svm.c | |
parent | 34c16eecf78ed4cf01f39ac7211f5b57942ec899 (diff) |
KVM: Move vmx_vcpu_reset() out of vmx_vcpu_setup()
Split guest reset code out of vmx_vcpu_setup(). Besides being cleaner, this
moves the realmode tss setup (which can sleep) outside vmx_vcpu_setup()
(which is executed with preemption enabled).
[izik: remove unused variable]
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r-- | drivers/kvm/svm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 035c8e6898f..953c111544e 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -557,7 +557,7 @@ static void init_vmcb(struct vmcb *vmcb) /* rdx = ?? */ } -static void svm_vcpu_reset(struct kvm_vcpu *vcpu) +static int svm_vcpu_reset(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); @@ -568,6 +568,8 @@ static void svm_vcpu_reset(struct kvm_vcpu *vcpu) svm->vmcb->save.cs.base = svm->vcpu.sipi_vector << 12; svm->vmcb->save.cs.selector = svm->vcpu.sipi_vector << 8; } + + return 0; } static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) |