xen: Add command line option to enable ASID support -- on by default
PATCH 1/1 xen: Add command line option to enable ASID support -- on by default
xen/arch/x86/hvm/svm/asid.c +5 -1
@@ -24,12 +24,16 @@#include <asm/amd.h> #include <asm/hvm/nestedhvm.h> +/* 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);
Quoted 1 line · George Dunlap
Signed-off-by George Dunlap <[email protected]>
Why would you want to be able to disable the feature?
-- Keir
Quoted 26 lines
xen/arch/x86/hvm/svm/asid.c +5
-1@@ -24,12 +24,16 @@#include <asm/amd.h> #include <asm/hvm/nestedhvm.h> +/* 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
[email protected]
http://lists.xen.org/xen-devel
Quoted 5 lines · Keir Fraser
Quoted 1 line · George Dunlap
Signed-off-by George Dunlap <[email protected]>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
Quoted 31 lines
-- Keir
Quoted 26 lines
xen/arch/x86/hvm/svm/asid.c +5
-1@@ -24,12 +24,16 @@#include <asm/amd.h> #include <asm/hvm/nestedhvm.h> +/* 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
[email protected]
http://lists.xen.org/xen-devel
Quoted 11 lines · George Dunlap
Quoted 5 lines · Keir Fraser
Quoted 1 line · George Dunlap
Signed-off-by George Dunlap <[email protected]>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.
Quoted 5 lines
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.
Okay, I applied it. I also moved the implementation into hvm/asid.c by the way -- your patch was unnecessarily AMD-specific.
xen-unstable:24986
-- Keir
Quoted 35 lines
-George
Quoted 31 lines
-- Keir
Quoted 26 lines
xen/arch/x86/hvm/svm/asid.c +5
-1@@ -24,12 +24,16 @@#include <asm/amd.h> #include <asm/hvm/nestedhvm.h> +/* 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
[email protected]
http://lists.xen.org/xen-devel
Keir Fraser writes ("Re: [Xen-devel] [PATCH] xen: Add command line option to enable ASID support -- on by default"):
Quoted 11 lines · George Dunlap
Quoted 9 lines
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.
Quoted 4 lines
Okay, I applied it. I also moved the implementation into
hvm/asid.cby the way -- your patch was unnecessarily AMD-specific.xen-unstable:24986
Surely given that we now have a document listing the command line options we shouldn't be introducing new options with no documentation ?
If George's original patch had come with a docs hunk it probably would have already contained the answers to the questions you asked, too...
Ian.
Quoted 15 lines · Ian Jackson
Keir Fraser writes ("Re: [Xen-devel] [PATCH] xen: Add command line option to enable ASID support -- on by default"):
Quoted 14 lines · George Dunlap
Quoted 9 lines
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.
Okay, I applied it. I also moved the implementation into
hvm/asid.cby the way -- your patch was unnecessarily AMD-specific.
Quoted 7 lines
Quoted 1 line
xen-unstable:24986
Surely given that we now have a document listing the command line options we shouldn't be introducing new options with no documentation ?
If George's original patch had come with a docs hunk it probably would have already contained the answers to the questions you asked, too...
When I wrote the patch I wasn't aware of the new doc file. (IIUC it was at most a week old at that point.) I'll put updating it on my to-do list.
-George
Quoted 7 lines
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
George Dunlap writes ("Re: [Xen-devel] [PATCH] xen: Add command line option to enable ASID support -- on by default"):
Quoted 11 lines · Ian Jackson
Quoted 6 lines
Keir Fraser writes ("Re: [Xen-devel] [PATCH] xen: Add command line option to enable ASID support -- on by default"):
Surely given that we now have a document listing the command line
options we shouldn't be introducing new options with no documentation ?If George's original patch had come with a docs hunk it probably would have already contained the answers to the questions you asked, too...
When I wrote the patch I wasn't aware of the new doc file. (IIUC it was at most a week old at that point.) I'll put updating it on my to-do list.
Well it was only introduced last week :-). Thanks.
Ian.