[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/3] x86/HVM: support (emulate) UMIP
On 12/06/2016 06:44 AM, Jan Beulich wrote: > There are three noteworthy drawbacks: > 1) The intercepts we need to enable here are CPL-independent, i.e. we > now have to emulate certain instructions for ring 0. > 2) On VMX there's no intercept for SMSW, so the emulation isn't really > complete there. > 3) The CR4 write intercept on SVM is lower priority than all exception > checks, so we need to intercept #GP. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > --- > The tool stack change could be left out - it updates a table which is > rather out of date anyway. > --- > This once again points out that handle_mmio() is rather badly named, as > it's about more than just MMIO. Since we have hvm_emulate_one() > already, I am, however, lacking an idea for a good alternative name. > > --- a/tools/libxl/libxl_cpuid.c > +++ b/tools/libxl/libxl_cpuid.c > @@ -158,6 +158,7 @@ int libxl_cpuid_parse_config(libxl_cpuid > {"de", 0x00000001, NA, CPUID_REG_EDX, 2, 1}, > {"vme", 0x00000001, NA, CPUID_REG_EDX, 1, 1}, > {"fpu", 0x00000001, NA, CPUID_REG_EDX, 0, 1}, > + {"umip", 0x00000007, 0, CPUID_REG_ECX, 2, 1}, > {"topoext", 0x80000001, NA, CPUID_REG_ECX, 22, 1}, > {"tbm", 0x80000001, NA, CPUID_REG_ECX, 21, 1}, > {"nodeid", 0x80000001, NA, CPUID_REG_ECX, 19, 1}, > --- a/xen/arch/x86/cpuid.c > +++ b/xen/arch/x86/cpuid.c > @@ -154,6 +154,13 @@ static void __init calculate_hvm_feature > __set_bit(X86_FEATURE_APIC, hvm_featureset); > > /* > + * Xen can often provide UMIP emulation to HVM guests even if the host > + * doesn't have such functionality. > + */ > + if ( cpu_has_vmx_dt_exiting || cpu_has_svm ) > + __set_bit(X86_FEATURE_UMIP, hvm_featureset); I don't think I understand how this is going to work for processors that don't support UMIP. How, for example, can guest_cr[4] have X86_CR4_UMIP set on these processors when CPUID will not show the feature being there? -boris _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |