|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCHv1 5/5] x86/domctl: Add XEN_DOMCTL_PARAM_ARCH_X86_FIP_WIDTH parameter
On 18/02/16 18:52, David Vrabel wrote:
> Add a parameter to allow the toolstack to set the x87 FIP width in case
> the hypervisor's heuristics do the wrong thing.
I think this would be better as a HVM param since: a) it only needs to
be changed for HVM guests; b) it would allow the guest agent or OS
(which may be able to make a better decision) to set it; and c) it can
be saved/restored across a migrate.
David
>
> Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
> ---
> xen/arch/x86/domctl.c | 10 ++++++++++
> xen/include/public/domctl.h | 1 +
> 2 files changed, 11 insertions(+)
>
> diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
> index 3a3ebbf..f75cd69 100644
> --- a/xen/arch/x86/domctl.c
> +++ b/xen/arch/x86/domctl.c
> @@ -1415,6 +1415,16 @@ int arch_domctl_param(struct domain *d, uint32_t
> param, bool_t set,
>
> switch ( param )
> {
> + case XEN_DOMCTL_PARAM_ARCH_X86_FIP_WIDTH:
> + *value = d->arch.x87_fip_width;
> + if ( set )
> + {
> + if ( new_value != 0 && new_value != 4 && new_value != 8 )
> + return -EINVAL;
> + d->arch.x87_fip_width = new_value;
> + }
> + break;
> +
> default:
> return -EINVAL;
> }
> diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
> index 330b3e7..26d4096 100644
> --- a/xen/include/public/domctl.h
> +++ b/xen/include/public/domctl.h
> @@ -1100,6 +1100,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_psr_cat_op_t);
> *
> * Not all parameters are valid for all architectures or domain types.
> */
> +#define XEN_DOMCTL_PARAM_ARCH_X86_FIP_WIDTH 0
> #define XEN_DOMCTL_PARAM_SET (1u << 31)
>
> struct xen_domctl_param {
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |