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

[Xen-devel] [patch] make evtchn_upcall_pending arch-specific type

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] make evtchn_upcall_pending arch-specific type
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Thu, 30 Mar 2006 13:13:43 -0600
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 30 Mar 2006 19:16:36 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.8.3
evtchn_upcall_pending is another variable that bitops are used on, so PowerPC 
wants it to be a long. Unfortunately, it's also part of the guest/hypervisor 
interface, so we can't change it for architectures with existing guests.

Compile-tested on x86(-32). Please apply.

-- 
Hollis Blanchard
IBM Linux Technology Center

Have each architecture specify the type of vcpu_info->evtchn_upcall_pending.

Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

diff -r d102a30417a7 xen/common/keyhandler.c
--- a/xen/common/keyhandler.c   Wed Mar 29 16:50:59 2006 +0100
+++ b/xen/common/keyhandler.c   Thu Mar 30 13:07:56 2006 -0600
@@ -144,11 +144,11 @@ static void dump_domains(unsigned char k
                d->domain_id);
         for_each_vcpu ( d, v ) {
             printk("    VCPU%d: CPU%d [has=%c] flags=%lx "
-                   "upcall_pend = %02x, upcall_mask = %02x ",
+                   "upcall_pend = %02lx, upcall_mask = %02x ",
                    v->vcpu_id, v->processor,
                    test_bit(_VCPUF_running, &v->vcpu_flags) ? 'T':'F',
                    v->vcpu_flags,
-                   v->vcpu_info->evtchn_upcall_pending, 
+                   (ulong)v->vcpu_info->evtchn_upcall_pending, 
                    v->vcpu_info->evtchn_upcall_mask);
             cpuset_print(cpuset, sizeof(cpuset), v->vcpu_dirty_cpumask);
             printk("dirty_cpus=%s ", cpuset);
diff -r d102a30417a7 xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h    Wed Mar 29 16:50:59 2006 +0100
+++ b/xen/include/public/arch-ia64.h    Thu Mar 30 13:07:56 2006 -0600
@@ -322,6 +322,8 @@ typedef struct vcpu_guest_context {
 } vcpu_guest_context_t;
 DEFINE_GUEST_HANDLE(vcpu_guest_context_t);
 
+typedef uint8_t pending_upcall_t;
+
 #endif /* !__ASSEMBLY__ */
 
 #endif /* __HYPERVISOR_IF_IA64_H__ */
diff -r d102a30417a7 xen/include/public/arch-x86_32.h
--- a/xen/include/public/arch-x86_32.h  Wed Mar 29 16:50:59 2006 +0100
+++ b/xen/include/public/arch-x86_32.h  Thu Mar 30 13:07:56 2006 -0600
@@ -168,6 +168,8 @@ typedef struct {
     unsigned long pad[5]; /* sizeof(vcpu_info_t) == 64 */
 } arch_vcpu_info_t;
 
+typedef uint8_t pending_upcall_t;
+
 #endif /* !__ASSEMBLY__ */
 
 /*
diff -r d102a30417a7 xen/include/public/arch-x86_64.h
--- a/xen/include/public/arch-x86_64.h  Wed Mar 29 16:50:59 2006 +0100
+++ b/xen/include/public/arch-x86_64.h  Thu Mar 30 13:07:56 2006 -0600
@@ -244,6 +244,8 @@ typedef struct {
     unsigned long pad; /* sizeof(vcpu_info_t) == 64 */
 } arch_vcpu_info_t;
 
+typedef uint8_t pending_upcall_t;
+
 #endif /* !__ASSEMBLY__ */
 
 /*
diff -r d102a30417a7 xen/include/public/xen.h
--- a/xen/include/public/xen.h  Wed Mar 29 16:50:59 2006 +0100
+++ b/xen/include/public/xen.h  Thu Mar 30 13:07:56 2006 -0600
@@ -312,7 +312,7 @@ typedef struct vcpu_info {
      * an upcall activation. The mask is cleared when the VCPU requests
      * to block: this avoids wakeup-waiting races.
      */
-    uint8_t evtchn_upcall_pending;
+    pending_upcall_t evtchn_upcall_pending;
     uint8_t evtchn_upcall_mask;
     unsigned long evtchn_pending_sel;
     arch_vcpu_info_t arch;

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

<Prev in Thread] Current Thread [Next in Thread>