From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Ofsthun Subject: Re: Windows SMP Date: Tue, 06 Jan 2009 16:20:29 -0500 Message-ID: <4963CB1D.60501@virtualiron.com> References: <069e01c96b55$3c834d80$b589e880$@com> <4962588D.7080204@virtualiron.com> <03d101c96f68$eec4da10$cc4e8e30$@com> <496267EF.5070508@virtualiron.com> <03e901c96f72$3029a400$907cec00$@com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090603040900090906060401" Return-path: In-Reply-To: <03e901c96f72$3029a400$907cec00$@com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Venefax Cc: xen-devel@lists.xensource.com, 'Andrew Lyon' , 'Dirk Utterback' , 'Keir Fraser' , 'James Harper' List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------090603040900090906060401 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Venefax wrote: > Dear Gentlemen > One silly question, maybe, how do I apply the patch supplied in SLES SP2? I have not compiled anything from sources. > Federico I believe the proper sequence is: download the SLES10 SDK iso from you Novell support account: SLE-10-SP2-SDK-DVD-x86_64-GM-DVD1.iso Add this ISO as a yast installation source. install the xen-3.2.0_16718_14-0.4.src.rpm rpm via yast or: # rpm -i xen-3.2.0_16718_14-0.4.src.rpm Note that this is the .src.rpm not the binary rpm. Prep the source tree using: # rpmbuild -bc /usr/src/packages/SPECS/xen.spec This should build, patch and compile the package. If it fails due to dependencies, add the missing RPMs using yast. Once it succeeds, apply the attached patch (I attached the wrong one previously): # cd /usr/src/packages/BUILD/xen-3.2-testing # patch -p0 < ~/xen-vioapic-callback-routing.patch Build the hypervisor: # cd /usr/src/packages/BUILD/xen-3.2-testing # make xen try out the resulting xen/xen.gz manually. Steve --------------090603040900090906060401 Content-Type: text/x-patch; name="xen-vioapic-callback-routing.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-vioapic-callback-routing.patch" --- xen/arch/x86/hvm/vioapic.c.orig 2008-01-16 15:19:06.000000000 -0500 +++ xen/arch/x86/hvm/vioapic.c 2009-01-06 16:00:10.000000000 -0500 @@ -44,6 +44,7 @@ #define IRQ0_SPECIAL_ROUTING 1 static void vioapic_deliver(struct hvm_hw_vioapic *vioapic, int irq); +static int is_hvm_callback_irq(struct hvm_hw_vioapic *vioapic,int irq); static unsigned long vioapic_read_indirect(struct hvm_hw_vioapic *vioapic, unsigned long addr, @@ -334,7 +335,8 @@ { #ifdef IRQ0_SPECIAL_ROUTING /* Force round-robin to pick VCPU 0 */ - if ( (irq == hvm_isa_irq_to_gsi(0)) && pit_channel0_enabled() ) + if ( ((irq == hvm_isa_irq_to_gsi(0)) && pit_channel0_enabled()) || + is_hvm_callback_irq(vioapic, irq) ) { v = vioapic_domain(vioapic)->vcpu[0]; target = v ? vcpu_vlapic(v) : NULL; @@ -366,7 +368,8 @@ deliver_bitmask &= ~(1 << bit); #ifdef IRQ0_SPECIAL_ROUTING /* Do not deliver timer interrupts to VCPU != 0 */ - if ( (irq == hvm_isa_irq_to_gsi(0)) && pit_channel0_enabled() ) + if ( ((irq == hvm_isa_irq_to_gsi(0)) && pit_channel0_enabled()) || + is_hvm_callback_irq(vioapic, irq) ) v = vioapic_domain(vioapic)->vcpu[0]; else #endif @@ -544,3 +547,29 @@ xfree(d->arch.hvm_domain.vioapic); d->arch.hvm_domain.vioapic = NULL; } + +static int is_hvm_callback_irq(struct hvm_hw_vioapic *vioapic,int irq) +{ + unsigned int gsi = VIOAPIC_NUM_PINS; + struct domain *d = vioapic_domain(vioapic); + struct hvm_irq *hvm_irq = &d->arch.hvm_domain.irq; + + + switch ( hvm_irq->callback_via_type ) + { + case HVMIRQ_callback_gsi: + gsi = hvm_irq->callback_via.gsi; + break; + case HVMIRQ_callback_pci_intx: + gsi = hvm_pci_intx_gsi(hvm_irq->callback_via.pci.dev, + hvm_irq->callback_via.pci.intx); + break; + default: + break; + } + + if (gsi == irq) /*Event Channel Interrupt*/ + return(1); + + return(0); +} --------------090603040900090906060401 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------090603040900090906060401--