With following fix, kernel PIC+APIC works on AMD box.

Eddie



diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index f4099f2..53ec38b 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -460,6 +460,12 @@ static void init_sys_seg(struct vmcb_seg *seg,
uint32_t type)
 
 static int svm_vcpu_setup(struct kvm_vcpu *vcpu)
 {
+       u64 msr;
+
+       msr = 0xfee00000 | MSR_IA32_APICBASE_ENABLE;
+       if (vcpu == &vcpu->kvm->vcpus[0])
+               msr |= MSR_IA32_APICBASE_BSP;
+       kvm_set_apic_base(vcpu, msr);
        return 0;
 }
 
@@ -572,7 +578,6 @@ static int svm_create_vcpu(struct kvm_vcpu *vcpu)
 {
        struct page *page;
        int r;
-       u64 msr;
 
        r = -ENOMEM;
        vcpu->svm = kzalloc(sizeof *vcpu->svm, GFP_KERNEL);
@@ -591,10 +596,6 @@ static int svm_create_vcpu(struct kvm_vcpu *vcpu)
 
        fx_init(vcpu);
        vcpu->fpu_active = 1;
-       msr = 0xfee00000 | MSR_IA32_APICBASE_ENABLE;
-       if (vcpu == &vcpu->kvm->vcpus[0])
-               msr |= MSR_IA32_APICBASE_BSP;
-       kvm_set_apic_base(vcpu, msr);
 
        return 0;
 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to