All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [v2] VMX: replace some plain numbers
  2015-04-16 20:49 [v2] VMX: replace some plain numbers Liang Li
@ 2015-04-16  9:53 ` Jan Beulich
  2015-04-16  9:57   ` Li, Liang Z
  2015-04-16 15:55 ` Tian, Kevin
  1 sibling, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2015-04-16  9:53 UTC (permalink / raw)
  To: Liang Li
  Cc: kevin.tian, keir, andrew.cooper3, eddie.dong, xen-devel,
	jun.nakajima, yang.z.zhang

>>> On 16.04.15 at 22:49, <liang.z.li@intel.com> wrote:
> ... making the code better document itself. No functional change
> intended.
> 
> Signed-off-by: Liang Li <liang.z.li@intel.com>
> ---

>From looking at it I can't see what the difference to v1 is, and you
also don't say anything in that regard here.

Jan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [v2] VMX: replace some plain numbers
  2015-04-16  9:53 ` Jan Beulich
@ 2015-04-16  9:57   ` Li, Liang Z
  0 siblings, 0 replies; 4+ messages in thread
From: Li, Liang Z @ 2015-04-16  9:57 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Tian, Kevin, keir, andrew.cooper3, Dong, Eddie, xen-devel,
	Nakajima, Jun, Zhang, Yang Z

> 
> >>> On 16.04.15 at 22:49, <liang.z.li@intel.com> wrote:
> > ... making the code better document itself. No functional change
> > intended.
> >
> > Signed-off-by: Liang Li <liang.z.li@intel.com>
> > ---
> 
> From looking at it I can't see what the difference to v1 is, and you also don't
> say anything in that regard here.
> 
> Jan

In v1, the 'X86_EVENTTYPE_EXT_INTR' is used instead of 'X86_EVENTTYPE_NMI', and it's wrong ...
I didn't found that at first.

Liang

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [v2] VMX: replace some plain numbers
  2015-04-16 20:49 [v2] VMX: replace some plain numbers Liang Li
  2015-04-16  9:53 ` Jan Beulich
@ 2015-04-16 15:55 ` Tian, Kevin
  1 sibling, 0 replies; 4+ messages in thread
From: Tian, Kevin @ 2015-04-16 15:55 UTC (permalink / raw)
  To: Li, Liang Z, xen-devel
  Cc: keir, jbeulich, andrew.cooper3, Dong, Eddie, Nakajima, Jun,
	Zhang, Yang Z

> From: Li, Liang Z
> Sent: Friday, April 17, 2015 4:50 AM
> 
> ... making the code better document itself. No functional change
> intended.
> 
> Signed-off-by: Liang Li <liang.z.li@intel.com>

Acked-by: Kevin Tian <kevin.tian@intel.com>

> ---
>  xen/arch/x86/hvm/vmx/vmx.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
> index 6c4f78c..892a3bc 100644
> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -2628,8 +2628,9 @@ static void vmx_idtv_reinject(unsigned long
> idtv_info)
>           * Clear NMI-blocking interruptibility info if an NMI delivery
> faulted.
>           * Re-delivery will re-set it (see SDM 3B 25.7.1.2).
>           */
> -        if ( cpu_has_vmx_vnmi && ((idtv_info &
> INTR_INFO_INTR_TYPE_MASK) ==
> -                                 (X86_EVENTTYPE_NMI<<8)) )
> +        if ( cpu_has_vmx_vnmi &&
> +             ((idtv_info & INTR_INFO_INTR_TYPE_MASK) ==
> +              MASK_INSR(X86_EVENTTYPE_NMI,
> INTR_INFO_INTR_TYPE_MASK)) )
>          {
>              unsigned long intr_info;
> 
> @@ -2705,9 +2706,9 @@ void vmx_vmexit_handler(struct cpu_user_regs
> *regs)
>          vector = intr_info & INTR_INFO_VECTOR_MASK;
>          if ( vector == TRAP_machine_check )
>              do_machine_check(regs);
> -        if ( vector == TRAP_nmi
> -             && ((intr_info & INTR_INFO_INTR_TYPE_MASK) ==
> -                 (X86_EVENTTYPE_NMI << 8)) )
> +        if ( (vector == TRAP_nmi) &&
> +             ((intr_info & INTR_INFO_INTR_TYPE_MASK) ==
> +              MASK_INSR(X86_EVENTTYPE_NMI,
> INTR_INFO_INTR_TYPE_MASK)) )
>          {
>              exception_table[TRAP_nmi](regs);
>              enable_nmis();
> --
> 1.9.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [v2] VMX: replace some plain numbers
@ 2015-04-16 20:49 Liang Li
  2015-04-16  9:53 ` Jan Beulich
  2015-04-16 15:55 ` Tian, Kevin
  0 siblings, 2 replies; 4+ messages in thread
From: Liang Li @ 2015-04-16 20:49 UTC (permalink / raw)
  To: xen-devel
  Cc: kevin.tian, keir, jbeulich, andrew.cooper3, Liang Li, eddie.dong,
	jun.nakajima, yang.z.zhang

... making the code better document itself. No functional change
intended.

Signed-off-by: Liang Li <liang.z.li@intel.com>
---
 xen/arch/x86/hvm/vmx/vmx.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 6c4f78c..892a3bc 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2628,8 +2628,9 @@ static void vmx_idtv_reinject(unsigned long idtv_info)
          * Clear NMI-blocking interruptibility info if an NMI delivery faulted.
          * Re-delivery will re-set it (see SDM 3B 25.7.1.2).
          */
-        if ( cpu_has_vmx_vnmi && ((idtv_info & INTR_INFO_INTR_TYPE_MASK) ==
-                                 (X86_EVENTTYPE_NMI<<8)) )
+        if ( cpu_has_vmx_vnmi &&
+             ((idtv_info & INTR_INFO_INTR_TYPE_MASK) ==
+              MASK_INSR(X86_EVENTTYPE_NMI, INTR_INFO_INTR_TYPE_MASK)) )
         {
             unsigned long intr_info;
 
@@ -2705,9 +2706,9 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
         vector = intr_info & INTR_INFO_VECTOR_MASK;
         if ( vector == TRAP_machine_check )
             do_machine_check(regs);
-        if ( vector == TRAP_nmi
-             && ((intr_info & INTR_INFO_INTR_TYPE_MASK) ==
-                 (X86_EVENTTYPE_NMI << 8)) )
+        if ( (vector == TRAP_nmi) &&
+             ((intr_info & INTR_INFO_INTR_TYPE_MASK) ==
+              MASK_INSR(X86_EVENTTYPE_NMI, INTR_INFO_INTR_TYPE_MASK)) )
         {
             exception_table[TRAP_nmi](regs);
             enable_nmis();
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-16 20:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16 20:49 [v2] VMX: replace some plain numbers Liang Li
2015-04-16  9:53 ` Jan Beulich
2015-04-16  9:57   ` Li, Liang Z
2015-04-16 15:55 ` Tian, Kevin

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.