|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 8/8] x86/AMD: Clean up context_update() in AMD VPMU code
On 04/11/2013 03:48 PM, Suravee Suthikulpanit wrote: It is possible to be both LOADED and STOPPED. Example: guest writes control register (but does not enable the counters, so VPMU is not RUNNING). In this case amd_vpmu_load() will not get called from vpmu_load() so subsequent rdmsr of this control register in the guest will need to read from context and not from HW (since HW register is zero). In this case context_load() really only needs to load control registers; the counters themselves are the same in both context and HW. 2. If you have already called context_load() above, shouldn't you have to call "vpmu_set(vpmu, VPMU_CONTEXT_LOADED)" as well? But then, you wouldn't be needing the latter logic, isn't it? Yes, you are right. I think we can get rid if context_read() completely and simply load the context if it is not LOADED or is STOPPED. Just like it is done in amd_vpmu_do_wrmsr(). -boris _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |