x86/hvm: Simplify hvm_enable_msr_interception()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 30 Nov 2021 14:37:59 +0000 (14:37 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 13 Jan 2022 15:19:43 +0000 (15:19 +0000)
The sole caller doesn't check the return value, and both vendors implement the
hook.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/include/asm/hvm/hvm.h

index bd2cbb0e7bafb6819c5991598315dbb26837fe3d..2767427aa938150c3eb339ef02be28131ad17d86 100644 (file)
@@ -631,15 +631,9 @@ static inline enum hvm_intblk nhvm_interrupt_blocked(struct vcpu *v)
     return hvm_funcs.nhvm_intr_blocked(v);
 }
 
-static inline bool_t hvm_enable_msr_interception(struct domain *d, uint32_t msr)
+static inline void hvm_enable_msr_interception(struct domain *d, uint32_t msr)
 {
-    if ( hvm_funcs.enable_msr_interception )
-    {
-        hvm_funcs.enable_msr_interception(d, msr);
-        return 1;
-    }
-
-    return 0;
+    hvm_funcs.enable_msr_interception(d, msr);
 }
 
 static inline bool_t hvm_is_singlestep_supported(void)