|
|
b266fc5 |
changeset: 15239:656b8175f4f2
|
|
|
b266fc5 |
user: kfraser@localhost.localdomain
|
|
|
b266fc5 |
date: Fri Jun 08 11:19:55 2007 +0100
|
|
|
b266fc5 |
files: tools/firmware/vmxassist/vm86.c tools/firmware/vmxassist/vm86.h xen/arch/x86/hvm/vmx/vmx.c xen/arch/x86/hvm/vpic.c xen/include/asm-x86/hvm/vmx/vmcs.h xen/include/public/hvm/vmx_assist.h
|
|
|
b266fc5 |
description:
|
|
|
b266fc5 |
hvm: Respect irqbase set by protected mode in mode switching with VMXAssist.
|
|
|
b266fc5 |
|
|
|
b266fc5 |
RHEL4U4 PAE SMP guest currently crashes, and we found changeset 15214
|
|
|
b266fc5 |
introduced it. This patch fixes it.
|
|
|
b266fc5 |
|
|
|
b266fc5 |
Signed-off-by: Xin Li <xin.b.li@intel.com>
|
|
|
b266fc5 |
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
|
|
|
b266fc5 |
|
|
|
b266fc5 |
|
|
|
b266fc5 |
diff -r 345ae2e61ba0 -r 656b8175f4f2 tools/firmware/vmxassist/vm86.c
|
|
|
b266fc5 |
--- a/tools/firmware/vmxassist/vm86.c Thu Jun 07 20:02:27 2007 +0100
|
|
|
b266fc5 |
+++ b/tools/firmware/vmxassist/vm86.c Fri Jun 08 11:19:55 2007 +0100
|
|
|
b266fc5 |
@@ -927,6 +927,7 @@ load_or_clear_seg(unsigned long sel, uin
|
|
|
b266fc5 |
load_seg(0, base, limit, arbytes);
|
|
|
b266fc5 |
}
|
|
|
b266fc5 |
|
|
|
b266fc5 |
+static unsigned char rm_irqbase[2];
|
|
|
b266fc5 |
|
|
|
b266fc5 |
/*
|
|
|
b266fc5 |
* Transition to protected mode
|
|
|
b266fc5 |
@@ -935,6 +936,9 @@ protected_mode(struct regs *regs)
|
|
|
b266fc5 |
protected_mode(struct regs *regs)
|
|
|
b266fc5 |
{
|
|
|
b266fc5 |
extern char stack_top[];
|
|
|
b266fc5 |
+
|
|
|
b266fc5 |
+ oldctx.rm_irqbase[0] = rm_irqbase[0];
|
|
|
b266fc5 |
+ oldctx.rm_irqbase[1] = rm_irqbase[1];
|
|
|
b266fc5 |
|
|
|
b266fc5 |
regs->eflags &= ~(EFLAGS_TF|EFLAGS_VM);
|
|
|
b266fc5 |
|
|
|
b266fc5 |
@@ -1187,6 +1191,7 @@ outbyte(struct regs *regs, unsigned pref
|
|
|
b266fc5 |
icw2[0] = 0;
|
|
|
b266fc5 |
printf("Remapping master: ICW2 0x%x -> 0x%x\n",
|
|
|
b266fc5 |
al, NR_EXCEPTION_HANDLER);
|
|
|
b266fc5 |
+ rm_irqbase[0] = al;
|
|
|
b266fc5 |
al = NR_EXCEPTION_HANDLER;
|
|
|
b266fc5 |
}
|
|
|
b266fc5 |
break;
|
|
|
b266fc5 |
@@ -1200,6 +1205,7 @@ outbyte(struct regs *regs, unsigned pref
|
|
|
b266fc5 |
icw2[1] = 0;
|
|
|
b266fc5 |
printf("Remapping slave: ICW2 0x%x -> 0x%x\n",
|
|
|
b266fc5 |
al, NR_EXCEPTION_HANDLER+8);
|
|
|
b266fc5 |
+ rm_irqbase[1] = al;
|
|
|
b266fc5 |
al = NR_EXCEPTION_HANDLER+8;
|
|
|
b266fc5 |
}
|
|
|
b266fc5 |
break;
|
|
|
b266fc5 |
diff -r 345ae2e61ba0 -r 656b8175f4f2 tools/firmware/vmxassist/vm86.h
|
|
|
b266fc5 |
--- a/tools/firmware/vmxassist/vm86.h Thu Jun 07 20:02:27 2007 +0100
|
|
|
b266fc5 |
+++ b/tools/firmware/vmxassist/vm86.h Fri Jun 08 11:19:55 2007 +0100
|
|
|
b266fc5 |
@@ -25,10 +25,6 @@
|
|
|
b266fc5 |
#endif
|
|
|
b266fc5 |
|
|
|
b266fc5 |
#include <xen/hvm/vmx_assist.h>
|
|
|
b266fc5 |
-
|
|
|
b266fc5 |
-#define NR_EXCEPTION_HANDLER 32
|
|
|
b266fc5 |
-#define NR_INTERRUPT_HANDLERS 16
|
|
|
b266fc5 |
-#define NR_TRAPS (NR_EXCEPTION_HANDLER+NR_INTERRUPT_HANDLERS)
|
|
|
b266fc5 |
|
|
|
b266fc5 |
#ifndef __ASSEMBLY__
|
|
|
b266fc5 |
|
|
|
b266fc5 |
diff -r 345ae2e61ba0 -r 656b8175f4f2 xen/include/public/hvm/vmx_assist.h
|
|
|
b266fc5 |
--- a/xen/include/public/hvm/vmx_assist.h Thu Jun 07 20:02:27 2007 +0100
|
|
|
b266fc5 |
+++ b/xen/include/public/hvm/vmx_assist.h Fri Jun 08 11:19:55 2007 +0100
|
|
|
b266fc5 |
@@ -34,6 +34,10 @@
|
|
|
b266fc5 |
#define VMXASSIST_OLD_CONTEXT (VMXASSIST_NEW_CONTEXT + 4)
|
|
|
b266fc5 |
|
|
|
b266fc5 |
#ifndef __ASSEMBLY__
|
|
|
b266fc5 |
+
|
|
|
b266fc5 |
+#define NR_EXCEPTION_HANDLER 32
|
|
|
b266fc5 |
+#define NR_INTERRUPT_HANDLERS 16
|
|
|
b266fc5 |
+#define NR_TRAPS (NR_EXCEPTION_HANDLER+NR_INTERRUPT_HANDLERS)
|
|
|
b266fc5 |
|
|
|
b266fc5 |
union vmcs_arbytes {
|
|
|
b266fc5 |
struct arbyte_fields {
|
|
|
b266fc5 |
@@ -98,6 +102,8 @@ struct vmx_assist_context {
|
|
|
b266fc5 |
uint32_t ldtr_limit;
|
|
|
b266fc5 |
uint32_t ldtr_base;
|
|
|
b266fc5 |
union vmcs_arbytes ldtr_arbytes;
|
|
|
b266fc5 |
+
|
|
|
b266fc5 |
+ unsigned char rm_irqbase[2];
|
|
|
b266fc5 |
};
|
|
|
b266fc5 |
typedef struct vmx_assist_context vmx_assist_context_t;
|
|
|
b266fc5 |
|
|
|
b266fc5 |
|