[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 2/2] x86/Intel: virtualize support for cpuid faulting
> From: Kyle Huey [mailto:me@xxxxxxxxxxxx] > Sent: Tuesday, October 18, 2016 2:51 AM > > On HVM guests, the cpuid triggers a vm exit, so we can check the emulated > faulting state in vmx_do_cpuid and hvmemul_cpuid. A new function, > hvm_check_cpuid_fault will check if cpuid faulting is enabled and the CPL > 0. > When it returns true, the cpuid handling functions will inject a GP(0). > Notably > no hardware support for faulting on cpuid is necessary to emulate support with > an HVM guest. > > On PV guests, hardware support is required so that userspace cpuid will trap > to Xen. Xen already enables cpuid faulting on supported CPUs for pv guests > (that > aren't the control domain, see the comment in intel_ctxt_switch_levelling). > Every PV guest cpuid will trap via a GP(0) to emulate_privileged_op (via > do_general_protection). Once there we simply decline to emulate cpuid if the > CPL > 0 and faulting is enabled, leaving the GP(0) for the guest kernel to > handle. > > Signed-off-by: Kyle Huey <khuey@xxxxxxxxxxxx> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>, assuming you'll fix cosmetic comments in next version. Thanks Kevin _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |