[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1290622715-8382-4-git-send-email-joerg.roedel@amd.com>
Date: Wed, 24 Nov 2010 19:18:29 +0100
From: Joerg Roedel <joerg.roedel@....com>
To: Avi Kivity <avi@...hat.com>, Marcelo Tosatti <mtosatti@...hat.com>
CC: <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Joerg Roedel <joerg.roedel@....com>
Subject: [PATCH 3/9] KVM: SVM: Add checks for DRx read and write intercepts
This patch adds checking for read and write intercepts
from/to DRx registers from the KVM instruction emulator
path.
Signed-off-by: Joerg Roedel <joerg.roedel@....com>
---
arch/x86/kvm/svm.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 29f0491..16ff569 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -3669,6 +3669,9 @@ static int svm_insn_intercepted(struct kvm_vcpu *vcpu,
case 0x20: /* CR read */
vmcb->control.exit_code = SVM_EXIT_READ_CR0 + c->modrm_reg;
break;
+ case 0x21:
+ vmcb->control.exit_code = SVM_EXIT_READ_DR0 + c->modrm_reg;
+ break;
case 0x22: /* CR write */
vmcb->control.exit_code = SVM_EXIT_WRITE_CR0 + c->modrm_reg;
if (c->modrm_reg == 0 &&
@@ -3683,6 +3686,9 @@ static int svm_insn_intercepted(struct kvm_vcpu *vcpu,
vmcb->control.exit_code = SVM_EXIT_CR0_SEL_WRITE;
}
break;
+ case 0x23:
+ vmcb->control.exit_code = SVM_EXIT_WRITE_DR0 + c->modrm_reg;
+ break;
}
vmcb->control.next_rip = ctxt->eip;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists