|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 03/12] x86/HVM: Hardware alternate p2m support detection.
On 22/06/15 19:56, Ed White wrote:
> As implemented here, only supported on platforms with VMX HAP.
>
> By default this functionality is force-disabled, it can be enabled
> by specifying altp2m=1 on the Xen command line.
>
> Signed-off-by: Ed White <edmund.h.white@xxxxxxxxx>
> ---
> docs/misc/xen-command-line.markdown | 7 +++++++
> xen/arch/x86/hvm/hvm.c | 12 ++++++++++++
> xen/arch/x86/hvm/vmx/vmx.c | 1 +
> xen/include/asm-x86/hvm/hvm.h | 6 ++++++
> 4 files changed, 26 insertions(+)
>
> diff --git a/docs/misc/xen-command-line.markdown
> b/docs/misc/xen-command-line.markdown
> index aa684c0..3391c66 100644
> --- a/docs/misc/xen-command-line.markdown
> +++ b/docs/misc/xen-command-line.markdown
> @@ -139,6 +139,13 @@ mode during S3 resume.
> > Default: `true`
>
> Permit Xen to use superpages when performing memory management.
> +
> +### altp2m (Intel)
> +> `= <boolean>`
> +
> ++> Default: `false`
> +
> +Permit multiple copies of host p2m.
>
> ### apic
> > `= bigsmp | default`
> diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
> index 65baa1b..af68d44 100644
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -94,6 +94,10 @@ bool_t opt_hvm_fep;
> boolean_param("hvm_fep", opt_hvm_fep);
> #endif
>
> +/* Xen command-line option to enable altp2m */
> +static bool_t __initdata opt_altp2m_enabled = 0;
> +boolean_param("altp2m", opt_altp2m_enabled);
> +
> static int cpu_callback(
> struct notifier_block *nfb, unsigned long action, void *hcpu)
> {
> @@ -160,6 +164,9 @@ static int __init hvm_enable(void)
> if ( !fns->pvh_supported )
> printk(XENLOG_INFO "HVM: PVH mode not supported on this platform\n");
>
> + if ( !opt_altp2m_enabled )
> + hvm_funcs.altp2m_supported = 0;
> +
> /*
> * Allow direct access to the PC debug ports 0x80 and 0xed (they are
> * often used for I/O delays, but the vmexits simply slow things down).
> @@ -6474,6 +6481,11 @@ enum hvm_intblk nhvm_interrupt_blocked(struct vcpu *v)
> return hvm_funcs.nhvm_intr_blocked(v);
> }
>
> +bool_t hvm_altp2m_supported()
> +{
> + return hvm_funcs.altp2m_supported;
> +}
I would put this as a static inline in hvm.h, as opposed to forcing a
call into a different translation unit to retrieve a global boolean.
Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |