>>> On 04.10.16 at 09:53, <jbeul...@suse.com> wrote:
>>>> On 04.10.16 at 09:34, <andrew.coop...@citrix.com> wrote:
>> On 04/10/2016 08:25, Jan Beulich wrote:
>>>>>> On 04.10.16 at 00:38, <m...@kylehuey.com> wrote:
>>>> rr (http://rr-project.org/), a Linux userspace record-and-replay reverse-
>>>> execution debugger, would like to trap and emulate the CPUID instruction.
>>>> This would allow us to a) mask away certain hardware features that rr does
>>>> not support (e.g. RDRAND) and b) enable trace portability across machines
>>>> by providing constant results. Patches for support in the Linux kernel are 
>> in
>>>> flight, and we'd like to be able to use this feature on virtualized Linux
>>>> instances as well.
>>>>
>>>> On HVM guests, the cpuid triggers a vm exit, so we can check the emulated
>>>> faulting state in vmx_do_cpuid and inject a GP(0) if CPL > 0.
>>> Why for CPL > 0 only? I don't think hardware CPUID faulting is CPL
>>> sensitive.
>> 
>> CPUID Faulting is CPL sensitive.  Otherwise Xen have a hard time
>> executing cpuid instructions itself.
> 
> Oh, of course. Sorry for the noise. But then the check added to
> emulate_privileged_op() fails to honor (virtual) CPL afaict.

And I think the change would then better be to the if() close after
the twobyte_opcode label. Which - considering that this explicit
check is scheduled to go away in 4.9 - implies that the insn emulator
also needs adjustment.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to