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-ia64-devel

Re: [Xen-ia64-devel] [RFC] The "vcpu->arch.privregs" is doubly used

To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [RFC] The "vcpu->arch.privregs" is doubly used
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Tue, 21 Mar 2006 14:55:22 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 21 Mar 2006 05:56:46 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <571ACEFD467F7749BC50E0A98C17CDD8094E7999@pdsmsx403>
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>
References: <571ACEFD467F7749BC50E0A98C17CDD8094E7999@pdsmsx403>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Kevin,

Thanks for your comment.
I fix domain destruction processing too, and will resend a patch.
I found the some memory leak issue in VTI domain destruction 
processing. I fix it too, and will send a patch.

Best regards,
 Kan

Tian, Kevin wrote:
>>From:Masaki Kanno
>>Sent: 2006定3埖20晩 18:00
>>
>>Sorry. Because size is not same as the mapped_regs_t structure as for
>>the vpd structure, my patch cannot solve a problem. Maybe the "destroy"
>>processing will become wrong.
>
>Long time ago, there're two structures completely different to contain 
>virtual processor context for VTI and non-VTI domain, and later Eddie 
>proposed a patch to merge two at last OLS. However because the virtual 
>processor context defined in VTI domain has an alignment requirement, 
>the actual size is bigger for VTI domain.
>
>Now that there's no VTI specific flag passed at domain creation phase 
>(only at domain builder phase), I think your patch is at least necessary to 
>ensure memory leak issue.
>
>At domain destroy, it's easy to free that different size area since you know 
>whether it's a VTI or not. :-)
>
>Alex, could you help check-in this patch?
>
>Thanks,
>Kevin
>
>>
>>Best regards,
>> Kan
>>
>>Masaki Kanno wrote:
>>>Hi,
>>>
>>>I found the "vcpu->arch.privregs" being doubly used.
>>>Please refer to the following functions.
>>>
>>> - alloc_vcpu_struct()               : xen/arch/ia64/xen/domain.c
>>> - vmx_final_setup_guest()   : xen/arch/ia64/vmx/vmx_init.c
>>>
>>>I suggest the following patch. Please comment.
>>>
>>>Best regards,
>>> Kan
>>>
>>>diff -r 25003dd43a92 xen/arch/ia64/vmx/vmx_init.c
>>>--- a/xen/arch/ia64/vmx/vmx_init.c      Fri Mar 17 15:37:28 2006
>>-0700
>>>+++ b/xen/arch/ia64/vmx/vmx_init.c      Mon Mar 20 17:35:23 2006
>>+0900
>>>@@ -261,6 +261,8 @@ vmx_final_setup_guest(struct vcpu *v)
>>> {
>>>        vpd_t *vpd;
>>>
>>>+       free_xenheap_pages(v->arch.privregs,
>>get_order(sizeof(mapped_regs_t)));
>>>+
>>>        vpd = alloc_vpd();
>>>        ASSERT(vpd);
>>>
>>>
>>>
>>>_______________________________________________
>>>Xen-ia64-devel mailing list
>>>Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>>>http://lists.xensource.com/xen-ia64-devel
>>>
>>
>>
>>_______________________________________________
>>Xen-ia64-devel mailing list
>>Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>>http://lists.xensource.com/xen-ia64-devel
>


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