:p
atchew
Login
When settings HVM_PARAM_IDENT_PT, skip domain pausing when : - there is no vcpu - unrestricted guest capability is used Signed-off-by: Teddy Astie <teddy.astie@vates.tech> --- xen/arch/x86/hvm/hvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index XXXXXXX..XXXXXXX 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -XXX,XX +XXX,XX @@ static int hvm_set_param(struct domain *d, uint32_t index, uint64_t value) rc = -EINVAL; break; case HVM_PARAM_IDENT_PT: + v = domain_vcpu(d, 0); + /* * Only actually required for VT-x lacking unrestricted_guest * capabilities. Short circuit the pause if possible. */ - if ( !paging_mode_hap(d) || !cpu_has_vmx ) + if ( !paging_mode_hap(d) || !cpu_has_vmx || !v || vmx_unrestricted_guest(v) ) { d->arch.hvm.params[index] = value; break; -- 2.50.1 Teddy Astie | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
When settings HVM_PARAM_IDENT_PT, skip domain pausing when : - there is no vcpu - unrestricted guest capability is used Signed-off-by: Teddy Astie <teddy.astie@vates.tech> --- v2: - rebased patches with staging xen/arch/x86/hvm/hvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index XXXXXXX..XXXXXXX 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -XXX,XX +XXX,XX @@ static int hvm_set_param(struct domain *d, uint32_t index, uint64_t value) rc = -EINVAL; break; case HVM_PARAM_IDENT_PT: + v = domain_vcpu(d, 0); + /* * Only actually required for VT-x lacking unrestricted_guest * capabilities. Short circuit the pause if possible. */ - if ( paging_mode_shadow(d) || !using_vmx() ) + if ( paging_mode_shadow(d) || !using_vmx() || !v || vmx_unrestricted_guest(v) ) { d->arch.hvm.params[index] = value; break; -- 2.52.0 -- Teddy Astie | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech