From: Greg KH on
2.6.33-stable review patch. If anyone has any objections, please let me know.

-----------------

From: Gleb Natapov <gleb(a)redhat.com>

commit 8b9f44140bc4afd2698413cd9960c3912168ee91 upstream.

Inject #UD if guest attempts to do so. This is in accordance to Intel
SDM.

Signed-off-by: Gleb Natapov <gleb(a)redhat.com>
Signed-off-by: Avi Kivity <avi(a)redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de>

---
arch/x86/kvm/emulate.c | 6 ++++++
1 file changed, 6 insertions(+)

--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -1987,6 +1987,12 @@ special_insn:
int err;

sel = c->src.val;
+
+ if (c->modrm_reg == VCPU_SREG_CS) {
+ kvm_queue_exception(ctxt->vcpu, UD_VECTOR);
+ goto done;
+ }
+
if (c->modrm_reg == VCPU_SREG_SS)
toggle_interruptibility(ctxt, X86_SHADOW_INT_MOV_SS);



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/