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

[Xen-changelog] [xen staging] xen/public: Obsolete HVM_PARAM_PAE_ENABLED



commit 1a16fee21ce4b0c876ee04af912b3f0545118cd9
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Wed Feb 5 14:33:00 2020 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Feb 21 15:28:40 2020 +0000

    xen/public: Obsolete HVM_PARAM_PAE_ENABLED
    
    Xen has never acted upon the value of HVM_PARAM_PAE_ENABLED, contrary 
perhaps
    to expectations based on how other boolean fields work.
    
    It was only ever used as a non-standard calling convention for
    xc_cpuid_apply_policy() but that has been fixed now.
    
    Purge its use, and any possible confusion over its behaviour, by having Xen
    reject any attempts to use it.  Forgo setting it up in libxl's
    hvm_set_conf_params().  The only backwards compatibility necessary is to 
have
    the HVM restore stream discard it if found.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxc/xc_sr_restore_x86_hvm.c | 10 ++++++++++
 tools/libxc/xc_sr_save_x86_hvm.c    |  1 -
 tools/libxl/libxl_x86.c             |  8 +-------
 xen/arch/x86/hvm/hvm.c              |  2 ++
 xen/include/public/hvm/params.h     |  3 +--
 5 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/tools/libxc/xc_sr_restore_x86_hvm.c 
b/tools/libxc/xc_sr_restore_x86_hvm.c
index 3f78248f32..adbdf1ae5f 100644
--- a/tools/libxc/xc_sr_restore_x86_hvm.c
+++ b/tools/libxc/xc_sr_restore_x86_hvm.c
@@ -72,6 +72,16 @@ static int handle_hvm_params(struct xc_sr_context *ctx,
         case HVM_PARAM_BUFIOREQ_PFN:
             xc_clear_domain_page(xch, ctx->domid, entry->value);
             break;
+
+        case HVM_PARAM_PAE_ENABLED:
+            /*
+             * This HVM_PARAM only ever existed to pass data into
+             * xc_cpuid_apply_policy().  The function has now been updated to
+             * use a normal calling convention, making the param obsolete.
+             *
+             * Discard if we find it in an old migration stream.
+             */
+            continue;
         }
 
         rc = xc_hvm_param_set(xch, ctx->domid, entry->index, entry->value);
diff --git a/tools/libxc/xc_sr_save_x86_hvm.c b/tools/libxc/xc_sr_save_x86_hvm.c
index d99efe65e5..7d3f3ddb8f 100644
--- a/tools/libxc/xc_sr_save_x86_hvm.c
+++ b/tools/libxc/xc_sr_save_x86_hvm.c
@@ -71,7 +71,6 @@ static int write_hvm_params(struct xc_sr_context *ctx)
         HVM_PARAM_ACPI_IOPORTS_LOCATION,
         HVM_PARAM_VIRIDIAN,
         HVM_PARAM_IDENT_PT,
-        HVM_PARAM_PAE_ENABLED,
         HVM_PARAM_VM_GENERATION_ID_ADDR,
         HVM_PARAM_IOREQ_SERVER_PFN,
         HVM_PARAM_NR_IOREQ_SERVER_PAGES,
diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c
index 1cae0e2b26..f8bc828e62 100644
--- a/tools/libxl/libxl_x86.c
+++ b/tools/libxl/libxl_x86.c
@@ -391,12 +391,10 @@ static int hvm_set_conf_params(libxl__gc *gc, uint32_t 
domid,
     libxl_ctx *ctx = libxl__gc_owner(gc);
     xc_interface *xch = ctx->xch;
     int ret = ERROR_FAIL;
-    bool pae = true, altp2m = info->altp2m;
+    bool altp2m = info->altp2m;
 
     switch(info->type) {
     case LIBXL_DOMAIN_TYPE_HVM:
-        pae = libxl_defbool_val(info->u.hvm.pae);
-
         /* The config parameter "altp2m" replaces the parameter "altp2mhvm". 
For
          * legacy reasons, both parameters are accepted on x86 HVM guests.
          *
@@ -425,10 +423,6 @@ static int hvm_set_conf_params(libxl__gc *gc, uint32_t 
domid,
 
         /* Fallthrough */
     case LIBXL_DOMAIN_TYPE_PVH:
-        if (xc_hvm_param_set(xch, domid, HVM_PARAM_PAE_ENABLED, pae)) {
-            LOG(ERROR, "Couldn't set HVM_PARAM_PAE_ENABLED");
-            goto out;
-        }
         if (xc_hvm_param_set(xch, domid, HVM_PARAM_TIMER_MODE,
                              timer_mode(info))) {
             LOG(ERROR, "Couldn't set HVM_PARAM_TIMER_MODE");
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 93795dab92..a339b36a0d 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4104,6 +4104,7 @@ static int hvm_allow_set_param(struct domain *d,
     case HVM_PARAM_X87_FIP_WIDTH:
         break;
     /* The following parameters are deprecated. */
+    case HVM_PARAM_PAE_ENABLED:
     case HVM_PARAM_DM_DOMAIN:
     case HVM_PARAM_MEMORY_EVENT_CR0:
     case HVM_PARAM_MEMORY_EVENT_CR3:
@@ -4407,6 +4408,7 @@ static int hvm_allow_get_param(struct domain *d,
     case HVM_PARAM_X87_FIP_WIDTH:
         break;
     /* The following parameters are deprecated. */
+    case HVM_PARAM_PAE_ENABLED:
     case HVM_PARAM_DM_DOMAIN:
     case HVM_PARAM_MEMORY_EVENT_CR0:
     case HVM_PARAM_MEMORY_EVENT_CR3:
diff --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h
index 68293e314e..0a91bfa749 100644
--- a/xen/include/public/hvm/params.h
+++ b/xen/include/public/hvm/params.h
@@ -28,6 +28,7 @@
 /* These parameters are deprecated and their meaning is undefined. */
 #if defined(__XEN__) || defined(__XEN_TOOLS__)
 
+#define HVM_PARAM_PAE_ENABLED                4
 #define HVM_PARAM_DM_DOMAIN                 13
 #define HVM_PARAM_MEMORY_EVENT_CR0          20
 #define HVM_PARAM_MEMORY_EVENT_CR3          21
@@ -92,8 +93,6 @@
 #define HVM_PARAM_STORE_PFN    1
 #define HVM_PARAM_STORE_EVTCHN 2
 
-#define HVM_PARAM_PAE_ENABLED  4
-
 #define HVM_PARAM_IOREQ_PFN    5
 
 #define HVM_PARAM_BUFIOREQ_PFN 6
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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