[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCHv1 5/5] x86/domctl: Add XEN_DOMCTL_PARAM_ARCH_X86_FIP_WIDTH parameter



Add a parameter to allow the toolstack to set the x87 FIP width in case
the hypervisor's heuristics do the wrong thing.

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 {
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.