rpms/xen/devel xen-vmxassist-irqs.patch, NONE, 1.1 xen.spec, 1.185, 1.186

Daniel P. Berrange (berrange) fedora-extras-commits at redhat.com
Mon Sep 24 21:56:24 UTC 2007


Author: berrange

Update of /cvs/pkgs/rpms/xen/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16823

Modified Files:
	xen.spec 
Added Files:
	xen-vmxassist-irqs.patch 
Log Message:
Added dep on xen-hypervisor-abi=3.1. Fix vmxassist bug
> Resolves: rhbz #247122

xen-vmxassist-irqs.patch:

--- NEW FILE xen-vmxassist-irqs.patch ---
changeset:   15239:656b8175f4f2
user:        kfraser at localhost.localdomain
date:        Fri Jun 08 11:19:55 2007 +0100
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
description:
hvm: Respect irqbase set by protected mode in mode switching with VMXAssist.

RHEL4U4 PAE SMP guest currently crashes, and we found changeset 15214
introduced it. This patch fixes it.

Signed-off-by: Xin Li <xin.b.li at intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui at intel.com>


diff -r 345ae2e61ba0 -r 656b8175f4f2 tools/firmware/vmxassist/vm86.c
--- a/tools/firmware/vmxassist/vm86.c	Thu Jun 07 20:02:27 2007 +0100
+++ b/tools/firmware/vmxassist/vm86.c	Fri Jun 08 11:19:55 2007 +0100
@@ -927,6 +927,7 @@ load_or_clear_seg(unsigned long sel, uin
 		load_seg(0, base, limit, arbytes);
 }
 
+static unsigned char rm_irqbase[2];
 
 /*
  * Transition to protected mode
@@ -935,6 +936,9 @@ protected_mode(struct regs *regs)
 protected_mode(struct regs *regs)
 {
 	extern char stack_top[];
+
+	oldctx.rm_irqbase[0] = rm_irqbase[0];
+	oldctx.rm_irqbase[1] = rm_irqbase[1];
 
 	regs->eflags &= ~(EFLAGS_TF|EFLAGS_VM);
 
@@ -1187,6 +1191,7 @@ outbyte(struct regs *regs, unsigned pref
 			icw2[0] = 0;
 			printf("Remapping master: ICW2 0x%x -> 0x%x\n",
 				al, NR_EXCEPTION_HANDLER);
+			rm_irqbase[0] = al;
 			al = NR_EXCEPTION_HANDLER;
 		}
 		break;
@@ -1200,6 +1205,7 @@ outbyte(struct regs *regs, unsigned pref
 			icw2[1] = 0;
 			printf("Remapping slave: ICW2 0x%x -> 0x%x\n",
 				al, NR_EXCEPTION_HANDLER+8);
+			rm_irqbase[1] = al;
 			al = NR_EXCEPTION_HANDLER+8;
 		}
 		break;
diff -r 345ae2e61ba0 -r 656b8175f4f2 tools/firmware/vmxassist/vm86.h
--- a/tools/firmware/vmxassist/vm86.h	Thu Jun 07 20:02:27 2007 +0100
+++ b/tools/firmware/vmxassist/vm86.h	Fri Jun 08 11:19:55 2007 +0100
@@ -25,10 +25,6 @@
 #endif
 
 #include <xen/hvm/vmx_assist.h>
-
-#define	NR_EXCEPTION_HANDLER	32
-#define	NR_INTERRUPT_HANDLERS	16
-#define	NR_TRAPS		(NR_EXCEPTION_HANDLER+NR_INTERRUPT_HANDLERS)
 
 #ifndef __ASSEMBLY__
 
diff -r 345ae2e61ba0 -r 656b8175f4f2 xen/include/public/hvm/vmx_assist.h
--- a/xen/include/public/hvm/vmx_assist.h	Thu Jun 07 20:02:27 2007 +0100
+++ b/xen/include/public/hvm/vmx_assist.h	Fri Jun 08 11:19:55 2007 +0100
@@ -34,6 +34,10 @@
 #define VMXASSIST_OLD_CONTEXT (VMXASSIST_NEW_CONTEXT + 4)
 
 #ifndef __ASSEMBLY__
+
+#define NR_EXCEPTION_HANDLER    32
+#define NR_INTERRUPT_HANDLERS   16
+#define NR_TRAPS        (NR_EXCEPTION_HANDLER+NR_INTERRUPT_HANDLERS)
 
 union vmcs_arbytes {
     struct arbyte_fields {
@@ -98,6 +102,8 @@ struct vmx_assist_context {
     uint32_t  ldtr_limit;
     uint32_t  ldtr_base;
     union vmcs_arbytes ldtr_arbytes;
+
+    unsigned char rm_irqbase[2];
 };
 typedef struct vmx_assist_context vmx_assist_context_t;
 



Index: xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xen/devel/xen.spec,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -r1.185 -r1.186
--- xen.spec	24 Sep 2007 20:51:43 -0000	1.185
+++ xen.spec	24 Sep 2007 21:55:52 -0000	1.186
@@ -28,6 +28,7 @@
 Patch30: xen-3.1.0-dev-native-protocol.patch
 Patch31: xen-tpm-functions.patch
 Patch32: xen-clobber-vif-type.patch
+Patch33: xen-vmxassist-irqs.patch
 
 # Patches to modify the default config of xend
 Patch100: xen-config-dom0-minmem.patch
@@ -70,6 +71,9 @@
 Requires: udev >= 059
 Requires: python-virtinst
 Requires: xen-libs = %{version}-%{release}
+# Ensure we at least have a suitable kernel installed, though we can't
+# force user to actually boot it.
+Requires: xen-hypervisor-abi = 3.1
 # Not strictly a dependency, but kpartx is by far the most useful tool right
 # now for accessing domU data from within a dom0 so bring it in when the user
 # installs xen.
@@ -126,6 +130,7 @@
 
 %patch31 -p1
 %patch32 -p1
+%patch33 -p1
 
 # config patches
 %patch100 -p1




More information about the fedora-extras-commits mailing list