qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH]SVM CR8 undefined bug fix


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH]SVM CR8 undefined bug fix
Date: Thu, 17 Jan 2008 17:13:31 +0100


On Jan 17, 2008, at 4:57 PM, Robert William Fuller wrote:

Alexander Graf wrote:
TeLeMan wrote:
env->cr[8] used by SVM codes was not defined.
As far as I remember cr8 is the very same as the TPR, so we only need to
implement one and map the other to the value we want.
My approach was to use the TPR and route the cr8 accesses to the tpr.
Even though I have to admit that this might not be consistent throughout
the code right now.

Am I to understand this is a TPR report?



The TPR is a register to control, which IRQs get routed. CR8 is the very same.

Their only difference is, that the TPR is implemented as an MSR, whereas the CR8 is a CPU register. CR8 is only supported on x86_64 though, while the TPR works on IA32 too.

So actually the TPR is only a mirror of the CR8 values and vice versa. Because MSR and CR8 access are equally slow in qemu, we can simply always use the TPR and shadow the CR8 to this, so whenever CR8 gets read from or written to, the TPR gets updated.

This way we do not break IA32 compatibility (because TPR always works) and everything's fine.

Regards,

Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]