[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH][RFC] FPU LWP 4/5: enable LWP for SVM guest
>>> On 14.04.11 at 22:39, Wei Huang <wei.huang2@xxxxxxx> wrote: >+static void svm_lwp_save(struct vcpu *v) >+{ >+ if ( cpu_has_lwp ) >+ { >+ rdmsrl(MSR_AMD64_LWP_CFG, v->arch.hvm_svm.guest_lwp_cfg); >+ wrmsrl(MSR_AMD64_LWP_CFG, 0x0); >+ /* Disable LWP for next VCPU */ >+ wrmsrl(MSR_AMD64_LWP_CBADDR, 0x0); >+ } >+} >+ >+static void svm_lwp_load(struct vcpu *v) >+{ >+ if ( cpu_has_lwp ) >+ { >+ /* Only LWP_CFG is reloaded. LWP_CBADDR will be reloaded via xrstor */ >+ wrmsrl(MSR_AMD64_LWP_CFG, v->arch.hvm_svm.guest_lwp_cfg); >+ } >+} I think I had pointed this out before - to avoid these MSR accesses for guests not using LWP, you should track whether the vCPU has LWP support enabled (e.g. non-zero written into LWP_CFG) and key off of that instead of cpu_has_lwp. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |