From: Joerg Roedel <[EMAIL PROTECTED]> This patch adds code to emulate the access to the cr8 register to the x86 instruction emulator in kvm.
Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Markus Rechberger <[EMAIL PROTECTED]> --- drivers/kvm/x86.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index 6deb052..9db4e32 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c @@ -2236,6 +2236,8 @@ unsigned long realmode_get_cr(struct kvm_vcpu *vcpu, int cr) return vcpu->cr3; case 4: return vcpu->cr4; + case 8: + return get_cr8(vcpu); default: vcpu_printf(vcpu, "%s: unexpected cr %u\n", __FUNCTION__, cr); return 0; @@ -2259,6 +2261,9 @@ void realmode_set_cr(struct kvm_vcpu *vcpu, int cr, unsigned long val, case 4: set_cr4(vcpu, mk_cr_64(vcpu->cr4, val)); break; + case 8: + set_cr8(vcpu, val & 0xfUL); + break; default: vcpu_printf(vcpu, "%s: unexpected cr %u\n", __FUNCTION__, cr); } -- 1.5.2.5 ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel