rpms/kernel-xen-2.6/devel xen-vpic-irqbase-mode.patch, NONE, 1.1 kernel-xen.spec, 1.54, 1.55
Eduardo Habkost (ehabkost)
fedora-extras-commits at redhat.com
Thu Sep 13 19:34:53 UTC 2007
- Previous message (by thread): rpms/kernel-xen-2.6/devel kernel-xen.spec, 1.53, 1.54 xen-compile-fix.patch, 1.2, 1.3 xen-version-strings.patch, 1.3, 1.4
- Next message (by thread): rpms/csound/OLPC-2 csound-5.07.0-version-libcsnd.patch, NONE, 1.1 csound.spec, 1.15, 1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ehabkost
Update of /cvs/pkgs/rpms/kernel-xen-2.6/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26992
Modified Files:
kernel-xen.spec
Added Files:
xen-vpic-irqbase-mode.patch
Log Message:
Fix for bug #248398: HVM domain hangs during (F-7) install.
Backport of fix from xen-unstable: 15239:656b8175f4f2.
xen-vpic-irqbase-mode.patch:
--- NEW FILE xen-vpic-irqbase-mode.patch ---
# HG changeset patch
# User kfraser at localhost.localdomain
# Node ID 656b8175f4f24b5bb3a761e62c496075510914ed
# Parent 345ae2e61ba0130cf4913fee13b378c4e21d24e7
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>
xen-unstable changeset: 15239:656b8175f4f24b5bb3a761e62c496075510914ed
xen-unstable date: Fri Jun 08 11:19:55 2007 +0100
Index: xen-3.1-testing-32/xen/arch/x86/hvm/vmx/vmx.c
===================================================================
--- xen-3.1-testing-32.orig/xen/arch/x86/hvm/vmx/vmx.c
+++ xen-3.1-testing-32/xen/arch/x86/hvm/vmx/vmx.c
@@ -1878,8 +1878,8 @@ enum { VMX_ASSIST_INVOKE = 0, VMX_ASSIST
static int vmx_assist(struct vcpu *v, int mode)
{
struct vmx_assist_context c;
- u32 magic;
- u32 cp;
+ struct hvm_hw_vpic *vpic = v->domain->arch.hvm_domain.vpic;
+ u32 magic, cp;
/* make sure vmxassist exists (this is not an error) */
if (hvm_copy_from_guest_phys(&magic, VMXASSIST_MAGIC_OFFSET,
@@ -1913,6 +1913,10 @@ static int vmx_assist(struct vcpu *v, in
goto error;
if ( vmx_world_restore(v, &c) != 0 )
goto error;
+ v->arch.hvm_vmx.pm_irqbase[0] = vpic[0].irq_base;
+ v->arch.hvm_vmx.pm_irqbase[1] = vpic[1].irq_base;
+ vpic[0].irq_base = NR_EXCEPTION_HANDLER;
+ vpic[1].irq_base = NR_EXCEPTION_HANDLER + 8;
v->arch.hvm_vmx.vmxassist_enabled = 1;
return 1;
}
@@ -1931,6 +1935,13 @@ static int vmx_assist(struct vcpu *v, in
goto error;
if ( vmx_world_restore(v, &c) != 0 )
goto error;
+ if ( v->arch.hvm_vmx.irqbase_mode ) {
+ vpic[0].irq_base = c.rm_irqbase[0] & 0xf8;
+ vpic[1].irq_base = c.rm_irqbase[1] & 0xf8;
+ } else {
+ vpic[0].irq_base = v->arch.hvm_vmx.pm_irqbase[0];
+ vpic[1].irq_base = v->arch.hvm_vmx.pm_irqbase[1];
+ }
v->arch.hvm_vmx.vmxassist_enabled = 0;
return 1;
}
Index: xen-3.1-testing-32/xen/arch/x86/hvm/vpic.c
===================================================================
--- xen-3.1-testing-32.orig/xen/arch/x86/hvm/vpic.c
+++ xen-3.1-testing-32/xen/arch/x86/hvm/vpic.c
@@ -174,7 +174,8 @@ static int vpic_intack(struct hvm_hw_vpi
return irq;
}
-static void vpic_ioport_write(struct hvm_hw_vpic *vpic, uint32_t addr, uint32_t val)
+static void vpic_ioport_write(
+ struct hvm_hw_vpic *vpic, uint32_t addr, uint32_t val)
{
int priority, cmd, irq;
uint8_t mask;
@@ -265,6 +266,11 @@ static void vpic_ioport_write(struct hvm
vpic->imr = val;
break;
case 1:
+#if 1 /* Delete me when vmxassist is retired. */
+ /* Which mode is irqbase programmed in? */
+ current->arch.hvm_vmx.irqbase_mode =
+ current->arch.hvm_vmx.vmxassist_enabled;
+#endif
/* ICW2 */
vpic->irq_base = val & 0xf8;
vpic->init_state++;
Index: xen-3.1-testing-32/xen/include/asm-x86/hvm/vmx/vmcs.h
===================================================================
--- xen-3.1-testing-32.orig/xen/include/asm-x86/hvm/vmx/vmcs.h
+++ xen-3.1-testing-32/xen/include/asm-x86/hvm/vmx/vmcs.h
@@ -77,7 +77,11 @@ struct arch_vmx_struct {
unsigned long cpu_cr2; /* save CR2 */
unsigned long cpu_cr3;
struct vmx_msr_state msr_state;
+
+ /* Following fields are all specific to vmxassist. */
unsigned long vmxassist_enabled:1;
+ unsigned long irqbase_mode:1;
+ unsigned char pm_irqbase[2];
};
struct vmcs_struct *vmx_alloc_host_vmcs(void);
Index: xen-3.1-testing-32/xen/include/public/hvm/vmx_assist.h
===================================================================
--- xen-3.1-testing-32.orig/xen/include/public/hvm/vmx_assist.h
+++ xen-3.1-testing-32/xen/include/public/hvm/vmx_assist.h
@@ -35,6 +35,10 @@
#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 {
unsigned int seg_type : 4,
@@ -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: kernel-xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/kernel-xen.spec,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- kernel-xen.spec 13 Sep 2007 19:20:29 -0000 1.54
+++ kernel-xen.spec 13 Sep 2007 19:34:21 -0000 1.55
@@ -633,6 +633,9 @@
Patch20000: xen-compile-fix.patch
Patch20001: xen-version-strings.patch
+# Fix graphical boot (e.g. F7 DVD booting) under Full Virtualization
+Patch20002: xen-vpic-irqbase-mode.patch
+
# END OF PATCH DEFINITIONS
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root-%{_target_cpu}
@@ -1442,6 +1445,7 @@
# Any necessary hypervisor patches go here
%patch20000 -p1
%patch20001 -p1
+%patch20002 -p1
cd xen/
# Update the Makefile version strings
@@ -2365,6 +2369,10 @@
%changelog
* Thu Sep 13 2007 Eduardo Habkost <ehabkost at redhat.com>
+- Fix for bug #248398: HVM domain hangs during (F-7) install.
+ Backported fix from xen-unstable: 15239:656b8175f4f2
+
+* Thu Sep 13 2007 Eduardo Habkost <ehabkost at redhat.com>
- Make hypervisor patches relative to the xen HG tree, not only the
hypervisor subdirectory. This makes easier to import patches from
upstream.
- Previous message (by thread): rpms/kernel-xen-2.6/devel kernel-xen.spec, 1.53, 1.54 xen-compile-fix.patch, 1.2, 1.3 xen-version-strings.patch, 1.3, 1.4
- Next message (by thread): rpms/csound/OLPC-2 csound-5.07.0-version-libcsnd.patch, NONE, 1.1 csound.spec, 1.15, 1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list