|
[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 14:59, Hongyang Yang wrote:
>
>
> On 05/07/2015 06:35 PM, Andrew Cooper wrote:
>> 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.
>
> I noticed that in legacy migration, this was set multiple times, so
> this patch is only a workaround that will avoid the fail in my test.
> will try your hypervisor patch tomorrow.
Try this version, which has been rebased over Pauls' cleanup in this
area which has just been committed to staging.
~Andrew
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 371fd33..941e9ea 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -5710,12 +5710,13 @@ static int hvmop_set_param(
rc = -EINVAL;
break;
case HVM_PARAM_IDENT_PT:
- 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;
/*
@@ -5729,7 +5730,6 @@ static int hvmop_set_param(
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |