* [Qemu-devel] [PATCH] enable SVM EFER bit
@ 2008-06-03 15:02 Alexander Graf
2008-06-03 19:11 ` Anthony Liguori
2008-06-04 13:02 ` [Qemu-devel] " Fabrice Bellard
0 siblings, 2 replies; 5+ messages in thread
From: Alexander Graf @ 2008-06-03 15:02 UTC (permalink / raw)
To: fabrice; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 327 bytes --]
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
[-- Attachment #2: svm.patch --]
[-- Type: text/x-patch, Size: 567 bytes --]
Index: target-i386/op_helper.c
===================================================================
--- target-i386/op_helper.c (revision 4652)
+++ target-i386/op_helper.c (working copy)
@@ -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);
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] enable SVM EFER bit
2008-06-03 15:02 [Qemu-devel] [PATCH] enable SVM EFER bit Alexander Graf
@ 2008-06-03 19:11 ` Anthony Liguori
2008-06-04 13:02 ` [Qemu-devel] " Fabrice Bellard
1 sibling, 0 replies; 5+ messages in thread
From: Anthony Liguori @ 2008-06-03 19:11 UTC (permalink / raw)
To: qemu-devel
Alexander Graf wrote:
> 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.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Regards,
Anthony Liguori
> Alex
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [PATCH] enable SVM EFER bit
2008-06-03 15:02 [Qemu-devel] [PATCH] enable SVM EFER bit Alexander Graf
2008-06-03 19:11 ` Anthony Liguori
@ 2008-06-04 13:02 ` Fabrice Bellard
2008-06-04 14:30 ` Alexander Graf
2008-06-04 14:33 ` Alexander Graf
1 sibling, 2 replies; 5+ messages in thread
From: Fabrice Bellard @ 2008-06-04 13:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexander Graf
Alexander Graf wrote:
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [PATCH] enable SVM EFER bit
2008-06-04 13:02 ` [Qemu-devel] " Fabrice Bellard
@ 2008-06-04 14:30 ` Alexander Graf
2008-06-04 14:33 ` Alexander Graf
1 sibling, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2008-06-04 14:30 UTC (permalink / raw)
To: Fabrice Bellard; +Cc: qemu-devel
On Jun 4, 2008, at 3:02 PM, Fabrice Bellard wrote:
> Alexander Graf wrote:
>> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [PATCH] enable SVM EFER bit
2008-06-04 13:02 ` [Qemu-devel] " Fabrice Bellard
2008-06-04 14:30 ` Alexander Graf
@ 2008-06-04 14:33 ` Alexander Graf
1 sibling, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2008-06-04 14:33 UTC (permalink / raw)
To: Fabrice Bellard; +Cc: qemu-devel
On Jun 4, 2008, at 3:02 PM, Fabrice Bellard wrote:
> Alexander Graf wrote:
>> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-06-04 14:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-03 15:02 [Qemu-devel] [PATCH] enable SVM EFER bit Alexander Graf
2008-06-03 19:11 ` Anthony Liguori
2008-06-04 13:02 ` [Qemu-devel] " Fabrice Bellard
2008-06-04 14:30 ` Alexander Graf
2008-06-04 14:33 ` Alexander Graf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).