Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 195201 Details for
Bug 248398
fully virtualized hvm domain hangs during install
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix for the bug
xen-vpic-irqbase-mode.patch (text/plain), 6.13 KB, created by
Eduardo Habkost
on 2007-09-13 20:11:01 UTC
(
hide
)
Description:
Fix for the bug
Filename:
MIME Type:
Creator:
Eduardo Habkost
Created:
2007-09-13 20:11:01 UTC
Size:
6.13 KB
patch
obsolete
># HG changeset patch ># User kfraser@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@intel.com> >Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> >xen-unstable changeset: 15239:656b8175f4f24b5bb3a761e62c496075510914ed >xen-unstable date: Fri Jun 08 11:19:55 2007 +0100 > >Index: xen-3.1-testing-32/tools/firmware/vmxassist/vm86.c >=================================================================== >--- xen-3.1-testing-32.orig/tools/firmware/vmxassist/vm86.c >+++ xen-3.1-testing-32/tools/firmware/vmxassist/vm86.c >@@ -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 >@@ -936,6 +937,9 @@ 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); > > oldctx.eip = regs->eip; >@@ -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; >Index: xen-3.1-testing-32/tools/firmware/vmxassist/vm86.h >=================================================================== >--- xen-3.1-testing-32.orig/tools/firmware/vmxassist/vm86.h >+++ xen-3.1-testing-32/tools/firmware/vmxassist/vm86.h >@@ -26,10 +26,6 @@ > > #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__ > > struct regs { >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; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 248398
:
159348
| 195201