WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[PATCH] Re: [Xen-devel] odd vcpu_info accesses in xen/arch/x86/time.c

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: [PATCH] Re: [Xen-devel] odd vcpu_info accesses in xen/arch/x86/time.c
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 31 Aug 2006 10:08:14 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 31 Aug 2006 01:08:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C11B7AF1.184B%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <44F471BA.76E4.0078.0@xxxxxxxxxx> <C11B7AF1.184B%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> 30.08.06 18:27 >>>
>On 29/8/06 3:56 pm, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:
>
>> 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.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2006-08-28/xen/arch/x86/time.c
===================================================================
--- 2006-08-28.orig/xen/arch/x86/time.c 2006-08-31 09:52:31.000000000 +0200
+++ 2006-08-28/xen/arch/x86/time.c      2006-08-31 09:55:54.000000000 +0200
@@ -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);
 }


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>