x86/VPMU: VPMU should not exist when vpmu_initialise() is called

We don't need to try to destroy it since it can't be already allocated at the
time we try to initialize it.

Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
This commit is contained in:
Boris Ostrovsky authored and Jan Beulich committed 2015-03-18 14:19:01 +01:00
1 parent fe3cafd89a
commit a47d6cdb07
2 files changed
+1 -7

No files matched your search

-3
View File
@@ -359,9 +359,6 @@ static int amd_vpmu_initialise(struct vcpu *v)
struct vpmu_struct *vpmu = vcpu_vpmu(v);
uint8_t family = current_cpu_data.x86;
if ( vpmu_is_set(vpmu, VPMU_CONTEXT_ALLOCATED) )
return 0;
if ( counters == NULL )
{
switch ( family )
+1 -4
View File
@@ -236,10 +236,7 @@ void vpmu_initialise(struct vcpu *v)
if ( is_pvh_vcpu(v) )
return;
if ( vpmu_is_set(vpmu, VPMU_CONTEXT_ALLOCATED) )
vpmu_destroy(v);
vpmu_clear(vpmu);
vpmu->context = NULL;
ASSERT(!vpmu->flags && !vpmu->context);
switch ( vendor )
{
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.