VMX: replace some plain numbers
PATCH v2 1/1 VMX: replace some plain numbers
... making the code better document itself. No functional change intended.
--- xen/arch/x86/hvm/vmx/vmx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
xen/arch/x86/hvm/vmx/vmx.c +6 -5
@@ -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 ();
Signature · 1 line
1.9.1
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 16.04.15 at 22:49, <[email protected]> wrote:
... making the code better document itself. No functional change intended.
Signed-off-by Liang Li <[email protected]>---
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
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines · On 16.04.15 at 22:49, <[email protected]> wrote:
... making the code better document itself. No functional change intended.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Liang Li <[email protected]>---
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
Quoted 7 lines
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 <[email protected]>
Quoted 41 lines
--- xen/arch/x86/hvm/vmx/vmx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)xen/arch/x86/hvm/vmx/vmx.c +0
-0@@ -2628,8 +2628,9 @@ static void vmx_idtv_reinject(unsigned long idtv_info) * Clear NMI-blocking interruptibility info if an NMI deliveryfaulted.
* 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) ==xen/arch/x86/hvm/vmx/vmx.c +3
-1- (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;xen/arch/x86/hvm/vmx/vmx.c +3
-3@@ -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