Skip to contentSkip to conversation

odd vcpu_info accesses in xen/arch/x86/time.c

DISCUSSION Jan Beulich 2 participants 3 messages Aug 29, 2006 – Aug 31, 2006

lore
Share & tools
lore
#0 lore raw

Is there a particular reason why in several places in this file, with a vcpu pointer at hand, the vcpu_info is accessed through

	v->domain->shared_info->vcpu_info[v->vcpu_id]

rather than

	v->vcpu_info

Thanks, Jan

#1 lore raw
Quoted 9 lines · Jan Beulich

Is there a particular reason why in several places in this file, with a vcpu pointer
at hand, the vcpu_info is accessed through

v->domain->shared_info->vcpu_info[v->vcpu_id]

rather than

v->vcpu_info

No. They should be fixed.

-- Keir

#2 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line

Keir Fraser <[email protected]> 30.08.06 18:27 >>>

Quoted 4 lines · Jan Beulich

Is there a particular reason why in several places in this file, with a vcpu pointer
at hand, the vcpu_info is accessed through

Quoted 7 lines
Quoted 5 lines

v->domain->shared_info->vcpu_info[v->vcpu_id]

rather than

v->vcpu_info

No. They should be fixed.

xen/arch/x86/time.c +2 -2
Index: 2006-08-28/xen/arch/x86/time.c
===================================================================
@@ -676,7 +676,7 @@ static inline void __update_vcpu_system_
     struct vcpu_time_info *u;
 
     t = &this_cpu(cpu_time);
-    u = &v->domain->shared_info->vcpu_info[v->vcpu_id].time;
+    u = &v->vcpu_info->time;
 
     version_update_begin(&u->version);
 
@@ -690,7 +690,7 @@ static inline void __update_vcpu_system_
 
 void update_vcpu_system_time(struct vcpu *v)
 {
-    if ( v->domain->shared_info->vcpu_info[v->vcpu_id].time.tsc_timestamp != 
+    if ( v->vcpu_info->time.tsc_timestamp !=
          this_cpu(cpu_time).local_tsc_stamp )
         __update_vcpu_system_time(v);
 }