|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [VMX] Check INTR_TYPE is NMI before doing
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 1d4fc7396c41658e8fb85267b7f4d9748dc99298
# Parent 4e3ddf1288fb2c5a434947a0366490944c9ea399
[VMX] Check INTR_TYPE is NMI before doing physical NMI processing.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
xen/arch/x86/hvm/vmx/vmx.c | 21 +++++++++++++--------
xen/include/asm-x86/hvm/vmx/vmx.h | 1 +
2 files changed, 14 insertions(+), 8 deletions(-)
diff -r 4e3ddf1288fb -r 1d4fc7396c41 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c Tue Nov 07 18:14:16 2006 -0700
+++ b/xen/arch/x86/hvm/vmx/vmx.c Wed Nov 08 15:10:21 2006 +0000
@@ -2112,17 +2112,19 @@ asmlinkage void vmx_vmexit_handler(struc
* (1) We can get an exception (e.g. #PG) in the guest, or
* (2) NMI
*/
- unsigned int vector;
-
- if ( __vmread(VM_EXIT_INTR_INFO, &vector) ||
- !(vector & INTR_INFO_VALID_MASK) )
- domain_crash_synchronous();
- vector &= INTR_INFO_VECTOR_MASK;
+ unsigned int intr_info, vector;
+
+ if ( __vmread(VM_EXIT_INTR_INFO, &intr_info) ||
+ !(intr_info & INTR_INFO_VALID_MASK) )
+ __hvm_bug(regs);
+
+ vector = intr_info & INTR_INFO_VECTOR_MASK;
TRACE_VMEXIT(1, vector);
perfc_incra(cause_vector, vector);
- switch ( vector ) {
+ switch ( vector )
+ {
#ifdef XEN_DEBUGGER
case TRAP_debug:
{
@@ -2198,7 +2200,10 @@ asmlinkage void vmx_vmexit_handler(struc
break;
}
case TRAP_nmi:
- do_nmi(regs);
+ if ( (intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI )
+ do_nmi(regs); /* Real NMI, vector 2: normal processing. */
+ else
+ vmx_reflect_exception(v);
break;
default:
vmx_reflect_exception(v);
diff -r 4e3ddf1288fb -r 1d4fc7396c41 xen/include/asm-x86/hvm/vmx/vmx.h
--- a/xen/include/asm-x86/hvm/vmx/vmx.h Tue Nov 07 18:14:16 2006 -0700
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h Wed Nov 08 15:10:21 2006 +0000
@@ -93,6 +93,7 @@ extern unsigned int cpu_rev;
#define INTR_INFO_VALID_MASK 0x80000000 /* 31 */
#define INTR_TYPE_EXT_INTR (0 << 8) /* external interrupt */
+#define INTR_TYPE_NMI (2 << 8) /* NMI */
#define INTR_TYPE_HW_EXCEPTION (3 << 8) /* hardware exception */
#define INTR_TYPE_SW_EXCEPTION (6 << 8) /* software exception */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [VMX] Check INTR_TYPE is NMI before doing physical NMI processing.,
Xen patchbot-unstable <=
|
|
|
|
|