WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Windows SMP

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


--- 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);
+}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel