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

Re: [Xen-devel] [PATCH Remus v1 5/8] tools/libxc: defer the setting of HVM_PARAM_IDENT_PT



On 07/05/15 07:37, Yang Hongyang wrote:
> Set the hvm param HVM_PARAM_IDENT_PT second time will fail.
> So defer the setting of HVM_PARAM_IDENT_PT.
>
> Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx>

I would argue that this is a Xen bug, not a migration bug.  There is
nothing conceptually wrong with setting this param multiple times.

Please try the following hypervisor patch instead:

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 3a09439..9ee56b3 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -5748,12 +5748,13 @@ long do_hvm_op(unsigned long op,
XEN_GUEST_HANDLE_PARAM(void) arg)
                 if ( curr_d == d )
                     break;
 
-                rc = -EINVAL;
-                if ( d->arch.hvm_domain.params[a.index] != 0 )
-                    break;
-
                 rc = 0;
-                if ( !paging_mode_hap(d) )
+                d->arch.hvm_domain.params[a.index] = a.value;
+                /*
+                 * Only actually required for VT-x lacking
unrestricted_guest
+                 * capabilities.  Short circuit the pause if possible.
+                 */
+                if ( !paging_mode_hap(d) || !cpu_has_vmx )
                     break;
 
                 /*
@@ -5767,7 +5768,6 @@ long do_hvm_op(unsigned long op,
XEN_GUEST_HANDLE_PARAM(void) arg)
 
                 rc = 0;
                 domain_pause(d);
-                d->arch.hvm_domain.params[a.index] = a.value;
                 for_each_vcpu ( d, v )
                     paging_update_cr3(v);
                 domain_unpause(d);


_______________________________________________
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®.