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/
Home Products Support Community News


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

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [xen-3.2]comment and code inconsistency in struct vcpu declaration?
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=UpXxSZu0VFMn9185YzYdOAsbjKXo/ephR/Rax7CHoss=; b=X3XMwMQsztXmROaodxboeF2VM3Cy0k7OJpZzk+iYMLEpTLZyb5b7OPjwQ0xKgo2s1vIP9XWNvdmoqozho6t1O0cAor8mjlsuVY93QCMJkzGJQabFhW1CR4t/RQU8gYoqUGC8bBF68WwVx+23XWEhVEMcIU4mYymQ/3e8Cr5ZZXw=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [xen-3.2]comment and code inconsistency in struct vcpu declaration?, pradeep singh rautela <=