[PATCH] x86/HVM: drop dead code from HVM_PARAM_IDENT_PT setting

Jan Beulich posted 1 patch 1 week, 5 days ago
Failed in applying to current master (apply log)
[PATCH] x86/HVM: drop dead code from HVM_PARAM_IDENT_PT setting
Posted by Jan Beulich 1 week, 5 days ago
The setting of d->arch.hvm.params[] will uniformly happen at the bottom of
hvm_set_param(), hence as per Misra's classification redundantly doing so
earlier is "dead code".

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4242,10 +4242,7 @@ static int hvm_set_param(struct domain *
          * capabilities.  Short circuit the pause if possible.
          */
         if ( paging_mode_shadow(d) || !using_vmx() )
-        {
-            d->arch.hvm.params[index] = value;
             break;
-        }
 
         /*
          * Update GUEST_CR3 in each VMCS to point at identity map.
Re: [PATCH] x86/HVM: drop dead code from HVM_PARAM_IDENT_PT setting
Posted by Jason Andryuk 1 week, 5 days ago
On 2026-04-22 08:52, Jan Beulich wrote:
> The setting of d->arch.hvm.params[] will uniformly happen at the bottom of
> hvm_set_param(), hence as per Misra's classification redundantly doing so
> earlier is "dead code".
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>