All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Tamas K Lengyel <tamas@tklengyel.com>, xen-devel@lists.xen.org
Cc: kevin.tian@intel.com, keir@xen.org, jun.nakajima@intel.com,
	eddie.dong@intel.com, jbeulich@suse.com,
	Tamas K Lengyel <tlengyel@novetta.com>,
	wei.liu2@citrix.com
Subject: Re: [PATCH] x86/vmx: fix vmx_is_singlestep_supported return value
Date: Mon, 24 Aug 2015 23:55:29 +0100	[thread overview]
Message-ID: <55DBA0E1.5090903@citrix.com> (raw)
In-Reply-To: <1440446133-1244-1-git-send-email-tamas@tklengyel.com>

On 24/08/2015 20:55, Tamas K Lengyel wrote:
> 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.

Ouch.  Given than bool_t is current signed char, that won't be of much use.

>
> Signed-off-by: Tamas K Lengyel <tlengyel@novetta.com>
> ---
>  xen/arch/x86/hvm/vmx/vmx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
> index 999defe..35bcd79 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 ? 1 : 0;

Prevailing style would tend towards !!cpu_has_monitor_trap_flag

Either way, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

>  }
>  
>  static void vmx_vcpu_update_eptp(struct vcpu *v)

  reply	other threads:[~2015-08-24 22:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 19:55 [PATCH] x86/vmx: fix vmx_is_singlestep_supported return value Tamas K Lengyel
2015-08-24 22:55 ` Andrew Cooper [this message]
2015-08-24 23:51   ` Tamas K Lengyel
2015-08-25  7:58     ` Jan Beulich
2015-08-27  7:39       ` Wei Liu
2015-08-28  2:01       ` Tian, Kevin
2015-08-28  7:05         ` Jan Beulich
2015-08-25  8:09 ` Wei Liu
2015-08-28  1:59 ` Tian, Kevin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55DBA0E1.5090903@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=eddie.dong@intel.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=tamas@tklengyel.com \
    --cc=tlengyel@novetta.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.