From: Hollis Blanchard Subject: [patch] make evtchn_upcall_pending arch-specific type Date: Thu, 30 Mar 2006 13:13:43 -0600 Message-ID: <200603301313.44384.hollisb@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: xen-ppc-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 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;