|
[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
Boris,
I have a couple questions. After patched, here is the final code:
static int amd_vpmu_do_rdmsr(unsigned int msr, uint64_t *msr_content)
{
struct vcpu *v = current;
struct vpmu_struct *vpmu = vcpu_vpmu(v);
if ( vpmu_is_set(vpmu, VPMU_STOPPED) )
{
context_load(v);
vpmu_reset(vpmu, VPMU_STOPPED);
}
if ( !vpmu_is_set(vpmu, VPMU_CONTEXT_LOADED) )
context_read(msr, msr_content);
else
rdmsrl(msr, *msr_content);
return 1;
}
1. Why do you need to call context_load() here since you checking if the
we are in VPMU_CONTEXT_LOADED and get the appropriate copy before
returning the msr_content?
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?
Suravee _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |