|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 2/3] x86emul: check for CMPXCHG8B availability
We can't exclude someone wanting to hide the instruction from guests.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
v2: Re-base.
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -1289,6 +1289,7 @@ static bool vcpu_has(
#define vcpu_has_fpu() vcpu_has( 1, EDX, 0, ctxt, ops)
#define vcpu_has_sep() vcpu_has( 1, EDX, 11, ctxt, ops)
+#define vcpu_has_cx8() vcpu_has( 1, EDX, 8, ctxt, ops)
#define vcpu_has_cmov() vcpu_has( 1, EDX, 15, ctxt, ops)
#define vcpu_has_clflush() vcpu_has( 1, EDX, 19, ctxt, ops)
#define vcpu_has_mmx() vcpu_has( 1, EDX, 23, ctxt, ops)
@@ -5369,7 +5370,10 @@ x86_emulate(
op_bytes = 16;
}
else
+ {
+ vcpu_must_have(cx8);
op_bytes = 8;
+ }
old = container_of(&mmvalp->ymm[0], typeof(*old), u64[0]);
aux = container_of(&mmvalp->ymm[2], typeof(*aux), u64[0]);
Attachment:
x86emul-check-CPUID-cx8.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |