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

[Xen-devel] RE: Avoid alloc for xsave before xsave_init

To: Keir Fraser <keir@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: Avoid alloc for xsave before xsave_init
From: "Wei, Gang" <gang.wei@xxxxxxxxx>
Date: Fri, 14 Jan 2011 13:06:48 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: "Wei, Gang" <gang.wei@xxxxxxxxx>
Delivery-date: Thu, 13 Jan 2011 21:08:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C9551B65.11CEA%keir@xxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <F26D193E20BBDC42A43B611D1BDEDE7125198A82D9@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C9551B65.11CEA%keir@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcuzUojLeS2z6tQSQCO88b+hMX2tAQAFCTB3ABA44MA=
Thread-topic: Avoid alloc for xsave before xsave_init
Keir Fraser wrote on 2011-01-14:
> On 13/01/2011 18:48, "Wei, Gang" <gang.wei@xxxxxxxxx> wrote:
> 
>> While debugging some weird booting failure bugs, just found
>> currently, xsave_alloc_save_area will be called in
>> init_idle_domain->scheduler_init->alloc_vcpu->vcpu_initialise calls,
>> it is earlier than xsave_init called in identity_cpu(). This may
>> causing buffer overflow on xmem_pool. I am thinking about how to fix it.
> 
> I doubt idle vcpus need an xsave context. Can we check for
> is_idle_vcpu() in xsave_{alloc,free}_save_area()?
> 
> Is this an issue only for xen-unstable/4.1 (not 4.0)?

This issue was induced by c/s 22345 two months ago, which moved the xsave alloc 
code out from hvm_vcpu_initialise() to support pv guest but forget to exclude 
idle vcpus. It looks like not back pulled to 4.0. So only 4.1 suffers from it.

Jimmy



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