* [PATCH v2] HAP: Add global enable/disable command line option
@ 2013-01-28 11:21 Andrew Cooper
2013-02-08 14:53 ` Andrew Cooper
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cooper @ 2013-01-28 11:21 UTC (permalink / raw)
To: xen-devel; +Cc: Keir Fraser, Jan Beulich
Also, correct a copy&paste error in the documentation.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
Changes since v1:
* bool_t __initdata
* tweak logic to reduce size of patch
diff -r 5af4f2ab06f3 -r b741ace3835a docs/misc/xen-command-line.markdown
--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -521,6 +521,14 @@ more importance will be printed.
The optional `<rate-limited level>` option instructs which severities
should be rate limited.
+### hap
+> `= <boolean>`
+
+> Default: `true`
+
+Flag to globally enable or disable support for Hardware Assisted
+Paging (HAP)
+
### hap\_1gb
> `= <boolean>`
@@ -534,7 +542,7 @@ Paging (HAP).
> Default: `true`
-Flag to enable 1 GB host page table support for Hardware Assisted
+Flag to enable 2 MB host page table support for Hardware Assisted
Paging (HAP).
### hpetbroadcast
diff -r 5af4f2ab06f3 -r b741ace3835a xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -78,6 +78,10 @@ struct hvm_function_table hvm_funcs __re
unsigned long __attribute__ ((__section__ (".bss.page_aligned")))
hvm_io_bitmap[3*PAGE_SIZE/BYTES_PER_LONG];
+/* Xen command-line option to enable HAP */
+static bool_t __initdata opt_hap_enabled = 1;
+boolean_param("hap", opt_hap_enabled);
+
static int cpu_callback(
struct notifier_block *nfb, unsigned long action, void *hcpu)
{
@@ -123,7 +127,14 @@ static int __init hvm_enable(void)
hvm_enabled = 1;
printk("HVM: %s enabled\n", hvm_funcs.name);
- if ( hvm_funcs.hap_supported )
+ if ( ! hvm_funcs.hap_supported )
+ printk("HVM: Hardware Assisted Paging (HAP) not detected\n");
+ else if ( ! opt_hap_enabled )
+ {
+ hvm_funcs.hap_supported = 0;
+ printk("HVM: Hardware Assisted Paging (HAP) detected but disabled\n");
+ }
+ else
{
printk("HVM: Hardware Assisted Paging (HAP) detected\n");
printk("HVM: HAP page sizes: 4kB");
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] HAP: Add global enable/disable command line option
2013-01-28 11:21 [PATCH v2] HAP: Add global enable/disable command line option Andrew Cooper
@ 2013-02-08 14:53 ` Andrew Cooper
2013-02-08 16:50 ` Jan Beulich
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cooper @ 2013-02-08 14:53 UTC (permalink / raw)
To: xen-devel@lists.xen.org; +Cc: Keir (Xen.org), Jan Beulich
Ping?
On 28/01/13 11:21, Andrew Cooper wrote:
> Also, correct a copy&paste error in the documentation.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> ---
>
> Changes since v1:
> * bool_t __initdata
> * tweak logic to reduce size of patch
>
> diff -r 5af4f2ab06f3 -r b741ace3835a docs/misc/xen-command-line.markdown
> --- a/docs/misc/xen-command-line.markdown
> +++ b/docs/misc/xen-command-line.markdown
> @@ -521,6 +521,14 @@ more importance will be printed.
> The optional `<rate-limited level>` option instructs which severities
> should be rate limited.
>
> +### hap
> +> `= <boolean>`
> +
> +> Default: `true`
> +
> +Flag to globally enable or disable support for Hardware Assisted
> +Paging (HAP)
> +
> ### hap\_1gb
> > `= <boolean>`
>
> @@ -534,7 +542,7 @@ Paging (HAP).
>
> > Default: `true`
>
> -Flag to enable 1 GB host page table support for Hardware Assisted
> +Flag to enable 2 MB host page table support for Hardware Assisted
> Paging (HAP).
>
> ### hpetbroadcast
> diff -r 5af4f2ab06f3 -r b741ace3835a xen/arch/x86/hvm/hvm.c
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -78,6 +78,10 @@ struct hvm_function_table hvm_funcs __re
> unsigned long __attribute__ ((__section__ (".bss.page_aligned")))
> hvm_io_bitmap[3*PAGE_SIZE/BYTES_PER_LONG];
>
> +/* Xen command-line option to enable HAP */
> +static bool_t __initdata opt_hap_enabled = 1;
> +boolean_param("hap", opt_hap_enabled);
> +
> static int cpu_callback(
> struct notifier_block *nfb, unsigned long action, void *hcpu)
> {
> @@ -123,7 +127,14 @@ static int __init hvm_enable(void)
> hvm_enabled = 1;
>
> printk("HVM: %s enabled\n", hvm_funcs.name);
> - if ( hvm_funcs.hap_supported )
> + if ( ! hvm_funcs.hap_supported )
> + printk("HVM: Hardware Assisted Paging (HAP) not detected\n");
> + else if ( ! opt_hap_enabled )
> + {
> + hvm_funcs.hap_supported = 0;
> + printk("HVM: Hardware Assisted Paging (HAP) detected but disabled\n");
> + }
> + else
> {
> printk("HVM: Hardware Assisted Paging (HAP) detected\n");
> printk("HVM: HAP page sizes: 4kB");
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] HAP: Add global enable/disable command line option
2013-02-08 14:53 ` Andrew Cooper
@ 2013-02-08 16:50 ` Jan Beulich
2013-02-08 16:57 ` Tim Deegan
0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2013-02-08 16:50 UTC (permalink / raw)
To: Andrew Cooper, Tim Deegan; +Cc: Keir (Xen.org), xen-devel@lists.xen.org
>>> On 08.02.13 at 15:53, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> Ping?
As being HAP related I was assuming Tim would be taking care of
this, despite the modified code not being under xen/arch/x86/mm/,
or at least ack it.
Jan
> On 28/01/13 11:21, Andrew Cooper wrote:
>> Also, correct a copy&paste error in the documentation.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>
>> ---
>>
>> Changes since v1:
>> * bool_t __initdata
>> * tweak logic to reduce size of patch
>>
>> diff -r 5af4f2ab06f3 -r b741ace3835a docs/misc/xen-command-line.markdown
>> --- a/docs/misc/xen-command-line.markdown
>> +++ b/docs/misc/xen-command-line.markdown
>> @@ -521,6 +521,14 @@ more importance will be printed.
>> The optional `<rate-limited level>` option instructs which severities
>> should be rate limited.
>>
>> +### hap
>> +> `= <boolean>`
>> +
>> +> Default: `true`
>> +
>> +Flag to globally enable or disable support for Hardware Assisted
>> +Paging (HAP)
>> +
>> ### hap\_1gb
>> > `= <boolean>`
>>
>> @@ -534,7 +542,7 @@ Paging (HAP).
>>
>> > Default: `true`
>>
>> -Flag to enable 1 GB host page table support for Hardware Assisted
>> +Flag to enable 2 MB host page table support for Hardware Assisted
>> Paging (HAP).
>>
>> ### hpetbroadcast
>> diff -r 5af4f2ab06f3 -r b741ace3835a xen/arch/x86/hvm/hvm.c
>> --- a/xen/arch/x86/hvm/hvm.c
>> +++ b/xen/arch/x86/hvm/hvm.c
>> @@ -78,6 +78,10 @@ struct hvm_function_table hvm_funcs __re
>> unsigned long __attribute__ ((__section__ (".bss.page_aligned")))
>> hvm_io_bitmap[3*PAGE_SIZE/BYTES_PER_LONG];
>>
>> +/* Xen command-line option to enable HAP */
>> +static bool_t __initdata opt_hap_enabled = 1;
>> +boolean_param("hap", opt_hap_enabled);
>> +
>> static int cpu_callback(
>> struct notifier_block *nfb, unsigned long action, void *hcpu)
>> {
>> @@ -123,7 +127,14 @@ static int __init hvm_enable(void)
>> hvm_enabled = 1;
>>
>> printk("HVM: %s enabled\n", hvm_funcs.name);
>> - if ( hvm_funcs.hap_supported )
>> + if ( ! hvm_funcs.hap_supported )
>> + printk("HVM: Hardware Assisted Paging (HAP) not detected\n");
>> + else if ( ! opt_hap_enabled )
>> + {
>> + hvm_funcs.hap_supported = 0;
>> + printk("HVM: Hardware Assisted Paging (HAP) detected but
> disabled\n");
>> + }
>> + else
>> {
>> printk("HVM: Hardware Assisted Paging (HAP) detected\n");
>> printk("HVM: HAP page sizes: 4kB");
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] HAP: Add global enable/disable command line option
2013-02-08 16:50 ` Jan Beulich
@ 2013-02-08 16:57 ` Tim Deegan
0 siblings, 0 replies; 4+ messages in thread
From: Tim Deegan @ 2013-02-08 16:57 UTC (permalink / raw)
To: Jan Beulich; +Cc: Andrew Cooper, Keir (Xen.org), xen-devel@lists.xen.org
At 16:50 +0000 on 08 Feb (1360342244), Jan Beulich wrote:
> >>> On 08.02.13 at 15:53, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> > Ping?
>
> As being HAP related I was assuming Tim would be taking care of
> this, despite the modified code not being under xen/arch/x86/mm/,
> or at least ack it.
Sorry, slipped under my radar.
Acked-by: Tim Deegan <tim@xen.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-08 16:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28 11:21 [PATCH v2] HAP: Add global enable/disable command line option Andrew Cooper
2013-02-08 14:53 ` Andrew Cooper
2013-02-08 16:50 ` Jan Beulich
2013-02-08 16:57 ` Tim Deegan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).