[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC] x86/Intel: virtualize support for cpuid faulting
>>> On 04.10.16 at 09:53, <JBeulich@xxxxxxxx> wrote: >>>> On 04.10.16 at 09:34, <andrew.cooper3@xxxxxxxxxx> wrote: >> On 04/10/2016 08:25, Jan Beulich wrote: >>>>>> On 04.10.16 at 00:38, <me@xxxxxxxxxxxx> 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@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |