From: Tamas K Lengyel Date: Fri, 28 Aug 2015 10:17:05 +0000 (+0200) Subject: x86/vmx: fix vmx_is_singlestep_supported return value X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2606 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=340ade2f0ef692efce01a708ad98629af985f978;p=xen.git x86/vmx: fix vmx_is_singlestep_supported return value The function supposed to return a boolean but instead it returned the value 0x8000000 which is the Intel internal flag for MTF. This has caused various checks using this function to falsely report no MTF capability. Signed-off-by: Tamas K Lengyel Reviewed-by: Andrew Cooper Acked-by: Kevin Tian Release-acked-by: Wei Liu --- diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 999defeaa3..2582cddf67 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -1768,7 +1768,7 @@ static void vmx_enable_msr_exit_interception(struct domain *d) static bool_t vmx_is_singlestep_supported(void) { - return cpu_has_monitor_trap_flag; + return !!cpu_has_monitor_trap_flag; } static void vmx_vcpu_update_eptp(struct vcpu *v)