enable SVM EFER bit
PATCH 1/1 enable SVM EFER bit
Due to the recently introduces checks for SVM activation, the SVM instructions currently throw a #UD exception if they are not activated. The activation happens through a write to the EFER which does not support the SVM bit yet.
This patch adds the SVME bit to the EFER MSR write. It makes KVM work for me again.
Alex
op_helper.c +2 -0
@@ -3069,6 +3069,8 @@ update_mask |=MSR_EFER_FFXSR ;if (env->cpuid_ext2_features &CPUID_EXT2_NX ) update_mask |=MSR_EFER_NXE ; +if (env->cpuid_ext3_features &CPUID_EXT3_SVM ) + update_mask |=MSR_EFER_SVME ; env->efer = (env->efer & ~update_mask) | (val & update_mask); }
Quoted 3 lines · Alexander Graf
Due to the recently introduces checks for SVM activation, the SVM instructions currently throw a #UD exception if they are not activated. The activation happens through a write to the EFER which does not support the SVM bit yet.
This patch adds the SVME bit to the EFER MSR write. It makes KVM work for me again.
Regards,
Anthony Liguori
Quoted 4 lines
Alex
Quoted 3 lines · Alexander Graf
Due to the recently introduces checks for SVM activation, the SVM instructions currently throw a #UD exception if they are not activated. The activation happens through a write to the EFER which does not support the SVM bit yet.
This patch adds the SVME bit to the EFER MSR write. It makes KVM work for me again.
OK for the problem, but the fix is not OK because you don't synchronize the hflags. It is strange that SVM can even work with that... I am working on a better fix.
Fabrice.
Quoted 5 lines · Fabrice Bellard
Quoted 2 lines · Alexander Graf
Due to the recently introduces checks for SVM activation, the SVM instructions currently throw a #UD exception if they are not activated. The activation happens through a write to the EFER which does not support the SVM bit yet. This patch adds the SVME bit to the EFER MSR write. It makes KVM work for me again.
OK for the problem, but the fix is not OK because you don't synchronize the hflags. It is strange that SVM can even work with that... I am working on a better fix.
a write to MSR_EFER calls cpu_load_efer() which updates the hflags.
Alex
Quoted 5 lines · Fabrice Bellard
Quoted 2 lines · Alexander Graf
Due to the recently introduces checks for SVM activation, the SVM instructions currently throw a #UD exception if they are not activated. The activation happens through a write to the EFER which does not support the SVM bit yet. This patch adds the SVME bit to the EFER MSR write. It makes KVM work for me again.
OK for the problem, but the fix is not OK because you don't synchronize the hflags. It is strange that SVM can even work with that... I am working on a better fix.
Wow I should probably not look at your fixed code when replying :-). You're just too fast for me.
Alex