diff mbox series

[1/2] x86/hvm: Simplify hvm_enable_msr_interception()

Message ID 20211130181139.14398-2-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show
Series x86/hvm: Cleanup | expand

Commit Message

Andrew Cooper Nov. 30, 2021, 6:11 p.m. UTC
The sole caller doesn't check the return value, and both vendors implement the
hook.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wl@xen.org>
CC: Tamas K Lengyel <tamas@tklengyel.com>
CC: Alexandru Isaila <aisaila@bitdefender.com>
CC: Petre Pircalabu <ppircalabu@bitdefender.com>
---
 xen/include/asm-x86/hvm/hvm.h | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Jan Beulich Dec. 1, 2021, 9:06 a.m. UTC | #1
On 30.11.2021 19:11, Andrew Cooper wrote:
> 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>
diff mbox series

Patch

diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h
index bd2cbb0e7baf..2767427aa938 100644
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -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)