From: George Dunlap Subject: Re: [PATCH] xen: Add command line option to enable ASID support -- on by default Date: Wed, 7 Mar 2012 18:14:23 +0000 Message-ID: <1331144063.32288.25.camel@elijah> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Keir Fraser Cc: George Dunlap , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Wed, 2012-03-07 at 18:07 +0000, Keir Fraser wrote: > On 07/03/2012 17:58, "George Dunlap" wrote: > > > Signed-off-by: George Dunlap > > Why would you want to be able to disable the feature? Well at very least to measure the performance benefit (or overhead) of using the feature. There may be hardware in the future where ASIDs may cause problems; who knows. AFAICT this isn't documented anywhere, so if you really don't want Yet Another Option, we could probably get rid of it from the XenServer patchqueue. But I didn't see any harm in it; and you never know when the flexibility of disabling something without recompiling will come in handy. -George > > -- Keir > > > diff --git a/xen/arch/x86/hvm/svm/asid.c b/xen/arch/x86/hvm/svm/asid.c > > --- a/xen/arch/x86/hvm/svm/asid.c > > +++ b/xen/arch/x86/hvm/svm/asid.c > > @@ -24,12 +24,16 @@ > > #include > > #include > > > > +/* Xen command-line option to enable ASIDs */ > > +static int opt_asid_enabled = 1; > > +boolean_param("asid", opt_asid_enabled); > > + > > void svm_asid_init(struct cpuinfo_x86 *c) > > { > > int nasids = 0; > > > > /* Check for erratum #170, and leave ASIDs disabled if it's present. */ > > - if ( !cpu_has_amd_erratum(c, AMD_ERRATUM_170) ) > > + if ( opt_asid_enabled && !cpu_has_amd_erratum(c, AMD_ERRATUM_170) ) > > nasids = cpuid_ebx(0x8000000A); > > > > hvm_asid_init(nasids); > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel > >