[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [xen-3.2]comment and code inconsistency in struct vcpu declaration?

  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "pradeep singh rautela" <rautelap@xxxxxxxxx>
  • Date: Wed, 9 Apr 2008 11:37:43 +0530
  • Delivery-date: Wed, 09 Apr 2008 00:08:05 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=NpdAsaxRR2792GCtTBgxUngO2xtswtPbvEvTIQmenMysK4y3qlbBbl5DJHsaQL5T0LRcE0wsICKgVhEc0o549JhldekPogPh4Fly6u08p25b5s1QBR6mpemXjDkjkRjCAmJ7ePdwBYPmPQiVzWM6f1NE4FchQSW8iFkJfyWOF+I=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi All,

A quick query base on  xen-3.2 code base -

In the file xen/include/xen/sched.h line number 74

declaration for struct vcpu has a macro as follows,

 95 struct vcpu_runstate_info runstate;
 96 #ifndef CONFIG_COMPAT
 97 # define runstate_guest(v) ((v)->runstate_guest)
 98     XEN_GUEST_HANDLE(vcpu_runstate_info_t) runstate_guest; /*
guest address */
 99 #else
100 # define runstate_guest(v) ((v)->runstate_guest.native)
101     union {
102         XEN_GUEST_HANDLE(vcpu_runstate_info_t) native;
103         XEN_GUEST_HANDLE(vcpu_runstate_info_compat_t) compat;
104     } runstate_guest; /* guest address */
105 #endif

vcpu_runstate_into_t is an opaque data structure for
vcpu_runstate_info and its declaration tells me that
vcpu_runstate_info struct has nothing related to guest address as
suggested by the comment above /* guest address */.

I am not able to correlate the comment to the contents of the code.

Also line 95 above has a struct vcpu_runstate_info already. Whats the
point of having another one as a guest handle here? Does this means
two same vcpu states but one which is exclusively for guest and other
one is for struct vcpu's use?

Pardon my naive questions but I am new to the daunting Xen code base.

Can any one help me here? Or may be some hints in the right direction?

Pradeep Singh Rautela

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.