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


RE: [Xen-ia64-devel] [PATCH] Fix freeing of privregs structure fordomVTi

To: "Masaki Kanno" <kanno.masaki@xxxxxxxxxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel] [PATCH] Fix freeing of privregs structure fordomVTi
From: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Date: Fri, 12 Jan 2007 11:01:33 +0800
Delivery-date: Thu, 11 Jan 2007 19:01:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <F1C73559E2ACD5kanno.masaki@xxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acc1Wixhid0lNHPyTL2UNqHc7uCYVAAmZs+w
Thread-topic: [Xen-ia64-devel] [PATCH] Fix freeing of privregs structure fordomVTi
Masaki Kanno write on 2007年1月11日 16:24:
> Hi,

Hi Kanno,

Good catch!

I have below comment.

The root cause is,  vhpt and privregs for xeno are allocated at hypercall
XEN-DOMCTL_max_vcpus, at that time d->arch.is_vti is not set yet.
When d->arch.is_vti is set, vhpt and privregs allocated for xeno are released, 
and vhpt and privregs for VTI are allocated at this time.

This logic is a little bit ugly.

Can we postpone vhpt and privregs allocation until d->arch.is_vti is set?

One place is at xen/arch/ia64/xen/arch_set_info_guest,

/*TODO  We can move vhpt and privregs logic for xeno here. */


What's your opinioin?


> When I repeated creation and destruction of domVTi, I found a bug.
> It is memory leak of privregs structure.
> This patch fixes the bug.
> Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
> Best regards,
>  Kan

Xen-ia64-devel mailing list