[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [HVM] Add broadcast destination for physical destination mode in



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 21dc71840bc0b5fab570c7125a857e5d55e10d01
# Parent  1ece34466781ec55f41fd29d53f6dafd208ba2fa
[HVM] Add broadcast destination for physical destination mode in
VLAPIC.
Based on a patch from Xiaohui Xin <xiaohui.xin@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vioapic.c |   32 +++++++++++++++++++++++---------
 1 files changed, 23 insertions(+), 9 deletions(-)

diff -r 1ece34466781 -r 21dc71840bc0 xen/arch/x86/hvm/vioapic.c
--- a/xen/arch/x86/hvm/vioapic.c        Wed Sep 13 14:05:33 2006 +0100
+++ b/xen/arch/x86/hvm/vioapic.c        Wed Sep 13 14:12:28 2006 +0100
@@ -362,21 +362,35 @@ static uint32_t ioapic_get_delivery_bitm
 
     ASSERT(s);
 
-    if (dest_mode == 0) { /* Physical mode */
-        for (i = 0; i < s->lapic_count; i++) {
-            if (VLAPIC_ID(s->lapic_info[i]) == dest) {
+    if ( dest_mode == 0 )
+    {
+        /* Physical mode. */
+        for ( i = 0; i < s->lapic_count; i++ )
+        {
+            if ( VLAPIC_ID(s->lapic_info[i]) == dest )
+            {
                 mask = 1 << i;
                 break;
             }
         }
-    } else {
-        /* logical destination. call match_logical_addr for each APIC. */
-        if (dest != 0) {
-            for (i=0; i< s->lapic_count; i++) {
+
+        /* Broadcast. */
+        if ( dest == 0xFF )
+        {
+            for ( i = 0; i < s->lapic_count; i++ )
+                mask |= ( 1 << i );
+        }
+    }
+    else
+    {
+        /* Logical destination. Call match_logical_addr for each APIC. */
+        if ( dest != 0 )
+        {
+            for ( i = 0; i < s->lapic_count; i++ )
+            {
                 if ( s->lapic_info[i] &&
-                     ioapic_match_logical_addr(s, i, dest) ) {
+                     ioapic_match_logical_addr(s, i, dest) )
                     mask |= (1<<i);
-                }
             }
         }
     }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.