[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH] plat/kvm: Make mxcsr_ptr in entry64.S a 32-bit value

LDMXCSR reads 32 bits into the register. If mxcsr_ptr is only a .word
(and thus 16 bits), the instruction reads adjacent bytes into the MXCSR
register, which can to produce #GP faults on LDMXCSR when those adjacent
bytes contain 1's in bit locations that are reserved in MXCSR.

Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
 plat/kvm/x86/entry64.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/plat/kvm/x86/entry64.S b/plat/kvm/x86/entry64.S
index 35738b6..dc3614a 100644
--- a/plat/kvm/x86/entry64.S
+++ b/plat/kvm/x86/entry64.S
@@ -160,8 +160,7 @@ gdt64_ptr:
 .type mxcsr_ptr, @object
-       .word 0x1f80                    /* Intel SDM power-on default */
+       .long 0x1f80                    /* Intel SDM power-on default */
 #include "pagetable.S"

Minios-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.